/* FONT IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Raleway:wght@500;600;700&family=Cabin:wght@400;500;600&display=swap');

/* FONT VARIABLES */
:root {
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Cabin', sans-serif;
    --font-ui: 'Poppins', sans-serif;

    /* EARTH TONE PALETTE */
    --earth-dark:    #6B4F39;  /* deep earth brown */
    --earth-clay:    #C2A878;  /* clay sand */
    --earth-moss:    #7A8F6C;  /* natural moss */
    --earth-deep:    #3D2E24;  /* dried leaf */
    --earth-beige:   #EFE7DA;  /* soft beige */
    --earth-olive:   #8A785D;  /* herbal olive */

    /* GRADIENTS */
    --grad-earth: linear-gradient(to right, #6B4F39, #C2A878);
    --grad-olive: linear-gradient(to right, #7A8F6C, #C2A878);
    --grad-deep:  linear-gradient(to right, #3D2E24, #6B4F39);
}

/* ---------------- GLOBAL ------------------- */
* {
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body {
    background: var(--earth-beige);
    font-family: var(--font-body);
    color: var(--earth-deep);
}

a {
    color:inherit;
    text-decoration:none;
}

/* ---------------- NAVBAR ------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;

    padding: 0 16px;
    background: var(--grad-earth);

    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 1500;
}

/* tombol bars */
#btnBars {
    font-size: 20px;
    color: #fff;
    cursor: pointer;
}

/* CART */
.cart-btn {
    position: relative;
    display: flex;
    align-items: center;

    height: 34px;
    flex-shrink: 0;
}

.cart-btn i {
    font-size: 20px;
    color: #fff;
}

/* badge jumlah */
.cart-count {
    position: absolute;
    top: -6px;
    right: -8px;

    width: 18px;
    height: 18px;
    background: #fff;
    color: var(--earth-dark);

    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------- SIDEBAR ------------------- */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px; /* default hidden */
    width: 250px;
    height: 100%;
    background: var(--earth-beige);
    padding-top: 65px;
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,.18);
    z-index: 1000; /* pastikan di atas content */
}

.sidebar-show {
    left: 0;
}

/* Tombol close di sidebar */
.sidebar-header {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1100; /* lebih tinggi dari sidebar */
}

.sidebar-header i {
    font-size: 1.5rem;
    color: var(--earth-dark);
    cursor: pointer;
}

/* Sidebar body */
.sidebar-body {
    padding: 15px;
}

.sidebar-body h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--earth-deep);
}

.sidebar-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-body ul li a {
    padding: 10px;
    border-radius: 6px;
    color: var(--earth-dark);
    display: block;
    transition: 0.25s;
}

.sidebar-body ul li a:hover {
    background: var(--earth-clay);
    color: #fff;
}

/* Dropdown submenu */
.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
}

.toggle-submenu {
    font-size: 12px;
    color: var(--earth-dark);
    transition: 0.3s;
}

.submenu {
    display: none;
    list-style: none;
    padding-left: 15px;
    margin-top: 5px;
}

.submenu li a {
    padding: 6px 10px;
    font-size: 14px;
    color: #4f463f;
    display: block;
}

.submenu li a:hover {
    background: var(--earth-moss);
    border-radius: 4px;
    color: #fff;
}

.dropdown.active .toggle-submenu {
    transform: rotate(90deg);
}



/* ---------------- BANNER ------------------- */
.banner {
    padding:85px 15px 45px;
    background:url('assets/img/banner-21.png') no-repeat center/cover;
    position:relative;
    color:#fff;
}

.banner:before {
    content:'';
    position:absolute;
    top:0; left:0; width:100%; height:100%;
    background:rgba(59,42,33,.45); /* earth-dark overlay */
}

.banner-text {
    position:relative;
    z-index:2;
    display:flex; justify-content:space-between; align-items:center;
    flex-wrap:wrap;
}

.banner-text h1 {
    font-family:var(--font-heading);
    font-size:2.2rem;
    font-weight:700;
}

/* Search bar */
.banner-search {
    display:flex;
    gap:6px;
}

.banner-search input {
    padding:8px 12px;
    border:1px solid var(--earth-olive);
    background:#fff;
    border-radius:6px;
    color: var(--earth-deep);
}

.banner-search button {
    padding:8px 14px;
    background: var(--grad-olive);
    border:none;
    border-radius:6px;
    color:#fff;
    cursor:pointer;
    font-family:var(--font-ui);
}

