

@font-face {
  font-family: 'Rabar';
  src: url('../fonts/ku.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rabar';
  src: url('../fonts/ku.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand:        #4f46e5;
  --brand-dark:   #4338ca;
  --brand-soft:   #eef0ff;
  --accent:       #06b6d4;
  --wa:           #25d366;
  --wa-dark:      #1da851;
  --ink:          #1e2430;
  --muted:        #6b7280;
  --line:         #e7e9f0;
  --bg:           #f6f7fb;
  --card:         #ffffff;
  --header-bg:    #ffffff;
  --header-text:  #1e2430;
  --footer-bg:    #0f1420;
  --footer-text:  #c7ccd8;
  --radius:       18px;
  --shadow:       0 8px 30px rgba(30, 36, 48, .08);
  --shadow-sm:    0 3px 12px rgba(30, 36, 48, .06);
}
.mlogo {
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .mlogo {
    width: 50% !important;
    height: 50% !important;
  }
}

* { box-sizing: border-box; }

body {
  font-family: 'Rabar', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  line-height: 1.7;
}

a { text-decoration: none; }

.navbar-brand {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--brand) !important;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.navbar-brand .logo-badge {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 11px;
  display: grid; place-items: center;
  color: #fff; font-size: 1.1rem;
}
.navbar {
  background: var(--header-bg) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}
.navbar .nav-link {
  font-weight: 600;
  color: var(--header-text) !important;
  border-radius: 10px;
  padding: .4rem .9rem !important;
  transition: .2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: var(--brand-soft);
  color: var(--brand) !important;
}

.page-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  padding: 2.4rem 1rem;
  border-radius: 0 0 28px 28px;
  text-align: center;
  margin-bottom: 1.6rem;
}
.page-hero h1 { font-weight: 800; margin: 0 0 .3rem; }
.page-hero p { opacity: .92; margin: 0; }

.filter-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 1.6rem;
}
.form-control, .form-select {
  border-radius: 12px;
  border: 1.5px solid var(--line);
  padding: .6rem .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem rgba(79,70,229,.15);
}
.chip {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: .2s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.chips-scroll {
  display: flex; gap: .5rem; overflow-x: auto;
  padding-bottom: .3rem;
  scrollbar-width: thin;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #f0f1f6;
  transition: transform .22s, box-shadow .22s;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.product-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f2f4f9;
  overflow: hidden;
  cursor: zoom-in;
}
.product-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.product-card:hover .product-thumb img { transform: scale(1.05); }

.thumb-zoom {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(15,20,32,.55);
  color: #fff;
  display: grid; place-items: center;
  font-size: .95rem;
  opacity: 0;
  transition: opacity .2s;
  backdrop-filter: blur(4px);
}
.product-card:hover .thumb-zoom { opacity: 1; }

.img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,12,20,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.2rem;
}
.img-lightbox.open { display: flex; }
.lightbox-figure {
  margin: 0;
  max-width: 96vw;
  max-height: 92vh;
  text-align: center;
}
.lightbox-figure img {
  max-width: 96vw;
  max-height: 82vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.lightbox-figure figcaption {
  color: #fff;
  margin-top: .8rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.lightbox-close {
  position: fixed;
  top: 18px;
  inset-inline-end: 18px;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

.badge-cat {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: rgba(255,255,255,.9);
  color: var(--brand);
  font-weight: 700;
  font-size: .72rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.product-body {
  padding: .95rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
  text-align: center;
}
.product-name {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  margin: 0;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.price-now {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--brand);
}

.btn-wa {
  background: var(--wa);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: .2s;
  margin-top: auto;
}
.btn-wa:hover { background: var(--wa-dark); color: #fff; transform: translateY(-2px); }
.btn-wa svg { width: 20px; height: 20px; fill: #fff; }

.btn-brand {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  padding: .6rem 1.2rem;
  transition: .2s;
}
.btn-brand:hover { background: var(--brand-dark); color: #fff; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.about-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem;
}
.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background:#000;
}
.gallery-item img,
.gallery-item video,
.gallery-item iframe {
  width: 100%;
  display: block;
  border: none;
}
.gallery-item img { aspect-ratio: 4/3; object-fit: cover; }
.gallery-item iframe, .gallery-item video { aspect-ratio: 16/9; }

.contact-tile {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.contact-tile .ic {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

footer.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2.2rem 1rem 1.4rem;
  margin-top: 3rem;
}
footer.site-footer a { color: var(--footer-text); }
footer.site-footer a:hover { color: #fff; }
.social-btn {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  display: grid; place-items: center;
  transition: .2s;
}
.social-btn:hover { background: var(--brand); }

.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px;
  background: #0f1420;
  color: #c7ccd8;
  padding: 1.2rem;
  flex-shrink: 0;
}
.admin-sidebar .brand {
  color: #fff; font-weight: 800; font-size: 1.2rem;
  margin-bottom: 1.4rem; display:flex; gap:.5rem; align-items:center;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: .6rem;
  color: #c7ccd8; padding: .7rem .9rem; border-radius: 11px;
  font-weight: 600; margin-bottom: .3rem; transition: .2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,.08); color: #fff;
}
.admin-main { flex: 1; padding: 1.6rem; background: var(--bg); }
.admin-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.4rem; margin-bottom: 1.4rem;
}
.admin-topbar {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom: 1.4rem; flex-wrap: wrap; gap:.6rem;
}
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 1.2rem;
  box-shadow: var(--shadow-sm); text-align:center;
}
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--brand); }
.stat-card .lbl { color: var(--muted); font-weight: 600; }
.table thead th { background: var(--brand-soft); color: var(--brand); border:none; }
.table td, .table th { vertical-align: middle; }
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  padding: 1rem;
}
.login-card {
  background:#fff; border-radius: 22px; box-shadow: var(--shadow);
  padding: 2.2rem; width: 100%; max-width: 400px;
}

