:root {
    --primary: #EF4444;
    --primary-dark: #DC2626;
    --primary-light: #FCA5A5;
    --primary-bg: #FEF2F2;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --accent: #F97316;
    --dark: #1F2937;
    --dark-light: #374151;
    --text: #111827;
    --text-secondary: #6B7280;
    --light: #F9FAFB;
    --white: #FFFFFF;
    --gray: #6B7280;
    --gray-light: #9CA3AF;
    --gray-200: #E5E7EB;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.06), 0 4px 6px rgba(0,0,0,0.04);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
img { max-width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
header {
    background: var(--white);
    padding: 0.75rem 3%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo i { font-size: 1.1rem; }

.header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    background: var(--light);
    color: var(--text);
    transition: var(--transition);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.header-search input::placeholder { color: var(--gray-light); }

.header-search i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-light);
    font-size: 0.85rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.header-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--dark);
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.header-action-btn:hover { background: var(--light); }

.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 800;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* ============================================================
   HERO SECTION  (Card style inside container)
   ============================================================ */
.hero-wrapper {
    max-width: 1240px;
    margin: 1.25rem auto 0;
    padding: 0 3%;
}

.hero {
    background: linear-gradient(135deg, #E5695C 0%, #E47E6F 35%, #E08A7A 60%, #DC8B7C 100%);
    color: var(--white);
    padding: 1.75rem 2.25rem;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 180px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 260px;
    height: 260px;
    background: rgba(207, 112, 85, 0.25);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -25%;
    right: 8%;
    width: 180px;
    height: 180px;
    background: rgba(195, 100, 75, 0.18);
    border-radius: 50%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
}

.hero h1 {
    font-size: 1.65rem;
    margin-bottom: 0.4rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    max-width: 340px;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-btn-primary {
    background: var(--white);
    color: var(--primary);
}

.hero-btn-primary:hover { background: #FFF5F5; transform: translateY(-1px); }

.hero-btn-outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.5);
}

.hero-btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

.hero-image {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.hero-image img {
    width: 310px;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
}

.hero-badge {
    position: absolute;
    bottom: 1.2rem;
    right: 1.2rem;
    background: var(--white);
    color: var(--text);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    z-index: 3;
}

.hero-badge-icon {
    width: 36px;
    height: 36px;
    background: var(--secondary);
    color: var(--white);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.hero-badge-text strong { display: block; font-size: 0.82rem; }
.hero-badge-text span { color: var(--gray); font-size: 0.72rem; }

/* ============================================================
   CATEGORY ICON ROW
   ============================================================ */
.category-icons-wrapper {
    max-width: 1240px;
    margin: 1.5rem auto 0;
    padding: 0 3%;
}

.category-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.category-icons::-webkit-scrollbar { display: none; }

.cat-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 72px;
    text-decoration: none;
    color: var(--text);
}

.cat-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--gray);
    transition: var(--transition);
    border: 2px solid transparent;
}

.cat-icon-item:hover .cat-icon-circle {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary-light);
}

.cat-icon-item.active .cat-icon-circle {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.cat-icon-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

.cat-icon-item.active .cat-icon-label {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
   MAIN CONTAINER
   ============================================================ */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 3%;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 1.5rem 0 3rem;
}

/* ============================================================
   LEFT SIDEBAR
   ============================================================ */
.sidebar-categories {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.sidebar-cat-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sidebar-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.sidebar-cat-link::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: var(--gray-light);
    transition: var(--transition);
}

.sidebar-cat-link:hover {
    background: var(--light);
    color: var(--text);
}

.sidebar-cat-link:hover::after { color: var(--text); }

.sidebar-cat-link.active {
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-bg);
}

.sidebar-cat-link.active::after { color: var(--primary); }

.sidebar-cat-link .cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    margin-right: 0.6rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-cat-link.active .cat-dot {
    background: var(--primary);
}

.sidebar-cat-link .cat-text-wrap {
    display: flex;
    align-items: center;
    flex: 1;
}

/* Filter Section */
.filter-section {
    margin-bottom: 1.5rem;
}

.filter-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.filter-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    display: block;
}

.price-range {
    width: 100%;
    margin: 0.5rem 0 0.3rem;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.price-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.price-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--gray-light);
    margin-top: 0.2rem;
}

.sort-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text);
    background: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 2rem;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Promo Card in Sidebar */
