/* ========================================
   DESIGN SYSTEM & CSS VARIABLES
   ======================================== */

:root {
  /* Colors - HSL Format */
  --color-primary: 217 91% 60%;
  --color-primary-dark: 217 91% 50%;
  --color-primary-light: 217 91% 70%;
  
  --color-secondary: 222 47% 11%;
  
  --color-accent: 30 100% 50%;
  
  --color-background: 210 40% 98%;
  --color-surface: 0 0% 100%;
  
  --color-text: 222 47% 11%;
  --color-text-muted: 215 16% 47%;
  --color-text-light: 210 16% 60%;
  
  --color-border: 214 32% 91%;
  --color-border-light: 220 13% 95%;
  
  --color-success: 142 76% 36%;
  --color-warning: 45 93% 47%;
  --color-error: 0 84% 60%;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(217 91% 60%) 0%, hsl(217 91% 50%) 100%);
  --gradient-hero: linear-gradient(180deg, hsl(210 40% 98%) 0%, hsl(0 0% 100%) 100%);
  --gradient-cta: linear-gradient(135deg, hsl(217 91% 60%) 0%, hsl(225 73% 57%) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 hsla(222 47% 11% / 0.05);
  --shadow-md: 0 4px 6px -1px hsla(222 47% 11% / 0.1), 0 2px 4px -1px hsla(222 47% 11% / 0.06);
  --shadow-lg: 0 10px 15px -3px hsla(222 47% 11% / 0.1), 0 4px 6px -2px hsla(222 47% 11% / 0.05);
  --shadow-xl: 0 20px 25px -5px hsla(222 47% 11% / 0.1), 0 10px 10px -5px hsla(222 47% 11% / 0.04);
  --shadow-card: 0 2px 8px hsla(222 47% 11% / 0.08);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Container */
  --container-max-width: 1280px;
  --container-padding: 1rem;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: hsl(var(--color-text));
  background-color: hsl(var(--color-background));
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

@media (min-width: 768px) {
  :root {
    --container-padding: 2rem;
  }
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: hsl(var(--color-surface));
  border-bottom: 1px solid hsl(var(--color-border-light));
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--container-padding);
  gap: 2rem;
}

.nav-brand {
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  background-color: #2563eb;
  color: white;
  font-weight: 700;
  border-radius: 0px;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  user-select: none;
}

.logo h1 {
  font-weight: 700;
  color: #1d2b64;
  font-size: 1.2rem;
}

.logo small {
  font-weight: 500;
  color: #3b82f6;
  font-size: 0.85rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

/* Judul Perusahaan */
.logo h1 {
  font-size: 0.95rem;     /* lebih kecil dari sebelumnya */
  font-weight: 700;
  margin: 0;
  line-height: 1.1;       /* rapatkan jarak vertikal */
}

/* Tagline */
.logo small {
  font-size: 0.75rem;
  margin-top: 2px;       /* tarik sedikit ke atas */
  display: block;
  color: #3b82f6;
  line-height: 1;
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 0.85rem;
  }
  .logo small {
    font-size: 0.7rem;
  }
}


.brand-name {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  color: hsl(var(--color-text));
}

.brand-tagline {
  font-size: var(--font-size-sm);
  color: hsl(var(--color-text-muted));
}

.nav-menu {
  display: none;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .nav-menu {
    display: flex;
  }
}

.nav-link {
  font-weight: var(--font-weight-medium);
  color: hsl(var(--color-text));
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: hsl(var(--color-primary));
}

.nav-link.active {
  color: hsl(var(--color-primary));
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-phone {
  display: none;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--color-primary));
  font-weight: var(--font-weight-medium);
  transition: opacity var(--transition-fast);
}

@media (min-width: 1024px) {
  .nav-phone {
    display: flex;
  }
}

.nav-phone:hover {
  opacity: 0.8;
}

.phone-icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

/* Judul Perusahaan */
.logo h1 {
  font-size: 0.95rem;     /* lebih kecil dari sebelumnya */
  font-weight: 700;
  margin: 0;
  line-height: 1.1;       /* rapatkan jarak vertikal */
}

