/* ============================================
   MARKETPLACE - MODERN STYLE 2026
   ============================================ */

:root {
    --primary: #FFC107;
    --primary-dark: #E0A800;
    --secondary: #EF4444;
    --accent: #3B82F6;
    --success: #10B981;
    --bg: #FAFBFC;
    --bg-card: #FFFFFF;
    --bg-soft: #F4F6F9;
    --text: #0F172A;
    --text-muted: #64748B;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.04);
    --shadow: 0 2px 12px rgba(15,23,42,.05);
    --shadow-lg: 0 8px 32px rgba(15,23,42,.06);
    --radius: 14px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --trans: .25s cubic-bezier(.4,0,.2,1);
    --grad-primary: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    --grad-red: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    --grad-blue: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    --grad-hero: linear-gradient(135deg, #FFC107 0%, #EF4444 50%, #3B82F6 100%);
}

[data-bs-theme="dark"] {
    --bg: #0F172A;
    --bg-card: #1E293B;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --border: #334155;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow: 0 4px 16px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.4);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
input, button, select, textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
input:focus, button:focus, textarea:focus, select:focus {
    outline: none;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    padding-bottom: 80px;
    -webkit-font-smoothing: antialiased;
    transition: background var(--trans), color var(--trans);
}

@media (min-width: 992px) {
    body { padding-bottom: 0; }
}

img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; transition: color var(--trans); }
a:hover { color: var(--primary-dark); }

/* ============================================
   NAVBAR STICKY
   ============================================ */
.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #E0A800));
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: none;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
[data-bs-theme="dark"] .navbar-sticky {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #E0A800));
}
.navbar-sticky .navbar-brand,
.navbar-sticky .brand-text {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    background: transparent !important;
    -webkit-background-clip: initial;
    background-clip: initial;
}
.navbar-sticky .brand-logo {
    background: rgba(255,255,255,.2);
    box-shadow: none;
}
.navbar-sticky .search-group {
    background: rgba(255,255,255,.95);
    border-color: transparent !important;
}
.navbar-sticky .search-group:focus-within {
    border-color: rgba(255,255,255,.6) !important;
    background: #fff;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    outline: none !important;
}
.navbar-sticky .search-group .form-control,
.navbar-sticky .search-group .form-control:focus,
.navbar-sticky .search-group .form-control:focus-visible,
.navbar-sticky .search-group .form-control:active {
    background: transparent !important;
    background-color: transparent !important;
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border: none !important;
    outline: none !important;
    outline-offset: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
}
.navbar-sticky .search-group .input-group-text {
    color: #1f2937;
    background: transparent !important;
}
.navbar-sticky .btn-icon {
    background: rgba(255,255,255,.2);
    color: #fff;
}
.navbar-sticky .btn-icon:hover,
.navbar-sticky .btn-icon:focus {
    background: rgba(255,255,255,.95);
    color: var(--primary);
    box-shadow: none !important;
    outline: none !important;
}
.navbar-sticky .cart-badge {
    box-shadow: 0 0 0 2px var(--primary);
}
.navbar-modern { padding: .6rem 0; }
.navbar-modern .container-fluid {
    flex-wrap: nowrap !important;
    gap: 6px;
    align-items: center;
}
.brand-logo {
    width: 38px; height: 38px;
    background: var(--grad-primary);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(255,193,7,.4);
    flex-shrink: 0;
}
.brand-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--bg-card);
    padding: 2px;
}
@media (max-width: 575px) {
    .brand-img { width: 36px; height: 36px; }
}
.brand-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.2rem;
}
@media (max-width: 575px) {
    .brand-text { display: none; }
    .brand-logo { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; }
    .navbar-modern { padding: .7rem 0; }
    .navbar-modern .container-fluid {
        gap: 8px;
        padding-left: .7rem !important;
        padding-right: .7rem !important;
        min-height: 56px;
    }
    .navbar-brand { margin-right: 0 !important; padding: 0 !important; }
}

/* Search Bar */
.search-wrapper {
    max-width: 600px;
    min-width: 0;
    flex: 1 1 auto;
}
@media (max-width: 575px) {
    .search-wrapper { margin-left: 4px !important; margin-right: 4px !important; }
}
.search-group {
    background: var(--bg);
    border-radius: 50px;
    border: 1.5px solid transparent;
    padding: 4px 4px 4px 12px;
    transition: border-color var(--trans);
    flex-wrap: nowrap;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}
