*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #2bd466; /* Green matching the search button and icons */
    --primary-dark: #22a951;
    --dark: #1e293b; /* Dark overlay color */
    --dark-bg: #111111; /* Top bar black */
    --gray-bg: #f0f2f5;
    --border: #e5e7eb;
    --text-main: #333333;
    --text-muted: #6b7280;
}

#app-header {
    display: contents;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--gray-bg);
    color: var(--text-main);
    width: 100%;
}

.main-layout {
}

/* Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box !important;
}

/* Top Bar */
.top-bar {
    background: var(--dark-bg);
    color: #a0a0a0;
    font-size: 13px;
    padding: 10px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.top-bar-left span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.top-bar-left .highlight {
    color: var(--primary);
}
.top-bar a {
    color: #ffffff;
    text-decoration: none;
}
.top-bar a:hover {
    color: var(--primary);
}
.lang-toggle {
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* Main Header */
.main-header {
    background: #ffffff;
    padding: 15px 0;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #2bd466 50%, #7c3aed 50%); /* Fake logo icon */
    border-radius: 8px;
}
.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-title {
    font-size: 22px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    line-height: 1;
}
.logo-title span {
    color: #7c3aed; /* Purple dot/ID */
}
.logo-tagline {
    font-size: 10px;
    font-weight: 700;
    color: #888;
    letter-spacing: 1.5px;
    margin-top: 2px;
}

.search-container {
    flex: 1;
    display: flex;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.search-container input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 14px;
    background: #ffffff;
    color: #374151;
}
.search-container button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.search-container button:hover {
    background: var(--primary-dark);
}
.search-container button svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.account-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
}
.account-icon {
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.account-text {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}
.account-text strong {
    font-size: 14px;
    color: #000;
}
.cart-btn {
    width: 42px;
    height: 42px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    text-decoration: none;
}

/* Nav Bar */
.nav-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}
.nav-bar .container {
    display: flex;
    justify-content: center;
    gap: 40px;
}
.nav-bar a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
}
.nav-bar a:hover {
    color: var(--primary);
}

@media (max-width: 1023px) {
    .nav-bar {
        display: none;
    }
    .top-bar {
        display: none;
    }
    .header-actions {
        display: flex;
        gap: 10px;
    }
    .account-link {
        display: none; /* Hide account text on mobile to save space */
    }
    .main-header {
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        padding: 10px 0;
        border-bottom: 1px solid #f3f4f6;
    }
    .main-header .container {
        justify-content: flex-start;
        gap: 10px;
        overflow: hidden;
    }
    .logo img {
        max-width: 110px !important; /* Smaller logo for mobile */
    }
    .search-container {
        display: flex;
        flex: 1;
        min-width: 0; /* Allow flex shrinking */
    }
    .search-container input {
        min-width: 0; /* Prevent default input size from stretching container */
        width: 100%;
        background: #f3f4f6;
        border: none;
        border-radius: 8px;
        padding: 10px 15px;
        padding-right: 35px; /* space for icon */
    }
    .search-container button {
        background: transparent;
        color: #6b7280;
    }
}

/* Layout */
.main-layout {
    display: flex;
    gap: 30px;
    padding-top: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

/* ============================================================
   SUPER SEARCH OVERLAY
   ============================================================ */
.super-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    display: none;
    flex-direction: column;
}
.super-search.active {
    display: flex;
}
.super-search-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
    gap: 15px;
}
.ss-close {
    background: none;
    border: none;
    color: #4b5563;
    padding: 5px;
    cursor: pointer;
}
.ss-close svg {
    width: 24px;
    height: 24px;
}
.ss-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0 10px;
}
.ss-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
}
.ss-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 10px;
    font-size: 16px;
    outline: none;
}
.ss-clear {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
}
.ss-clear svg {
    width: 18px;
    height: 18px;
}
.super-search-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.ss-state {
    display: none;
}
.ss-state.active {
    display: block;
}
.ss-section h4 {
    font-size: 14px;
    color: #6b7280;
    margin-top: 0;
    margin-bottom: 15px;
}
.ss-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ss-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}
.ss-tag:hover {
    background: #e5e7eb;
}
.ss-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
}
.ss-item-img {
    width: 50px;
    height: 50px;
    background: #f3f4f6;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.ss-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ss-item-info h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}
.ss-item-info h5 strong {
    color: var(--primary);
    font-weight: 700;
}
.ss-item-info span {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}
.ss-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}
.ss-no-results svg {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
}
.ss-no-results p {
    font-size: 16px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 5px;
}
.ss-no-results span {
    font-size: 14px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}
