/* ==============================================
   product-detail.css  —  Crown Gem Product Detail
   Uses global.css tokens only. Nothing re-declared.
   ============================================== */

/* ================================================
   BREADCRUMB
   ================================================ */
.pd-breadcrumb {
    padding: 20px 0 12px;
}

.pd-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-mid);
    transition: color var(--transition);
}
.pd-back:hover { color: var(--gold); }

/* ================================================
   PRODUCT DETAIL LAYOUT
   ================================================ */
.pd-detail { padding: 8px 0 60px; }

.pd-detail__inner {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 52px;
    align-items: start;
}

/* ================================================
   LEFT — GALLERY
   ================================================ */
.pd-gallery__main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3.6;
    overflow: hidden;
    background: var(--off-white);
    margin-bottom: 12px;
}

.pd-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-gallery__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    border: none;
}
.pd-gallery__play:hover { background: var(--white); transform: scale(1.08); }

/* ---- thumbnails ---- */
.pd-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.pd-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition);
}

.pd-thumb--active,
.pd-thumb:hover { border-color: var(--gold); }

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-thumb__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.80);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    pointer-events: none;
}

/* ---- description ---- */
.pd-description { margin-bottom: 22px; }

.pd-description__title {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.pd-description__text {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.75;
}

/* ---- action links ---- */
.pd-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    margin-bottom: 18px;
}

.pd-action-link {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--sans);
    font-size: 12.5px;
    color: var(--text-mid);
    transition: color var(--transition);
}
.pd-action-link:hover { color: var(--gold); }
.pd-action-link svg { flex-shrink: 0; }

/* ---- share ---- */
.pd-share {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pd-share__label {
    font-family: var(--sans);
    font-size: 12.5px;
    color: var(--text-mid);
}

.pd-share__icons { display: flex; gap: 8px; }

.pd-share__icon {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mid);
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.pd-share__icon:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: #FDF4E3;
}

/* ================================================
   RIGHT — INFO
   ================================================ */
.pd-info { padding-top: 4px; }

.pd-info__type {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--gold);
    margin-bottom: 6px;
}

.pd-info__title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.pd-info__name {
    font-family: var(--serif);
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
}

.pd-info__price {
    font-family: var(--serif);
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 600;
    color: var(--gold);
    white-space: nowrap;
}

.pd-info__short-desc {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* ---- specs grid ---- */
.pd-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    margin-bottom: 24px;
    background: var( --off-white);
}

.pd-spec {
    padding: 14px 16px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* remove right border on even children (right column) */
.pd-spec:nth-child(even) { border-right: none; }

/* remove bottom border on last two */
.pd-spec:nth-last-child(-n+2) { border-bottom: none; }

.pd-spec__label {
    font-family: var(--sans);
    font-size: 10.5px;
    color: var(--text-light);
    letter-spacing: 0.04em;
}

.pd-spec__value {
    font-family: var(--sans);
    font-size: 13.5px;
    color: var(--text-dark);
    font-weight: 500;
}

/* ---- purchase row ---- */
.pd-purchase {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 10px;
    border: 1.5px solid var(--border);
}

.pd-qty {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-right: 1.5px solid var(--border);
}

.pd-qty__btn {
    width: 36px;
    height: 44px;
    font-size: 18px;
    color: var(--text-dark);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}
.pd-qty__btn:hover { color: var(--gold); }

.pd-qty__input {
    width: 40px;
    height: 44px;
    text-align: center;
    border: none;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    -moz-appearance: textfield;
}
.pd-qty__input::-webkit-outer-spin-button,
.pd-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pd-add-cart {
    flex: 1;
    height: 46px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-dark);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.pd-add-cart:hover { background: var(--off-white); }

.pd-wish-btn {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1.5px solid var(--border);
    color: var(--text-light);
    background: transparent;
    cursor: pointer;
    transition: color var(--transition);
    border-top: none;
    border-right: none;
    border-bottom: none;
    flex-shrink: 0;
}
.pd-wish-btn:hover,
.pd-wish-btn--active { color: var(--gold); }
.pd-wish-btn--active svg { fill: var(--gold); }

/* ---- buy now ---- */
.pd-buy-now {
    display: block;
    width: 100%;
    padding: 14px 0;
    background: var(--gold);
    color: var(--white);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    cursor: pointer;
    border: none;
    margin-bottom: 28px;
    transition: background var(--transition);
}
.pd-buy-now:hover { background: var(--gold-dark); }

/* ---- installment ---- */
.pd-installment__title {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.pd-banks {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.pd-bank {
    border: 1px solid var(--border);
    padding: 8px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.pd-bank img {
    max-width: 100%;
    /* max-height: 32px; */
    object-fit: contain;
}

.pd-gateways {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.pd-gateways img {
    /* height: 26px; */
    object-fit: contain;
    opacity: 0.85;
    transition: opacity var(--transition);
}
.pd-gateways img:hover { opacity: 1; }

/* ================================================
   RELATED STONES
   ================================================ */
.pd-related {
    padding: 40px 0 72px;
    background: var(--white);
}

.pd-related__title {
    font-family: var(--serif);
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 28px;
}

.pd-related__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 560px;               /* matches design — only 2 cards shown */
}

/* ---- related card ---- */
.pd-rel-card { display: flex; flex-direction: column; }

.pd-rel-card__img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--off-white);
    margin-bottom: 12px;
}

.pd-rel-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.pd-rel-card:hover .pd-rel-card__img-wrap img { transform: scale(1.05); }

.pd-rel-card__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    border: none;
    cursor: pointer;
    transition: background var(--transition);
}
.pd-rel-card__play:hover { background: var(--white); }

.pd-rel-card__wish {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    border: none;
    cursor: pointer;
    transition: color var(--transition);
}
.pd-rel-card__wish:hover { color: var(--gold); }

.pd-rel-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.pd-rel-card__name {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--gold);
}

.pd-rel-card__price {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.pd-rel-card__sub {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-mid);
    margin-bottom: 2px;
}

.pd-rel-card__detail {
    font-family: var(--sans);
    font-size: 11.5px;
    color: var(--text-light);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
    .pd-detail__inner { grid-template-columns: 360px 1fr; gap: 36px; }
}

@media (max-width: 860px) {
    .pd-detail__inner { grid-template-columns: 1fr; gap: 32px; }
    .pd-gallery__main { max-width: 500px; }
    .pd-related__grid { max-width: 100%; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .pd-banks              { grid-template-columns: repeat(3, 1fr); }
    .pd-actions            { grid-template-columns: 1fr; }
    .pd-info__title-row    { flex-direction: column; gap: 4px; }
    .pd-related__grid      { grid-template-columns: 1fr; max-width: 340px; }
    .pd-gateways           { gap: 12px; }
}