/* ==========================================
   PREMIUM PRODUCT DETAIL PAGE (REFINED)
   ========================================== */

:root {
    --text-main: var(--dark);
    --text-muted: #71717a;
    --border-light: var(--border);
    --bg-soft: var(--soft);
    --accent: var(--primary);
    --white: #ffffff;
    --radius: 12px;
}

.product-detail-page {
    background: var(--white);
    padding: 40px 0 100px;
    color: var(--text-main);
    font-family: 'Space Grotesk', sans-serif;
}

/* --- Breadcrumbs --- */
.breadcrumb-wrap {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;
}
.breadcrumb-wrap a { color: var(--text-muted); text-decoration: none; transition: 0.2s; }
.breadcrumb-wrap a:hover { color: var(--accent); }
.breadcrumb-wrap i { font-size: 10px; color: #d4d4d8; }
.breadcrumb-wrap span { color: var(--text-main); font-weight: 600; }

/* --- Main Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: 550px 1fr; /* Rigid width for gallery column */
    gap: 80px;
    align-items: start;
}

/* --- Gallery Section --- */
.gallery-container {
    display: flex;
    gap: 20px;
    position: sticky;
    top: 100px;
    width: 550px; /* Fixed width to prevent JS expansion */
    max-width: 100%;
    overflow: hidden;
}

.thumb-slider {
    width: 80px;
    flex-shrink: 0;
}
.thumb-slider .swiper-slide {
    width: 100% !important;
    height: 80px !important;
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    overflow: hidden;
    transition: 0.3s;
    opacity: 0.5;
}
.thumb-slider .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(245, 158, 29, 0.1);
}
.thumb-slider img { width: 100%; height: 100%; object-fit: cover; }

.main-slider-container {
    flex: 1;
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.main-slider .swiper-slide img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    cursor: zoom-in;
}

/* --- Product Info --- */
.product-info-wrap {
    padding: 0 10px;
}
.category-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}
.product-info-wrap h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}
.sku-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 25px;
    background: var(--bg-soft);
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
}

.price-box {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.current-price { font-size: 34px; font-weight: 700; color: var(--dark); }
.old-price { font-size: 20px; color: #a1a1aa; text-decoration: line-through; }
.discount-badge {
    font-size: 12px;
    background: #ef4444;
    color: #fff;
    padding: 4px 10px;
    font-weight: 700;
    border-radius: 6px;
}

.shipping-info {
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}
.shipping-info i {
    color: var(--accent);
    font-size: 16px;
}
.free-shipping-label {
    color: #10b981;
    font-weight: 700;
    text-transform: uppercase;
}
.shipping-cost-label {
    font-weight: 600;
}

/* --- Options --- */
.option-group { margin-bottom: 30px; }
.option-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
    color: var(--dark);
}

.choice-list { display: flex; flex-wrap: wrap; gap: 12px; }
.choice-item { position: relative; cursor: pointer; }
.choice-item input { position: absolute; opacity: 0; }
.choice-box {
    padding: 12px 24px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
    background: var(--white);
}
.choice-item input:checked + .choice-box {
    border-color: var(--accent);
    background: rgba(245, 158, 29, 0.05);
    color: var(--accent);
}

.minimal-input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}
.minimal-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 158, 29, 0.1); }

/* --- Controls --- */
.purchase-controls { margin-top: 40px; }
.qty-selector {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}
.qty-ctrl {
    display: flex;
    background: var(--bg-soft);
    border-radius: 10px;
    overflow: hidden;
    height: 52px;
}
.qty-btn {
    width: 52px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    transition: 0.2s;
}
.qty-btn:hover { background: rgba(0,0,0,0.05); }
.qty-val {
    width: 60px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
}

.action-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.btn-main {
    height: 60px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
}
.btn-black { background: var(--dark); color: #fff; }
.btn-black:hover { background: #000; transform: translateY(-2px); }

.btn-outline { background: #fff; border: 2px solid var(--dark); color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: #fff; transform: translateY(-2px); }

/* --- Tabs --- */
.details-tabs { margin-top: 80px; }
.tabs-nav {
    display: flex;
    gap: 40px;
    border-bottom: 1px solid var(--border-light);
}
.tab-btn {
    padding: 20px 0;
    background: none;
    border: none;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
}
.tab-btn.active { color: var(--dark); }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
}

.tab-content { padding: 40px 0; }
.description-rich { line-height: 1.8; color: #4b5563; }

/* --- Mobile --- */
@media (max-width: 992px) {
    .product-grid { grid-template-columns: 1fr; gap: 30px; }
    .gallery-container { 
        position: static; 
        flex-direction: column-reverse; 
        max-width: 450px; /* Reduced max-width for mobile */
        width: 90%;
        margin: 0 auto;
        gap: 12px;
    }
    .thumb-slider { width: 100%; }
    .thumb-slider .swiper-slide { 
        width: 65px !important; 
        height: 65px !important; 
        border-radius: 10px;
    }
    .main-slider-container {
        border-radius: 16px;
        border: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    }
    .product-info-wrap h1 { font-size: 28px; letter-spacing: -0.5px; }
    .product-detail-page { padding-top: 20px; }
}

@media (max-width: 600px) {
    .action-btns { grid-template-columns: 1fr; gap: 12px; }
    .btn-main { height: 56px; font-size: 14px; }
    .price-box { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; margin-bottom: 25px; }
    .qty-selector { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 20px; }
}
