/* ================================================================
   PRODUCT DETAILS PAGE — MOBILE FIRST (Fully Responsive)
   ================================================================ */

/* ── BASE (MOBILE ≤ 767px) ───────────────────────────────────── */

/* Breadcrumbs */
.prod-breadcrumbs {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    white-space: nowrap;
    overflow-x: auto;
}
.prod-breadcrumbs::-webkit-scrollbar { display: none; }
.prod-breadcrumbs a { color: var(--text-muted); transition: color var(--t); }
.prod-breadcrumbs a:hover { color: var(--gold); }
.prod-breadcrumbs .sep { margin: 0 6px; color: var(--border-2); }
.prod-breadcrumbs .current { color: var(--white); font-weight: 500; }

/* Section & Grid */
.prod-detail-section { padding: 24px 0 80px; }
.prod-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── GALLERY ─────────────────────────────────────────────────── */
.prod-gallery { display: flex; flex-direction: column; gap: 10px; }

.prod-main-img-wrap {
    background: var(--surface-1);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1;       /* square on mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
}
.prod-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease-out;
}
.prod-zoom-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    transition: opacity var(--t);
}

.prod-thumb-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.prod-thumb-list::-webkit-scrollbar { display: none; }
.prod-thumb {
    width: 60px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--r-sm);
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all var(--t);
    flex-shrink: 0;
}
.prod-thumb.active { border-color: var(--gold); opacity: 1; }

/* ── INFO PANEL ──────────────────────────────────────────────── */
.prod-info-panel { display: flex; flex-direction: column; }

.prod-brand-sku {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
}
.prod-brand-label { color: var(--gold); font-weight: 600; }
.prod-sku { color: var(--text-dim); }

.prod-detail-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--white);
    margin-bottom: 10px;
}
.prod-detail-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.prod-detail-rating .stars { display: flex; gap: 2px; color: var(--gold); }
.prod-detail-rating .rating-count { font-size: 12px; color: var(--text-muted); }

.prod-detail-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.prod-detail-price-main { font-size: 1.4rem; font-weight: 600; color: var(--white); }
.prod-detail-price-old { font-size: 1rem; color: var(--text-dim); text-decoration: line-through; }

