/* Product Detail Page Styles */

/* Product Gallery Layout */
.product-gallery {
    max-width: 100%;
}

/* Desktop Thumbnail Container */
.thumbnail-container {
    display: flex;
    flex-direction: column;
    height: 600px;
    align-items: center;
}

.thumbnail-scroll-wrapper {
    flex: 1;
    overflow: hidden;
    width: 100%;
    position: relative;
    max-height: 500px;
}

.thumbnail-scroll-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease;
    padding: 8px 4px;
}

.desktop-thumbnail-item {
    width: 100%;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.desktop-thumbnail-item:hover {
    border-color: var(--pink-primary);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}

.desktop-thumbnail-item.active {
    border-color: var(--pink-primary);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.desktop-thumbnail-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* Thumbnail Navigation Buttons */
.thumbnail-nav-btn {
    width: 100%;
    height: 36px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.thumbnail-nav-btn:hover:not(:disabled) {
    background: var(--pink-light);
    border-color: var(--pink-primary);
    color: var(--pink-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(236, 72, 153, 0.2);
}

.thumbnail-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #f9fafb;
}

/* Main Product Image */
.main-product-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.main-product-image:hover {
    transform: scale(1.02);
}

.main-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

/* Mobile Gallery */
.mobile-gallery {
    width: 100%;
}

.mobile-thumbnail-container {
    width: 100%;
    overflow: hidden;
}

.mobile-thumbnail-scroll {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.mobile-thumbnail-scroll::-webkit-scrollbar {
    height: 4px;
}

.mobile-thumbnail-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.mobile-thumbnail-scroll::-webkit-scrollbar-thumb {
    background: var(--pink-primary);
    border-radius: 2px;
}

.mobile-thumbnail {
    width: 70px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.mobile-thumbnail:hover,
.mobile-thumbnail.active {
    border-color: var(--pink-primary);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    transform: scale(1.05);
}

/* Product Info */
.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.rating {
    display: flex;
    align-items: center;
}

/* Price Section */
.price-section {
    background: linear-gradient(135deg, var(--pink-light) 0%, var(--purple-light) 100%);
    padding: 1.5rem;
    border-radius: 12px;
}

.original-price {
    font-size: 1.1rem;
    color: #6b7280;
    text-decoration: line-through;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pink-primary);
}

.discount-badge {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
}

.color-option:hover,
.color-option.active {
    border-color: var(--pink-primary);
    transform: scale(1.1);
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

/* Size Options */
.size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-option {
    width: 48px;
    height: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
}

.size-option:hover,
.size-option.active {
    border-color: var(--pink-primary);
    background: var(--pink-primary);
    color: white;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    max-width: 150px;
}

.quantity-selector .form-control {
    border-left: none;
    border-right: none;
    border-radius: 0;
    text-align: center;
    font-weight: 600;
}

.quantity-selector .btn {
    border-radius: 0;
    width: 40px;
    height: 38px;
}

.quantity-selector .btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.quantity-selector .btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Action Buttons */
.action-buttons .btn {
    padding: 12px 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-pink {
    background: var(--pink-primary);
    border-color: var(--pink-primary);
    color: white;
}

.btn-pink:hover {
    background: #d946ef;
    border-color: #d946ef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.btn-outline-pink {
    color: var(--pink-primary);
    border-color: var(--pink-primary);
}

.btn-outline-pink:hover {
    background: var(--pink-primary);
    border-color: var(--pink-primary);
    color: white;
    transform: translateY(-2px);
}

/* Product Features */
.product-features {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.feature-item i {
    font-size: 1.1rem;
}

/* Product Details Tabs */
.product-details-tabs .nav-pills .nav-link {
    color: #6b7280;
    background: transparent;
    border-radius: 25px;
    font-weight: 500;
    padding: 10px 20px;
    margin: 0 4px;
}

.product-details-tabs .nav-pills .nav-link.active {
    background: var(--pink-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* Description Content */
.description-content {
    line-height: 1.7;
}

.description-content h5 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.description-content p {
    color: #4b5563;
    margin-bottom: 1.5rem;
}

/* Reviews */
.review-summary {
    border: 1px solid #e5e7eb;
}

.overall-rating {
    text-align: center;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--pink-primary);
    line-height: 1;
}

.rating-breakdown .progress {
    background-color: #f3f4f6;
}

.review-item {
    padding: 1.5rem 0;
}

.review-images img {
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* Shipping Options */
.shipping-option {
    transition: all 0.3s ease;
}

.shipping-option:hover {
    border-color: var(--pink-primary) !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.1);
}

/* Related Products */
.product-card {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-img {
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #d1d5db;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .main-product-image {
        height: 400px;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.75rem;
    }
    
    .color-option {
        width: 35px;
        height: 35px;
    }
    
    .size-option {
        width: 42px;
        height: 42px;
    }
    
    .action-buttons .btn {
        padding: 10px 12px;
        font-size: 0.875rem;
    }
    
    .product-details-tabs .nav-pills .nav-link {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--pink-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d946ef;
}

/* Search Modal Styles */
.cursor-pointer {
    cursor: pointer;
}

.popular-search:hover {
    background-color: var(--pink-primary) !important;
    color: white !important;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Modal Backdrop Fix */
.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1050;
}

/* Ensure modal closes properly */
.modal.fade.show {
    display: block !important;
}

.modal.fade:not(.show) {
    display: none !important;
}

/* Force remove backdrop when modal is hidden */
body:not(.modal-open) .modal-backdrop {
    display: none !important;
}