.search-group:focus-within {
    border-color: var(--primary);
}
.search-group * {
    -webkit-tap-highlight-color: transparent;
}
.search-group .form-control,
.search-group .form-control:focus,
.search-group .form-control:focus-visible,
.search-group .form-control:active,
.search-group .form-control:hover {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border: none !important;
    outline: none !important;
    outline-width: 0 !important;
    font-size: .9rem;
    min-width: 0;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.4;
    height: auto;
    color: var(--text);
}
.search-group .form-control:-webkit-autofill,
.search-group .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--bg) inset !important;
    -webkit-text-fill-color: var(--text) !important;
    transition: background-color 5000s ease-in-out 0s;
}
.search-group .input-group-text {
    color: var(--text-muted);
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding-top: 0;
    padding-bottom: 0;
}
@media (max-width: 575px) {
    .search-group {
        padding: 2px 4px 2px 8px;
        border-width: 1.5px;
    }
    .search-group .form-control,
    .search-group .form-control:focus,
    .search-group .form-control:focus-visible {
        font-size: .85rem;
        padding: 6px 4px;
        height: 36px;
        line-height: 1.3;
    }
    .search-group .input-group-text {
        padding-left: 2px;
        padding-right: 2px;
        font-size: .9rem;
        height: 36px;
        display: inline-flex;
        align-items: center;
    }
    .btn-clear {
        width: 24px !important;
        height: 24px !important;
        font-size: .7rem;
    }
}
.btn-clear {
    border: none;
    background: var(--border);
    border-radius: 50%;
    width: 28px; height: 28px;
    padding: 0;
    color: var(--text-muted);
}
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 420px;
    overflow-y: auto;
    z-index: 1050;
    border: 1px solid var(--border);
}
.search-item {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    transition: background var(--trans);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg); }
.search-item img {
    width: 48px; height: 48px;
    object-fit: cover;
    border-radius: 8px;
}
.search-item .name { font-weight: 500; font-size: .9rem; }
.search-item .price { color: var(--secondary); font-weight: 600; font-size: .85rem; }

/* Icon buttons */
.btn-icon {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--bg);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--text);
    transition: all var(--trans);
    position: relative;
    flex-shrink: 0;
}
.btn-icon:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}
@media (max-width: 575px) {
    .btn-icon {
        width: 34px;
        height: 34px;
        font-size: .95rem;
    }
    .navbar-modern .d-flex.align-items-center.gap-2 { gap: 4px !important; }
}
.cart-badge {
    position: absolute;
    top: 0; right: 0;
    background: var(--secondary);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 0 0 2px var(--bg-card);
}

/* ============================================
   BOTTOM NAV (MOBILE)
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 1029;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,.05);
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    color: var(--text-muted);
    font-size: .65rem;
    font-weight: 500;
    position: relative;
    transition: color var(--trans);
}
.bottom-nav-item i { font-size: 1.35rem; }
.bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--primary-dark);
}
.bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 18px);
    background: var(--secondary);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Float WhatsApp */