/* Tagline */
.logo small {
  font-size: 0.75rem;
  margin-top: 2px;       /* tarik sedikit ke atas */
  display: block;
  color: #3b82f6;
  line-height: 1;
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 0.85rem;
  }
  .logo small {
    font-size: 0.7rem;
  }
}


/* ========================================
   BUTTON
   ======================================== */


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

/* Menggunakan font Inter sebagai standar profesional */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* --- Variabel Warna --- */
:root {
    --primary: #1e3a8a; /* Biru Tua */
    --secondary: #3b82f6; /* Biru Cerah */
    --light-blue: #eff6ff; /* Biru Sangat Muda */
    --text-dark: #1f2937; /* Gray 900 */
    --text-medium: #4b5563; /* Gray 700 */
    --text-light: #6b7280; /* Gray 600 */
    --bg-light: #ffffff; /* Putih */
    --bg-page: #f8f8fa; /* Off-white */
    --border-color: #e5e7eb; /* Gray 200 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* --- Base & Utilitas --- */
.page-body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Icons */
.icon-xs { width: 1rem; height: 1rem; }
.icon-sm { width: 1.25rem; height: 1.25rem; }
.icon-md { width: 1.5rem; height: 1.5rem; }
.icon-mr { margin-right: 0.5rem; }



/* --- Tombol (Buttons) --- */


.btn-cta {
    padding: 0.5rem 1rem; /* px-4 py-2 */
    border-radius: 9999px;
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--bg-light);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3); /* Custom shadow based on secondary color */
}
.btn-secondary:hover {
    background-color: #3673d6; /* Secondary slightly darker */
}

/* --- Konten Utama & Layout --- */
.main-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem; /* 3xl */
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.catalog-layout {
    display: block; /* Default block layout for mobile */
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-count p {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    margin-right: 1rem;
}

.filter-sort-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-sort {
    appearance: none; /* Hide default arrow */
    background-color: var(--bg-light);
    border: 1px solid #d1d5db; /* Gray 300 */
    color: var(--text-medium);
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
}
.select-sort:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--light-blue);
}

.select-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
}

.filter-sort-desktop {
    display: none; /* Desktop sort hidden by default on mobile */
}
.filter-sort-mobile {
    display: block; /* Mobile sort visible by default */
}


/* --- Grid Produk --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom di mobile */
    gap: 1rem;
}


/* --- Kartu Produk --- */
.product-card {
    background-color: var(--bg-light);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 300ms ease;
}

.product-card:hover {
    box-shadow: 0 10px 20px -5px rgba(30, 58, 138, 0.2);
    transform: translateY(-4px);
}

.product-image-wrapper {
   position: relative;
    height: 12rem; /* tetap */
    background-color: #f3f4f6;
    overflow: hidden; /* boleh tetap */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;     /* FOTO TIDAK TERPOTONG */
    transition: transform 500ms ease;
}

.product-card:hover .product-image {
     transform: scale(1.05); /* masih bisa zoom */
}

.product-badge-new {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: #dc2626; /* Red 600 */
    color: var(--bg-light);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    box-shadow: var(--shadow-md);
}

.product-fav-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem;
    border-radius: 9999px;
    color: #ef4444; /* Red 500 */
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: background-color 150ms;
}
.product-fav-btn:hover {
    background-color: var(--bg-light);
}

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

