/* Product Page Styles */
.product-page {
    padding: 0;
    background-color: #ffffff;
    font-family: 'Inter', sans-serif;
    width: 100%;
}

/* Global text alignment override */
.product-page * {
    text-align: left !important;
}

.product-page .text-center {
    text-align: center !important;
}

/* Container */
.container {
    max-width: 100%;
    margin: 0;
    padding: 0 30px;
    width: 100%;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -15px;
}

.col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 15px;
}

/* Product Main Section */
.product-main-section {
    padding: 40px 0;
    background-color: #ffffff;
}

/* Product Images Section */
.product-images {
    position: sticky;
    top: 20px;
}

/* Images Layout Container */
.images-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.main-image-viewer {
    flex: 1;
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 800px;
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px !important;
}

.image-zoom-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.main-image-container:hover .image-zoom-overlay {
    opacity: 1;
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    overflow: hidden;
    flex: 0 0 100px;
    max-height: 500px;
}

.thumbnail-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 0 5px 0 0;
    height: 500px;
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #f1f1f1;
}

.thumbnail-wrapper::-webkit-scrollbar {
    width: 6px;
}

.thumbnail-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.thumbnail-wrapper::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 3px;
}

.thumbnail-item {
    width: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-item.active {
    border-color: #d4af37;
    transform: scale(1.05);
}

.thumbnail-item:hover {
    border-color: #d4af37;
    opacity: 0.8;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Information */
.product-info {
    padding: 20px 0;
    text-align: left;
    padding-top: 0px;
}

.product-info * {
    text-align: left !important;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
    text-align: left !important;
}

.product-sku {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.sku-label {
    font-weight: 600;
    margin-right: 8px;
}

.sku-value {
    background-color: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* Product Price */
.product-price {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.current-price,
.sale-price {
    font-size: 2rem;
    font-weight: 700;
    color: #d4af37;
}

.regular-price {
    font-size: 1.4rem;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Description */
.product-description {
    margin-bottom: 30px;
}

.product-description h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.product-description p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Size Selection */
.size-selection {
    margin-bottom: 30px;
}

.size-selection h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-option {
    cursor: pointer;
    margin: 0;
}

.size-option input[type="radio"] {
    display: none;
}

.size-label {
    display: inline-block;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    color: #555;
    font-weight: 500;
    text-align: center;
    min-width: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.size-option input[type="radio"]:checked + .size-label {
    border-color: #d4af37;
    background-color: #d4af37;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.size-option:hover .size-label {
    border-color: #d4af37;
    transform: translateY(-1px);
}

/* Quantity Selection */
.quantity-selection {
    margin-bottom: 30px;
}

.quantity-selection h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    background-color: #f8f9fa;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #555;
}

.quantity-btn:hover {
    background-color: #d4af37;
    color: white;
}

.quantity-btn:active {
    transform: scale(0.95);
}

#productQuantity {
    border: none;
    width: 60px;
    height: 40px;
    text-align: center;
    font-weight: 600;
    background-color: white;
    outline: none;
    padding-left: 20px;
}

.stock-info {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 0.9rem;
}

/* Product Actions */
.product-actions {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 160px;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37, #f4d467);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 26, 26, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* Enquiry Section */
.enquiry-section {
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.enquiry-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.enquiry-section h3::before {
    content: "💬";
    font-size: 1.1rem;
}

.enquiry-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.enquiry-btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    min-width: 100px;
    justify-content: center;
}

.enquiry-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #1da851);
    color: white;
}

.enquiry-btn.whatsapp:hover {
    background: linear-gradient(135deg, #1da851, #128c3c);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
}

.enquiry-btn.phone {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.enquiry-btn.phone:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
}

/* Size Chart */
.size-chart {
    max-width: 400px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.size-chart h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.size-chart-image {
    position: relative;
    display: inline-block;
}

.size-chart-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.view-size-chart {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-size-chart:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

/* Related Products Section */
.related-products-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.section-header {
    text-align: left;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
    text-align: left !important;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
    text-align: left !important;
}

/* Related Products Carousel */
.related-products-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-wrapper {
    overflow: hidden;
    border-radius: 12px;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.product-card {
    flex: 0 0 calc(16.666% - 17px);
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image .discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.product-details {
    padding: 20px;
}

.product-name {
    margin-bottom: 10px;
}

.product-name a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    display: block;
}

.product-name a:hover {
    color: #d4af37;
}

.product-details .product-price {
    margin: 0;
    gap: 8px;
}

.product-details .current-price,
.product-details .sale-price {
    font-size: 1.2rem;
}

.product-details .regular-price {
    font-size: 1rem;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: 2px solid #e0e0e0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
    background-color: #d4af37;
    border-color: #d4af37;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: -25px;
}

.carousel-nav.next {
    right: -25px;
}

/* Modals */
.image-modal,
.size-chart-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    height: 100% !important;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-content img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #d4af37;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .product-card {
        flex: 0 0 calc(20% - 16px);
    }
    
    .carousel-nav.prev {
        left: -20px;
    }
    
    .carousel-nav.next {
        right: -20px;
    }
}

@media (max-width: 992px) {
    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .product-main-section {
        padding: 20px 0;
    }
    
    .product-images {
        position: static;
        margin-bottom: 30px;
    }
    
    /* Adjust for tablet layout */
    .images-layout {
        gap: 15px;
    }
    
    .thumbnail-gallery {
        flex: 0 0 90px;
    }
    
    .thumbnail-item {
        width: 70px;
        flex: 0 0 70px;
    }
    
    .main-image-container {
        height: 600px;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .product-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    /* Revert to vertical layout on mobile */
    .images-layout {
        flex-direction: column;
        gap: 15px;
    }
    
    .thumbnail-gallery {
        flex: none;
        max-height: none;
        order: 2;
    }
    
    .main-image-viewer {
        order: 1;
    }
    
    .thumbnail-wrapper {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        height: auto;
        padding: 5px 0;
    }
    
    .thumbnail-wrapper::-webkit-scrollbar {
        height: 6px;
        width: auto;
    }
    
    .thumbnail-item {
        flex: 0 0 60px;
        width: 60px;
    }
    
    .main-image-container {
        height: 500px;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
    }
    
    .enquiry-buttons {
        flex-direction: row;
        gap: 8px;
    }
    
    .enquiry-btn {
        text-align: center;
        justify-content: center;
        flex: 1;
        min-width: 80px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .size-options {
        gap: 8px;
    }
    
    .size-label {
        padding: 10px 16px;
        min-width: 45px;
        font-size: 0.9rem;
    }
    
    .related-products-section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .product-card {
        flex: 0 0 calc(50% - 10px);
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav.prev {
        left: -15px;
    }
    
    .carousel-nav.next {
        right: -15px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 95%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .product-card {
        flex: 0 0 calc(100% - 10px);
    }
}

@media (max-width: 480px) {
    
    .product-price {
        gap: 8px;
    }
    
    .current-price,
    .sale-price {
        font-size: 1.6rem;
    }
    
    .regular-price {
        font-size: 1.2rem;
    }
    
    .quantity-controls {
        width: 100%;
    }
    
    .quantity-btn {
        flex: 1;
        max-width: 50px;
    }
    
    #productQuantity {
        flex: 1;
        min-width: 80px;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #d4af37;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus States for Accessibility */
.thumbnail-item:focus,
.size-option:focus-within,
.quantity-btn:focus,
.btn:focus,
.enquiry-btn:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
    
    .btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .carousel-container {
        transition: none;
    }
}

/* Large screens - optimize full width layout */
@media (min-width: 1400px) {
    .container {
        padding: 0 50px;
    }
    
    .product-main-section {
        padding: 80px 0;
    }
    
    .related-products-section {
        padding: 80px 0;
    }
}

@media (min-width: 1200px) {
    .row {
        margin: -20px;
    }
    
    .col-lg-6 {
        padding: 20px;
    }
}