.float-whatsapp {
    position: fixed;
    bottom: 90px;
    right: 18px;
    width: 56px; height: 56px;
    background: #25D366;
    color: #fff !important;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(37,211,102,.4);
    z-index: 1028;
    transition: transform var(--trans);
    animation: pulse 2s infinite;
}
.float-whatsapp:hover { transform: scale(1.1); color:#fff; }
@keyframes pulse {
    0%,100% { box-shadow: 0 8px 24px rgba(37,211,102,.4); }
    50% { box-shadow: 0 8px 24px rgba(37,211,102,.8); }
}
@media (max-width: 991.98px) {
    .float-whatsapp { display: none !important; }
}
@media (min-width: 992px) {
    .float-whatsapp { bottom: 24px; }
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero-section {
    padding: 12px 0 8px;
}
.hero-slider {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.hero-slide {
    position: relative;
    aspect-ratio: 21/9;
    background: var(--grad-hero);
    display: flex;
    align-items: center;
    padding: 24px;
    color: #fff;
    overflow: hidden;
}
@media (max-width: 575px) {
    .hero-slide {
        aspect-ratio: 16/9;
        padding: 14px 16px;
    }
}
.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,.1) 50%, transparent 70%);
    z-index: 1;
}
.hero-slide-content {
    position: relative;
    z-index: 2;
    max-width: 60%;
}
@media (max-width: 575px) {
    .hero-slide-content { max-width: 75%; }
}
.hero-slide-title {
    font-size: clamp(0.85rem, 3.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,.15);
    line-height: 1.2;
}
.hero-slide-sub {
    font-size: clamp(0.65rem, 2vw, 1rem);
    opacity: .95;
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0,0,0,.15);
    line-height: 1.3;
}
.hero-slide .btn {
    font-size: clamp(0.65rem, 2vw, 0.85rem);
    padding: 4px 14px;
    font-weight: 600;
}
@media (min-width: 768px) {
    .hero-slide .btn {
        padding: 6px 20px;
    }
    .hero-slide-title { margin-bottom: 8px; }
    .hero-slide-sub { margin-bottom: 14px; }
}
/* Carousel indicators - cleaner pills */
.hero-slider .carousel-indicators {
    margin-bottom: 8px;
}
.hero-slider .carousel-indicators button {
    width: 18px !important;
    height: 3px !important;
    border-radius: 4px;
    background: rgba(255,255,255,0.5) !important;
    border: none !important;
    margin: 0 2px !important;
    opacity: 1 !important;
    transition: all var(--trans);
}
.hero-slider .carousel-indicators button.active {
    background: #fff !important;
    width: 26px !important;
}
@media (min-width: 768px) {
    .hero-slider .carousel-indicators button { width: 24px !important; height: 4px !important; }
    .hero-slider .carousel-indicators button.active { width: 32px !important; }
}

/* ============================================
   CATEGORY ICONS
   ============================================ */
.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}
.section-link {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: .85rem;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
@media (min-width: 576px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 992px) { .category-grid { grid-template-columns: repeat(8, 1fr); } }

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 8px;
    text-align: center;
    transition: all var(--trans);
    border: 1px solid var(--border);
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    color: inherit;
}
.category-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 1.4rem;
    color: #fff;
}
.category-name {
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.2;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(5, 1fr); } }

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--trans);
    position: relative;
    display: block;
    color: inherit;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    color: inherit;
}
.product-img-wrap {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--bg);
}
.product-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.08); }
.badge-discount {
    position: absolute;
    top: 8px; left: 8px;
    background: var(--grad-red);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
}
.badge-flash {
    position: absolute;
    top: 8px; right: 8px;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 6px;
    animation: flash-pulse 1.2s infinite;
}
@keyframes flash-pulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.wishlist-btn {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(255,255,255,.95);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94A3B8;
    transition: all var(--trans);
}
.wishlist-btn.active, .wishlist-btn:hover {
    color: var(--secondary);
    transform: scale(1.1);
}
.product-info { padding: 10px; }
.product-name {
    font-size: .85rem;
    font-weight: 500;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
}
.product-price {
    color: var(--secondary);
    font-weight: 700;
    font-size: .95rem;
}
.product-price-old {
    color: var(--text-muted);
    font-size: .75rem;
    text-decoration: line-through;
    margin-left: 4px;
}
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: .7rem;
    color: var(--text-muted);
}
.rating-star { color: #FBBF24; }

/* ============================================
   FLASH SALE SECTION
   ============================================ */
.flash-sale-section {
    background: var(--grad-red);
    border-radius: var(--radius-lg);
    padding: 16px;
    color: #fff;
    margin-bottom: 20px;
}
.flash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.flash-title {
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.flash-timer {
    display: flex;
    gap: 4px;
    align-items: center;
}
.flash-timer span {
    background: rgba(0,0,0,.3);
    padding: 3px 6px;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.flash-sale-section .product-card {
    background: rgba(255,255,255,.97);
    border: none;
    color: var(--text);
}
.flash-sale-section .product-card,
.flash-sale-section .product-card .product-name,
.flash-sale-section .product-card .product-price,
.flash-sale-section .product-card a {
    color: var(--text) !important;
}
.flash-sale-section .product-card .product-old-price,
.flash-sale-section .product-card .text-muted,
.flash-sale-section .product-card .product-meta {
    color: var(--text-muted) !important;
}
.flash-sale-section .product-card .product-discount-price,
.flash-sale-section .product-card .price-discount {
    color: var(--secondary) !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-warning {
    background: var(--grad-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    transition: all var(--trans);
}
.btn-warning:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,193,7,.4);
}
.btn-danger {
    background: var(--grad-red);
    border: none;
    font-weight: 600;
    transition: all var(--trans);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239,68,68,.4); }
.btn-primary {
    background: var(--grad-blue);
    border: none;
    font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-whatsapp {
    background: #25D366;
    color: #fff;
    border: none;
    font-weight: 600;
}
.btn-whatsapp:hover { background: #128C7E; color: #fff; }
.btn-soft {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

/* ============================================
   PRODUCT DETAIL
   ============================================ */
.product-detail {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 20px;
    box-shadow: var(--shadow);
}
.product-gallery img.main-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--radius);
}
.thumb-list {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}
.thumb-list img {
    width: 70px; height: 70px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--trans);
}
.thumb-list img.active, .thumb-list img:hover {
    border-color: var(--primary);
}
.product-detail h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.detail-price {
    font-size: 1.6rem;
    color: var(--secondary);
    font-weight: 800;
}
.detail-price-old {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 1rem;
    margin-left: 8px;
    font-weight: 400;
}
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
}
.qty-control button {
    background: transparent;
    border: none;
    width: 36px; height: 36px;
    font-size: 1.1rem;
    color: var(--text);
}
.qty-control input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--text);
}

