/* ============================================================
   WALLPAPER ADVISOR - STYLE.CSS
   Modern, clean, mobile-first (2026)
   Full version - All Features
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES (gampang diubah)
   ============================================================ */
:root {
    /* Colors */
    --color-bg:         #ffffff;
    --color-bg-alt:     #f7f8fa;
    --color-surface:    #ffffff;
    --color-text:       #0f1419;
    --color-text-soft:  #536471;
    --color-border:     #e5e7eb;
    --color-primary:    #0a84ff;
    --color-primary-d:  #0066cc;
    --color-accent:     #ff375f;
    --color-success:    #16a34a;
    --color-wa:         #25D366;

    /* Typography */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-md: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 2rem;
    --fs-3xl: 2.5rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Layout */
    --container: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;

    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.12);
    --shadow-xl: 0 24px 64px rgba(0,0,0,.16);

    /* Transition */
    --t-fast: .15s ease;
    --t-base: .25s ease;
    --t-slow: .4s ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    font-size: var(--fs-md);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--t-fast);
}

a:hover { color: var(--color-primary-d); }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* ============================================================
   3. LAYOUT HELPERS
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

main {
    flex: 1;
    padding-top: 72px;
}

.section {
    padding: var(--space-xl) 0;
}

.section-title {
    font-size: var(--fs-2xl);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: var(--space-xs);
    line-height: 1.2;
}

.section-subtitle {
    color: var(--color-text-soft);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-lg);
}

/* Skip link (aksesibilitas) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--color-primary);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: var(--radius-sm);
    z-index: 9999;
}
.skip-link:focus {
    top: 1rem;
    color: #fff;
}

/* ============================================================
   4. HEADER / NAVBAR
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: background var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: var(--fs-lg);
    color: var(--color-text);
    letter-spacing: -.02em;
    text-decoration: none;
}
.logo img {
    max-height: 36px;
    width: auto;
}
.logo:hover { color: var(--color-primary); }

.main-nav ul {
    display: flex;
    gap: var(--space-md);
    list-style: none;
}

.main-nav a {
    color: var(--color-text);
    font-weight: 500;
    font-size: var(--fs-sm);
    padding: .5rem 0;
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--t-base);
}
.main-nav a:hover { color: var(--color-primary); }
.main-nav a:hover::after { width: 100%; }

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: var(--radius-sm);
    padding: 0;
}
.menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--t-base);
    border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   5. HERO SECTION
   ============================================================ */
.hero {
    padding: var(--space-xl) 0 var(--space-lg);
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.hero h1 {
    font-size: var(--fs-3xl);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: var(--fs-lg);
    color: var(--color-text-soft);
    max-width: 640px;
    margin: 0 auto var(--space-md);
}

/* ============================================================
   6. CATEGORY FILTER CHIPS
   ============================================================ */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: .5rem 1rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text-soft);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--t-base);
    white-space: nowrap;
}
.filter-chip:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.filter-chip.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ============================================================
   7. PRODUCT GRID & CARD
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.product-card > a {
    display: block;
    color: inherit;
}

.product-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-bg-alt);
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}
.product-card:hover .product-card-image img {
    transform: scale(1.06);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--color-text);
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: .35rem .75rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: .04em;
    z-index: 2;
}
.product-badge.out {
    background: var(--color-accent);
    color: #fff;
}

.product-card-body {
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

.product-card-category {
    font-size: var(--fs-xs);
    color: var(--color-text-soft);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
}

.product-card-title {
    font-size: var(--fs-md);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-title a {
    color: inherit;
    text-decoration: none;
}
.product-card-title a:hover {
    color: var(--color-primary);
}

.product-card-desc {
    font-size: var(--fs-sm);
    color: var(--color-text-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: .25rem;
}

.product-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .5rem;
}

.product-price {
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -.02em;
}

/* ============================================================
   8. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--t-base);
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    border: 2px solid transparent;
    line-height: 1.2;
    text-decoration: none;
    font-family: inherit;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-primary-d);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(10,132,255,.35);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-wa {
    background: var(--color-wa);
    color: #fff;
}
.btn-wa:hover {
    background: #1ebe5b;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37,211,102,.4);
}

.btn-block { width: 100%; }

.btn-sm {
    padding: .5rem 1rem;
    font-size: var(--fs-xs);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--fs-md);
}

/* ============================================================
   9. BREADCRUMB
   ============================================================ */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    font-size: var(--fs-sm);
    color: var(--color-text-soft);
    padding: var(--space-md) 0 var(--space-sm);
    list-style: none;
    margin: 0;
}
.breadcrumb li {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.breadcrumb li::after {
    content: '/';
    color: var(--color-border);
}
.breadcrumb li:last-child::after {
    display: none;
}
.breadcrumb a {
    color: var(--color-text-soft);
}
.breadcrumb a:hover {
    color: var(--color-primary);
}
.breadcrumb [aria-current] {
    color: var(--color-text);
    font-weight: 600;
}

/* ============================================================
   10. PRODUCT DETAIL PAGE
   ============================================================ */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    padding: var(--space-md) 0 var(--space-xl);
    align-items: start;
}

.product-detail-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-alt);
    aspect-ratio: 1 / 1;
    position: sticky;
    top: 96px;
}
.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: var(--fs-2xl);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    margin: var(--space-xs) 0;
}

.product-detail-meta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-text-soft);
}

.product-detail-price {
    font-size: var(--fs-3xl);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -.03em;
    margin: var(--space-sm) 0;
}

.product-detail-desc {
    font-size: var(--fs-md);
    color: var(--color-text-soft);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}