.sidebar-inner {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.sidebar-header-mobile {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.sidebar-header-mobile h3 {
    font-weight: 700;
    font-size: 18px;
    margin: 0;
}
.sidebar-header-mobile button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
}

.sidebar-title-desktop {
    font-weight: 700;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 16px;
}

.widget {
    margin-bottom: 24px;
}
.widget h4 {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    color: #374151;
    margin-top: 0;
}

.price-filter-form {
    display: flex;
    flex-direction: column;
}
.price-inputs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.price-inputs input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #f9fafb;
}
.price-inputs input:focus {
    border-color: var(--primary);
}
.btn-filter {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-filter:hover {
    background-color: var(--primary-dark);
}

.category-list, .status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-list li, .status-list li {
    margin-bottom: 8px;
}
.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    transition: color 0.2s;
}
.category-list a:hover, .status-list a:hover {
    color: var(--primary);
}
.category-list span.count {
    font-size: 12px;
    color: #9ca3af;
}

.status-list a {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
}
.status-list svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}
.icon-sale { color: #ef4444; }
.icon-featured { color: #eab308; }

@media (min-width: 1024px) {
    .sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 25px;
        align-self: flex-start;
        height: max-content;
    }
    .sidebar-inner {
        position: static;
    }

    .bottom-nav {
        display: none !important;
    }
}
@media (max-width: 1023px) {
    .sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 2000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    .sidebar.active {
        left: 0;
    }
    .sidebar-inner {
        padding: 20px;
        box-shadow: none;
        border-radius: 0;
    }
    .sidebar-header-mobile {
        display: flex;
    }
    .sidebar-title-desktop {
        display: none;
    }
    
    /* Overlay */
    body.sidebar-open {
        overflow: hidden;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }
    .sidebar-overlay.active {
        display: block;
    }
}

/* Grid Area */
.content-area {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}
.toolbar {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.toolbar-left {
    font-size: 14px;
    color: #666;
}
.toolbar-right {
    display: flex;
    gap: 15px;
}
.toolbar-right select {
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    background: #f9fafb;
}
.view-toggles {
    display: flex;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2px;
    align-items: center;
}
.view-toggles button {
    background: transparent;
    border: none;
    color: #9ca3af;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.view-toggles button:hover {
    color: #4b5563;
}
.view-toggles button.active {
    background: var(--primary);
    color: white;
}
/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .container {
        padding: 0 15px; /* Kembalikan padding standar agar logo/icon tidak mepet tepi */
        width: 100%;
    }
    .product-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }
    .product-grid.list-view {
        grid-template-columns: 1fr;
        flex-wrap: wrap;
        gap: 10px;
    }
    .toolbar {
        padding: 10px;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 20px;
    }
}
    .toolbar-left {
        font-size: 11px;
        width: 100%;
        text-align: center;
    }
    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
    .toolbar-right select {
        min-width: 0; /* Prevent longest option from stretching the select box */
        font-size: 12px;
        padding: 6px 10px;
        flex: 1;
        margin-right: 0; /* Let flex gap handle spacing */
    }
    .view-toggles {
        flex-shrink: 0;
    }
}

/* Bottom Nav Bar (Mobile & Tablet) */
.bottom-nav {
    display: none;
}

@media (max-width: 1023px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        height: 60px;
        padding: 0 10px;
    }
    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #6b7280;
        font-size: 10px;
        gap: 4px;
        width: 20%;
    }
    .nav-item.active {
        color: var(--primary);
    }
    .nav-item svg {
        width: 20px;
        height: 20px;
    }
    .nav-center {
        position: relative;
        justify-content: flex-end;
        height: 100%;
        padding-bottom: 5px;
    }
    .center-btn {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
        background: var(--primary);
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0, 143, 59, 0.3);
    }
    .center-btn svg {
        width: 24px;
        height: 24px;
    }
    .center-btn {
        width: 45px;
        height: 45px;
        bottom: 15px;
    }
    body {
        /* padding-bottom: 70px; Make room for bottom nav */
    }
}