.product-category {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.product-description {
    color: var(--text-light);
    font-size: 0.875rem;
    flex-grow: 1;
    margin-bottom: 0.75rem;
}

.product-footer {
    margin-top: auto;
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.product-unit {
    font-size: 0.75rem;
    color: var(--text-light);
}

.btn-add-cart {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    align-items: center;
    display: flex;
    gap: 12px;
}

/* --- Paginasi --- */
.pagination-area {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.btn-load-more {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* --- Footer --- */



/* --- Sidebar Mobile --- */
.mobile-menu {
    background-color: var(--primary);
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 0;
    right: 0;
    width: 75%; /* Lebar sidebar */
    height: 100%;
    z-index: 50;
    transform: translateX(100%); /* Sembunyikan di kanan */
    transition: transform 0.3s ease-in-out;
    max-width: 320px; /* Batasan lebar */
}

.mobile-menu.open {
    transform: translateX(0); /* Tampilkan */
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    display: none;
}
.menu-overlay.hidden {
    display: none;
}

.mobile-menu.open + .menu-overlay {
    display: block;
}

.menu-content {
    padding: 1.5rem;
}

.menu-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.btn-close-menu {
    color: var(--bg-light);
    border: none;
    background: none;
    cursor: pointer;
    transition: color 150ms;
}
.btn-close-menu:hover {
    color: #e5e7eb;
}

.menu-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--bg-light);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
}

.menu-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-btn {
    width: 100%;
    text-align: left;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 150ms ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.category-btn-mobile {
    background: none;
    color: rgba(255, 255, 255, 0.8);
}
.category-btn-mobile:hover {
    background-color: #1a3275; /* Primary slightly darker */
    color: var(--bg-light);
}
.category-btn-mobile-active {
    background-color: var(--bg-light);
    color: var(--primary);
    font-weight: 700;
}

/* DESKTOP default */
.category-btn {
    background: none;
    color: #1e3a8a;
    font-weight: 500;
}

/* DESKTOP hover */
.category-btn:hover {
    background-color: #e5e7eb;
}

/* DESKTOP active */
.category-btn-active {
    background-color: #1e3a8a;
    color: white;
    font-weight: 700;
}

.menu-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.menu-link {
    display: block;
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    transition: color 150ms;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.menu-link:hover {
    color: var(--bg-light);
}

/* --- Sidebar Desktop --- */
.sidebar-desktop {
    display:grid; /* Default hidden on mobile */
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-btn-desktop {
    background-color: var(--bg-light);
    color: var(--text-light);
}
.category-btn-desktop:hover {
    background-color: #f9fafb; /* Gray 50 */
}
.category-btn-desktop-active {
    background-color: var(--light-blue);
    color: var(--primary);
    font-weight: 600;
    border: 1px solid var(--primary);
}


/* --- Media Queries (Responsivitas) --- */

/* Tablet/Small Desktop (sm: 640px) */
@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (lg: 1024px) */
@media (min-width: 1024px) {
    .header-icons-mobile, #open-menu {
        display: none;
    }

    .nav-desktop {
        display: flex;
    }

    .page-title {
        font-size: 1.875rem;
        margin-bottom: 2.5rem;
    }

    .catalog-layout {
        display: grid;
        grid-template-columns: 3fr 9fr; /* Sidebar 25%, Konten 75% */
        gap: 2rem;
    }

    .sidebar-desktop {
        display: block;
        position: sticky;
        top: 6rem; /* top-24 */
        align-self: flex-start;
        background-color: var(--bg-light);
        padding: 1.5rem;
        border-radius: 0.75rem;
        box-shadow: var(--shadow-lg);
    }

    .product-area {
        grid-column: span 1 / span 1;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .filter-sort-mobile {
        display: none;
    }
    .filter-sort-desktop {
        display: block;
    }
}

/* Extra Large Desktop (xl: 1280px) */
@media (min-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== HEADER STICKY ========== */
.header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 3000;
  border-bottom: 1px solid #eee;
}

/* ========== NAVBASE ========== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--container-padding);
  position: relative; /* PENTING */
}

/* ========== NAV MENU DESKTOP ========== */
.nav-menu {
  display: none;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .nav-menu {
    display: flex;
    position: static;
  }
}

/* ========== HAMBURGER BUTTON ========== */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 44px;
  border-radius: 8px;
  border: none;
  background: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 3100; /* di atas header + menu */
}

.menu-toggle i,
.fas.fa-bars {
  font-size: 24px;
  color: #000 !important;
}

.menu-toggle i,
.fas.fa-bars {
  color: #000 !important; /* hitam */
}


@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

/* ========== HIDE HUBUNGI KAMI DI MOBILE ========== */
@media (max-width: 1023px) {
  .btn.btn-primary {
    display: none;
  }
}

@media (max-width: 1023px) {
    
    /* ... (Kode untuk .btn.btn-primary display: none) ... */

    /* >>> TAMBAHKAN/EDIT BLOK INI <<< */
    .nav-menu {
        display: flex; 
        flex-direction: column;
        
        position: fixed; /* PENTING: Menu tidak ikut scroll */
        top: 0;
        right: 0; /* Mulai dari sisi kanan */
        width: 300px; /* Lebar Sidebar (sesuaikan jika perlu) */
        height: 100%; /* Mengisi seluruh tinggi layar */
        
        background-color: #1d2b64; /* Warna Biru Tua/Navy */
        padding: 80px 30px 20px 30px; /* Jarak dari atas untuk header */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        z-index: 999; /* Pastikan di atas overlay */
        overflow-y: auto; 
        
        /* SEMBUNYIKAN MENU SECARA DEFAULT */
        transform: translateX(100%); 
        transition: transform 0.3s ease-in-out;
    }

}


/* ========== MOBILE SIDEBAR MENU (PENGGANTI DROPDOWN) ========== */
.nav-menu.open {
    /* Hanya perlu menggeser menu masuk (transform: translateX(0)) */
    transform: translateX(0); 
    
    /* Hapus semua properti lain yang ada di blok lama seperti top, left, width, background, dll. karena sudah didefinisikan di .nav-menu di Langkah 1. */
    
    /* Z-Index harus lebih tinggi dari backdrop */
    z-index: 2200; 
}

.nav-menu.open li {
    margin: .7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Tambahkan garis pemisah putih */
}

.nav-menu.open .nav-link {
    display: block;
    width: 100%;
    color: white; /* PENTING: Agar tautan terlihat di latar belakang biru tua */
    padding: 10px 0;
}

/* HAPUS TOTAL: Animasi Drop */
/* @keyframes drop { ... } */

.nav-menu.open li {
  margin: .7rem 0;
}

.nav-menu.open .nav-link {
  display: block;
  width: 100%;
}



/* ========== BACKDROP MOBILE ========== */
.mobile-backdrop {
  display: none;
}

.mobile-backdrop.show {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 2000; /* di bawah menu */
}

/* ============================
  FORCE HAMBURGER ICON BLACK
  Tempelkan ini di paling bawah file CSS
   ============================ */

/* Semua kemungkinan class FontAwesome & i */
.menu-toggle,
.menu-toggle * {
  color: #000 !important;      /* teks / icon color */
  fill: #000 !important;       /* untuk svg fill */
  stroke: #000 !important;     /* untuk svg stroke */
}

/* Target spesifik untuk FA v4/v5 pseudo-element */
.menu-toggle .fa,
.menu-toggle .fas,
.menu-toggle .fa-bars,
.menu-toggle i.fas,
.menu-toggle i.fa,
.menu-toggle .fa-bars:before,
.menu-toggle i.fas:before {
  color: #000 !important;
  fill: #000 !important;
}

/* Jika icon dimasukkan sebagai SVG */
.menu-toggle svg,
.menu-toggle svg * {
  color: #000 !important;
  fill: #000 !important;
  stroke: #000 !important;
}

/* Pastikan tidak ada background-clip atau mix-blend yang membuatnya transparan */
.menu-toggle,
.menu-toggle i,
.menu-toggle .fa,
.menu-toggle svg {
  -webkit-text-fill-color: #000 !important;
  mix-blend-mode: normal !important;
}

/* Jika masih ada style inline di elemen, tambahkan ini untuk prioritas tertinggi (jadi gunakan sementara) */
[style] > .menu-toggle,
.menu-toggle[style] {
  color: #000 !important;
  fill: #000 !important;
}
/* Warna icon hamburger jadi hitam */
.menu-toggle i {
  color: #000000 !important;
  font-size: 24px; /* opsional */
}

/* Hilangkan border jika ada */
.menu-toggle {
  border: none;
  background: transparent;
}

.detail-container {
    padding: 1.5rem;
}

.detail-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.detail-name {
    font-size: 1.6rem;
    font-weight: bold;
}

.detail-description {
    font-size: 1rem;
    line-height: 1.6rem;
    opacity: .8;
}

.detail-price-box {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.detail-price {
    font-size: 1.5rem;
    color: #1e3a8a;
    font-weight: bold;
}

.detail-order-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
}

/* Menghilangkan Price/harga */
.product-price,
.product-unit,
.price-info {
    display: none !important;
}
/* ending menghilangkan harga */

/* ukuran kolom produk di mobile */

/* ================================
   OPTIMASI MOBILE PRODUCT CARD
   ================================ */
@media (max-width: 480px) {

    /* Kartu lebih pendek */
    .product-card {
        padding: 10px !important;
        border-radius: 14px !important;
    }

    /* Gambar tidak terlalu tinggi */
    .product-image-wrapper {
        height: 120px !important;
    }

    .product-image {
        object-fit: cover !important;
        height: 120px !important;
    }

    /* Kategori */
    .product-category {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }

    /* Judul */
    .product-name {
        font-size: 15px !important;
        line-height: 1.3 !important;
        margin-bottom: 6px !important;
    }

    /* Deskripsi lebih kecil + dipotong */
    .product-description {
        font-size: 12px !important;
        line-height: 1.35 !important;
        max-height: 38px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        margin-bottom: 10px !important;
    }

    /* Tombol Hubungi Kami */
    .btn-add-cart {
        font-size: 13px !important;
        padding: 8px 12px !important;
        height: auto !important;
    }

    /* Footer (agar tidak melebar jauh ke bawah) */
    .product-footer {
        margin-top: 6px !important;
    }
}

@media (max-width: 480px) {

    .product-image-wrapper {
        width: 100% !important;
        height: 120px !important;
        overflow: hidden !important;
        border-radius: 12px 12px 0 0 !important;
    }

    .product-image {
        width: 100% !important;         /* Full width */
        height: 100% !important;        /* Ikuti tinggi wrapper */
        object-fit: cover !important;   /* Zoom crop rapi, tidak gepeng */
        object-position: center !important;
        display: block !important;
    }
}

/* ===== FIX SEJARASKAN TOMBOL MOBILE ===== */
@media (max-width: 480px) {

  .product-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    height: 100% !important;
  }

  .product-detail {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
  }

  .product-description {
    flex: 1 1 auto !important;
  }

  .product-footer {
    margin-top: auto !important; /* INILAH KUNCI-NYA */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .btn-add-cart {
    width: 85% !important;
  }
}

/* --- Equal Height Card: MOBILE ONLY --- */
@media (max-width: 480px) {

  /* Pastikan grid meratakan tinggi item */
  #product-list {
    display: grid !important;
    grid-auto-rows: 1fr !important;
  }

  /* Paksa card selalu sama tinggi */
  .product-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .product-detail {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .product-description {
    flex-grow: 1 !important;
  }
  
}


/* Call To Action Section */
.cta-section {
  background-color: #1e40af;
  color: white;
  text-align: center;
  padding: 4rem 1rem 6rem;
}

.cta-container {
  max-width: 650px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer */
footer {
  background: #1e3a8a;
  color: white;
  padding: 4rem 1rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo img {
  background-color: #2563eb;
  color: white;
  font-weight: 700;
  border-radius: 10px;
  width: 47px;
  height: 47px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  user-select: none;
}


.footer-logo h3 {
  font-weight: 700;
  font-size: 1.3rem;
}

.footer-logo small {
  font-size: 0.75rem;
  color: #a5b4fc;
}

footer p {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #bfdbfe;
}

footer ul {
  list-style: none;
  margin-top: 0.75rem;
}

footer ul li a {
  color: #bfdbfe;
  text-decoration: none;
  display: block;
  margin: 0.4rem 0;
  transition: color 0.3s ease;
}

footer ul li a:hover {
  color: white;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.contact-list li i {
  stroke: white;
  min-width: 20px;
  min-height: 20px;
}

.contact-list li a {
  color: #bfdbfe;
  text-decoration: none;
}

.contact-list li a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #a5b4fc;
}

.footer-links a {
  margin-left: 1rem;
  color: #a5b4fc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}


.footer-item:hover {
  transform: translateY(-2px);
}

/* POPUP BASE */
/* POPUP WRAPPER */
/* POPUP BASE */
.popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.popup.hidden {
    display: none !important;
}

.popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

/* POPUP CONTENT */
.popup-content {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    width: 92%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: popIn 0.2s ease;
}

/* ANIMATION */
@keyframes popIn {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* IMAGE */
.popup-img {
    width: 100%;
    max-height: 380px;      /* batasi tinggi agar popup tidak terlalu panjang */
    object-fit: contain;     /* FOTO UTUH, TIDAK TERPOTONG */
    background-color: #f3f3f3;
    border-radius: 14px;
    margin-bottom: 14px;
    padding: 10px;           /* beri ruang agar gambar tidak mentok */
    display: flex;
}

/* TITLE */
.popup-title {
    font-size: 22px;
    font-weight: 700;
    margin-top: 4px;
    margin-bottom: 6px;
}

.popup-line {
    border: none;
    border-top: 1px solid #ddd;
    margin: 15px 0;
}

/* INFO BLOCK */
.popup-info {
    margin-bottom: 12px;
}

.info-block {
    margin-bottom: 16px;
}

.info-block h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.info-block p,
.info-block ul {
    font-size: 14.5px;
    line-height: 1.45;
}

#popup-nutrition {
    padding-left: 20px;
    list-style: disc;
}

/* FORM */
.popup-form-title {
    font-size: 19px;
    margin-bottom: 10px;
}

#popup-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#popup-form input,
#popup-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.btn-wa {
    background: #25D366;
    color: white;
    padding: 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

/* CLOSE BUTTON */
.popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 999;
    background: rgba(0,0,0,0.15);
    color: #000;
    padding: 6px 10px;
    border-radius: 50%;
    font-size: 18px;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

/* DESKTOP */
@media (min-width: 768px) {
    .popup-content { max-width: 600px; padding: 28px; }
}

@media (min-width: 1024px) {
    .popup-content { max-width: 700px; padding: 32px; }
    .popup-img { max-height: 300px; }
}

/* CAROUSEL CONTAINER */
.carousel {
    position: relative;
    width: 100%;
    height: 48vh;
    overflow: hidden;
    border-radius: 12px;
    margin-top: 10px;
}

/* WRAPPER SLIDE */
.carousel-wrapper {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

/* ITEM SLIDE */
.carousel-item {
    width: 100%;
    flex-shrink: 0;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* BUTTON SLIDE */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.35);
    border: none;
    padding: 10px 15px;
    color: #fff;
    font-size: 22px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.55);
}

.carousel-btn.left { left: 12px; }
.carousel-btn.right { right: 12px; }

/* DOTS */
.carousel-dots {
    position: absolute;
    bottom: 12px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.carousel-dots span {
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
}

.carousel-dots .active {
    background: #fff;
}

/* ==== CAROUSEL WRAPPER ==== */
/* ==== CAROUSEL WRAPPER ==== */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 0 auto;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

/* Tombol Next / Prev */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  backdrop-filter: blur(4px);
}

.carousel-btn:hover {
  background: rgba(0,0,0,0.6);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* Responsive: Space kiri kanan untuk carousel (biar tidak nempel) */
.carousel-container {
  padding: 0 16px;
  margin-top: 20px;
}

@media (min-width: 1024px) {
  .carousel-container {
    padding: 0 60px;
  }
}




/* MOBILE RESPONSIVE */
@media (max-width: 480px) {
    .carousel {
        height: 30vh;
        border-radius: 8px;
    }
}

/* MOBILE – Full width */
.carousel {
    position: relative;
    width: 100%;          /* FULL */
    margin: 12px 0 0 0;   /* hanya jarak atas */
    height: 30vh;
    overflow: hidden;
    border-radius: 10px;
}

/* DESKTOP – ada margin kiri-kanan */
@media (min-width: 768px) {
    .carousel {
        width: calc(100% - 60px);   /* margin kiri-kanan */
        margin: 30px auto 0;
        height: 45vh;
        border-radius: 12px;
        
    }
}


/* Saat popup aktif, nonaktifkan scroll background */
.body-no-scroll {
    overflow: hidden !important;
    height: 100% !important;
}