.product-detail-desc p {
    margin-bottom: 1rem;
}
.product-detail-desc p:last-child {
    margin-bottom: 0;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin: var(--space-md) 0;
}

.stock-info {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: var(--fs-sm);
    font-weight: 600;
}
.stock-info.ready { color: var(--color-success); }
.stock-info.out { color: var(--color-accent); }
.stock-info::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* ============================================================
   11. FAQ ACCORDION
   ============================================================ */
.faq-section {
    margin-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-md);
}
.faq-section h2 {
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}
.faq-item {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) 0;
}
.faq-item summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: var(--fs-md);
    color: var(--color-text);
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-text-soft);
    transition: transform var(--t-base);
    line-height: 1;
    flex-shrink: 0;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-item p {
    margin-top: .75rem;
    color: var(--color-text-soft);
    font-size: var(--fs-sm);
    line-height: 1.7;
}

/* ============================================================
   12. RELATED PRODUCTS
   ============================================================ */
.related-section {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

/* ============================================================
   13. FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
    padding-top: var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.footer-brand {
    font-size: var(--fs-xl);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: var(--space-xs);
}

.footer-desc {
    color: var(--color-text-soft);
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.footer-col h4 {
    font-size: var(--fs-sm);
    font-weight: 700;
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.footer-col a {
    color: var(--color-text-soft);
    font-size: var(--fs-sm);
    text-decoration: none;
}
.footer-col a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: var(--space-sm) 0;
    text-align: center;
    font-size: var(--fs-sm);
    color: var(--color-text-soft);
}

/* ============================================================
   14. FLOATING WHATSAPP
   ============================================================ */
.wa-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-wa);
    color: #fff !important;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37,211,102,.45);
    z-index: 999;
    transition: all var(--t-base);
    overflow: hidden;
    text-decoration: none;
}
.wa-float:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(37,211,102,.6);
    color: #fff;
}
.wa-float-label {
    display: none;
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-left: .5rem;
    white-space: nowrap;
}

.wa-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--color-wa);
    animation: pulse 2s infinite;
    z-index: -1;
}
@keyframes pulse {
    0%   { transform: scale(1);   opacity: .7; }
    70%  { transform: scale(1.5); opacity: 0;  }
    100% { transform: scale(1.5); opacity: 0;  }
}

/* ============================================================
   15. EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: var(--space-xl) var(--space-sm);
    color: var(--color-text-soft);
}
.empty-state h2 {
    font-size: var(--fs-xl);
    color: var(--color-text);
    margin-bottom: .5rem;
}
.empty-state code {
    background: var(--color-bg-alt);
    padding: .2rem .4rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: var(--fs-sm);
    color: var(--color-primary);
}

/* ============================================================
   16. FADE-IN ANIMATION
   ============================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   17. RESPONSIVE
   ============================================================ */

/* Tablet (<= 900px) */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }
    .product-detail-image {
        position: static;
        aspect-ratio: 4 / 3;
    }
}

/* Mobile (<= 720px) */
@media (max-width: 720px) {
    :root {
        --fs-2xl: 1.75rem;
        --fs-3xl: 2rem;
        --space-xl: 3rem;
    }

    .menu-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--color-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--t-base);
        box-shadow: var(--shadow-md);
    }
    .main-nav.open { max-height: 300px; }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: var(--space-sm);
    }
    .main-nav li {
        border-bottom: 1px solid var(--color-border);
    }
    .main-nav li:last-child {
        border-bottom: none;
    }
    .main-nav a {
        display: block;
        padding: .9rem .5rem;
        font-size: var(--fs-md);
    }
    .main-nav a::after { display: none; }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    .product-card-body { padding: .75rem; }
    .product-card-title { font-size: var(--fs-sm); }
    .product-card-desc { display: none; }
    .product-price { font-size: var(--fs-md); }

    .hero h1 { font-size: var(--fs-2xl); }
    .hero p { font-size: var(--fs-md); }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .product-detail-price { font-size: var(--fs-2xl); }

    .wa-float {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .breadcrumb {
        font-size: var(--fs-xs);
    }

    .btn-lg {
        padding: .9rem 1.5rem;
        font-size: var(--fs-sm);
    }
}

/* Small mobile (<= 380px) */
@media (max-width: 380px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .category-filter {
        justify-content: flex-start;
    }
}

/* ============================================================
   18. DARK MODE (auto, aktif kalau body punya class "dark-auto")
   ============================================================ */
@media (prefers-color-scheme: dark) {
    body.dark-auto {
        --color-bg:        #0a0a0a;
        --color-bg-alt:    #141414;
        --color-surface:   #1a1a1a;
        --color-text:      #f5f5f7;
        --color-text-soft: #a1a1a6;
        --color-border:    #2a2a2a;
    }
    body.dark-auto .site-header {
        background: rgba(10,10,10,.85);
    }
    body.dark-auto .site-header.scrolled {
        background: rgba(10,10,10,.95);
    }
    body.dark-auto .main-nav {
        background: rgba(10,10,10,.98);
    }
    body.dark-auto .product-badge {
        background: rgba(26,26,26,.95);
        color: var(--color-text);
    }
}

/* ============================================================
   19. REDUCED MOTION (aksesibilitas)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
    .wa-float::before {
        animation: none !important;
    }
}

/* ============================================================
   20. PRINT
   ============================================================ */
@media print {
    .site-header,
    .wa-float,
    .product-actions,
    .menu-toggle,
    .related-section {
        display: none !important;
    }
    main { padding-top: 0; }
    body { background: #fff; color: #000; }
    .product-detail {
        grid-template-columns: 1fr;
    }
    .product-detail-image {
        position: static;
    }
}