/* ============================================================
   PRODUCT DETAILS PAGE — Modern Redesign
============================================================ */

/* ── PAGE WRAPPER ── */
.pd-page {
    background: #f8f9fa;
    min-height: 60vh;
}

/* ── BREADCRUMB ── */
.pd-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.pd-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
}

.pd-breadcrumb li+li::before {
    content: '›';
    color: #bbb;
    margin-right: 6px;
}

.pd-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.pd-breadcrumb a:hover {
    color: #915659;
}

.pd-breadcrumb .current {
    color: #333;
    font-weight: 600;
}

/* ── MAIN LAYOUT ── */
.pd-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 16px 48px;
}

.pd-grid {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    justify-content: space-between;
}

/* ══════════════════════
   GALLERY SECTION
══════════════════════ */
.pd-gallery {
    position: sticky;
    top: 80px;
}

/* Main Image */
.pd-main-img-wrap {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    aspect-ratio: 1 / 1;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
}

.pd-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    cursor: zoom-in;
    transition: transform 0.4s ease;
}

.pd-main-img:hover {
    transform: scale(1.04);
}

/* Gallery badges */
.pd-gallery-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pd-gbadge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 20px;
    color: #fff;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.pd-gbadge--sale {
    background: #e74c3c;
}

.pd-gbadge--hot {
    background: #f39c12;
}

.pd-gbadge--out {
    background: #95a5a6;
}

/* Zoom button */
.pd-zoom-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    color: #555;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.pd-zoom-btn:hover {
    background: #915659;
    color: #fff;
    transform: scale(1.08);
}

/* Prev / Next nav arrows */
.pd-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    color: #333;
    font-size: 20px;
    transition: background 0.2s, color 0.2s, transform 0.2s, opacity 0.2s;
    backdrop-filter: blur(6px);
    opacity: 0;
    line-height: 1;
}

.pd-main-img-wrap:hover .pd-nav-btn {
    opacity: 1;
}

.pd-nav-btn:hover {
    background: #915659;
    color: #fff;
}

.pd-nav-btn--prev {
    left: 12px;
}

.pd-nav-btn--next {
    right: 12px;
}

.pd-nav-btn:disabled {
    opacity: 0 !important;
    pointer-events: none;
}

/* Counter badge */
.pd-img-counter {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    display: none;
    /* shown by JS when > 1 image */
}

/* ── LIGHTBOX ZOOM OVERLAY ── */
.pd-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    animation: pd-lb-in 0.22s ease;
}

.pd-lightbox.open {
    display: flex;
}

@keyframes pd-lb-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pd-lightbox__inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-lightbox__img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    display: block;
    animation: pd-lb-zoom 0.22s ease;
}

