/* Product Detail Page Styles */

/* Product Images */
.product-images .main-image {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-images .main-image img {
    transition: transform 0.3s ease;
}

.product-images .main-image:hover img {
    transform: scale(1.05);
}

.thumbnail-images {
    scrollbar-width: thin;
    scrollbar-color: #ec4899 #f3f4f6;
}

.thumbnail-images::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-images::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.thumbnail-images::-webkit-scrollbar-thumb {
    background: #ec4899;
    border-radius: 3px;
}

.thumbnail-images img {
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail-images img:hover {
    transform: scale(1.1);
}

.thumbnail-active {
    border-color: #ec4899 !important;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

/* Product Info */
.product-info h1 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

.price-section {
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.quantity-selector {
    background: white;
    transition: all 0.3s ease;
}

.quantity-selector:focus-within {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.quantity-selector button {
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.quantity-selector button:hover {
    background-color: #fdf2f8;
    color: #ec4899;
}

.quantity-selector input {
    font-weight: 500;
}

/* Product Actions */
.product-actions button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-actions button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.product-actions button:hover:before {
    left: 100%;
}

/* Product Tabs */
.product-tabs {
    margin-top: 3rem;
}

.tab-button {
    transition: all 0.3s ease;
    position: relative;
}

.tab-button.active {
    color: #ec4899;
    border-color: #ec4899;
}

.tab-button:hover {
    color: #ec4899;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reviews */
.reviews-section .review-item {
    transition: all 0.3s ease;
    padding: 1.5rem;
    border-radius: 0.5rem;
    background: #fafafa;
    margin-bottom: 1rem;
}

.reviews-section .review-item:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    transition: all 0.2s ease;
}

.rating-stars i:hover {
    transform: scale(1.2);
}

/* Stock Status */
.stock-status {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Image Modal */
#imageModal {
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

#imageModal.show {
    display: flex;
}

#modalImage {
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

/* Breadcrumb */
.breadcrumb {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.breadcrumb a {
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    color: #ec4899;
    text-decoration: underline;
}

/* Related Products */
.related-products {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

.related-products h2 {
    position: relative;
    padding-bottom: 0.5rem;
}

.related-products h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ec4899, #f472b6);
    border-radius: 2px;
}

/* Product Meta */
.product-meta {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid #ec4899;
}

.product-meta div {
    padding: 0.25rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-images .main-image {
        height: 300px;
    }
    
    .thumbnail-images {
        justify-content: center;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions > div {
        width: 100%;
    }
    
    .quantity-selector {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .tab-button {
        font-size: 0.875rem;
        padding: 0.5rem;
    }
}

@media (max-width: 640px) {
    .product-images .main-image {
        height: 250px;
    }
    
    .thumbnail-images img {
        width: 60px;
        height: 60px;
    }
    
    .price-section {
        text-align: center;
    }
    
    .product-meta {
        font-size: 0.875rem;
    }
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Focus States */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #ec4899;
    outline-offset: 2px;
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Text Selection */
::selection {
    background-color: #ec4899;
    color: white;
}

::-moz-selection {
    background-color: #ec4899;
    color: white;
}

/* Product Detail Page - Product Actions */
.product-detail .product-actions {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    background: transparent !important;
    padding: 0 !important;
    z-index: auto !important;
    display: block !important;
}

.product-detail .product-actions .flex {
    display: flex !important;
}

.product-detail .product-actions .space-y-4 > * + * {
    margin-top: 1rem !important;
}