/* =========================================================
   jabelo.id — Centralized Stylesheet (Apple Store Off-White)
   ========================================================= */

:root {
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --card-bg-hover: #ffffff;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --accent-blue: #0066cc;
    --accent-blue-hover: #0077ed;
    --accent-red: #ff3b30;
    --badge-green: #28cd41;
    --badge-red: #ff3b30;
    --badge-orange: #ff9500;
    --badge-purple: #af52de;
    --wa-color: #25d366;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* --- BADGE KONDISI FISIK --- */
.badge-condition-new { background: #28cd41; color: #ffffff; }
.badge-condition-likenew { background: #34c759; color: #ffffff; }
.badge-condition-used { background: #8e8e93; color: #ffffff; }

/* PENGUNCIAN LAYAR TOTAL UNTUK HP */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* --- NAVBAR APPLE STORE LIGHT RESPONSIF --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(245, 245, 247, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 52px;
    padding: 0 16px;
    gap: 24px;
    width: 100%;
}

.logo {
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
    margin-left: auto;
    max-width: 100%;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

@media (max-width: 640px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 10px 16px 8px 16px;
        gap: 8px;
    }

    .nav-links {
        width: 100%;
        gap: 16px;
        padding-bottom: 2px;
        margin-left: 0;
    }

    .hero, 
    .category-header {
        padding-top: 130px !important;
    }

    .product-detail-container {
        margin-top: 120px !important;
    }
}

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 120px 16px 40px 16px;
    background: var(--bg-color);
    width: 100%;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 8px 0;
    color: var(--text-main);
}

@media(min-width: 768px) {
    .hero-title { font-size: 56px; }
}

.hero-description {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 400;
}

/* --- BUTTONS --- */
.btn-primary {
    background: var(--accent-blue);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 980px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
}

/* --- SHOWCASE & PRODUCT GRID --- */
.showcase {
    max-width: 1140px;
    margin: 30px auto 80px auto;
    padding: 0 16px;
    width: 100%;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
}

@media(min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media(min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.product-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    position: relative;
    width: 100%;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
}

/* --- BINGKAI GAMBAR SLIDER INDEX --- */
.slider-container {
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 280px;
    margin: 12px 0;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding: 0;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.slider-container::-webkit-scrollbar {
    display: none;
}

/* EFEK HOVER: Frame Gambar Produk Berubah Merah saat Mouse di atas Product Card */
.product-card:hover .slider-container {
    border-color: var(--accent-red) !important;
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.2);
}

.slider-img {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    scroll-snap-align: center;
    border-radius: 12px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.04));
    transform: scale(0.8) !important;
    transition: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

.product-card:hover .slider-img {
    transform: scale(0.8) !important;
}

/* Penyesuaian Presisi Layar HP */
@media (max-width: 640px) {
    .showcase {
        padding: 0 16px;
    }

    .slider-container {
        max-height: none;
        margin: 10px 0;
        border-radius: 12px;
    }

    .slider-img {
        border-radius: 10px;
    }
}

/* --- BADGES --- */
.badge-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-part { background: var(--badge-orange); color: #ffffff; }
.badge-single { background: var(--badge-purple); color: #ffffff; }
.badge-discount { background: var(--badge-red); color: #ffffff; }

/* --- PRICES --- */
.price-original {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
}

.price-value.has-discount {
    color: var(--accent-blue);
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

/* --- FLOATING CART --- */
.floating-cart {
    position: fixed;
    bottom: 15px;
    right: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    display: none;
    color: var(--text-main);
}

@media(min-width: 640px) {
    .floating-cart {
        left: auto;
        width: 340px;
        bottom: 30px;
        right: 30px;
    }
}

.btn-wa-checkout {
    width: 100%;
    background: var(--wa-color);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 980px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.3s ease;
}

.btn-wa-checkout:hover {
    opacity: 0.9;
}