/* Lumio — admin theme on top of Bootstrap 5.3
   Mobile-first; sidebar collapses to an offcanvas under lg. */

:root {
  --lm-bg: #f4f6fb;
  --lm-surface: #ffffff;
  --lm-sidebar: #0f172a;        /* slate-900 */
  --lm-sidebar-hover: #1e293b;  /* slate-800 */
  --lm-sidebar-active: #6366f1; /* indigo-500 */
  --lm-muted: #94a3b8;
  --lm-text: #1e293b;
  --lm-primary: #6366f1;
  --lm-primary-d: #4f46e5;
  --lm-radius: .85rem;
  --lm-sidebar-w: 256px;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  background: var(--lm-bg);
  color: var(--lm-text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Buttons / brand primary ---------- */
.btn-primary {
  --bs-btn-bg: var(--lm-primary);
  --bs-btn-border-color: var(--lm-primary);
  --bs-btn-hover-bg: var(--lm-primary-d);
  --bs-btn-hover-border-color: var(--lm-primary-d);
  --bs-btn-active-bg: var(--lm-primary-d);
  --bs-btn-disabled-bg: var(--lm-primary);
}
.text-primary { color: var(--lm-primary) !important; }
.link-primary { color: var(--lm-primary) !important; }
a { text-decoration: none; }

/* ---------- App shell ---------- */
.lm-shell { min-height: 100vh; }

.lm-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--lm-sidebar-w);
  background: var(--lm-sidebar);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  z-index: 1045;
  transition: transform .25s ease;
}
.lm-sidebar__brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.15rem 1.25rem;
  color: #fff; font-weight: 700; font-size: 1.15rem;
  letter-spacing: .2px;
}
.lm-sidebar__brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--lm-primary), #22d3ee);
  display: grid; place-items: center; color: #fff; font-weight: 800;
}
.lm-nav { padding: .5rem .75rem; overflow-y: auto; flex: 1; }
.lm-nav__label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
  color: #64748b; padding: 1rem .75rem .35rem;
}
.lm-nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .62rem .8rem; margin-bottom: 2px;
  border-radius: .6rem; color: #cbd5e1; font-weight: 500; font-size: .94rem;
  transition: background .15s, color .15s;
}
.lm-nav a i { font-size: 1.1rem; width: 1.25rem; text-align: center; }
.lm-nav a:hover { background: var(--lm-sidebar-hover); color: #fff; }
.lm-nav a.active {
  background: linear-gradient(90deg, rgba(99,102,241,.25), rgba(99,102,241,.05));
  color: #fff; box-shadow: inset 3px 0 0 var(--lm-sidebar-active);
}
.lm-sidebar__foot { padding: .9rem 1.1rem; border-top: 1px solid #1e293b; font-size: .8rem; color: var(--lm-muted); }

/* ---------- Main column ---------- */
.lm-main { margin-left: var(--lm-sidebar-w); min-width: 0; }
.lm-topbar {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid #e9edf5;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.25rem;
}
.lm-topbar h1 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.lm-content { padding: 1.5rem 1.25rem 3rem; }

/* ---------- Cards / stats ---------- */
.lm-card {
  background: var(--lm-surface);
  border: 1px solid #eaeef6;
  border-radius: var(--lm-radius);
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.lm-stat { padding: 1.15rem 1.25rem; height: 100%; }
.lm-stat__icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.3rem; margin-bottom: .75rem;
}
.lm-stat__val { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.lm-stat__label { color: #64748b; font-size: .85rem; }
.bg-soft-primary { background: #eef0fe; color: var(--lm-primary-d); }
.bg-soft-success { background: #e7f7ef; color: #0f9d6e; }
.bg-soft-warning { background: #fef3e2; color: #d97706; }
.bg-soft-danger  { background: #fdecec; color: #dc2626; }
.bg-soft-info    { background: #e6f6fb; color: #0891b2; }

/* ---------- Tables ---------- */
.lm-card .table { margin: 0; }
.lm-card .table > :not(caption) > * > * { padding: .85rem 1rem; }
.lm-card .table thead th {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .05em;
  color: #64748b; font-weight: 600; border-bottom: 1px solid #eef1f7;
}
.lm-card .table tbody tr { border-top: 1px solid #f1f4fa; }
.lm-card .table tbody td { vertical-align: middle; font-size: .95rem; }

.badge-soft { padding: .4em .75em; border-radius: 999px; font-weight: 600; font-size: .76rem; }

/* ---------- Order tabs ---------- */
.lm-order-tab {
  font-size: .92rem; font-weight: 600; padding: .45rem 1rem;
  border: 1.5px solid #dde3ee; border-radius: .5rem; color: #475569;
  background: #fff; transition: .15s;
}
.lm-order-tab:hover { background: #f1f4fa; color: #1e293b; }
.lm-order-tab.active {
  background: var(--lm-primary); color: #fff; border-color: var(--lm-primary);
}

/* ---------- Orders table larger text ---------- */
.lm-orders-table tbody td { font-size: 1rem; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .86rem; color: #334155; }
.form-control, .form-select { border-radius: .6rem; padding: .55rem .8rem; border-color: #dde3ee; }
.form-control:focus, .form-select:focus {
  border-color: var(--lm-primary); box-shadow: 0 0 0 .2rem rgba(99,102,241,.15);
}
.lm-input-help { font-size: .8rem; color: #94a3b8; }

/* ---------- Auth ---------- */
.lm-auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: radial-gradient(1200px 600px at 10% -10%, #e0e7ff, transparent),
              radial-gradient(1000px 500px at 110% 110%, #cffafe, transparent), var(--lm-bg); }
.lm-auth__card { width: 100%; max-width: 420px; }

/* ---------- Backdrop for mobile sidebar ---------- */
.lm-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  z-index: 1044; opacity: 0; visibility: hidden; transition: opacity .25s;
}
.lm-backdrop.show { opacity: 1; visibility: visible; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .lm-sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .lm-sidebar.open { transform: translateX(0); }
  .lm-main { margin-left: 0; }
}
.lm-burger { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; color: #334155; }
@media (min-width: 992px) { .lm-burger { display: none; } }

/* ============ Storefront (public) ============ */

/* ---- Page shell — footer always at bottom ---- */
.sf-page { display: flex; flex-direction: column; min-height: 100vh; }
.sf-main { flex: 1; }

/* ---- Header ---- */
.shop-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid #eef1f7;
  box-shadow: 0 1px 8px rgba(16,24,40,.06);
}
.shop-header__bar { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; }
.shop-brand { display: flex; align-items: center; color: var(--lm-text); flex-shrink: 0; }
.shop-brand img { height: 38px; width: auto; border-radius: 8px; object-fit: cover; }
.shop-brand .logo-fallback {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lm-primary), #22d3ee); color: #fff; font-weight: 800; font-size: 1.1rem;
}
.cart-btn { position: relative; }
.cart-btn .badge { position: absolute; top: -6px; right: -6px; font-size: .65rem; }

/* ---- Search — centered ---- */
.shop-search-center { min-width: 0; }
.shop-search { width: 100%; max-width: 520px; }
.search-wrap { position: relative; }
.search-icon {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
  color: #94a3b8; pointer-events: none; z-index: 2;
}
.search-input {
  border-radius: 999px !important;
  padding-left: 2.4rem !important;
  padding-right: 2.6rem !important;
  border-color: #dde3ee;
  transition: border-color .15s, box-shadow .15s;
}
.search-barcode-btn {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: #94a3b8;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer; transition: color .12s, background .12s; z-index: 2;
  font-size: 1rem; padding: 0;
}
.search-barcode-btn:hover { color: var(--lm-primary); background: #f1f4fa; }
.search-input:focus {
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 .2rem rgba(99,102,241,.15);
}

/* ---- Search dropdown ---- */
.search-dropdown {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid #eaedfa;
  border-radius: 1rem; box-shadow: 0 12px 32px rgba(16,24,40,.12);
  z-index: 1050; overflow: hidden;
  max-height: 420px; overflow-y: auto;
}
.search-dropdown.show { display: block; }
.sd-section-label {
  padding: .6rem 1rem .3rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #94a3b8;
}
.sd-section-label--tags { border-top: 1px solid #f1f4fa; }
.sd-product {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem; color: var(--lm-text); text-decoration: none;
  transition: background .12s;
}
.sd-product:hover { background: #f8f9ff; color: var(--lm-text); }
.sd-product__img {
  width: 44px; height: 44px; border-radius: .5rem; flex-shrink: 0;
  object-fit: cover; background: #f1f4fa;
}
.sd-product__img--placeholder { display: grid; place-items: center; font-size: 1.2rem; color: #cbd5e1; }
.sd-product__info { flex: 1; min-width: 0; }
.sd-product__name { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sd-product__price { font-size: .82rem; color: var(--lm-primary-d); font-weight: 700; }
.sd-see-all {
  display: block; padding: .6rem 1rem; font-size: .84rem; color: var(--lm-primary);
  border-top: 1px solid #f1f4fa; text-decoration: none;
}
.sd-see-all:hover { background: #f8f9ff; }
.sd-empty { padding: 1rem; font-size: .88rem; color: #94a3b8; text-align: center; }
.sd-tags { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem 1rem .75rem; }
.sd-tag {
  padding: .25rem .7rem; border-radius: 999px; background: #f1f4fa; color: #475569;
  font-size: .8rem; font-weight: 600; text-decoration: none; transition: .12s;
}
.sd-tag:hover { background: var(--lm-primary); color: #fff; }

/* ---- Homepage hero ---- */
.home-hero {
  position: relative; border-radius: 1.25rem; overflow: hidden; min-height: 260px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  display: flex; align-items: flex-end; margin-bottom: 0;
}
@media(min-width:768px) { .home-hero { min-height: 340px; } }
.home-hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.home-hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.72) 0%, rgba(15,23,42,.15) 100%); }
.home-hero__body { position: relative; color: #fff; padding: 2rem 1.75rem; width: 100%; }
@media(min-width:768px) { .home-hero__body { max-width: 580px; padding: 2.5rem 2.5rem; } }
.home-hero__eyebrow { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; opacity: .8; margin-bottom: .35rem; }
.home-hero__title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.15; margin-bottom: .5rem; }
.home-hero__sub { font-size: 1rem; opacity: .85; margin-bottom: 1.25rem; }

/* ---- Shared section styles ---- */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; }
.section-title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.section-link { font-size: .85rem; color: var(--lm-primary); font-weight: 600; }
.section-link:hover { text-decoration: underline; }

/* Section wrapper — neutral, no color noise */
.sf-section { }
.sf-section__inner { padding: 0; }

.sf-section--categories { }
.sf-section--tags      { }
.sf-section--featured  { }
.sf-section--new       { background: #f9fafb; border-radius: 1rem; padding: 1.5rem; }
@media(max-width:767.98px) { .sf-section--new { padding: .85rem .5rem; border-radius: .75rem; } }

/* ---- Category grid cards ---- */
.cat-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: .65rem;
  padding-bottom: .5rem;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.cat-grid::-webkit-scrollbar { display: none; }
.cat-grid .cat-card { flex-shrink: 0; width: 82px; scroll-snap-align: start; }
@media(min-width:576px) { .cat-grid { flex-wrap: wrap; overflow-x: visible; padding-bottom: 0; } .cat-grid .cat-card { flex-shrink: 1; width: auto; flex: 0 0 calc(25% - .65rem); } }
@media(min-width:768px) { .cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1rem; } .cat-grid .cat-card { width: auto; flex: none; } }

.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  background: #fff; border-radius: .85rem; padding: 1.1rem .5rem .9rem;
  text-decoration: none; color: var(--lm-text);
  border: 1.5px solid #eef1f7;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cat-card:hover {
  border-color: var(--lm-primary);
  box-shadow: 0 4px 14px rgba(99,102,241,.12);
  transform: translateY(-2px);
}
.cat-card__img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
@media(min-width:768px) { .cat-card__img { width: 60px; height: 60px; } }

.cat-card__icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: #f1f4fa;
  color: #0f172a;
  display: grid; place-items: center; font-size: 1.45rem;
}
@media(min-width:768px) { .cat-card__icon { width: 60px; height: 60px; font-size: 1.6rem; } }

.cat-card__name {
  font-size: .8rem; font-weight: 600; text-align: center;
  line-height: 1.35; color: #334155;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  width: 100%;
}
@media(min-width:768px) { .cat-card__name { font-size: .85rem; } }

/* ---- Home tag chips ---- */
.home-tag-chip {
  padding: .35rem .85rem; border-radius: 999px;
  background: rgba(255,255,255,.7); color: #166534; font-size: .84rem; font-weight: 600;
  text-decoration: none; transition: .15s; border: 1px solid rgba(16,185,129,.2);
}
.home-tag-chip:hover { background: #059669; color: #fff; border-color: #059669; }

/* ---- Featured product slider ---- */
.product-slider-wrap { position: relative; }
.product-scroll {
  display: flex; gap: .75rem; overflow-x: auto;
  padding: .25rem .25rem .5rem;
  scrollbar-width: none; scroll-snap-type: x mandatory;
}
.product-scroll::-webkit-scrollbar { display: none; }
.product-scroll__item { flex-shrink: 0; width: calc(50% - .375rem); scroll-snap-align: start; }
@media(min-width:480px) { .product-scroll__item { width: calc(33.333% - .5rem); } }
@media(min-width:768px) { .product-scroll__item { width: calc(20% - .6rem); } }

.pslider-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: #fff; color: var(--lm-text); box-shadow: 0 2px 10px rgba(16,24,40,.15);
  display: grid; place-items: center; transition: .15s; cursor: pointer;
}
.pslider-btn:hover { background: var(--lm-primary); color: #fff; box-shadow: 0 4px 16px rgba(99,102,241,.3); }
.pslider-btn:disabled { opacity: .3; cursor: default; }
.pslider-btn--prev { left: -14px; }
.pslider-btn--next { right: -14px; }
@media(max-width:575.98px) { .pslider-btn { width: 30px; height: 30px; } .pslider-btn--prev { left: -10px; } .pslider-btn--next { right: -10px; } }

/* ---- Add-to-cart button ---- */
.btn-cart {
  background: #0f172a; border: 1.5px solid #0f172a; color: #fff;
  font-weight: 600; transition: background .15s, border-color .15s;
}
.btn-cart:hover:not(:disabled) { background: #1e293b; border-color: #1e293b; color: #fff; }
.btn-cart:disabled { opacity: .45; }

/* ---- Product cards ---- */
.product-card {
  background: #fff; border: 1px solid #eef1f7; border-radius: var(--lm-radius); overflow: hidden;
  height: 100%; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.product-card:hover { box-shadow: 0 10px 25px rgba(16,24,40,.1); transform: translateY(-2px); }
.product-card__img { aspect-ratio: 1/1; background: #f6f8fc; display: grid; place-items: center; overflow: hidden; }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__img i { font-size: 2.5rem; color: #cbd5e1; }
.product-card__body { padding: .8rem; display: flex; flex-direction: column; flex: 1; }
.product-card__name {
  font-weight: 600; font-size: .9rem; color: var(--lm-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em;
}
.product-card__price { font-weight: 800; color: var(--lm-primary-d); font-size: 1rem; margin-top: auto; }
.product-card__unit { color: #94a3b8; font-size: .76rem; font-weight: 500; }
.badge-featured { position: absolute; top: .5rem; left: .5rem; }

/* ---- Catalog sidebar filters ---- */
.filter-check { cursor: pointer; border-radius: .4rem; padding: .2rem .35rem; transition: background .12s; }
.filter-check:hover { background: #f1f4fa; }
.filter-tag-chip {
  padding: .25rem .75rem; border-radius: 999px;
  background: #f1f4fa; color: #475569; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: .12s; user-select: none;
}
.filter-tag-chip.active, .filter-tag-chip:hover { background: var(--lm-primary); color: #fff; }

/* ---- Contact page ---- */
.contact-info-list { list-style: none; padding: 0; margin: 0; }
.contact-info-list li { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: 1.1rem; }
.contact-info-list li:last-child { margin-bottom: 0; }
.contact-info-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.1rem;
}
.contact-map-label { border-bottom: 1px solid #eef1f7; background: #f8faff; }

/* ---- Footer ---- */
.shop-footer {
  background: #0f172a; color: #94a3b8;
  margin-top: 0; padding: 3rem 0 2rem;
  border-top: 3px solid var(--lm-primary);
}
.shop-footer a { color: #94a3b8; transition: color .15s; }
.shop-footer a:hover { color: #fff; }

.sf-footer-logo { height: 36px; width: auto; border-radius: 8px; object-fit: cover; }
.sf-footer-logo-icon {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lm-primary), #22d3ee); color: #fff; font-weight: 800; font-size: 1rem; flex-shrink: 0;
}

.sf-footer-heading {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: #475569; margin-bottom: .75rem;
}
.sf-footer-links { padding: 0; margin: 0; list-style: none; }
.sf-footer-links li { margin-bottom: .55rem; font-size: .88rem; }

.sf-footer-social {
  width: 34px; height: 34px; border-radius: 8px;
  background: #1e293b; color: #94a3b8; display: grid; place-items: center;
  font-size: 1rem; text-decoration: none; transition: .15s;
}
.sf-footer-social:hover { background: var(--lm-primary); color: #fff; }

.sf-pay-badge {
  background: #1e293b; color: #cbd5e1; padding: .3rem .75rem;
  border-radius: 999px; font-size: .8rem; font-weight: 600;
  border: 1px solid #334155;
}

/* ---- Checkout modal (cart page popup) ---- */
.co-summary {
  background: #f8faff; border-radius: .75rem;
  padding: 1rem 1.1rem;
}
.co-summary__row {
  display: flex; align-items: center; gap: .65rem;
  margin-bottom: .75rem;
}
.co-summary__img {
  width: 44px; height: 44px; border-radius: .5rem;
  background: #eef1f7; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #94a3b8;
}
.co-summary__img img { width: 100%; height: 100%; object-fit: cover; }
.co-summary__info { flex: 1; min-width: 0; }
.co-summary__name { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-summary__qty  { font-size: .78rem; color: #64748b; }
.co-summary__price { font-size: .82rem; font-weight: 700; color: var(--lm-primary); flex-shrink: 0; }

.co-summary__total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid #e2e8f0; padding-top: .75rem; margin-top: .25rem;
  font-weight: 700; font-size: .95rem;
}
.co-summary__total-price { color: var(--lm-primary); font-size: 1.1rem; }

.co-cod-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0;
  border-radius: 999px; font-size: .78rem; font-weight: 600;
  padding: .3rem .8rem;
}

.co-success-icon { font-size: 3.5rem; line-height: 1; }