.prod-detail-desc {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.prod-divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── OPTIONS ─────────────────────────────────────────────────── */
.prod-options-wrapper { display: flex; flex-direction: column; gap: 18px; }
.prod-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.prod-option-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.size-guide-link {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: underline;
    transition: color var(--t);
}
.prod-size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.psize-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 1px solid var(--border-2);
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t);
    font-family: inherit;
    touch-action: manipulation;
}
.psize-btn.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212,175,55,0.05);
}
.prod-color-options { display: flex; gap: 12px; flex-wrap: wrap; }
.pcolor-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 0 0 1px var(--border-2);
    transition: all var(--t);
    touch-action: manipulation;
}
.pcolor-btn.active { box-shadow: 0 0 0 2px var(--gold); transform: scale(1.1); }
.color-indicator { margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.color-indicator strong { color: var(--white); }

/* ── BUY SECTION ─────────────────────────────────────────────── */
.buy-section { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

/* Primary WA Button */
.buy-btn-primary {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #1ebe5d 0%, #25d366 60%, #1da851 100%);
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 4px 20px rgba(37,211,102,0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.buy-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    border-radius: inherit;
}
.buy-btn-primary:hover,
.buy-btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(37,211,102,0.4);
    color: #fff;
    text-decoration: none;
}
.buy-btn-icon--wa {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.buy-btn-label { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.buy-btn-sub {
    font-size: 10px;
    opacity: 0.85;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.buy-btn-main {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.buy-btn-arrow { opacity: 0.8; flex-shrink: 0; }

/* Marketplace Divider */
.buy-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin: 2px 0;
}
.buy-divider::before, .buy-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

/* Marketplace Pills */
.marketplace-pills { display: flex; flex-direction: column; gap: 8px; }
.mp-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.mp-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 0%, transparent 60%);
    border-radius: inherit;
}
.mp-pill:hover, .mp-pill:active { transform: translateX(3px); text-decoration: none; }
.mp-pill--shopee   { background: rgba(238,77,45,0.13); border-color: rgba(238,77,45,0.35); }
.mp-pill--shopee:hover { border-color: #ee4d2d; box-shadow: 0 4px 16px rgba(238,77,45,0.2); }
.mp-pill--tokopedia { background: rgba(66,181,73,0.10); border-color: rgba(66,181,73,0.3); }
.mp-pill--tokopedia:hover { border-color: #42b549; box-shadow: 0 4px 16px rgba(66,181,73,0.18); }
.mp-pill--tiktok   { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); }
.mp-pill--tiktok:hover { border-color: rgba(255,255,255,0.35); box-shadow: 0 4px 16px rgba(238,29,82,0.18); }
.mp-pill-logo { flex-shrink: 0; display: flex; align-items: center; }
.mp-pill-text { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mp-pill-name { font-size: 14px; font-weight: 700; color: #fff; }
.mp-pill-action { font-size: 11px; opacity: 0.5; font-weight: 400; color: #aaa; }
.mp-pill-chevron { flex-shrink: 0; opacity: 0.35; transition: opacity 0.15s, transform 0.15s; }
.mp-pill:hover .mp-pill-chevron { opacity: 0.85; transform: translateX(2px); }

/* ── SECONDARY ACTIONS (Wishlist & Compare) ──────────────────── */
.prod-secondary-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.prod-sec-btn {
    flex: 1 1 calc(50% - 5px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--surface-1);
    border: 1px solid var(--border-2);
    border-radius: var(--r-md);
    padding: 11px 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.prod-sec-btn:hover,
.prod-sec-btn.wish-active,
.prod-sec-btn.compare-active {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(212,175,55,0.05);
}

/* ── META INFO ───────────────────────────────────────────────── */
.prod-meta-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: var(--surface-1);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.prod-meta-item { display: flex; font-size: 12px; }
.meta-label { width: 80px; color: var(--text-dim); flex-shrink: 0; }
.meta-value, .meta-value a { color: var(--text-muted); word-break: break-word; }
.meta-socials { display: flex; gap: 10px; }
.meta-socials a { color: var(--text-dim); }

/* ── DELIVERY INFO ───────────────────────────────────────────── */
.prod-delivery-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px dashed var(--border-2);
    border-radius: var(--r-md);
}
.delivery-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(212,175,55,0.1);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.prod-delivery-info strong { display: block; color: var(--white); font-size: 13px; margin-bottom: 2px; }
.prod-delivery-info p { color: var(--text-muted); font-size: 12px; margin: 0; }

/* ── TABS ────────────────────────────────────────────────────── */
.prod-tabs-section { margin-top: 32px; border-top: 1px solid var(--border); }
.prod-tabs-header {
    display: flex;
    overflow-x: auto;               /* horizontal scroll on mobile */
    -webkit-overflow-scrolling: touch;
    gap: 0;
    border-bottom: 1px solid var(--border-2);
    scrollbar-width: none;
}
.prod-tabs-header::-webkit-scrollbar { display: none; }
.prod-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 14px 18px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;             /* prevent wrapping */
    transition: all var(--t);
    touch-action: manipulation;
}
.prod-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.prod-tab-content {
    display: none;
    padding: 20px 0;
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 13px;
    animation: fadeIn 0.3s ease forwards;
}
.prod-tab-content.active { display: block; }

.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-2);
    text-align: left;
    font-size: 12px;
    word-break: break-word;
}
.info-table th { width: 40%; color: var(--white); font-weight: 500; }

.review-item { padding: 18px 0; border-bottom: 1px solid var(--border-2); }
.review-item:last-child { border-bottom: none; }
.rev-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.rev-user { display: flex; align-items: center; gap: 10px; }
.rev-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 600;
    flex-shrink: 0;
}
.rev-meta strong { display: block; color: var(--white); font-size: 13px; }
.rev-date { font-size: 11px; color: var(--text-dim); }

/* ── STICKY CART (MOBILE) ────────────────────────────────────── */
.sticky-add-cart {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 900;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
    safe-area-inset-bottom: env(safe-area-inset-bottom);
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.sticky-add-cart.visible { bottom: 0; }
.sticky-cart-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sticky-cart-img { width: 38px; height: 38px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.sticky-cart-name { font-size: 12px; color: var(--white); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.sticky-cart-price { font-size: 12px; color: var(--gold); }

/* Keep qty control & add-to-cart button for sticky bar */
.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-2);
    border-radius: var(--r-md);
    height: 44px;
    background: var(--surface-1);
}
.qty-btn {
    width: 40px;
    height: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}
.qty-num {
    width: 36px;
    text-align: center;
    background: none;
    border: none;
    color: var(--white);
    font-weight: 500;
    font-size: 14px;
    -moz-appearance: textfield;
}
.qty-num::-webkit-outer-spin-button,
.qty-num::-webkit-inner-spin-button { -webkit-appearance: none; }
.pd-add-btn {
    height: 44px;
    font-size: 12px;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

/* ── TABLET (min-width: 640px) ───────────────────────────────── */
@media (min-width: 640px) {
    .buy-btn-main { font-size: 15px; }
    .mp-pill-name { font-size: 15px; }
    .prod-detail-name { font-size: 1.75rem; }
}

/* ── TABLET (min-width: 768px) ───────────────────────────────── */
@media (min-width: 768px) {
    .prod-breadcrumbs { font-size: 13px; padding: 16px 0; }
    .prod-detail-section { padding: 40px 0 80px; }
    .prod-detail-name { font-size: 2rem; }
    .prod-detail-price-main { font-size: 1.6rem; }
    .prod-detail-desc { font-size: 14px; }
    .prod-tab { font-size: 14px; padding: 16px 24px; }
    .prod-tab-content { font-size: 14px; }
    .rev-header { flex-direction: row; justify-content: space-between; align-items: center; }
    .info-table th { width: 30%; }
    .sticky-cart-name { max-width: 200px; }
}

/* ── DESKTOP (min-width: 1024px) ─────────────────────────────── */
@media (min-width: 1024px) {
    .prod-detail-section { padding: 48px 0 80px; }
    .prod-detail-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: start;
    }
    .prod-gallery {
        position: sticky;
        top: calc(var(--header-h) + 20px);
        gap: 16px;
    }
    .prod-main-img-wrap {
        border-radius: var(--r-lg);
        aspect-ratio: 4/5;
    }
    .prod-zoom-hint { opacity: 0; }
    .prod-main-img-wrap:hover .prod-zoom-hint { opacity: 1; }
    .prod-thumb { width: 76px; height: 96px; }
    .prod-detail-name { font-size: 2.25rem; margin-bottom: 14px; }
    .prod-detail-price-main { font-size: 1.8rem; }
    .prod-detail-desc { font-size: 15px; }
    .prod-tabs-section { padding-top: 60px; margin-top: 80px; }
    .prod-tabs-header { gap: 40px; }
    .prod-tab-content { font-size: 15px; }
    .prod-tab { font-size: 15px; padding: 0 0 18px 0; }

    /* On desktop, secondary actions can be inline */
    .prod-secondary-actions {
        flex-direction: row;
        gap: 20px;
        margin-bottom: 32px;
    }
    .prod-sec-btn {
        flex: 0;
        background: none;
        border: none;
        padding: 0;
        font-size: 13px;
        gap: 8px;
    }
    .prod-sec-btn:hover,
    .prod-sec-btn.wish-active,
    .prod-sec-btn.compare-active {
        background: none;
        border: none;
    }
}