@media (max-width: 991px) {
  .admin-sidebar {
    position: fixed; inset-inline-start: 0; top:0; bottom:0;
    z-index: 1050; transform: translateX(0);
    transition: transform .25s;
  }
  html[dir=rtl] .admin-sidebar { transform: translateX(100%); }
  html[dir=rtl] .admin-sidebar.open { transform: translateX(0); }
  .admin-backdrop {
    position: fixed; inset:0; background: rgba(0,0,0,.4); z-index: 1040; display:none;
  }
  .admin-backdrop.show { display:block; }
}

.brand-logo { height: 40px; width: auto; border-radius: 8px; }
.brand-name { font-weight: 800; }
.navbar-brand .logo-badge {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 11px; display: grid; place-items: center;
  color: #fff; font-size: 1.15rem;
}
.hero-logo {
  max-width: 220px; width: 60%; height: auto;
  margin-bottom: .6rem; filter: drop-shadow(0 6px 18px rgba(0,0,0,.18));
}
@media (min-width: 768px){ .hero-logo{ width: 260px; } }

.btn-wa i.bi { font-size: 1.15rem; }

.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-ic {
  position: absolute; inset-inline-start: 14px; top: 12px;
  font-size: 1.5rem; color: var(--brand); opacity: .25;
}

.img-preview {
  width: 100px; height: 100px; object-fit: cover;
  border-radius: 12px; border: 2px solid var(--line);
  background: #f2f4f9;
}
.image-drop { position: relative; }

.form-control-color { width: 52px; min-width: 52px; padding: .25rem; border-radius: 12px 0 0 12px; }
.color-input .form-control:last-child { border-radius: 0 12px 12px 0; }
.theme-preview .tp-bar {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; font-weight: 800; text-align: center;
  padding: 1rem; border-radius: 14px;
}

.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-select:focus, .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem var(--brand-soft); }

.page-link { color: var(--brand); border-radius: 10px !important; margin: 0 2px; border-color: var(--line); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); }