.banner-search button:hover {
    background: linear-gradient(to right, #8EA981, #D5C7A0);
}

@media(max-width:600px) {
    .banner-text { flex-direction:column; text-align:center; }
    .banner-search { width:100%; justify-content:center; margin-top:15px; }
    .banner-search input { width:100%; max-width:350px; }
}

/* ---------------- CONTENT ------------------- */
.content { padding:20px; }

.container {
    width:95%; max-width:1200px;
    margin:auto;
}

.row {
    display:flex; flex-wrap:wrap;
    margin:-10px;
}

.col-3 {
    flex:0 0 25%;
    padding:10px;
}

/* ---------------- CARD MENU ------------------- */
/* IMAGE CONTAINER */
.image-box {
    position: relative;   /* INI KUNCI UTAMA */
    width: 100%;
    height: 150px;
    overflow: hidden;
}

/* GAMBAR PRODUK */
.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* RIBBON */
.ribbon {
  position: absolute;
  top: 10px;
  right: -35px;
  background: #bf3f3f;
  color: #fff;
  padding: 6px 40px;
  font-size: 12px;
  font-weight: 600;
  transform: rotate(30deg);
  box-shadow: 0 3px 6px rgba(0,0,0,.25);
  z-index: 20;
}

.card-menu {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
    border: 1px solid #e3d7c8;
    transition: .25s;
    display: flex;
    flex-direction: column;
}

.card-menu:hover {
    transform: translateY(-6px);
}

.card-body {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    order: 2; /* Di bawah img-wrap */
}

.menu-name {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--earth-deep);
}

.menu-desc {
    font-size: .9rem;
    color: #6f6a62;
    margin-bottom: 8px;
    min-height: 40px;
}

.menu-price {
    font-weight: 600;
    font-family: var(--font-ui);
    font-size: 1.05rem;
    color: var(--earth-dark);
    margin-bottom: 10px;
}

/* Add to Cart */
.btn-add-cart {
    padding: 2px;
    border: none;
    border-radius: 6px;
    background: var(--grad-earth);
    color: #fff;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: .3s;
    margin-top: auto;
}

.btn-add-cart:hover {
    background: var(--grad-deep);
}

.cart-toast {
    margin-top: 50px;     /* turun ke bawah */
    margin-right: 10px;   /* geser dari kanan */
    font-size: 14px;      /* ukuran teks */
    padding: 5px 10px;   /* padding DALAM popup */
}


/* ---------------- CART SIDEBAR ------------------- */
#cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: var(--earth-beige);
    box-shadow: -5px 0 20px rgba(0,0,0,.35);
    transform: translateX(100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
}

#cart-sidebar.active {
    transform: translateX(0);
}

.cart-btn.open i:before {
    content: "\f00d"; /* icon X fontawesome */
}

#cart-sidebar header {
    padding:15px;
    background: var(--grad-earth);
    color:#fff;
    display:flex; justify-content:space-between; align-items:center;
    font-family:var(--font-ui);
    font-weight:600;
}

#cart-items {
    flex:1;
    padding:15px;
    overflow-y:auto;
}

.cart-item {
    display:flex; justify-content:space-between;
    border-bottom:1px solid #d2c8ba;
    padding-bottom:6px; margin-bottom:10px;
}

.cart-item-name { font-weight:600; color:var(--earth-dark); }
.cart-item-price { font-weight:600; color:var(--earth-clay); }

.cart-item-remove {
    color:#b54c4c;
    cursor:pointer;
}

/* Footer */
#cart-footer {
    padding:15px;
    border-top:1px solid #cbbfaa;
}

#cart-footer .total {
    font-weight:700;
    margin-bottom:10px;
}

#cart-footer button {
    width:100%;
    padding:10px;
    background: var(--grad-earth);
    border:none;
    border-radius:6px;
    color:#fff;
    font-family:var(--font-ui);
    cursor:pointer;
}

#cart-footer button:hover {
    background: var(--grad-deep);
}

/* Qty buttons */
.cart-item-qty button {
    background:var(--earth-clay);
    color:#fff;
    border:none;
    width:24px; height:24px;
    font-weight:bold;
    border-radius:50%;
    cursor:pointer;
    margin:0 4px;
}

/* ---------------- RESPONSIVE ------------------- */
@media(max-width:768px) { .col-3 { flex:0 0 50%; } }
@media(max-width:480px) { .col-3 { flex:0 0 100%; } }