.sticky-buy {
    position: fixed;
    bottom: 70px;
    left: 0; right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 10px 14px;
    z-index: 1027;
    display: flex;
    gap: 8px;
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
@media (min-width: 992px) {
    .sticky-buy { display: none !important; }
}

/* ============================================
   CART
   ============================================ */
.cart-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    border: 1px solid var(--border);
    max-width: 100%;
    overflow: hidden;
}
.cart-item > .flex-grow-1 {
    min-width: 0;
    overflow: hidden;
}
.cart-item img {
    width: 80px; height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
.cart-item h6 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    word-break: break-word;
    max-width: 100%;
    white-space: normal !important;
    text-overflow: clip !important;
}
@media (max-width: 575px) {
    .cart-item {
        padding: 10px;
        gap: 10px;
    }
    .cart-item img {
        width: 64px; height: 64px;
    }
    .cart-item h6 {
        font-size: 0.9rem;
    }
    .cart-item .qty-control button {
        width: 30px; height: 30px;
        font-size: 1rem;
    }
    .cart-item .qty-control input {
        width: 38px;
        font-size: .85rem;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.footer-modern {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}
.footer-title { font-weight: 800; font-size: 1.2rem; }
.footer-heading { font-weight: 700; font-size: .95rem; margin-bottom: 12px; }
.footer-list { list-style: none; padding: 0; }
.footer-list li { margin-bottom: 6px; }
.footer-list a {
    color: var(--text-muted);
    font-size: .85rem;
    transition: color var(--trans);
}
.footer-list a:hover { color: var(--primary-dark); }
.social-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--trans);
}
.social-icon:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast-container-fixed {
    position: fixed;
    bottom: 100px;
    right: 16px;
    z-index: 9999;
}
@media (min-width: 992px) {
    .toast-container-fixed { bottom: 24px; }
}
.toast-modern {
    background: var(--bg-card);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    border-left: 4px solid var(--success);
    animation: slideInRight .3s;
}
.toast-modern.error { border-left-color: var(--secondary); }
.toast-modern.warning { border-left-color: var(--primary); }
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.4s infinite;
    border-radius: 8px;
}
@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonial-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    height: 100%;
    transition: all var(--trans);
    box-shadow: var(--shadow-sm);
}
.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.testimonial-rating { color: #FBBF24; font-size: .85rem; line-height: 1; }
.testimonial-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--bg);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.testimonial-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 700;
    font-size: 1.3rem;
}
.testimonial-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.testimonial-photo-link {
    flex: 1 1 0;
    min-width: 0;
    max-width: 33.333%;
    display: block;
    background: #F4F6F9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--trans);
}
.testimonial-photo-link img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    display: block;
    background: #F4F6F9;
}
.testimonial-photo-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
[data-bs-theme="dark"] .testimonial-photo-link,
[data-bs-theme="dark"] .testimonial-photo-link img {
    background: rgba(255,255,255,.05);
}

.testimonial-product-name {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-soft, #F4F6F9);
    padding: 5px 11px;
    border-radius: 50px;
    display: inline-block;
}
[data-bs-theme="dark"] .testimonial-product-name { background: rgba(255,255,255,.06); }

