/* =====================================================
   Product Details Page — product-page.css
   ===================================================== */

/* ─── Page shell ─── */
.pdp {
    padding: 32px 16px 72px;
    background: var(--color-background);
}

.pdp__inner {
    width: min(100%, 1320px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.pdp__not-found {
    max-width: 640px;
    margin: 64px auto;
    text-align: center;
    color: var(--color-text-muted);
}
.pdp__trust-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(27,106,92,.10);
    border-radius: 14px;
    background: #fbf8f2;
}

.pdp__trust-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.pdp__trust-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.pdp__trust-item span {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}


.pdp__back-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

/* ─── Two-column layout ─── */
.pdp__columns {
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr;
}

/* ─── Gallery ─── */
.pdp__gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Badge should only appear on the primary visible product image */
.pdp__thumb .pdp__bakram-badge,
.pdp__zoom-window .pdp__bakram-badge,
.pdp__viewer .pdp__bakram-badge {
    display: none !important;
}

.pdp__gallery-main {
    position: relative;
    overflow: visible;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbf8f2 0%, #f4eee4 100%);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.pdp__bakram-badge {
    position: absolute;
    top: -18px;
    left: -18px;
    width: 84px;
    height: 84px;
    padding: 10px;
    border-radius: 50%;
    background: #8b0000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transform: rotate(-10deg);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
    z-index: 2;
}

@media (max-width: 768px) {
    .pdp__bakram-badge {
        top: -10px;
        left: -10px;
    }
}

.pdp__bakram-badge::before,
.pdp__bakram-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.pdp__bakram-badge::before {
    border: 2px solid rgba(255, 255, 255, 0.22);
    transform: scale(0.86);
}

.pdp__bakram-badge::after {
    border: 1px dashed rgba(255, 255, 255, 0.32);
    transform: scale(0.72);
}

.pdp__bakram-badge__icon {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    margin-bottom: 4px;
    letter-spacing: 0.2em;
}

.pdp__bakram-badge__text {
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .pdp__bakram-badge {
        top: -20px;
        left: -20px;
        width: 60px;
        height: 60px;
        padding: 8px;
    }

    .pdp__bakram-badge__icon {
        font-size: 0.76rem;
        margin-bottom: 2px;
    }

    .pdp__bakram-badge__text {
        font-size: 0.62rem;
    }
}

.pdp__gallery-main:hover .pdp__main-image {
    cursor: crosshair;
}

.pdp__zoom-lens {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.88), 0 12px 28px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease, transform 120ms ease;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(2px);
}

.pdp__zoom-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 340px;
    height: 340px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(220, 224, 231, 0.85);
    background: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 999;
    pointer-events: none;
}

.pdp__zoom-window--visible {
    opacity: 1;
    transform: translateY(0);
}

.pdp__zoom-image {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 240%;
}

.pdp__viewer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
}

.pdp__viewer--open {
    display: flex;
}

.pdp__viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}

.pdp__viewer-shell {
    position: relative;
    width: 100%;
    max-width: 1024px;
    height: 100%;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.pdp__viewer-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 2;
}

.pdp__viewer-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 300ms ease;
    will-change: transform;
}

.pdp__viewer-slide {
    position: relative;
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pdp__viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 280ms ease;
    touch-action: none;
}

.pdp__viewer-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.54);
    color: #ffffff;
    font-size: 0.95rem;
    z-index: 2;
}

@media (max-width: 1023px) {
    .pdp__zoom-window {
        display: none !important;
    }

    .pdp__main-image {
        cursor: zoom-in;
    }
}

.pdp__gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pdp__thumb {
    width: 68px;
    height: 68px;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    padding: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 200ms ease;
}

.pdp__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdp__thumb--active {
    border-color: var(--color-primary);
}

/* ─── Info panel ─── */
.pdp__info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Trust bar — single flex row on all screens */
.pdp__trust-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(27, 106, 92, 0.1);
    border-radius: 14px;
    background: #fbf8f2;
    overflow: hidden;
}

.pdp__trust-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    text-align: center;
}

.pdp__trust-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.pdp__trust-item span {
    color: var(--color-text);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.35;
}

/* Title */
.pdp__title {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.15;
}

.pdp__short-desc {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.97rem;
    line-height: 1.7;
}

