/* ====================================================
   PRODUCT DETAILS PAGE STYLES - LUXURY EDITION
   ==================================================== */

/* General Layout */
.product-details-page {
    background: #ffffff;
    font-family: 'Poppins', sans-serif;
}

.product-detail-section {
    padding: 30px 0 60px;
}

.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 992px) {
    .product-detail-wrapper {
        grid-template-columns: 1.2fr 1fr;
        /* Wider image area for gallery */
        gap: 60px;
        align-items: start;
    }
}

/* ====================================================
   GALLERY STYLES
   ==================================================== */
.product-images-gallery {
    display: flex;
    flex-direction: column-reverse;
    /* Mobile: Thumbs below */
    gap: 15px;
}

@media (min-width: 992px) {
    .product-images-gallery {
        flex-direction: row;
        /* Desktop: Thumbs left */
        gap: 20px;
    }
}

/* Thumbnails Container */
.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    /* Scrollbar space */
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

@media (min-width: 992px) {
    .gallery-thumbnails {
        flex-direction: column;
        width: 80px;
        min-width: 80px;
        max-height: 600px;
        /* Match main image height approx */
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 5px;
    }
}

/* Thumbnail Items */
.thumb-item {
    width: 70px;
    height: 90px;
    /* Portrait aspect ratio */
    min-width: 70px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.thumb-item:hover {
    opacity: 1;
    border-color: #999;
}

.thumb-item.active {
    opacity: 1;
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
    /* mimic double border */
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Main Image Area */
.main-image-container {
    flex-grow: 1;
    position: relative;
    border-radius: 0;
    /* Cleaner look */
    overflow: hidden;
    background: #fafafa;
    aspect-ratio: 3/4;
    /* Consistent Portrait Ratio */
    border: 1px solid #f0f0f0;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* OR cover, depending on image quality. 'cover' is better for luxury if images are good */
    display: block;
    transition: transform 0.5s ease;
    transform-origin: center center;
    cursor: zoom-in;
}

/* Zoom Effect */
.main-image-container:hover img {
    transform: scale(1.5);
    /* Desktop Zoom */
}

/* Badges */
.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
    pointer-events: none;
}

.badge-custom {
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    border-radius: 2px;
}

.badge-sale {
    background: #d32f2f;
}

.badge-new {
    background: #388e3c;
}

.badge-out {
    background: #616161;
}

/* Wishlist Icon on Main Image */
.wishlist-icon-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wishlist-icon-btn:hover {
    background: #000;
    color: #fff;
    transform: scale(1.1);
}

/* Mobile Enhancement: Swipe Indicator (Optional) */
@media (max-width: 991px) {
    .main-image-container::after {
        content: '';
        /* Remove swipe hint for cleaner look, visual cues are enough */
        display: none;
    }
}

/* ====================================================
   PRODUCT INFO STYLES
   ==================================================== */
.product-info-column {
    padding: 0 10px;
}

.product-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.2;
}

.product-price-wrapper {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 15px 0 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.price-current {
    color: #000;
}

.price-old {
    font-size: 1.1rem;
    color: #888;
    text-decoration: line-through;
}

.price-discount {
    font-size: 0.9rem;
    color: #d32f2f;
    background: #ffebee;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Variant Swatches */
.variant-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #ddd;
    padding: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.variant-swatch.active {
    border-color: #000;
}

.variant-swatch img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Quantity & Cart */
.cart-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.qty-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 120px;
}

.qty-btn {
    background: none;
    border: none;
    width: 35px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    height: 45px;
    font-weight: 600;
}

.btn-add-cart {
    flex: 1;
    background: #000;
    color: white;
    border: none;
    padding: 0 30px;
    height: 45px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    min-width: 200px;
}

.btn-add-cart:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Description Accordion/Tabs Cleaner Look */
.product-tabs {
    margin-top: 40px;
    border-top: 1px solid #eee;
}

.tab-link {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    color: #000;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.tab-link:hover {
    color: #555;
}

.tab-content {
    display: none;
    padding: 15px 0;
    color: #555;
    line-height: 1.6;
}

.tab-content.active {
    display: block;
}

/* ====================================================
   LIVE PAGE OVERRIDES
   Match the active PHP markup and beat legacy theme rules.
   ==================================================== */

.product-details-page > .container.py-4 {
    padding-top: 18px !important;
    padding-bottom: 24px !important;
}

.product-details-page > .container.py-4 .breadcrumb {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.product-details-page > .container.py-4 .breadcrumb a {
    color: #6d6974;
    text-decoration: none;
}

.product-details-page > .container.py-4 .breadcrumb-item.active {
    color: #d78cab;
    font-weight: 600;
}

.product-details-page .product-detail-section {
    padding: 18px 0 68px;
}

.product-details-page .product-detail-section > .container,
.product-details-page .related-products > .container,
.product-details-page .product-newsletter > .container {
    width: min(1360px, calc(100% - 48px));
    max-width: 1360px;
}

.product-details-page .product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
    align-items: start;
}

@media (min-width: 992px) {
    .product-details-page .product-detail-wrapper {
        grid-template-columns: minmax(0, 1.18fr) minmax(360px, 430px);
        gap: 44px;
    }
}

.product-details-page .product-images-gallery {
    gap: 18px;
    align-items: flex-start;
}

@media (min-width: 992px) {
    .product-details-page .product-images-gallery {
        gap: 24px;
    }

    .product-details-page .gallery-thumbnails {
        width: 78px;
        min-width: 78px;
        max-height: 740px;
        gap: 12px;
        padding-right: 6px;
    }
}

.product-details-page .thumb-item {
    width: 74px;
    min-width: 74px;
    height: 90px;
    opacity: 1;
    background: #fff;
    border-color: #d8d8df;
}

.product-details-page .thumb-item.active {
    border-color: #17171b;
    box-shadow: 0 0 0 1px #17171b;
}

.product-details-page .thumb-item img {
    object-fit: cover;
}

.product-details-page .main-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 0%, #f7f7f9 100%);
    border: 1px solid #eceaf0;
    aspect-ratio: 1 / 1.16;
    min-height: clamp(500px, 58vw, 760px);
    max-height: 760px;
}