/* Admin upload slot styling */
.photo-upload-slot {
    background: var(--bg-soft, #F4F6F9);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}
[data-bs-theme="dark"] .photo-upload-slot { background: rgba(255,255,255,.04); }

/* ============================================
   CARDS, SECTIONS, MISC
   ============================================ */
.section { margin-bottom: 28px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.glass-card {
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
[data-bs-theme="dark"] .glass-card {
    background: rgba(30,41,59,.7);
    border-color: rgba(255,255,255,.1);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in { animation: fadeIn .5s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}
.admin-sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    transition: all var(--trans);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-content {
    flex: 1;
    padding: 24px;
    min-width: 0;
}
.admin-brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
}
.admin-menu { list-style: none; padding: 0; margin: 0; }
.admin-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: var(--text-muted);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all var(--trans);
}
.admin-menu li a:hover {
    background: var(--bg);
    color: var(--text);
}
.admin-menu li a.active {
    background: var(--bg);
    color: var(--primary-dark);
    border-left-color: var(--primary);
    font-weight: 600;
}
.admin-menu li a i { font-size: 1.15rem; width: 22px; }

.admin-topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--trans);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}
.stat-label { font-size: .8rem; color: var(--text-muted); }
.stat-value { font-size: 1.4rem; font-weight: 700; }

@media (max-width: 991px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        z-index: 1050;
        box-shadow: 0 10px 40px rgba(0,0,0,.2);
    }
    .admin-sidebar.show { left: 0; }
    .admin-content { padding: 16px; }
    body.admin-page { padding-bottom: 0; }
}

/* Admin login */
.admin-login-page {
    min-height: 100vh;
    background: var(--grad-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

/* Tables admin */
.admin-table {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.admin-table table { margin: 0; }
.admin-table thead {
    background: var(--bg);
}
.admin-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: 12px; }
.admin-table td { padding: 12px; vertical-align: middle; font-size: .9rem; }

/* Form */
.form-control, .form-select {
    border-radius: 12px;
    border: 1.5px solid var(--border);
    padding: 10px 14px;
    transition: all var(--trans);
    background: var(--bg-card);
    color: var(--text);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255,193,7,.15);
    background: var(--bg-card);
    color: var(--text);
}
.form-label { font-weight: 500; font-size: .9rem; margin-bottom: 6px; }

/* Promo popup */
.promo-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.promo-popup.show { display: flex; }
.promo-popup-inner {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 380px;
    width: 100%;
    overflow: hidden;
    position: relative;
    animation: popIn .35s;
}
@keyframes popIn {
    from { transform: scale(.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.promo-popup-close {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,.5);
    color: #fff;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    z-index: 2;
    cursor: pointer;
}

/* Status badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
    display: inline-block;
}
.status-pending { background: #FEF3C7; color: #92400E; }
.status-diproses { background: #DBEAFE; color: #1E40AF; }
.status-selesai { background: #D1FAE5; color: #065F46; }
.status-dibatalkan { background: #FEE2E2; color: #991B1B; }

[data-bs-theme="dark"] .status-pending { background: #78350F; color: #FCD34D; }
[data-bs-theme="dark"] .status-diproses { background: #1E3A8A; color: #93C5FD; }
[data-bs-theme="dark"] .status-selesai { background: #064E3B; color: #6EE7B7; }
[data-bs-theme="dark"] .status-dibatalkan { background: #7F1D1D; color: #FCA5A5; }

/* Utility */
.text-secondary-color { color: var(--secondary) !important; }
.bg-soft-primary { background: rgba(255,193,7,.12) !important; }

/* ============================================
   ADMIN LAYOUT v2 - Match dengan HTML struktur
   ============================================ */

.admin-body {
    display: block !important;
    background: var(--bg);
    min-height: 100vh;
    margin: 0;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark, #E0A800));
    border-right: none;
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform var(--trans);
    box-shadow: 2px 0 16px rgba(0,0,0,.06);
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff !important;
    text-decoration: none !important;
    flex: 1;
    min-width: 0;
}
.admin-logo i {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.2);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.admin-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255,255,255,.95);
    padding: 2px;
    flex-shrink: 0;
}
.admin-logo span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}