.promo-card {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.promo-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
}

.promo-card h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #065F46;
    margin-bottom: 0.3rem;
}

.promo-card .promo-discount {
    font-size: 1.8rem;
    font-weight: 800;
    color: #047857;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.promo-card .promo-sub {
    font-size: 0.75rem;
    color: #065F46;
    margin-bottom: 1rem;
}

.promo-card .promo-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #047857;
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.promo-card .promo-btn:hover { background: #065F46; }

/* ============================================================
   PRODUCTS AREA
   ============================================================ */
.products-section {
    flex: 1;
    min-width: 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.products-header-left h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.products-header-left p {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.products-header-right .sort-select {
    min-width: 130px;
}

/* Product Grid */
.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    transform: translateY(-3px);
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--light);
}

.product-img {
    width: 100%;
    height: 155px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.product-card:hover .product-img {
    transform: scale(1.04);
}

.stock-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text);
    z-index: 2;
}

.out-of-stock {
    background: rgba(239, 68, 68, 0.9);
    color: var(--white);
}

.product-info {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    width: fit-content;
}

/* Category color variations */
.cat-tag-makanan-ringan { background: #FEF3C7; color: #92400E; }
.cat-tag-minuman { background: #DBEAFE; color: #1E40AF; }
.cat-tag-makanan-instan { background: #FCE7F3; color: #9D174D; }
.cat-tag-minuman-instan-sachet { background: #E0E7FF; color: #3730A3; }
.cat-tag-kebutuhan-harian { background: #D1FAE5; color: #065F46; }
.cat-tag-lainnya { background: #F3F4F6; color: #374151; }

.product-name {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
    margin-bottom: 0.6rem;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-cart-btn {
    flex: 1;
    background: transparent;
    color: var(--secondary);
    border: 1.5px solid var(--secondary);
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
}

.add-to-cart-btn:hover {
    background: var(--secondary);
    color: var(--white);
}

.add-to-cart-btn:active { transform: scale(0.97); }

.add-to-cart-btn:disabled {
    background: var(--border);
    color: var(--gray-light);
    border-color: var(--border);
    cursor: not-allowed;
}

.add-to-cart-btn i { font-size: 0.75rem; }

.wishlist-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--gray-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.wishlist-btn:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    background: var(--primary-bg);
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
}

/* ============================================================
   TRUST BADGES FOOTER
   ============================================================ */
.trust-badges {
    border-top: 1px solid var(--border);
    padding: 1.5rem 3%;
    max-width: 1240px;
    margin: 0 auto;
}

.trust-badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trust-badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.trust-badge-icon.green { color: var(--secondary); }
.trust-badge-icon.blue { color: #3B82F6; }
.trust-badge-icon.orange { color: var(--accent); }
.trust-badge-icon.purple { color: #8B5CF6; }

.trust-badge-text strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
}

.trust-badge-text span {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.store-footer {
    text-align: center;
    padding: 1.25rem 3%;
    color: var(--gray);
    font-size: 0.78rem;
    border-top: 1px solid var(--border);
}

/* ============================================================
   HORIZONTAL CATEGORIES (Mobile only)
   ============================================================ */
.categories {
    display: none;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0;
    scrollbar-width: none;
}

.categories::-webkit-scrollbar { display: none; }

.category-btn {
    padding: 0.45rem 1.1rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    color: var(--text-secondary);
}

.category-btn:hover {
    border-color: var(--dark);
    color: var(--dark);
}

.category-btn.active {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}

/* ============================================================
   BUTTONS - GENERAL
   ============================================================ */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--dark);
}

.btn-outline:hover {
    border-color: var(--dark);
    background: var(--dark);
    color: var(--white);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 1rem;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: var(--white);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    transform: translateY(20px) scale(0.97);
    transition: var(--transition);
}

.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 { font-size: 1.1rem; font-weight: 700; }

.close-modal {
    background: var(--light);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-modal:hover { background: var(--border); color: var(--dark); }

/* ============================================================
   PAYMENT METHOD OPTION CARDS (in modal)
   ============================================================ */
.payment-method-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.payment-option {
    cursor: pointer;
    display: block;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    background: var(--white);
    position: relative;
}

.payment-option-card:hover {
    border-color: var(--gray-light);
    background: var(--light);
}

.payment-option input[type="radio"]:checked + .payment-option-card {
    border-color: #3B82F6;
    background: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.payment-option-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.payment-option-icon.qris-icon {
    background: linear-gradient(135deg, #E0E7FF, #C7D2FE);
    color: #4338CA;
}

.payment-option-icon.bca-icon {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
    color: #1D4ED8;
}

.payment-option-info {
    flex: 1;
}

.payment-option-info strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.1rem;
}

.payment-option-info span {
    font-size: 0.75rem;
    color: var(--gray);
}

.payment-option-check {
    font-size: 1.2rem;
    color: var(--border);
    transition: all 0.2s ease;
}

.payment-option input[type="radio"]:checked + .payment-option-card .payment-option-check {
    color: #3B82F6;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.form-control::placeholder { color: var(--gray-light); }

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2rem;
}

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.cart-container h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.cart-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    gap: 1rem;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cart-item-details {
    flex-grow: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.92rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.88rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.qty-input {
    width: 52px;
    padding: 0.35rem;
    text-align: center;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
}

.qty-input:focus { outline: none; border-color: var(--primary); }

.remove-btn {
    color: var(--gray-light);
    font-size: 1rem;
    transition: var(--transition);
    padding: 0.25rem;
}

.remove-btn:hover { color: var(--primary); }

.cart-summary {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
    text-align: right;
}

.cart-total {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.checkout-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ============================================================
   ADMIN LAYOUT & SERBA ADA MODERN THEME
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: #F8FAFC;
    color: #0F172A;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 250px;
    background: #FFFFFF;
    color: #0F172A;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid #F1F5F9;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 90;
}

.sidebar-brand {
    padding: 0 0.5rem 1.5rem 0.5rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand-icon {
    width: 38px;
    height: 38px;
    background: #FEF2F2;
    color: #EF4444;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.sidebar-link {
    padding: 0.7rem 1rem;
    color: #64748B;
    border-radius: 12px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
}

.sidebar-link:hover {
    background: #F8FAFC;
    color: #0F172A;
}

.sidebar-link.active {
    background: #FEF2F2;
    color: #EF4444;
    font-weight: 600;
}

.sidebar-link i {
    width: 22px;
    text-align: center;
    font-size: 1rem;
}

/* Sidebar Upgrade Box */
.sidebar-upgrade-card {
    background: linear-gradient(135deg, #FFF5F5 0%, #FEF2F2 100%);
    border: 1px solid #FEE2E2;
    border-radius: 16px;
    padding: 1.1rem 1rem;
    margin: 1rem 0;
}

.sidebar-upgrade-card h4 {
    color: #EF4444;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.sidebar-upgrade-card p {
    color: #64748B;
    font-size: 0.75rem;
    line-height: 1.35;
    margin-bottom: 0.85rem;
}

.btn-upgrade {
    display: block;
    width: 100%;
    background: #FF4D4D;
    color: #FFFFFF;
    text-align: center;
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-upgrade:hover {
    background: #DC2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* --- MAIN CONTENT & TOPBAR --- */
.admin-content {
    flex-grow: 1;
    background: #F8FAFC;
    padding: 1.5rem 2rem 2.5rem;
    overflow-y: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.topbar-search-box {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.topbar-search-box input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #FFFFFF;
    font-size: 0.88rem;
    color: #0F172A;
    transition: var(--transition);
}

.topbar-search-box input:focus {
    outline: none;
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.topbar-search-box i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 0.9rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.topbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.topbar-icon-btn:hover {
    background: #F8FAFC;
    color: #0F172A;
}

.topbar-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 0.62rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFFFFF;
}

.topbar-user-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
}

.topbar-user-profile:hover {
    background: #FFFFFF;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.topbar-user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0F172A;
}

.topbar-user-role {
    font-size: 0.72rem;
    color: #64748B;
}

/* Profile Dropdown Popup */
.user-dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 200px;
    padding: 0.5rem 0;
    display: none;
    z-index: 100;
}

.user-dropdown-menu.active {
    display: block;
    animation: fadeInUp 0.2s ease;
}

.user-dropdown-item {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: var(--transition);
}

.user-dropdown-item:hover {
    background: #F8FAFC;
    color: #EF4444;
}

/* --- PAGE HEADER TITLE & BUTTON --- */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header-title h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.01em;
    margin-bottom: 0.2rem;
}

.admin-header-title p {
    font-size: 0.88rem;
    color: #64748B;
}

.btn-add-product {
    background: #FF4D4D;
    color: #FFFFFF;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.2);
}

.btn-add-product:hover {
    background: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 77, 77, 0.3);
}

/* --- STATS CARDS GRID (4 COLUMNS) --- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.admin-stat-card {
    background: #FFFFFF;
    border: 1px solid #F1F5F9;
    border-radius: 16px;
    padding: 1.25rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: var(--transition);
}

.admin-stat-card:hover {
    border-color: #E2E8F0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.stat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Colors for stat card icons */
.stat-icon-wrap.red { background: #FEF2F2; color: #EF4444; }
.stat-icon-wrap.green { background: #ECFDF5; color: #10B981; }
.stat-icon-wrap.orange { background: #FFF7ED; color: #F97316; }
.stat-icon-wrap.purple { background: #F3E8FF; color: #8B5CF6; }

.stat-card-details {
    display: flex;
    flex-direction: column;
}

.stat-label-top {
    font-size: 0.78rem;
    color: #64748B;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.stat-number-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.15;
}

.stat-label-sub {
    font-size: 0.72rem;
    color: #94A3B8;
    margin-top: 0.2rem;
}

/* --- FILTER & SEARCH CONTROL BAR --- */
.admin-filter-card {
    background: #FFFFFF;
    border: 1px solid #F1F5F9;
    border-radius: 16px;
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.filter-search-box {
    flex: 2;
    min-width: 240px;
    position: relative;
}

.filter-search-box input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.4rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #F8FAFC;
    font-size: 0.85rem;
    color: #0F172A;
    transition: var(--transition);
}

.filter-search-box input:focus {
    outline: none;
    border-color: #EF4444;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.filter-search-box i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 0.85rem;
}

.filter-select {
    flex: 1;
    min-width: 150px;
    padding: 0.6rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #FFFFFF;
    color: #0F172A;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2.2rem;
}

.filter-select:focus {
    border-color: #EF4444;
}

.btn-filter-more {
    padding: 0.6rem 1.1rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #FFFFFF;
    color: #0F172A;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-filter-more:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

/* --- DATA TABLE CARD --- */
.admin-table-card {
    background: #FFFFFF;
    border: 1px solid #F1F5F9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 0.9rem 1.25rem;
    background: #FFFFFF;
    color: #64748B;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid #F1F5F9;
    text-align: left;
}

td {
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid #F8FAFC;
    vertical-align: middle;
    color: #0F172A;
    font-size: 0.88rem;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAFA; }

.table-prod-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

/* Category Pill Badges */
.badge-cat {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.badge-cat-kebutuhan-harian { background: #F3E8FF; color: #7E22CE; }
.badge-cat-minuman-instan-sachet { background: #E0F2FE; color: #0284C7; }
.badge-cat-makanan-instan { background: #FFEDD5; color: #C2410C; }
.badge-cat-makanan-ringan { background: #FEF9C3; color: #A16207; }
.badge-cat-minuman { background: #DBEAFE; color: #1D4ED8; }
.badge-cat-lainnya { background: #F1F5F9; color: #475569; }

/* Status Pill Badges */
.badge-status {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.badge-status-tersedia { background: #DCFCE7; color: #15803D; }
.badge-status-habis { background: #FEE2E2; color: #B91C1C; }
.badge-status-nonaktif { background: #FEF3C7; color: #B45309; }

/* Action Buttons */
.action-btns {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-action-edit {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-action-edit:hover {
    background: #F8FAFC;
    color: #0F172A;
    border-color: #CBD5E1;
}

.btn-action-delete {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    color: #EF4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-action-delete:hover {
    background: #FEE2E2;
    color: #DC2626;
}

/* --- TABLE PAGINATION FOOTER --- */
.admin-table-footer {
    padding: 0.9rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid #F1F5F9;
    background: #FFFFFF;
}

.table-pagination-info {
    font-size: 0.82rem;
    color: #64748B;
}

.table-pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover {
    background: #F8FAFC;
    color: #0F172A;
}

.page-btn.active {
    background: #FEF2F2;
    color: #EF4444;
    border-color: #FEE2E2;
    font-weight: 700;
}

.page-btn.dots {
    border: none;
    background: transparent;
    cursor: default;
}

.per-page-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #FFFFFF;
    color: #475569;
    font-size: 0.82rem;
    cursor: pointer;
    outline: none;
}

/* ============================================================
   POS PAGE
   ============================================================ */
.pos-container {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 110px);
}

.pos-products { flex: 2; overflow-y: auto; padding-right: 0.5rem; }

.pos-cart {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.pos-item {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 0.65rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.pos-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pos-item:active { transform: scale(0.97); }

.pos-item img {
    width: 100%;
    height: 85px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
}

.pos-item-name {
    font-weight: 600;
    font-size: 0.78rem;
    margin-bottom: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-item-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.82rem;
}

.pos-item-stock { font-size: 0.68rem; color: var(--gray-light); }

.cart-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.82rem;
    gap: 0.4rem;
}

.cart-row-name {
    flex-grow: 1;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-row-qty {
    width: 46px;
    text-align: center;
    padding: 0.2rem;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.cart-row-remove {
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.cart-row-remove:hover { color: var(--primary-dark); }

.cart-total {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: right;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeInUp 0.35s ease both;
}

.product-card:nth-child(1) { animation-delay: 0.02s; }
.product-card:nth-child(2) { animation-delay: 0.04s; }
.product-card:nth-child(3) { animation-delay: 0.06s; }
.product-card:nth-child(4) { animation-delay: 0.08s; }
.product-card:nth-child(5) { animation-delay: 0.10s; }
.product-card:nth-child(6) { animation-delay: 0.12s; }
.product-card:nth-child(7) { animation-delay: 0.14s; }
.product-card:nth-child(8) { animation-delay: 0.16s; }
.product-card:nth-child(9) { animation-delay: 0.18s; }
.product-card:nth-child(10) { animation-delay: 0.20s; }
.product-card:nth-child(11) { animation-delay: 0.22s; }
.product-card:nth-child(12) { animation-delay: 0.24s; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cart-count.pulse { animation: pulse 0.3s ease; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-light); }

/* ============================================================
   RESPONSIVE — 1024px
   ============================================================ */
@media (max-width: 1024px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
    }
    .sidebar-categories { width: 190px; }
    .hero-image img { width: 180px; }
    .trust-badges-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE — 768px (Tablets)
   ============================================================ */
@media (max-width: 768px) {
    header { padding: 0.65rem 4%; gap: 0.75rem; }
    .header-search { max-width: 300px; }

    .hero-wrapper { padding: 0 4%; margin-top: 1rem; }
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }
    .hero h1 { font-size: 1.5rem; }
    .hero-content { text-align: center; }
    .hero p { margin: 0 auto 1rem; }
    .hero-buttons { justify-content: center; }
    .hero-image { display: none; }
    .hero-badge { position: static; margin-top: 1rem; justify-content: center; }

    .category-icons-wrapper { padding: 0 4%; }
    .category-icons { justify-content: flex-start; gap: 1rem; }
    .cat-icon-circle { width: 44px; height: 44px; font-size: 1rem; }

    .container { padding: 0 4%; }

    /* Show horizontal categories, hide sidebar */
    .categories { display: flex; }
    .sidebar-categories { display: none; }
    .main-layout { flex-direction: column; gap: 1rem; padding: 1rem 0 2rem; }

    .products { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
    .product-img { height: 130px; }
    .product-info { padding: 0.65rem; }
    .product-name { font-size: 0.82rem; }
    .product-price { font-size: 0.88rem; margin-bottom: 0.5rem; }
    .add-to-cart-btn { padding: 0.4rem 0.5rem; font-size: 0.72rem; }
    .wishlist-btn { width: 30px; height: 30px; font-size: 0.75rem; }
    .stock-badge { font-size: 0.6rem; padding: 0.1rem 0.4rem; }

    .trust-badges { padding: 1.25rem 4%; }
    .trust-badges-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }

    /* Admin responsive */
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; padding: 0.75rem 0; }
    .sidebar-brand { padding: 0 1rem; margin-bottom: 0.5rem; font-size: 1rem; }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 0.75rem;
        scrollbar-width: none;
    }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .sidebar-link {
        padding: 0.55rem 0.8rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        font-size: 0.8rem;
        gap: 0.4rem;
    }
    .sidebar-link:hover, .sidebar-link.active {
        border-left: none;
        border-bottom-color: var(--primary);
    }
    .admin-content { padding: 1rem; }
    .admin-header h2 { font-size: 1.15rem; }
    .stats-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .card { padding: 1rem; }
    th, td { padding: 0.6rem 0.45rem; font-size: 0.78rem; }

    .modal { padding: 1.25rem; max-width: 100%; }
    .btn { padding: 0.5rem 1rem; font-size: 0.82rem; }

    .cart-container { padding: 1rem; margin-top: 1rem; }
    .cart-item { flex-wrap: wrap; gap: 0.75rem; }
    .cart-item-img { width: 60px; height: 60px; }
    .cart-summary { text-align: center; }
    .checkout-actions { justify-content: center; }
    .cart-total { font-size: 1.15rem; }

    .pos-container { flex-direction: column; height: auto; }
    .pos-products { padding-right: 0; }
    .pos-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.6rem; }
    .pos-item img { height: 70px; }
    .pos-item-name { font-size: 0.72rem; }
    .pos-item-price { font-size: 0.75rem; }
}

/* ============================================================
   RESPONSIVE — 480px (Phones)
   ============================================================ */
@media (max-width: 480px) {
    header { padding: 0.55rem 3.5%; gap: 0.5rem; }
    .logo { font-size: 1.1rem; }
    .header-search input { padding: 0.5rem 0.8rem 0.5rem 2.2rem; font-size: 0.82rem; }
    .header-action-btn { width: 36px; height: 36px; font-size: 1rem; }

    .hero-wrapper { padding: 0 3.5%; }
    .hero { padding: 1.5rem 1.25rem; border-radius: var(--radius-lg); }
    .hero h1 { font-size: 1.3rem; }
    .hero p { font-size: 0.8rem; }
    .hero-btn { padding: 0.5rem 1.1rem; font-size: 0.78rem; }

    .category-icons-wrapper { padding: 0 3.5%; }
    .category-icons { gap: 0.75rem; padding: 1rem 0; }
    .cat-icon-circle { width: 40px; height: 40px; font-size: 0.9rem; }
    .cat-icon-label { font-size: 0.65rem; }

    .container { padding: 0 3.5%; }

    .products { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
    .product-img { height: 110px; }
    .product-info { padding: 0.5rem; }
    .product-category-tag { font-size: 0.58rem; padding: 0.1rem 0.4rem; }
    .product-name { font-size: 0.75rem; margin-bottom: 0.2rem; }
    .product-price { font-size: 0.82rem; margin-bottom: 0.4rem; }
    .add-to-cart-btn { padding: 0.35rem 0.4rem; font-size: 0.68rem; border-radius: 6px; }
    .wishlist-btn { width: 28px; height: 28px; font-size: 0.7rem; }
    .stock-badge { font-size: 0.55rem; padding: 0.1rem 0.35rem; top: 0.3rem; right: 0.3rem; }
    .category-btn { padding: 0.35rem 0.85rem; font-size: 0.72rem; }

    .trust-badges { padding: 1rem 3.5%; }
    .trust-badges-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .trust-badge-icon { width: 34px; height: 34px; font-size: 0.88rem; }
    .trust-badge-text strong { font-size: 0.75rem; }
    .trust-badge-text span { font-size: 0.65rem; }

    .admin-content { padding: 0.75rem; }
    .sidebar-brand { font-size: 0.92rem; }
    .sidebar-link { padding: 0.5rem 0.65rem; font-size: 0.72rem; }
    .sidebar-link i { font-size: 0.82rem; }
    .stat-icon { width: 38px; height: 38px; font-size: 1rem; }
    .stat-info p { font-size: 1.1rem; }

    .modal { padding: 1rem; border-radius: var(--radius); }
    .modal-header h3 { font-size: 0.95rem; }
    .form-control { padding: 0.5rem 0.7rem; font-size: 0.82rem; }

    .checkout-actions { flex-direction: column; }
    .checkout-actions .btn { width: 100%; }
}

/* ============================================================
   RESPONSIVE — 360px (Very small)
   ============================================================ */
@media (max-width: 360px) {
    .hero h1 { font-size: 1.15rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .products { grid-template-columns: 1fr; gap: 0.65rem; }
    .product-img { height: 170px; }
    .product-info { padding: 0.75rem; }
    .product-name { font-size: 0.85rem; }
    .product-price { font-size: 0.92rem; }
    .trust-badges-grid { grid-template-columns: 1fr; }
}