@keyframes pd-lb-zoom {
    from {
        transform: scale(0.93);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.pd-lightbox__close {
    position: fixed;
    top: 18px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.pd-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.pd-lightbox__prev,
.pd-lightbox__next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
    line-height: 1;
}

.pd-lightbox__prev {
    left: 16px;
}

.pd-lightbox__next {
    right: 16px;
}

.pd-lightbox__prev:hover,
.pd-lightbox__next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.pd-lightbox__caption {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* Wishlist on gallery */
.pd-gallery-wish {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    color: #bbb;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.pd-gallery-wish:hover,
.pd-gallery-wish.active {
    background: #e74c3c;
    color: #fff;
    transform: scale(1.1);
}

.pd-gallery-wish svg {
    fill: currentColor;
}

/* Thumbnail Strip */
.pd-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.pd-thumbs::-webkit-scrollbar {
    height: 4px;
}

.pd-thumbs::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.pd-thumb {
    flex: 0 0 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 2.5px solid transparent;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

.pd-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pd-thumb.active {
    border-color: #915659;
    box-shadow: 0 0 0 3px rgba(145, 86, 89, 0.2);
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    pointer-events: none;
}

/* ══════════════════════
   PRODUCT INFO SECTION
══════════════════════ */
.pd-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Category tag */
.pd-cat-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #915659;
    background: rgba(145, 86, 89, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

/* Title */
.pd-title {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin: 0;
}

/* Rating row */
.pd-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #666;
}

.pd-stars {
    color: #ffc107;
    font-size: 1rem;
    letter-spacing: 1px;
}

.pd-rating-count {
    color: #999;
}

/* Divider */
.pd-divider {
    height: 1px;
    background: #efefef;
}

/* Price block */
.pd-price-block {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 1px solid #f0dada;
    border-radius: 14px;
    padding: 18px 20px;
}

.pd-price-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pd-price-now {
    font-size: 2rem;
    font-weight: 800;
    color: #915659;
    line-height: 1;
}

.pd-price-was {
    font-size: 1rem;
    color: #bbb;
    text-decoration: line-through;
    margin-left: 10px;
    font-weight: 500;
}

.pd-discount-pill {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}

.pd-inquiry-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f39c12;
}

/* Stock badge */
.pd-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
}

.pd-stock--in {
    background: #e8f8f0;
    color: #27ae60;
}

.pd-stock--low {
    background: #fff8e1;
    color: #e67e22;
}

.pd-stock--out {
    background: #fdecea;
    color: #e74c3c;
}

.pd-stock .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse-dot 1.4s ease-in-out infinite;
}

.pd-stock--in .dot {
    background: #27ae60;
}

.pd-stock--low .dot {
    background: #e67e22;
}

.pd-stock--out .dot {
    background: #e74c3c;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Meta table */
.pd-meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
}

.pd-meta-table th {
    text-align: left;
    padding: 8px 0 8px 0;
    color: #999;
    font-weight: 600;
    white-space: nowrap;
    width: 140px;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}

.pd-meta-table td {
    padding: 8px 0;
    color: #333;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
}

.pd-meta-table a {
    color: #915659;
    text-decoration: none;
}

.pd-meta-table a:hover {
    text-decoration: underline;
}

/* Highlight / excerpt */
.pd-highlight {
    background: #fafafa;
    border-left: 3px solid #915659;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
}

/* ── QTY + ACTIONS ── */
.pd-qty-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pd-qty-box {
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.pd-qty-btn {
    width: 38px;
    height: 44px;
    background: #f7f7f7;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-qty-btn:hover {
    background: #eee;
}

.pd-qty-input {
    width: 52px;
    height: 44px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    outline: none;
    background: #fff;
}

/* Hide spinners */
.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.pd-action-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-btn {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.22s ease;
}

.pd-btn--buy {
    background: linear-gradient(135deg, #915659 0%, #72233d 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(145, 86, 89, 0.3);
}

.pd-btn--buy:hover {
    background: linear-gradient(135deg, #a4676a 0%, #822e50 100%);
    box-shadow: 0 8px 20px rgba(145, 86, 89, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

.pd-btn--cart {
    background: #fff;
    color: #2c3e50;
    border: 2px solid #d0d0d0;
}

.pd-btn--cart:hover {
    background: #f0f4ff;
    border-color: #915659;
    color: #915659;
    transform: translateY(-2px);
}

.pd-btn--inquiry {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(243, 156, 18, 0.25);
}

.pd-btn--inquiry:hover {
    box-shadow: 0 8px 20px rgba(243, 156, 18, 0.35);
    transform: translateY(-2px);
    color: #fff;
}

.pd-wishlist-text-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 0.83rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    transition: color 0.2s;
}

.pd-wishlist-text-btn:hover {
    color: #e74c3c;
}

.pd-wishlist-text-btn svg {
    fill: currentColor;
}

/* ── Trust Badges ── */
.pd-trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.pd-trust-item {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-trust-icon {
    color: #915659;
    flex-shrink: 0;
}

.pd-trust-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #333;
}

.pd-trust-sub {
    font-size: 0.7rem;
    color: #999;
    margin-top: 1px;
}

/* ══════════════════════
   TABS SECTION
══════════════════════ */
.pd-tabs-section {
    margin-top: 36px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.pd-tabs-nav {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.pd-tabs-nav::-webkit-scrollbar {
    height: 3px;
}

.pd-tabs-nav::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.pd-tab-btn {
    padding: 16px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
}

.pd-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #915659;
    transform: scaleX(0);
    transition: transform 0.2s;
}

.pd-tab-btn:hover {
    color: #333;
}

.pd-tab-btn.active {
    color: #915659;
}

.pd-tab-btn.active::after {
    transform: scaleX(1);
}

.pd-tab-pane {
    display: none;
    padding: 28px;
}

.pd-tab-pane.active {
    display: block;
}

.pd-tab-pane .typography {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #444;
}

/* ══════════════════════
   RELATED PRODUCTS
══════════════════════ */
.pd-related {
    margin-top: 40px;
}

.pd-related-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.pd-related-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.pd-related-line {
    flex: 1;
    height: 2px;
    background: #f0f0f0;
}

/* ── Mobile adjustments ── */
@media(max-width:900px) {
    .pd-grid {
        grid-template-columns: 1fr;
    }

    .pd-gallery {
        position: static;
        width: 75%;
    }

    .pd-info {
        width: 75%;
    }
}

@media(max-width:768px) {
    .pd-action-stack {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pd-btn {
        flex: 1 1 100%;
    }

    .pd-btn--buy,
    .pd-btn--cart {
        flex: 1 1 calc(50% - 5px);
    }

    .pd-trust {
        grid-template-columns: 1fr 1fr;
    }

    .pd-gallery {
        position: sticky !important;
        width: 63.5%;
    }

    .pd-info {
        width: 63.5%;
    }
}

@media(max-width:576px) {
    .pd-container {
        padding: 16px 12px 32px;
    }

    .pd-breadcrumb {
        padding: 10px 0;
    }

    .pd-breadcrumb ol {
        font-size: 0.75rem;
    }

    .pd-title {
        font-size: 1.4rem;
        line-height: 1.3;
        word-wrap: break-word;
    }

    .pd-tab-btn {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .pd-thumb {
        flex: 0 0 60px;
        height: 60px;
    }

    .pd-price-now {
        font-size: 1.6rem;
    }

    .pd-action-stack {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .pd-btn {
        font-size: 12px;
        height: 44px;
        gap: 6px;
        flex: 1 1 100%;
    }

    .pd-btn--buy,
    .pd-btn--cart {
        flex: 1 1 calc(50% - 4px);
        padding: 0 8px;
    }

    .pd-btn svg {
        width: 14px;
        height: 14px;
    }

    .pd-meta-table th {
        width: 100px;
        font-size: 0.7rem;
    }

    .pd-trust {
        grid-template-columns: 1fr;
    }

    .pd-qty-row {
        gap: 10px;
        justify-content: flex-start;
    }

    .pd-gallery {
        position: sticky !important;
        width: 48%;
    }

    .pd-info {
        width: 48%;
    }
}

@media(max-width:476px) {
    .pd-gallery {
        position: sticky !important;
        width: 42%;
    }

    .pd-info {
        width: 42%;
    }
}


@media(max-width:430px) {
    .pd-gallery {
        position: sticky !important;
        width: 41.5%;
    }

    .pd-info {
        width: 41.5%;
    }
}

@media(max-width:400px) {
    .pd-gallery {
        position: sticky !important;
        width: 40%;
    }

    .pd-info {
        width: 40%;
    }
}

@media(max-width:376px) {
    .pd-gallery {
        position: sticky !important;
        width: 38%;
    }

    .pd-info {
        width: 38%;
    }
}

/* Ensure rich text description does not cause horizontal scroll */
.typography {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.typography img,
.typography iframe,
.typography video {
    max-width: 100% !important;
    height: auto !important;
}

.typography table {
    width: 100% !important;
    max-width: 100%;
    display: block;
    overflow-x: auto;
}