.btn-sidebar-close,
.btn-sidebar-toggle {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 1.5rem;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
}
.btn-sidebar-close:hover,
.btn-sidebar-toggle:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.admin-nav {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}
.admin-nav-link {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,.85) !important;
    font-weight: 500;
    text-decoration: none !important;
    border-left: 3px solid transparent;
    transition: all var(--trans);
    font-size: .92rem;
}
.admin-nav-link i { font-size: 1.15rem; width: 22px; text-align: center; }
.admin-nav-link:hover {
    background: rgba(255,255,255,.12);
    color: #fff !important;
}
.admin-nav-link.active {
    background: rgba(255,255,255,.18);
    color: #fff !important;
    border-left-color: #fff;
    font-weight: 700;
}
.admin-nav-link.text-danger { color: #FECACA !important; }
.admin-nav-link.text-danger:hover { background: rgba(239,68,68,.25); color: #fff !important; }
.admin-nav-divider {
    height: 1px;
    background: rgba(255,255,255,.15);
    margin: 10px 20px;
}

/* Main content area */
.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.admin-topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.admin-topbar h5 { color: var(--text); }
.admin-topbar .theme-toggle,
.admin-topbar .btn-light {
    background: var(--bg) !important;
}

.admin-content {
    padding: 24px;
    flex: 1;
}

/* Stat cards variants */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--trans);
    box-shadow: var(--shadow-sm);
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.stat-info { flex: 1; min-width: 0; }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}
.stat-label { font-size: .8rem; color: var(--text-muted); margin-bottom: 2px; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat-value-sm { font-size: 1.1rem; }

.stat-primary .stat-icon { background: linear-gradient(135deg, #FFC107, #FF9800); }
.stat-success .stat-icon { background: linear-gradient(135deg, #10B981, #059669); }
.stat-info .stat-icon { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.stat-warning .stat-icon { background: linear-gradient(135deg, #EF4444, #DC2626); }

/* Category icon preview */
.cat-icon-preview {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Settings tabs */
.settings-tabs .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 50px;
    padding: 8px 18px;
}
.settings-tabs .nav-link.active {
    background: var(--primary);
    color: #1f2937;
}

/* Login Page */
.login-body {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}
.login-container { width: 100%; max-width: 440px; }
.login-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.login-header { text-align: center; margin-bottom: 28px; }
.login-logo {
    width: 76px; height: 76px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
    margin-bottom: 14px;
}

/* Mobile sidebar (responsive) */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        box-shadow: 0 10px 40px rgba(0,0,0,.25);
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .admin-content { padding: 16px; }
    .admin-topbar { padding: 12px 16px; }
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .admin-sidebar { background: var(--bg-card); }
[data-bs-theme="dark"] .admin-topbar { background: rgba(31,41,55,.85); }
[data-bs-theme="dark"] .login-card { background: var(--bg-card); color: var(--text); }

/* ============================================
   VARIANT INPUT (Admin)
   ============================================ */
.variant-box {
    background: var(--bg-soft, #F4F6F9);
    border-radius: 12px;
}
.variant-list { display: flex; flex-direction: column; gap: 8px; }
.variant-row {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 8px;
    border: 1px solid var(--border);
}
.variant-row-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.1fr 1.1fr 1fr auto;
    gap: 6px;
    align-items: center;
}
@media (max-width: 991.98px) {
    .variant-row-grid { grid-template-columns: 1fr 1fr auto; }
    .variant-row-grid > input { min-width: 0; }
}
.variant-remove {
    width: 32px; height: 32px;
    border-radius: 8px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   VARIANT SELECTOR (Customer)
   ============================================ */
.variant-section { margin: 18px 0; }
.variant-section-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.variant-option-btn {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--trans);
    text-align: left;
    min-width: 80px;
}
.variant-option-btn:hover {
    border-color: var(--primary);
}
.variant-option-btn.active {
    background: rgba(255,193,7,.1);
    border-color: var(--primary);
    color: var(--primary-dark, #B8860B);
    font-weight: 600;
}
.variant-option-btn .vopt-desc {
    display: block;
    font-size: .72rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}
.variant-option-btn:disabled,
.variant-option-btn[data-stock="0"] {
    opacity: .45;
    cursor: not-allowed;
}

/* Variant input grid - mobile layout fix */
@media (max-width: 575px) {
    .variant-row-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .variant-row-grid > input[name*="option_name"] { grid-column: span 2; }
    .variant-row-grid > input[name*="option_description"] { grid-column: span 2; }
    .variant-row-grid > button { grid-column: span 2; justify-self: end; }
}

/* ============================================
   DASHBOARD - Top Products Card Fix
   ============================================ */
.top-product-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.top-product-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.top-product-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    flex-shrink: 0;
}
.top-product-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.top-product-name {
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    word-break: break-word;
}