/* Price */
.pdp__price-block {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pdp__price {
    color: var(--color-primary);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.pdp__tax-note {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* Size chips */
.pdp__size-label,
.pdp__qty-label {
    margin: 0 0 8px;
    color: var(--color-text);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pdp__size-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pdp__size-chip {
    min-width: 42px;
    min-height: 42px;
    padding: 6px 10px;
    border: 1.5px solid rgba(27, 106, 92, 0.2);
    border-radius: 10px;
    background: #ffffff;
    color: var(--color-text);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.pdp__size-chip--active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #ffffff;
}

.pdp__size-chip:hover:not(.pdp__size-chip--active) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Quantity */
.pdp__qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid rgba(27, 106, 92, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.pdp__qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 180ms ease;
}

.pdp__qty-btn:hover {
    background: rgba(27, 106, 92, 0.06);
}

.pdp__qty-value {
    min-width: 40px;
    text-align: center;
    font-size: 0.96rem;
    font-weight: 600;
    border-left: 1.5px solid rgba(27, 106, 92, 0.14);
    border-right: 1.5px solid rgba(27, 106, 92, 0.14);
    line-height: 40px;
}

.pdp__promo {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(27, 106, 92, 0.08);
    color: var(--color-primary);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
}

.pdp__promo strong {
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* CTAs */
.pdp__cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pdp__btn {
    min-height: 48px;
    border: none;
    border-radius: 999px;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.pdp__btn--primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(27, 106, 92, 0.22);
}

.pdp__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(27, 106, 92, 0.3);
}

.pdp__btn--secondary {
    background: #ffffff;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.pdp__btn--secondary:hover {
    background: rgba(27, 106, 92, 0.06);
}

.pdp__share-row {
    display: flex;
    justify-content: flex-start;
}

.pdp__btn--share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.pdp__share-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.35);
}

.pdp__share-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
}

.pdp__share-panel {
    position: relative;
    width: min(100%, 420px);
    max-width: 420px;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(20, 40, 40, 0.16);
    display: grid;
    gap: 20px;
    z-index: 1;
}

.pdp__share-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.pdp__share-title {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.3;
    color: var(--color-text);
}

.pdp__share-subtitle {
    margin: 6px 0 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pdp__share-close {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.pdp__share-actions {
    display: grid;
    gap: 10px;
}

.pdp__share-option {
    width: 100%;
    justify-content: center;
    padding: 14px 16px;
}

.pdp__share-toast {
    min-height: 22px;
    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
}

.pdp__share-modal[hidden] {
    display: none;
}

/* ─── Product page custom size shortcut and specs ─── */
.pdp__custom-size {
    margin-top: 14px;
}

.pdp__btn--custom-size {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    background: #ffffff;
    border: 1.5px solid var(--color-primary);
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
}

.pdp__btn--custom-size:hover {
    background: rgba(27, 106, 92, 0.06);
}

.pdp__size-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.pdp__btn--size-guide {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 8px 12px;
    min-height: 40px;
    border: 1.5px solid var(--color-primary);
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.pdp__btn--size-guide:hover {
    background: rgba(27, 106, 92, 0.06);
}

.pdp__size-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.56);
    padding: 18px;
}

.pdp__size-guide-modal[hidden] {
    display: none;
}

.pdp__size-guide-panel {
    position: relative;
    width: min(100%, 900px);
    max-width: 100%;
    max-height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.22);
    display: grid;
    gap: 18px;
    overflow: hidden;
}

.pdp__size-guide-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px 0;
}

.pdp__size-guide-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--color-text);
}

.pdp__size-guide-copy {
    margin: 8px 0 0;
    color: var(--color-text-muted);
    font-size: 0.94rem;
    line-height: 1.5;
}

.pdp__size-guide-close {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.pdp__size-guide-body {
    padding: 0 22px 22px;
    overflow: auto;
}

.pdp__size-guide-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 767px) {
    .pdp__size-guide-panel {
        width: min(90vw, 700px);
        max-height: 90vh;
        border-radius: 20px;
    }

    .pdp__size-guide-header {
        padding: 16px 16px 0;
    }

    .pdp__size-guide-body {
        padding: 0 16px 16px;
    }
}

@media (min-width: 1024px) {
    .pdp__size-guide-panel {
        width: min(92vw, 860px);
        max-height: calc(100vh - 80px);
    }

    .pdp__size-guide-body {
        padding: 0 22px 22px;
    }

    .pdp__size-guide-image {
        max-height: calc(100vh - 170px);
    }
}

.pdp__spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

.pdp__spec-table th,
.pdp__spec-table td {
    padding: 11px 0;
    border-bottom: 1px solid rgba(27, 106, 92, 0.12);
    text-align: left;
    vertical-align: top;
}

.pdp__spec-table th {
    width: 140px;
    color: var(--color-text);
    font-weight: 700;
}

.pdp__spec-table td {
    color: var(--color-text-muted);
}

/* ─── Accordion ─── */
.pdp__accordion {
    border-top: 1px solid rgba(27, 106, 92, 0.12);
}

.pdp__accordion-item {
    border-bottom: 1px solid rgba(27, 106, 92, 0.12);
}

.pdp__accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.pdp__accordion-trigger i {
    color: var(--color-primary);
    font-size: 0.85rem;
    transition: transform 260ms ease;
    flex-shrink: 0;
}

.pdp__accordion-trigger[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.pdp__accordion-panel {
    display: none;
    overflow: hidden;
}

.pdp__accordion-panel--open {
    display: block;
}

.pdp__accordion-body {
    padding: 0 0 18px;
    color: var(--color-text-muted);
    font-size: 0.96rem;
    line-height: 1.75;
}

/* ─── Related products ─── */
.pdp__related {
    padding-top: 4px;
}

.pdp__related-header {
    margin-bottom: 22px;
    text-align: center;
}

.pdp__related-title {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 700;
}

.pdp__related-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ─── Responsive ─── */
@media (max-width: 767px) {
    .pdp__gallery-main {
        aspect-ratio: 1 / 1;
        padding: 12px;
        min-height: 0;
    }

    .pdp__trust-bar {
        gap: 7px;
        padding: 10px 10px;
    }

    .pdp__thumb {
        width: 74px;
        height: 74px;
    }

    .pdp__trust-icon {
        width: 34px;
        height: 34px;
    }

    .pdp__trust-item span {
        font-size: 0.69rem;
        line-height: 1.25;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .pdp__trust-bar {
        gap: 10px;
        padding: 12px;
    }

    .pdp__trust-icon {
        width: 38px;
        height: 38px;
    }

    .pdp__trust-item span {
        font-size: 0.72rem;
    }
}

@media (min-width: 1024px) {
    .pdp {
        padding-top: 24px;
    }

    .pdp__columns {
        grid-template-columns: 55fr 45fr;
        gap: 32px;
        align-items: start;
    }

    .pdp__gallery-main {
        aspect-ratio: 1 / 1;
        padding: 14px;
    }

    .pdp__thumb {
        width: 72px;
        height: 72px;
    }

    .pdp__info {
        gap: 16px;
    }

    .pdp__related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