/* Product Card (Pure CSS replacing Tailwind) */
.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-img-wrap {
    position: relative;
    overflow: hidden;
    background-color: #f3f4f6;
    aspect-ratio: 1 / 1;
}
.card-img-wrap a {
    display: block;
    height: 100%;
}
.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-hover-action {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.5) 50%, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.product-card:hover .card-hover-action {
    opacity: 1;
}
.card-hover-action button {
    width: 100%;
    background-color: var(--primary);
    color: white;
    font-weight: bold;
    padding: 12px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    font-size: 14px;
}
.card-hover-action button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-category {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 8px 0;
}
.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.5;
    /* Line clamp 2 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem;
}
.card-title a {
    color: #008f3b;
    text-decoration: none;
}
.card-price {
    font-size: 20px;
    font-weight: bold;
    color: #111827;
    margin-top: auto;
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .card-info {
        padding: 10px;
    }
    .card-category {
        font-size: 0.7rem;
    }
    .card-title {
        font-size: 0.85rem;
        line-height: 1.2rem;
        margin-bottom: 0.5rem;
        min-height: 2.2rem;
    }
    .card-price {
        font-size: 16px;
    }
}

.card-list-action {
    display: none;
    margin-top: 15px;
}
.card-list-action button {
    background-color: var(--primary);
    color: white;
    font-weight: bold;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.card-list-action button:hover {
    background-color: var(--primary-dark);
}

/* List View Overrides */

.product-grid.list-view {
    grid-template-columns: 1fr;
}

.grid-item-wrapper .list-card {
    display: none;
}

.product-grid.list-view .grid-item-wrapper .grid-card {
    display: none;
}
.product-grid.list-view .grid-item-wrapper .list-card {
    display: flex;
}

/* Compact Product Card (List View) */
.product-card-compact {
    background-color: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    border: 1px solid #f3f4f6;
    width: 100%;
}
.product-card-compact:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.compact-img-wrap {
    position: relative;
    width: 12rem;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #f3f4f6;
}
.compact-img-wrap a {
    display: block;
    height: 100%;
}
.compact-img-wrap img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
}

.compact-info {
    flex: 1 1 0%;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}
.compact-info-top {
    flex: 1 1 0%;
}

.compact-category {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.compact-title {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.compact-title a {
    color: #008f3b;
    text-decoration: none;
}

.compact-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.compact-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.btn-add-cart {
    flex: 1 1 0%;
    background-color: var(--primary);
    color: #ffffff;
    text-align: center;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-add-cart:hover {
    background-color: var(--primary-dark, #007a33);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-quick-view {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d1d5db;
    color: #4b5563;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
.btn-quick-view:hover {
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 640px) {
    .product-card-compact {
        flex-direction: row;
    }
    .compact-img-wrap {
        width: 40%;
        aspect-ratio: auto;
    }
    .compact-info {
        padding: 0.75rem;
    }
    .compact-title {
        font-size: 0.9rem;
    }
    .compact-price {
        font-size: 1rem;
    }
    .btn-text {
        display: none;
    }
    .btn-quick-view {
        width: 2.5rem;
        height: 2.5rem;
    }
    .btn-add-cart {
        padding: 0.5rem;
    }
}

/* Floating WA */
.float-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
    z-index: 100;
}
.float-wa svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

@media (max-width: 1023px) {
    .float-wa {
        bottom: 90px;
        right: 15px;
    }
}

@media (max-width: 767px) {
    .float-wa {
        width: 50px;
        height: 50px;
    }
    .float-wa svg {
        width: 25px;
        height: 25px;
    }
}

/* Single Page Fallbacks */
.single-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.single-title {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 20px;
}
.single-meta {
    color: #666;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}
.single-body {
    line-height: 1.8;
    color: #444;
}

/* Footer */
.main-footer {
    background: #111111;
    color: #999999;
    font-size: 14px;
    padding-top: 60px;
}
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 25px;
    margin-top: 0;
    text-transform: uppercase;
}
.social-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin-top: 30px !important;
    margin-bottom: 15px !important;
    text-transform: uppercase;
}
.footer-desc {
    line-height: 1.8;
    margin-top: 20px;
    max-width: 90%;
}
.social-icons {
    display: flex;
    gap: 10px;
}
.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #192720;
    border-radius: 6px;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}
.social-icons a:hover {
    background: var(--primary);
    color: white;
}
.social-icons svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.col-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.col-links li {
    margin-bottom: 15px;
}
.col-links a {
    color: #999999;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.col-links a::before {
    content: '\203A'; /* right chevron */
    font-size: 18px;
    margin-right: 8px;
    color: #555;
    font-weight: bold;
}
.col-links a:hover {
    color: var(--primary);
}
.col-contact .contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: flex-start;
}
.col-contact .contact-item svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    margin-top: 2px;
}
.col-contact .contact-item strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 5px;
}
.col-contact .contact-item span {
    line-height: 1.6;
}
.payment-methods {
    display: flex;
    gap: 10px;
}
.badge-bri {
    background: #ffffff;
    color: #0b5b99;
    font-weight: 800;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
}
.footer-bottom {
    border-top: 1px solid #222222;
    padding: 20px 0;
}
.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bottom-links {
    display: flex;
    gap: 20px;
}
.bottom-links a {
    color: #999999;
    text-decoration: none;
}
.bottom-links a:hover {
    color: var(--primary);
}

