/* ══════════════════════════════
   WRAPPER
══════════════════════════════ */
.pd-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 32px 80px;
}

/* ══════════════════════════════
   MAIN PRODUCT LAYOUT
══════════════════════════════ */
.pd-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
    align-items: flex-start;
}

/* ── Gallery ── */
.pd-gallery {
    display: flex;
    gap: 16px;
    position: sticky;
    top: 100px;
}

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

.pd-thumb {
    width: 72px;
    height: 88px;
    border: 2px solid var(--border);
    background: var(--cream-deep);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.pd-thumb.active { border-color: var(--gold); }
.pd-thumb:hover  { border-color: var(--gold-dark); }

.thumb-placeholder {
    width: 100%;
    height: 100%;
    background: var(--cream-deep);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 100"><path d="M25 10 L15 80 L35 80 Z" fill="%23ddd" stroke="%23d2a679" stroke-width="0.5"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

.pd-main-image {
    flex: 1;
}

.main-image-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--cream-deep);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 100"><path d="M25 10 L15 80 L35 80 Z" fill="%23eee" stroke="%23d2a679" stroke-width="1"/></svg>');
    background-repeat: no-repeat;
    background-position: center 40%;
    border: 1px solid var(--border);
    transition: opacity 0.2s;
}

/* ── Product Info ── */
.pd-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pd-category {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-dark);
}

.pd-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    color: var(--navy);
    line-height: 1.1;
    margin: -8px 0 0;
}

/* Stars */
.pd-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars { display: flex; gap: 2px; }

.star {
    font-size: 1rem;
    color: var(--border);
}

.stars.large .star { font-size: 1.6rem; }
.stars.small .star { font-size: 0.85rem; }

.star.filled { color: var(--gold-dark); }
.star.half   { color: var(--gold-dark); opacity: 0.5; }

.rating-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: underline;
}

.rating-count:hover { color: var(--gold-dark); }

.pd-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    color: var(--navy);
}

.pd-stock {
    font-size: 0.8rem;
    font-weight: 500;
}

.pd-stock.in-stock  { color: #4e9e70; }
.pd-stock.out-stock { color: #c0392b; }
.pd-stock span { color: var(--text-muted); font-weight: 400; }

.pd-short-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.75;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

/* ── Scent Notes ── */
.pd-notes {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--cream-deep);
    border: 1px solid var(--border);
    padding: 16px 0;
}

.note-column {
    flex: 1;
    text-align: center;
    padding: 0 16px;
}

.note-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
    flex-shrink: 0;
}

.note-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.note-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--navy);
}

/* ── Option Groups ── */
.pd-option-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-option-label {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

/* Size */
.size-options {
    display: flex;
    gap: 10px;
}

.size-btn {
    flex: 1;
    padding: 12px 8px;
    border: 1.5px solid var(--border);
    background: var(--cream-deep);
    color: var(--navy);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.size-btn span {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}

.size-btn:hover  { border-color: var(--gold); }
.size-btn.active { border-color: var(--gold); background: var(--gold-pale); }

/* Quantity */
.pd-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    width: fit-content;
}

.qty-btn {
    background: var(--cream-deep);
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    color: var(--navy);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover:not(:disabled) { background: var(--gold-pale); }
.qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.qty-val {
    width: 48px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    line-height: 40px;
}

/* ── Actions ── */
.pd-actions {
    display: flex;
    gap: 12px;
}

.pd-cart-btn { flex: 1; text-align: center; padding: 16px; }

.pd-cart-btn.is-waitlisted {
    background: var(--gold-pale);
    color: var(--navy);
    box-shadow: inset 0 0 0 1px var(--gold-dark);
}

.pd-cart-btn.is-waitlisted:hover {
    background: #EEDCB0;
    box-shadow: inset 0 0 0 1px var(--gold-dark);
}

.pd-cart-btn.is-added,
.pd-cart-btn.is-added:hover {
    background: #2E7D32;
    border-color: #2E7D32;
    color: #fff;
    box-shadow: none;
    transform: none;
    cursor: default;
}
.pd-buy-btn  { flex: 1; text-align: center; padding: 15px; }

/* ── Perks ── */
.pd-perks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.perk {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.perk svg {
    width: 15px;
    height: 15px;
    stroke: var(--gold-dark);
    flex-shrink: 0;
}

/* ══════════════════════════════
   TABS
══════════════════════════════ */
.pd-tabs {
    border-top: 1px solid var(--border);
    margin-bottom: 64px;
}

.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 16px 28px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover  { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--gold); }

.tab-panel {
    padding: 36px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tab-panel.hidden { display: none; }

.tab-panel p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 720px;
}

/* Details table */
.details-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 560px;
}

.details-table tr {
    border-bottom: 1px solid var(--border);
}

.details-table td {
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.details-table td:first-child {
    font-weight: 500;
    color: var(--navy);
    width: 180px;
    background: var(--cream-deep);
}

/* Care tips */
.care-tips {
    background: var(--cream-deep);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    padding: 20px 24px;
    max-width: 560px;
}

.care-title {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy) !important;
    margin-bottom: 10px !important;
}

.care-tips ul {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.care-tips li {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    list-style: disc;
}

/* Reviews */
.reviews-summary {
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.reviews-avg {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem !important;
    font-weight: 300;
    color: var(--navy) !important;
    margin-bottom: 6px !important;
    line-height: 1;
}

.reviews-count {
    font-size: 0.78rem !important;
    color: var(--text-muted) !important;
    margin-top: 6px !important;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 720px;
}

.review-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.review-author {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--navy);
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.review-body {
    font-size: 0.88rem !important;
    color: var(--text-muted) !important;
    line-height: 1.7 !important;
}

/* ══════════════════════════════
   RELATED PRODUCTS
══════════════════════════════ */
.pd-related {
    padding-top: 16px;
}

.pd-related .section-label {
    margin-bottom: 32px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.related-card:hover { transform: translateY(-4px); }

.related-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--cream-deep);
    border: 1px solid var(--border);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 100"><path d="M25 10 L15 80 L35 80 Z" fill="%23eee" stroke="%23d2a679" stroke-width="0.5"/></svg>');
    background-repeat: no-repeat;
    background-position: center 40%;
    margin-bottom: 14px;
    transition: box-shadow 0.25s;
}

.related-card:hover .related-img {
    box-shadow: var(--shadow-md);
}

.related-category {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 4px;
}

.related-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--navy);
    margin-bottom: 6px;
}

.related-price {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .pd-main {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .pd-gallery { position: static; }

    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .pd-wrapper { padding: 24px 16px 60px; }

    .pd-gallery { flex-direction: column-reverse; }

    .pd-thumbnails {
        flex-direction: row;
        overflow-x: auto;
    }

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

    .pd-actions { flex-direction: column; }

    .related-grid { grid-template-columns: repeat(2, 1fr); }

    .tab-btn { padding: 14px 16px; font-size: 0.7rem; }
}

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
.pd-toast[hidden] { display: none; }
.pd-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--navy);
    color: var(--cream);
    padding: 13px 28px;
    font-size: 0.86rem;
    letter-spacing: 0.02em;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.pd-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