.product-details-page .main-image-container img {
    padding: 26px;
    object-fit: contain;
}

.product-details-page .main-image-container:hover img {
    transform: scale(1.06);
}

.product-details-page .wishlist-icon-btn {
    width: 44px;
    height: 44px;
}

.product-details-page .product-info {
    width: 100%;
    max-width: 430px;
    align-self: start;
}

@media (min-width: 992px) {
    .product-details-page .product-info {
        position: sticky;
        top: 108px;
    }
}

.product-details-page .product-title {
    font-size: clamp(2.75rem, 3vw, 4.4rem);
    line-height: 1.03;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.product-details-page .product-info > .d-flex.align-items-center.mb-3 {
    display: flex !important;
    align-items: center !important;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px !important;
}

.product-details-page .product-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f3b400;
}

.product-details-page .product-rating .rating-text {
    margin-left: 8px !important;
    color: #6d6974 !important;
    font-size: 0.95rem !important;
}

.product-details-page .product-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-left: 0 !important;
    border-radius: 18px;
    background: #f1eff2;
    padding: 12px 18px !important;
    color: #5d5963 !important;
    font-size: 0.95rem !important;
}

.product-details-page .product-short-desc {
    margin: 0 0 28px;
    max-width: 26ch;
    color: #64606a;
    font-size: 1.18rem;
    line-height: 1.72;
}

.product-details-page .product-price {
    margin: 0 0 28px;
}

.product-details-page .current-price {
    color: #de8ead;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.product-details-page .price-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.product-details-page .original-price {
    color: #97939d;
    font-size: 1.1rem;
    text-decoration: line-through;
}

.product-details-page .discount-percent {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #ffe8f1;
    color: #e04b7e;
    padding: 8px 14px;
    font-size: 0.95rem;
    font-weight: 600;
}

.product-details-page .savings-highlight {
    color: #1ba25b !important;
    font-size: 0.95rem;
    font-weight: 600;
}

.product-details-page .product-variants {
    margin-bottom: 26px !important;
}

.product-details-page .product-variants h6 {
    color: #26242a;
}

.product-details-page .variant-swatch {
    width: 66px;
    min-width: 66px;
    height: 66px;
    border-radius: 999px;
    border-color: #d8d5dd;
    padding: 4px;
    background: #fff;
}

.product-details-page .variant-swatch.active {
    border-color: #1d1c22;
    box-shadow: 0 0 0 1px #1d1c22;
}

.product-details-page .stock-status {
    margin: 0 0 24px;
}

.product-details-page .stock-status .status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 700;
}

.product-details-page .stock-status .in-stock {
    background: #e9f8ee;
    color: #21a05c;
}

.product-details-page .stock-status .low-stock {
    background: #fff4df;
    color: #c17b00;
}

.product-details-page .stock-status .out-of-stock {
    background: #f9e7e7;
    color: #c34343;
}

.product-details-page .stock-count {
    font-weight: 500;
}

.product-details-page .product-features-horizontal {
    border-color: #ece8ef !important;
    margin: 0 0 28px !important;
    padding: 22px 0 !important;
}

.product-details-page .feature-box {
    color: #4a4751;
}

.product-details-page .feature-box i {
    color: #1b1b20;
    font-size: 1.1rem;
}

.product-details-page .feature-box .small {
    font-size: 0.95rem !important;
    line-height: 1.65;
}

.product-details-page .add-cart-form {
    display: grid;
    gap: 22px;
}

.product-details-page .quantity-selector {
    display: grid;
    gap: 12px;
}

.product-details-page .quantity-selector label {
    margin: 0;
    color: #26242a;
    font-size: 1rem;
    font-weight: 600;
}