@media (max-width: 1023px) {
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}
@media (max-width: 640px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom .container {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
    }
    .bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Dropdown Navigation */
.nav-bar .dropdown {
    position: relative;
    display: inline-block;
}
.nav-bar .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 220px;
    z-index: 50;
    border-radius: 4px;
    padding: 10px 0;
}
.nav-bar .dropdown:hover .dropdown-menu {
    display: block;
}
.nav-bar .dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-main);
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.nav-bar .dropdown-menu a:last-child {
    border-bottom: none;
}
.nav-bar .dropdown-menu a:hover {
    background: #f9f9f9;
    color: var(--primary);
}

/* Pagination */
.woocommerce-pagination {
    display: block !important;
    margin: 3rem auto;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 10;
    border: none;
    background: transparent;
}
.woocommerce-pagination ul.page-numbers {
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    max-width: 100%;
    list-style: none;
    background: transparent;
    border: none;
}
.woocommerce-pagination ul.page-numbers li {
    display: block;
    border: none;
}
.woocommerce-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #4b5563;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}


.woocommerce-pagination ul.page-numbers li:hover .page-numbers:not(.current):not(.dots) {
    background: rgba(43, 212, 102, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    opacity: 1;
}
.woocommerce-pagination .page-numbers.current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    cursor: default;
}
.woocommerce-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    pointer-events: none;
}

/* ============================================================
   SINGLE PRODUCT PAGE
   ============================================================ */
