/* ============================================================
   Product Detail Page
   ============================================================ */

/* Breadcrumb */
.kd-breadcrumb {
    padding: 14px 0;
    border-bottom: 1px solid var(--kd-border);
    font-size: 13px;
    color: var(--kd-muted);
}

.kd-breadcrumb__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.kd-breadcrumb__list li + li::before {
    content: "/";
    margin-right: 6px;
    color: var(--kd-border);
}

.kd-breadcrumb__list a {
    color: var(--kd-muted);
    text-decoration: none;
    transition: color 200ms ease;
}

.kd-breadcrumb__list a:hover {
    color: var(--kd-ink);
}

/* Layout grid */
.pd-section {
    padding: 40px 0 60px;
}

.pd-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .pd-grid {
        grid-template-columns: 55% 1fr;
        gap: 56px;
        align-items: start;
    }
}

/* ── Gallery ── */
.pd-gallery__main {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--kd-border);
    background: #fafafa;
}

.pd-gallery__main-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 680px;
    object-fit: cover;
    transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
}

.pd-gallery__main:hover .pd-gallery__main-img {
    transform: scale(1.04);
}

.pd-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 12px;
    letter-spacing: 0.3px;
    font-weight: 600;
    color: #fff;
    pointer-events: none;
    z-index: 2;
}

.pd-badge--sold {
    background: #a33d2c;
    animation: acBadgePulse 2.2s ease-in-out infinite;
}

.pd-badge--sale {
    background: #b42318;
}

.pd-gallery__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.pd-gallery__thumb {
    width: 74px;
    height: 92px;
    padding: 0;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    background: #fafafa;
    flex-shrink: 0;
    transition: border-color 200ms ease;
}

.pd-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 350ms ease;
}

.pd-gallery__thumb:hover img {
    transform: scale(1.06);
}

.pd-gallery__thumb.is-active {
    border-color: var(--kd-ink);
}

/* ── Info Panel ── */
.pd-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (min-width: 768px) {
    .pd-info {
        position: sticky;
        top: 100px;
    }
}

.pd-info__brand {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--kd-muted);
    margin: 0 0 10px;
}

.pd-info__title {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 400;
    line-height: 1.2;
    color: var(--kd-ink);
    margin: 0 0 20px;
}

/* Price */
.pd-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.pd-price__regular,
.pd-price__sale {
    font-size: 22px;
    font-weight: 700;
    color: var(--kd-ink);
}

.pd-price--on-sale .pd-price__sale {
    color: #b42318;
}

.pd-price__was {
    font-size: 16px;
    color: var(--kd-muted);
    font-weight: 400;
}

.pd-price__badge {
    font-size: 11px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    background: #b42318;
    color: #fff;
    border-radius: 999px;
    padding: 3px 10px;
    font-weight: 600;
    align-self: center;
}

.pd-price--sold-out .pd-price__regular {
    color: var(--kd-muted);
}

.pd-shipping-note {
    font-size: 13px;
    color: var(--kd-muted);
    margin: 0 0 24px;
}

.pd-shipping-note a {
    color: var(--kd-ink);
}

/* Form */
.pd-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Quantity stepper */
.pd-quantity__label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--kd-muted);
    margin-bottom: 8px;
}

.pd-quantity__stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--kd-border);
    width: fit-content;
    height: 46px;
}

.pd-qty-btn {
    width: 46px;
    height: 46px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kd-ink);
    transition: background 200ms ease;
}

.pd-qty-btn:hover {
    background: #f5f5f5;
}

.pd-quantity__input {
    width: 54px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--kd-border);
    border-right: 1px solid var(--kd-border);
    text-align: center;
    font-size: 15px;
    color: var(--kd-ink);
    background: transparent;
    -moz-appearance: textfield;
}

.pd-quantity__input::-webkit-inner-spin-button,
.pd-quantity__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Add to cart */
.pd-atc-btn {
    width: 100%;
    padding: 15px 24px;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pd-atc-btn--sold {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Accordion */
.pd-accordion {
    border-top: 1px solid var(--kd-border);
    margin-top: 4px;
}

.pd-accordion:last-of-type {
    border-bottom: 1px solid var(--kd-border);
    margin-bottom: 20px;
}

.pd-accordion__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 13px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
    color: var(--kd-ink);
    user-select: none;
}

.pd-accordion__summary::-webkit-details-marker {
    display: none;
}

.pd-accordion__summary::after {
    content: "+";
    font-size: 18px;
    line-height: 1;
    color: var(--kd-muted);
    transition: transform 250ms ease;
}

.pd-accordion[open] > .pd-accordion__summary::after {
    content: "−";
}

.pd-accordion__body {
    padding-bottom: 16px;
    font-size: 14px;
    color: var(--kd-muted);
    line-height: 1.7;
}

.pd-description p,
.pd-description h3,
.pd-description h4 {
    margin-top: 0;
}

.pd-details-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-details-list li {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.pd-details-list li span:first-child {
    color: var(--kd-ink);
    font-weight: 500;
}

/* Share */
.pd-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.pd-share__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--kd-muted);
    letter-spacing: 0.4px;
    padding: 0;
    transition: color 200ms ease;
}

.pd-share__btn:hover {
    color: var(--kd-ink);
}

.pd-share__copied {
    font-size: 13px;
    color: #2c7a2c;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .pd-section {
        padding: 24px 0 40px;
    }

    .pd-gallery__thumb {
        width: 60px;
        height: 76px;
    }

    .pd-info__title {
        font-size: 26px;
    }

    .pd-atc-btn {
        padding: 13px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pd-gallery__main-img,
    .pd-gallery__thumb img {
        transition: none !important;
    }
}