.product-details-page .quantity-input {
    display: inline-grid;
    grid-template-columns: 42px 58px 42px;
    width: max-content;
    overflow: hidden;
    border: 1px solid #e3e0e8;
    border-radius: 12px;
    background: #fff;
}

.product-details-page .qty-btn,
.product-details-page .quantity-input input {
    height: 48px;
}

.product-details-page .qty-btn {
    border: 0;
    background: #f7f5f8;
    color: #4b4852;
    font-size: 1.2rem;
    font-weight: 500;
}

.product-details-page .quantity-input input {
    width: 58px;
    border: 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: none;
}

.product-details-page .quantity-input input::-webkit-outer-spin-button,
.product-details-page .quantity-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-details-page .quantity-input input[type=number] {
    -moz-appearance: textfield;
}

.product-details-page .action-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 14px;
    margin: 0 !important;
}

.product-details-page .add-to-cart-btn,
.product-details-page .buy-now-btn {
    width: 100%;
    min-width: 0;
    min-height: 64px;
    justify-content: center;
    padding: 18px 22px;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.product-details-page .add-to-cart-btn {
    background: #e2a0bd !important;
    border-color: #e2a0bd !important;
    color: #fff !important;
}

.product-details-page .add-to-cart-btn:hover {
    background: #d88aad !important;
    border-color: #d88aad !important;
    color: #fff !important;
}

.product-details-page .buy-now-btn {
    background: #fff !important;
    border-color: #202026 !important;
    color: #202026 !important;
}

.product-details-page .buy-now-btn:hover {
    background: #202026 !important;
    color: #fff !important;
}

.product-details-page .add-to-cart-btn:disabled,
.product-details-page .buy-now-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.product-details-page .product-meta-footer {
    margin-top: 8px;
    color: #726d79 !important;
    font-size: 0.95rem !important;
    line-height: 1.85;
}

.product-details-page .product-meta-footer a {
    color: #4f4a56;
    text-decoration: none;
}

.product-details-page .product-meta-footer a:hover {
    color: #d78cab;
}

.product-details-page .product-description-section {
    margin-top: 72px !important;
}

.product-details-page .nav-tabs {
    border-bottom: 1px solid #ece8ef;
    gap: 8px;
}

.product-details-page .nav-tabs .nav-link {
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    color: #6b6772;
    font-weight: 600;
    padding: 14px 22px;
}

.product-details-page .nav-tabs .nav-link.active {
    border-color: #ece8ef;
    background: #fff;
    color: #1f1d23;
}

.product-details-page .tab-content {
    padding: 28px 32px !important;
    border-color: #ece8ef !important;
    border-radius: 0 0 18px 18px !important;
}

.product-details-page .description-content,
.product-details-page .tab-pane p {
    color: #5e5a65;
    font-size: 1.04rem;
    line-height: 1.9;
}

.product-details-page .related-products {
    padding: 34px 0 0;
}

.product-details-page .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.product-details-page .section-header h2 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 2.6vw, 3.3rem);
}

.product-details-page .view-all {
    color: #1f1d23;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.product-details-page .product-newsletter {
    padding: 44px 0 0;
}

@media (max-width: 991px) {
    .product-details-page .product-detail-section > .container,
    .product-details-page .related-products > .container,
    .product-details-page .product-newsletter > .container {
        width: min(100%, calc(100% - 32px));
    }

    .product-details-page .gallery-thumbnails {
        gap: 10px;
    }

    .product-details-page .thumb-item {
        width: 68px;
        min-width: 68px;
        height: 84px;
    }

    .product-details-page .main-image-container {
        aspect-ratio: 1 / 1.05;
        min-height: 440px;
    }

    .product-details-page .product-info {
        max-width: none;
        position: static;
    }

    .product-details-page .product-title {
        font-size: clamp(2.2rem, 7vw, 3.2rem);
    }

    .product-details-page .product-short-desc {
        max-width: none;
        font-size: 1.06rem;
    }

    .product-details-page .action-buttons {
        grid-template-columns: 1fr;
    }

    .product-details-page .feature-box .small {
        font-size: 0.88rem !important;
    }
}

@media (max-width: 767px) {
    .product-details-page > .container.py-4 {
        padding-top: 12px !important;
        padding-bottom: 18px !important;
    }

    .product-details-page .product-detail-section > .container,
    .product-details-page .related-products > .container,
    .product-details-page .product-newsletter > .container {
        width: calc(100% - 24px);
    }

    .product-details-page .main-image-container {
        min-height: 360px;
    }

    .product-details-page .main-image-container img {
        padding: 18px;
    }

    .product-details-page .product-brand {
        width: 100%;
        justify-content: center;
    }

    .product-details-page .product-features-horizontal .row {
        row-gap: 18px;
    }

    .product-details-page .tab-content {
        padding: 22px 18px !important;
    }

    .product-details-page .section-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