.single-container {
    padding-top: 20px;
    padding-bottom: 50px;
}
.breadcrumb {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumb svg {
    width: 14px;
    height: 14px;
}
.breadcrumb .current {
    color: #111827;
    font-weight: 600;
}
.state-message {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.state-message.error {
    color: #ef4444;
}
.state-message svg {
    width: 48px;
    height: 48px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.btn-back {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

/* ============================================================
   SCREENSHOT MATCHING LAYOUT (MOBILE FIRST)
   ============================================================ */
.hidden-content { display: none !important; }
.sp-page {
    background: #ffffff;
    min-height: 100vh;
    padding-bottom: 80px; /* space for bottom nav */
}
.sp-image-container {
    width: 100%;
    background: #fff;
}
.sp-image-container img {
    width: 100%;
    height: auto;
    display: block;
}
.sp-info-container {
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    background: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
}
.sp-price {
    order: 1;
    font-size: 24px;
    font-weight: 800;
    color: #212121; /* Tokopedia dark color */
    margin: 0 0 8px 0;
}
.sp-title {
    order: 2;
    font-size: 16px;
    font-weight: 400;
    color: #31353b;
    margin: 0 0 15px 0;
    line-height: 1.5;
}
.sp-meta-row {
    order: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}
.sp-qty-row { order: 4; }
.sp-action-buttons { order: 5; }
.sp-trust-badges { order: 6; }
.sp-tabs { order: 7; }
.sp-tab-content { order: 8; }

.sp-brand {
    color: #6b7280;
    text-transform: uppercase;
    font-size: 12px;
}
.sp-stock {
    color: #10b981;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sp-stock .dot {
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
}

/* Quantity */
.sp-qty-row {
    margin-bottom: 20px;
}
.sp-qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    height: 44px;
    overflow: hidden;
}
.sp-qty-selector button {
    width: 44px;
    background: #fff;
    border: none;
    font-size: 20px;
    color: #374151;
    cursor: pointer;
}
.sp-qty-selector input {
    color: black;
    background: white;
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    font-size: 16px;
    font-weight: 600;
    height: 100%;
    outline: none;
    -moz-appearance: textfield;
}
.sp-qty-selector input::-webkit-outer-spin-button,
.sp-qty-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Buttons */
.sp-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}
.btn-cart-outline {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
}
.btn-buy-solid {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.btn-chat { display: none; }

/* Mobile Floating Header (Tokopedia style) */
.sp-mobile-header { display: none; }
.desktop-only { display: block; }

@media (max-width: 767px) {
    .hide-on-mobile-sp { display: none !important; }
    .desktop-only { display: none !important; }
    
    .sp-page { padding-top: 50px; } /* Space for the sticky header */
    
    .sp-mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        z-index: 100;
        border-bottom: 1px solid #f3f4f6;
    }
    .sp-mobile-header .mh-btn {
        background: transparent;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #111827;
        backdrop-filter: none;
    }
    .sp-mobile-header .mh-btn svg { width: 24px; height: 24px; }
    .sp-mobile-header .mh-right { display: flex; gap: 20px; }
    
    /* E-commerce Sticky Bottom Bar */
    .sp-action-buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        padding: 10px 15px;
        display: flex;
        flex-direction: row;
        gap: 10px;
        border-top: 1px solid #e5e7eb;
        z-index: 100;
        margin: 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    }
    .btn-chat {
        display: flex;
        flex: 0 0 45px;
        height: 45px;
        border: 1px solid var(--primary);
        color: var(--primary);
        align-items: center;
        justify-content: center;
        border-radius: 8px;
    }
    .btn-chat svg { width: 22px; height: 22px; }
    .btn-cart-outline {
        flex: 1;
        height: 45px;
        padding: 0;
        font-size: 14px;
    }
    .btn-buy-solid {
        flex: 1;
        height: 45px;
        padding: 0;
        font-size: 14px;
    }
    
    /* Global bottom nav should be hidden on SP */
    body:has(.sp-page) .bottom-nav { display: none !important; }
    body:has(.sp-page) .float-wa { display: none !important; }
}

/* Help Box */
.sp-help-box {
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}
.help-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.help-item:last-child { margin-bottom: 0; }
.help-item svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.help-item p { margin: 0; font-size: 13px; color: #4b5563; line-height: 1.5; }

/* Trust Badges */
.sp-trust-badges {
    margin-bottom: 30px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    justify-content: flex-start;
}
.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
}
.trust-item svg { width: 20px; height: 20px; color: #9ca3af; flex-shrink: 0; margin-top: 2px; }
.trust-item span { display: block; font-size: 11px; color: #6b7280; }
.trust-item strong { display: block; font-size: 12px; color: #374151; }

/* Tabs */
.sp-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
}
.sp-tab {
    padding: 10px 0;
    margin-right: 30px;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
}
.sp-tab.active {
    color: #22c55e;
    border-bottom: 2px solid #22c55e;
    margin-bottom: -2px;
}
.sp-tab-content {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
}
.desc-text { padding-bottom: 20px; }

/* Desktop scaling & 2-column layout */
@media (min-width: 768px) {
    .sp-page { max-width: 100%; width: 100%; margin: 0; padding-top: 40px; background: #ffffff; }
    #productContent {
        display: flex;
        gap: 40px;
        align-items: flex-start;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }
    #relatedSection .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
    .sp-image-container {
        flex: 0 0 40%;
        max-width: 40%;
        border-radius: 12px;
        overflow: hidden;
        position: sticky;
        top: 20px;
    }
    .sp-image-container img { border: none; }
    .sp-info-container {
        flex: 0 0 55%;
        max-width: 55%;
        padding: 0; /* remove mobile padding */
        background: transparent;
        display: block; /* remove flex column so they follow DOM order or keep flex but reset order */
    }
    .sp-title { 
        font-size: 32px; 
        font-weight: 800;
        color: #111827;
    }
    .sp-price { 
        font-size: 36px;
        color: var(--primary);
        margin-bottom: 25px;
    }
    .sp-trust-badges { gap: 30px; }
}

.sp-tab-content { overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; }
.sp-tab-content img { max-width: 100%; height: auto; }
.sp-tab-content ul, .sp-tab-content ol { padding-left: 20px; }

/* ============================================================
   MY ACCOUNT PAGE DUMMY UI
   ============================================================ */
.account-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 60px 15px;
}
.account-card {
    background: #fff;
    width: 100%;
    max-width: 450px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border);
}
.account-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}
.account-tabs .tab-btn {
    flex: 1;
    padding: 15px;
    background: #f9fafb;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}
.account-tabs .tab-btn.active {
    background: #fff;
    color: var(--primary-dark);
    border-bottom: 3px solid var(--primary);
}
.account-form {
    padding: 30px;
}
.account-form .form-group {
    margin-bottom: 20px;
}
.account-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
}
.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    background: #f0f2f5;
    transition: border-color 0.2s;
}
.account-form input:focus {
    outline: none;
    border-color: var(--primary);
}
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}
.form-options a {
    color: var(--primary);
    text-decoration: none;
}
.form-options a:hover {
    text-decoration: underline;
}
.account-form .btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.account-form .btn-block:hover {
    background: var(--primary-dark);
}
.form-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
}