.toast-stack {
  position: fixed; inset-block-end: 20px; inset-inline-end: 20px;
  display: flex; flex-direction: column; gap: .6rem; z-index: 3000;
}
.toast-msg {
  background: #fff; border-inline-start: 4px solid var(--brand);
  box-shadow: var(--shadow); border-radius: 12px;
  padding: .8rem 1.1rem; font-weight: 600; min-width: 220px;
  animation: toastIn .25s ease;
}
.toast-msg.success { border-color: #16a34a; }
.toast-msg.danger  { border-color: #dc2626; }
@keyframes toastIn { from{ transform: translateY(12px); opacity:0 } to{ transform:none; opacity:1 } }

.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.6);
  border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.admin-sidebar .brand img { vertical-align: middle; }

.product-card {
  border: 1px solid #eef0f6;
  border-radius: 20px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -18px rgba(30,35,60,.35);
  border-color: var(--brand-soft);
}
.product-thumb { aspect-ratio: 1 / 1; }
.product-body {
  padding: 1rem 1rem 1.1rem;
  gap: .5rem;
  text-align: start;
}
.product-name {
  font-size: 1rem;
  min-height: auto;
  -webkit-line-clamp: 2;
}
.product-desc {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-row { justify-content: flex-start; margin-top: .1rem; }
.price-now { font-size: 1.2rem; }
.card-actions { display: flex; flex-direction: column; gap: .45rem; margin-top: auto; }
.btn-cart {
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  font-size: .9rem;
  padding: .5rem .8rem;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  transition: .18s;
}
.btn-cart:hover { background: var(--brand); color: #fff; }
.btn-cart.added { background: #16a34a; color: #fff; }

.cart-link { position: relative; }
.cart-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--brand); color: #fff;
  border-radius: 999px; font-size: .72rem; font-weight: 800;
  margin-inline-start: 2px;
}
.cart-count.empty { display: none; }

.qr-open-btn {
  background: rgba(255,255,255,.12);
  color: #fff; border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px; font-weight: 700; padding: .55rem 1rem;
  display: inline-flex; align-items: center; gap: .5rem; transition: .18s;
}
.qr-open-btn:hover { background: #fff; color: var(--brand); }
.qr-modal {
  position: fixed; inset: 0; z-index: 3500;
  background: rgba(10,12,20,.75);
  display: none; align-items: center; justify-content: center; padding: 1.2rem;
}
.qr-modal.open { display: flex; }
.qr-box {
  background: #fff; border-radius: 20px; padding: 1.6rem;
  max-width: 340px; width: 100%; text-align: center; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.qr-close {
  position: absolute; top: 10px; inset-inline-end: 10px;
  width: 36px; height: 36px; border: none; border-radius: 10px;
  background: #f2f4f9; color: var(--ink); cursor: pointer;
}
.qr-canvas-wrap {
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px;
}
.qr-canvas-wrap canvas, .qr-canvas-wrap img { width: 240px; height: 240px; image-rendering: pixelated; }

.order-wrap { max-width: 760px; margin: 0 auto; }
.order-empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.order-item {
  display: flex; align-items: center; gap: .9rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: .7rem; margin-bottom: .7rem;
}
.order-item img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 12px; flex-shrink: 0; cursor: zoom-in;
}
.order-item .oi-info { flex: 1; min-width: 0; }
.order-item .oi-name { font-weight: 700; margin: 0; }
.order-item .oi-price { color: var(--brand); font-weight: 700; font-size: .92rem; }
.order-qty { display: flex; align-items: center; gap: .3rem; }
.order-qty button {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; font-weight: 800; color: var(--brand); cursor: pointer;
}
.order-qty span { min-width: 26px; text-align: center; font-weight: 700; }
.oi-remove { border: none; background: none; color: #dc2626; font-size: 1.1rem; cursor: pointer; }
.order-summary {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.1rem 1.2rem; margin-top: 1rem;
  position: sticky; bottom: 12px; box-shadow: var(--shadow-sm);
}
.order-total-row { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 1.15rem; margin-bottom: .8rem; }
.order-total-row .val { color: var(--brand); }

.color-group-label {
  font-weight: 800;
  font-size: .82rem;
  color: var(--brand);
  border-inline-start: 3px solid var(--brand);
  padding-inline-start: .5rem;
  margin: .2rem 0 .1rem;
}
.form-control-color { min-width: 46px; }
