/* v=mob3 left-rail */
:root {
  --bg: #070b14;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --border: rgba(148,163,184,.16);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --blue: #38bdf8;
  --accent: #f472b6;
  --accent-hover: #ec4899;
  --pink: #f472b6;
  --pink-soft: #f9a8d4;
  --purple: #a78bfa;
  --radius: 14px;
}
* { margin:0; padding:0; box-sizing:border-box; }
html { color-scheme:dark; }
body {
  font-family: 'Noto Sans Bengali', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(56,189,248,.08), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(244,114,182,.07), transparent 50%),
    radial-gradient(800px 400px at 50% 100%, rgba(167,139,250,.06), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--blue); text-decoration:none; }
a:hover { text-decoration:underline; color:#7dd3fc; }
img { max-width:100%; height:auto; }

/* ── Navbar ── */
.nav {
  background: rgba(15,23,42,.9);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex; align-items: center; height: 56px; gap: 18px;
  position: sticky; top:0; z-index:80;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.nav-brand {
  font-size: 1.25rem; font-weight: 800;
  color: #fff; display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.nav-brand:hover { text-decoration:none; color:#fff; }
.nav-brand .logo-icon { font-size:1.5rem; }
.nav-links { display:flex; gap:4px; align-items:center; margin-left:auto; flex-wrap:wrap; }
.nav-links a, .nav-links .nav-btn {
  color: var(--muted); padding: 8px 14px; border-radius: 10px;
  font-size: 0.875rem; font-weight: 600; transition:.15s; text-decoration:none;
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.nav-links a:hover, .nav-links .nav-btn:hover {
  color: #fff; background: rgba(255,255,255,.06); text-decoration:none;
}
.nav-cart {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff !important; padding: 8px 16px; border-radius: 10px;
  font-weight: 700; font-size: .875rem; text-decoration:none;
  transition: .15s;
}
.nav-cart:hover { box-shadow: 0 4px 16px rgba(244,114,182,.35); text-decoration:none; color:#fff !important; }
.nav-cart .badge-cart {
  position: absolute; top: -6px; right: -6px;
  background: var(--red); color: #fff; font-size: .7rem;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; padding: 0 4px;
}

/* ── Mobile nav ── */
.hamburger { display:none; background:none; border:none; color:var(--text); font-size:1.5rem; cursor:pointer; }
@media (max-width:768px) {
  .hamburger { display:block; margin-left:auto; }
  .nav-links { display:none; position:absolute; top:56px; left:0; right:0; background:rgba(15,23,42,.98); flex-direction:column; padding:12px; gap:2px; border-bottom:1px solid var(--border); backdrop-filter:blur(14px); }
  .nav-links.open { display:flex; }
}

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden;
  padding: 100px 20px 80px;
  text-align: center;
  background: linear-gradient(160deg, rgba(30,41,59,.7), rgba(15,23,42,.95));
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 20% 20%, rgba(244,114,182,.12), transparent 70%),
    radial-gradient(500px 250px at 80% 50%, rgba(56,189,248,.08), transparent 70%),
    radial-gradient(400px 200px at 60% 80%, rgba(167,139,250,.08), transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: 3.2rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(105deg, #f9a8d4 0%, #c4b5fd 40%, #7dd3fc 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; line-height: 1.2; position: relative;
}
.hero p {
  font-size: 1.1rem; color: var(--muted); max-width: 600px;
  margin: 16px auto 28px; position: relative;
}
@media (max-width:768px) {
  .hero h1 { font-size:2rem; }
  .hero { padding:60px 16px 50px; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 10px;
  font-size: .875rem; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: .15s;
  font-family: inherit; text-decoration:none; line-height:1.4;
}
.btn:hover { text-decoration:none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(236,72,153,.25);
}
.btn-primary:hover { box-shadow: 0 6px 22px rgba(236,72,153,.4); transform: translateY(-1px); color:#fff; }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.2); color:#fff; }
.btn-sm { padding: 6px 14px; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }
.btn-danger { background: var(--red); color: #fff; border:none; }

/* ── Cards ── */
.card {
  background: linear-gradient(160deg, rgba(30,41,59,.55), rgba(15,23,42,.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  transition: .2s;
}
.card:hover { border-color: rgba(255,255,255,.12); }

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.product-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  overflow: hidden;
  transition: .25s;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.16);
}
.product-card .img-wrap {
  position: relative;
  overflow: hidden;
  background: #f4f4f5;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .3s;
}
.product-card:hover .img-wrap img { transform: scale(1.04); }
.product-card .img-wrap .no-img {
  font-size: 3.5rem;
  color: #ccc;
}
.discount-tag {
  position: absolute;
  top: 12px;
  left: 0;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  padding: 6px 14px 6px 12px;
  border-radius: 0 8px 8px 0;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(234,88,12,.35);
}
.product-card .card-body {
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #fff;
}
.product-card .cat-label {
  font-size: .72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
.product-card h3 {
  font-size: .95rem;
  font-weight: 700;
  margin: 6px 0 10px;
  line-height: 1.35;
  color: #1e293b;
  min-height: 2.6em;
}
.product-card h3 a {
  color: #1e293b;
  text-decoration: none;
}
.product-card h3 a:hover {
  color: #ea580c;
  text-decoration: none;
}
.product-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.product-card .price {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ea580c;
  letter-spacing: -0.02em;
}
.product-card .old-price {
  font-size: .95rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
}
.product-card .card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}
.product-card .btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid #ea580c;
  background: #fff;
  color: #ea580c;
  transition: .15s;
  font-family: inherit;
  text-decoration: none;
  width: 100%;
}
.product-card .btn-add:hover {
  background: #fff7ed;
  text-decoration: none;
  color: #c2410c;
}
.product-card .btn-order {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  background: #0f172a;
  color: #fff;
  transition: .15s;
  font-family: inherit;
  text-decoration: none;
}
.product-card .btn-order:hover {
  background: #1e293b;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(15,23,42,.25);
}
@media (max-width:768px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .product-card .card-actions { grid-template-columns: 1fr; }
  .product-card .btn-add, .product-card .btn-order { font-size: .72rem; padding: 10px 6px; }
  .product-card .price { font-size: 1.2rem; }
  .product-card h3 { font-size: .85rem; min-height: auto; }
}

/* ── Container ── */
.container { max-width: 1280px; margin:0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-title {
  font-size: 1.8rem; font-weight: 800; margin-bottom: 32px;
  background: linear-gradient(105deg, #f9a8d4, #c4b5fd, #7dd3fc);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; display: inline-block;
}
@media (max-width:768px) {
  .section-title { font-size:1.4rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap:12px; }
}

/* ── Breadcrumb ── */
.breadcrumb {
  padding: 14px 0;
  font-size: .85rem; color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(15,23,42,.5);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

/* ── Detail page ── */
.detail-layout { display:grid; grid-template-columns:1fr 1fr; gap:40px; padding:40px 0; }
.detail-img {
  background: rgba(0,0,0,.15); border-radius: 16px;
  display:flex; align-items:center; justify-content:center;
  min-height: 400px; overflow:hidden; border: 1px solid var(--border);
}
.detail-img img { width:100%; height:100%; object-fit:contain; max-height:500px; }
.detail-info { display:flex; flex-direction:column; gap:16px; }
.detail-info h2 { font-size:2rem; font-weight:800; }
.detail-info .badge-cat {
  display:inline-block; background:rgba(167,139,250,.15); color:var(--purple);
  padding:4px 12px; border-radius:8px; font-size:.8rem; font-weight:700;
}
.detail-price-row { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.detail-price-row .price { font-size:2rem; font-weight:800; color:var(--accent); }
.detail-price-row .old-price { font-size:1.1rem; color:var(--muted); text-decoration:line-through; }
.detail-price-row .sale-badge {
  background: rgba(248,113,113,.15); color: var(--red);
  padding: 4px 12px; border-radius: 8px; font-weight: 800; font-size: .85rem;
}
.detail-info .desc { color: var(--muted); line-height:1.7; }
.detail-info .stock { color: var(--green); font-weight:600; }
@media (max-width:768px) {
  .detail-layout { grid-template-columns:1fr; gap:20px; }
  .detail-img { min-height:280px; }
}

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display:block; font-size:.85rem; font-weight:600; color:var(--muted); margin-bottom:6px; }
.form-control, .form-select {
  width: 100%; padding: 10px 14px;
  background: rgba(2,6,23,.65); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: .9rem;
  font-family: inherit; transition: .15s;
}
.form-control:focus, .form-select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244,114,182,.15);
}
.form-select { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; padding-right:36px; }

/* ── Cart Table ── */
.cart-table { width:100%; border-collapse:collapse; }
.cart-table th { text-align:left; padding:12px 8px; font-size:.8rem; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; border-bottom:1px solid var(--border); }
.cart-table td { padding:14px 8px; border-bottom:1px solid var(--border); vertical-align:middle; }
.cart-item { display:flex; align-items:center; gap:14px; }
.cart-item img { width:64px; height:64px; object-fit:cover; border-radius:10px; }
.cart-qty { width:70px; text-align:center; }

/* ── Checkout Summary ── */
.summary-card {
  background: linear-gradient(160deg, rgba(30,41,59,.55), rgba(15,23,42,.92));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: sticky; top: 80px;
}

/* ── Empty state ── */
.empty-state { text-align:center; padding:80px 20px; }
.empty-state .icon { font-size:4rem; color:rgba(255,255,255,.08); margin-bottom:16px; }
.empty-state h3 { font-size:1.3rem; color:var(--muted); }

/* ── Alerts ── */
.alert {
  padding: 12px 18px; border-radius: 10px; margin-bottom: 16px;
  font-size: .875rem; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.alert-success { background: rgba(74,222,128,.12); color: var(--green); border:1px solid rgba(74,222,128,.2); }
.alert-error { background: rgba(248,113,113,.12); color: var(--red); border:1px solid rgba(248,113,113,.2); }
.alert-info { background: rgba(56,189,248,.12); color: var(--blue); border:1px solid rgba(56,189,248,.2); }

/* ── Footer ── */
.footer {
  background: rgba(15,23,42,.95); border-top: 1px solid var(--border);
  padding: 50px 0 30px; margin-top: 80px;
}
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:40px; }
.footer h5 { color:#fff; font-size:1rem; margin-bottom:14px; }
.footer p, .footer a { color: var(--muted); font-size:.875rem; line-height:1.7; }
.footer a:hover { color:var(--accent); text-decoration:none; }
.footer-bottom { text-align:center; padding-top:24px; margin-top:24px; border-top:1px solid var(--border); color:var(--muted); font-size:.8rem; }
@media (max-width:768px) {
  .footer-grid { grid-template-columns:1fr; gap:24px; }
}

/* ── Pagination ── */
.pagination { display:flex; gap:4px; justify-content:center; margin-top:32px; }
.pagination a, .pagination span {
  display:flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:10px; font-size:.85rem; font-weight:700;
  border:1px solid var(--border); color:var(--muted);
  background:var(--surface); transition:.15s; text-decoration:none;
}
.pagination a:hover { border-color:var(--accent); color:#fff; background:rgba(244,114,182,.1); }
.pagination .active { background:linear-gradient(135deg,var(--accent),var(--accent-hover)); color:#fff; border:none; }

/* ── Features bar ── */
.features-bar { background:rgba(15,23,42,.7); border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.features-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; text-align:center; padding:40px 0; }
.feature-item .ficon { font-size:2rem; margin-bottom:10px; }
.feature-item h4 { font-size:.95rem; color:#fff; margin-bottom:4px; }
.feature-item p { font-size:.85rem; color:var(--muted); }
@media (max-width:768px) {
  .features-grid { grid-template-columns:1fr; gap:24px; }
}

/* ── Admin Sidebar ── */
.admin-layout { display:flex; min-height:calc(100vh - 56px); }
.admin-sidebar {
  width: 240px; background: rgba(15,23,42,.95);
  border-right: 1px solid var(--border); padding-top: 16px;
  flex-shrink: 0;
}
.admin-sidebar .brand { padding: 0 20px 20px; border-bottom:1px solid var(--border); margin-bottom:8px; font-weight:800; font-size:1.1rem; color:#fff; }
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; margin:2px 8px; border-radius: 8px;
  font-size: .85rem; font-weight: 600; color: var(--muted);
  text-decoration: none; transition:.15s;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background:rgba(255,255,255,.06); color:#fff; text-decoration:none; }
.admin-sidebar a.active { background:rgba(244,114,182,.12); color:var(--accent); }
.admin-main { flex:1; padding: 24px 32px; overflow-x:auto; }
.admin-main h2, .admin-main h3 { color:#fff; margin-bottom:20px; }
@media (max-width:768px) {
  .admin-sidebar { width:100%; position:fixed; bottom:0; z-index:90; border-right:none; border-top:1px solid var(--border); flex-direction:row; overflow-x:auto; padding:0; display:flex; }
  .admin-sidebar .brand { display:none; }
  .admin-sidebar a { flex-shrink:0; margin:4px; padding:8px 14px; font-size:.75rem; white-space:nowrap; }
}

/* ── Admin stat cards ── */
.stat-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); gap:16px; margin-bottom:28px; }
.stat-card {
  background: linear-gradient(160deg, rgba(30,41,59,.55), rgba(15,23,42,.92));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.stat-card .stat-label { font-size:.75rem; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.stat-card .stat-value { font-size:2rem; font-weight:800; color:#fff; margin-top:4px; }

/* ── Admin Table ── */
.data-table { width:100%; border-collapse:collapse; }
.data-table th { text-align:left; padding:10px 12px; font-size:.75rem; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; border-bottom:1px solid var(--border); background:rgba(0,0,0,.1); }
.data-table td { padding:10px 12px; border-bottom:1px solid var(--border); }
.data-table tr:hover { background:rgba(255,255,255,.02); }

/* ── Badges ── */
.badge {
  display:inline-flex; align-items:center; padding:3px 10px; border-radius:7px;
  font-size:.75rem; font-weight:700; gap:4px;
}
.badge-success { background:rgba(74,222,128,.15); color:var(--green); }
.badge-warning { background:rgba(251,191,36,.15); color:var(--yellow); }
.badge-info { background:rgba(56,189,248,.15); color:var(--blue); }
.badge-danger { background:rgba(248,113,113,.15); color:var(--red); }
.badge-purple { background:rgba(167,139,250,.15); color:var(--purple); }

/* ── Utility ── */
.text-muted { color: var(--muted) !important; }
.text-accent { color: var(--accent) !important; }
.mt-1 { margin-top:8px; } .mt-2 { margin-top:16px; } .mt-3 { margin-top:24px; } .mt-4 { margin-top:32px; } .mt-5 { margin-top:48px; }
.mb-1 { margin-bottom:8px; } .mb-2 { margin-bottom:16px; } .mb-3 { margin-bottom:24px; }
.gap-2 { gap:8px; } .gap-3 { gap:16px; }
.d-flex { display:flex; } .align-center { align-items:center; }
.justify-between { justify-content:space-between; }
.flex-wrap { flex-wrap:wrap; }
.fw-bold { font-weight:700; }

.checkout-grid { display:grid; grid-template-columns:1fr 380px; gap:32px; }
@media (max-width:768px) {
  .checkout-grid { grid-template-columns:1fr; }
  .summary-card { position:static; }
}


/* ── Oxiosoft-style admin shell: rail + product subnav ───────── */
.admin-body { background: #0b1220; margin: 0; }
.admin-shell {
  display: flex;
  min-height: 100vh;
  background: #0b1220;
}
.admin-rail {
  width: 200px;
  flex-shrink: 0;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 14px 12px 18px;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-rail .rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 6px 8px;
  margin-bottom: 12px;
  border-radius: 12px;
  text-decoration: none !important;
  color: #0f172a !important;
}
.admin-rail .rail-brand-mark {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(124,58,237,.35);
}
.admin-rail .rail-brand-text {
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -0.02em;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-rail .rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-rail .rail-item {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #475569;
  text-decoration: none !important;
  transition: .15s;
  position: relative;
  box-sizing: border-box;
}
.admin-rail .rail-item:hover {
  background: #eef2ff;
  color: #4f46e5;
}
.admin-rail .rail-item.active {
  background: #5b21b6;
  color: #fff;
  box-shadow: 0 6px 16px rgba(91,33,182,.28);
}
.admin-rail .rail-item.active .rail-label { color: #fff; }
.admin-rail .rail-ico {
  font-size: 1.1rem;
  line-height: 1;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.admin-rail .rail-label {
  font-size: .9rem;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
}
.admin-rail .rail-spacer { flex: 1; min-height: 12px; }
.admin-rail .rail-nav-bottom {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  margin-top: 4px;
}

/* Product nested sub-menu panel */
.admin-subnav {
  width: 240px;
  flex-shrink: 0;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  padding: 18px 14px 28px;
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
}
.admin-subnav .subnav-head {
  padding: 4px 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 10px;
}
.admin-subnav .subnav-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.admin-subnav .subnav-dash {
  display: inline-block;
  margin-top: 4px;
  font-size: .8rem;
  color: #64748b;
  text-decoration: none;
}
.admin-subnav .subnav-dash:hover { color: #4f46e5; text-decoration: none; }

.admin-subnav .subnav-group {
  padding: 8px 0 6px;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 2px;
}
.admin-subnav .subnav-group:last-child { border-bottom: none; }
.admin-subnav .subnav-group-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #94a3b8;
  padding: 6px 12px 6px;
  text-transform: uppercase;
}
.admin-subnav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 2px 4px;
  border-radius: 10px;
  color: #334155;
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: .12s;
}
.admin-subnav a .sub-ico {
  width: 18px;
  text-align: center;
  color: #94a3b8;
  font-size: .95rem;
}
.admin-subnav a:hover {
  background: #eef2ff;
  color: #3730a3;
}
.admin-subnav a:hover .sub-ico { color: #6366f1; }
.admin-subnav a.active {
  background: #5b21b6;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(91,33,182,.28);
}
.admin-subnav a.active .sub-ico { color: #e9d5ff; }

.admin-shell .admin-main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
  background: #0b1220;
  overflow-x: auto;
}
.admin-shell .admin-main h2,
.admin-shell .admin-main h3 { color: #fff; margin-bottom: 20px; }

/* kill old flat sidebar when present */
.admin-layout > .admin-sidebar { display: none; }

/* ── Advanced dashboard ─────────────────────────────────────── */
.dash-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.dash-sub { color: #94a3b8; font-size: .85rem; margin: 6px 0 0; }
.dash-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  background: #111827;
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 96px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  border-color: rgba(167,139,250,.35);
}
.kpi-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #a78bfa, #db2777);
}
.kpi-rev::before { background: linear-gradient(180deg, #34d399, #059669); }
.kpi-orders::before { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.kpi-aov::before { background: linear-gradient(180deg, #f472b6, #db2777); }
.kpi-catalog::before { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.kpi-stock::before { background: linear-gradient(180deg, #fbbf24, #d97706); }
.kpi-msg::before { background: linear-gradient(180deg, #22d3ee, #0891b2); }

.kpi-icon {
  width: 44px; height: 44px; min-width: 44px; max-width: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06);
  color: #e2e8f0;
  font-weight: 800;
  font-size: 1.1rem;
  flex: 0 0 44px;
}
.kpi-body { flex: 1; min-width: 0; }
.kpi-label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: #94a3b8; font-weight: 600;
}
.kpi-value {
  font-size: 1.55rem; font-weight: 800; color: #fff;
  margin-top: 2px; line-height: 1.15; letter-spacing: -.02em;
}
.kpi-trend { font-size: .75rem; color: #94a3b8; margin-top: 6px; line-height: 1.35; }
.kpi-trend .up { color: #34d399; font-weight: 600; }
.kpi-trend .warn { color: #fbbf24; font-weight: 600; }
.text-warn { color: #fbbf24 !important; }

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
}
.dash-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dash-panel {
  padding: 18px;
  background: #111827 !important;
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 16px;
}
.dash-panel h4 { color: #fff; margin: 0; font-size: 1rem; font-weight: 700; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 16px;
}
.panel-meta { font-size: .8rem; }
.panel-link { font-size: .8rem; color: #a5b4fc; text-decoration: none; font-weight: 600; }
.panel-link:hover { color: #c7d2fe; text-decoration: none; }

.bar-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  height: 210px;
  padding: 28px 4px 0;
}
.bar-col {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: 100%; min-width: 0; position: relative;
}
.bar-val {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: .58rem; color: #94a3b8; white-space: nowrap;
  opacity: 0; transition: opacity .12s; pointer-events: none;
}
.bar-col:hover .bar-val { opacity: 1; }
.bar-fill {
  width: 100%; max-width: 28px; min-height: 6px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #c084fc 0%, #6366f1 50%, #db2777 100%);
  box-shadow: 0 6px 14px rgba(99,102,241,.28);
  transition: height .35s ease, filter .15s;
}
.bar-col:hover .bar-fill { filter: brightness(1.18); }
.bar-label {
  margin-top: 8px; font-size: .65rem; color: #64748b; font-weight: 600;
}

.line-chip-row {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  min-height: 110px;
  padding-top: 8px;
}
.chip-col { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.chip {
  width: 100%; max-width: 26px; min-height: 16px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(56,189,248,.95), rgba(99,102,241,.8));
  box-shadow: 0 4px 12px rgba(56,189,248,.18);
}
.chip-n { font-size: .68rem; color: #cbd5e1; margin-top: 6px; font-weight: 700; }
.chip-l { font-size: .62rem; color: #64748b; }

.status-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.status-row {
  display: grid;
  grid-template-columns: 10px minmax(70px, 0.9fr) 1fr 32px;
  gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px;
  color: #e2e8f0; text-decoration: none !important;
  transition: background .12s;
}
.status-row:hover { background: rgba(255,255,255,.04); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #64748b; box-shadow: 0 0 0 3px rgba(148,163,184,.12);
}
.status-name {
  font-size: .84rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-bar-bg {
  height: 6px; background: rgba(255,255,255,.06);
  border-radius: 99px; overflow: hidden;
}
.status-bar-fg { height: 100%; border-radius: 99px; min-width: 2px; }
.status-count { font-weight: 700; text-align: right; color: #fff; font-size: .9rem; }

.feed-list { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; }
.feed-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: 10px;
  color: inherit; text-decoration: none !important;
  border-bottom: 1px solid rgba(148,163,184,.08);
  transition: background .12s;
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover:not(.static) { background: rgba(255,255,255,.04); }
.feed-thumb {
  width: 40px; height: 40px; border-radius: 10px; overflow: hidden;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed-main { flex: 1; min-width: 0; }
.feed-main strong { color: #fff; font-size: .9rem; }
.feed-sub { color: #94a3b8; font-size: .75rem; margin-top: 2px; }
.feed-msg { color: #cbd5e1; font-size: .8rem; margin-top: 4px; line-height: 1.35; }
.feed-right {
  text-align: right; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.qa-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(148,163,184,.1);
  color: #e2e8f0; text-decoration: none !important;
  font-size: .82rem; font-weight: 600; transition: .12s;
}
.qa-btn:hover {
  background: rgba(99,102,241,.14);
  border-color: rgba(129,140,248,.35); color: #fff;
}
.dash-snapshot {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding-top: 12px; border-top: 1px solid rgba(148,163,184,.1); margin-top: 12px;
}
.dash-snapshot .snap {
  background: rgba(255,255,255,.03); border-radius: 10px; padding: 10px; text-align: center;
}
.dash-snapshot .snap span {
  display: block; font-size: .68rem; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .04em;
}
.dash-snapshot .snap strong {
  display: block; margin-top: 4px; color: #fff; font-size: 1.15rem;
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid-3 { grid-template-columns: 1fr 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .qa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-chart, .line-chip-row { gap: 3px; }
}


/* ── Settings page ──────────────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.settings-full { grid-column: 1 / -1; }
.settings-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-bottom: 24px;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: #e2e8f0;
  font-size: .9rem;
  cursor: pointer;
  user-select: none;
}
.switch-row input { width: 18px; height: 18px; accent-color: #7c3aed; }

/* ── Phone responsive admin ─────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════
   PHONE / TABLET RESPONSIVE (admin + store) — consolidated
   ═══════════════════════════════════════════════════════════ */

.admin-mobile-bar {
  display: none;
  align-items: center;
  gap: 10px;
  margin: -6px 0 16px;
  padding: 10px 12px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
}
.mobile-bar-title {
  color: #e2e8f0;
  font-weight: 700;
  font-size: .95rem;
}
.btn-menu-toggle {
  background: #4f46e5;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  font-size: .85rem;
}
.subnav-close {
  display: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 1rem;
  cursor: pointer;
  margin-left: auto;
}
.admin-subnav .subnav-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.admin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.55);
  z-index: 60;
}
body.admin-lock { overflow: hidden; }
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.settings-grid .full { grid-column: 1 / -1; }
.settings-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.settings-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 18px 18px 8px;
  margin-bottom: 16px;
}
.settings-card h4 {
  color: #e2e8f0;
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
}
.settings-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.settings-form label {
  color: #94a3b8;
  font-size: .82rem;
  font-weight: 600;
}
.settings-form .form-control,
.settings-form .form-select,
.settings-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #0b1220;
  border: 1px solid #334155;
  color: #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
}
.settings-form .form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  margin-bottom: 12px;
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .dash-grid-3 { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 900px) {
  .settings-grid,
  .settings-2col { grid-template-columns: 1fr !important; }
  .admin-mobile-bar { display: flex; }
  .subnav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Keep menus on the LEFT (row shell) — never flip rail to top */
  .admin-shell {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .admin-rail {
    width: 168px !important;
    min-width: 168px !important;
    max-width: 168px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    position: sticky !important;
    top: 0;
    left: 0;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 10px 8px 12px !important;
    gap: 2px !important;
    z-index: 50;
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .admin-rail .rail-spacer { display: block !important; flex: 1 1 auto; min-height: 8px; }
  .admin-rail .rail-brand {
    margin: 0 0 8px 0 !important;
    width: 100% !important;
    height: auto !important;
    padding: 4px 6px !important;
  }
  .admin-rail .rail-brand-mark {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    font-size: .95rem !important;
  }
  .admin-rail .rail-brand-text { font-size: .82rem !important; }
  .admin-rail .rail-item {
    width: 100% !important;
    min-height: 40px !important;
    height: auto !important;
    border-radius: 10px !important;
    padding: 8px 10px !important;
    flex-shrink: 0;
  }
  .admin-rail .rail-label { font-size: .82rem !important; }
  .admin-rail .rail-ico { font-size: 1rem !important; width: 20px !important; }

  /* Subnav: fixed left drawer beside rail when opened */
  .admin-shell.has-subnav .admin-subnav {
    position: fixed !important;
    left: 168px;
    top: 0;
    bottom: 0;
    width: min(260px, calc(100vw - 176px)) !important;
    max-height: none !important;
    height: 100vh !important;
    z-index: 70;
    transform: translateX(-110%);
    transition: transform .22s ease;
    box-shadow: 8px 0 30px rgba(0,0,0,.25);
    border-right: 1px solid #e2e8f0;
    border-bottom: none !important;
  }
  .admin-shell.has-subnav.subnav-open .admin-subnav {
    transform: translateX(0);
  }
  .admin-shell.has-subnav.subnav-open .admin-overlay {
    display: block;
  }
  .admin-shell:not(.has-subnav) .admin-subnav { display: none !important; }

  .admin-shell .admin-main {
    width: auto !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    padding: 14px 12px 88px !important;
    overflow-x: hidden !important;
    min-width: 0 !important;
  }

  /* dash / tables */
  .kpi-grid { grid-template-columns: 1fr 1fr !important; }
  .dash-grid-2, .dash-grid-3 { grid-template-columns: 1fr !important; }
  .qa-grid { grid-template-columns: 1fr 1fr !important; }
  .bar-chart, .line-chip-row { gap: 3px; }
  .bar-val, .chip-n { display: none; }
  .dash-header-actions .btn { padding: 8px 10px; font-size: .8rem; }
  .status-row {
    grid-template-columns: 10px minmax(60px, 1fr) 1fr 28px;
    gap: 6px;
    padding: 8px 6px;
  }
  .data-table { min-width: 560px; }
  .settings-form .data-table { min-width: 0; }
  .admin-body, body.admin-body { overflow-x: hidden; max-width: 100vw; }
}

@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr !important; }
  .kpi-value { font-size: 1.35rem; }
  .qa-grid { grid-template-columns: 1fr !important; }
  .dash-snapshot { grid-template-columns: 1fr 1fr; }
  .admin-main h3 { font-size: 1.2rem; }
  .data-table { font-size: .82rem; min-width: 480px; }
  .data-table th, .data-table td { padding: 8px 10px; }
  .btn, .btn-sm { min-height: 40px; }
  .form-control, .form-select, textarea { font-size: 16px; }

  /* Icon-only left rail on tiny screens (still LEFT, never top) */
  .admin-rail {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    padding: 10px 6px 12px !important;
    align-items: center !important;
  }
  .admin-rail .rail-brand {
    justify-content: center;
    padding: 0 !important;
  }
  .admin-rail .rail-brand-text,
  .admin-rail .rail-label { display: none !important; }
  .admin-rail .rail-item {
    width: 44px !important;
    min-height: 44px !important;
    justify-content: center;
    padding: 8px !important;
  }
  .admin-shell.has-subnav .admin-subnav { left: 58px; width: min(270px, calc(100vw - 66px)) !important; }
}

/* Storefront phone */
@media (max-width: 768px) {
  .site-header .nav-links { gap: 4px; }
  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 1.7rem !important; line-height: 1.25; }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .product-card .card-body { padding: 10px 10px 12px; }
  .product-card h3 { font-size: .82rem; min-height: 2.4em; }
  .product-card .price { font-size: 1.05rem; }
  .product-card .old-price { font-size: .78rem; }
  .product-card .card-actions {
    grid-template-columns: 1fr !important;
    gap: 6px;
  }
  .product-card .btn-add,
  .product-card .btn-order {
    font-size: .72rem !important;
    padding: 10px 6px !important;
  }
  .section { padding: 36px 0; }
  .section-title { font-size: 1.25rem; }
  .container { padding: 0 12px; }
  footer .footer-grid,
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }
  .checkout-grid, .cart-layout, .detail-layout {
    grid-template-columns: 1fr !important;
  }
  .navbar, .site-nav, header.site-header {
    padding-left: 8px;
    padding-right: 8px;
  }
  body { overflow-x: hidden; }
}

@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr !important; }
}


/* === PHONE RESPONSIVE FIX mob7 === */
html, body.admin-body {
  max-width: 100vw;
  overflow-x: hidden;
}

.admin-shell {
  width: 100%;
  max-width: 100vw;
  min-height: 100dvh;
  overflow-x: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.admin-rail {
  box-sizing: border-box;
  flex: 0 0 var(--admin-rail-w);
  width: var(--admin-rail-w);
  max-width: var(--admin-rail-w);
  overflow-x: hidden !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.admin-main {
  flex: 1 1 auto;
  min-width: 0 !important;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.admin-shell.has-subnav .admin-main {
  margin-left: 0 !important;
}

/* Tablet + phone: left icon rail + fully hidden subnav drawer */
@media (max-width: 900px) {
  .admin-shell {
    --admin-rail-w: 60px;
  }

  .admin-rail {
    position: sticky;
    top: 0;
    height: 100dvh;
    height: 100vh;
    z-index: 100;
    /* match dark admin shell on phone — avoids white strip looking “broken” */
    background: #0f172a !important;
    border-right: 1px solid rgba(255,255,255,.08) !important;
    color: #e2e8f0;
    padding: 10px 6px 14px !important;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .admin-rail .rail-brand-mark {
    box-shadow: 0 6px 16px rgba(124,58,237,.45);
  }

  .admin-rail .rail-brand-text {
    color: #f8fafc;
  }

  .admin-rail .rail-item {
    color: #94a3b8 !important;
    border-radius: 12px;
  }

  .admin-rail .rail-item:hover,
  .admin-rail .rail-item.active {
    background: rgba(124,58,237,.22) !important;
    color: #f5f3ff !important;
  }

  .admin-rail .rail-item.danger { color: #fca5a5 !important; }
  .admin-rail .rail-item.success { color: #86efac !important; }
  .admin-rail .rail-spacer { min-height: 12px; }
  .admin-rail .rail-sep {
    border-top-color: rgba(255,255,255,.1) !important;
  }

  .admin-shell.has-subnav .admin-subnav,
  .admin-subnav {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: var(--admin-rail-w, 56px) !important;
    width: min(280px, calc(100vw - var(--admin-rail-w, 56px) - 12px)) !important;
    max-width: calc(100vw - var(--admin-rail-w, 56px) - 8px) !important;
    height: 100dvh !important;
    height: 100vh !important;
    transform: translate3d(-120%, 0, 0) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    box-shadow: none !important;
    z-index: 95 !important;
    background: #111827 !important;
    color: #e2e8f0 !important;
    border-right: 1px solid rgba(255,255,255,.08) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .admin-shell.has-subnav.subnav-open .admin-subnav,
  .admin-shell.subnav-open .admin-subnav {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: 12px 0 36px rgba(0,0,0,.5) !important;
  }

  .admin-shell.has-subnav.subnav-open .admin-overlay,
  .admin-shell.subnav-open .admin-overlay {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    left: var(--admin-rail-w, 56px) !important;
    background: rgba(2,6,23,.55) !important;
    z-index: 90 !important;
  }

  /* Readable subnav on dark panel */
  .admin-subnav .subnav-title,
  .admin-subnav .subnav-group-title {
    color: #cbd5e1 !important;
  }
  .admin-subnav a {
    color: #e2e8f0 !important;
  }
  .admin-subnav a .sub-ico {
    color: #a5b4fc !important;
  }
  .admin-subnav a.active {
    background: rgba(124,58,237,.28) !important;
    color: #fff !important;
  }
  .admin-subnav .subnav-dash {
    color: #93c5fd !important;
  }
  .admin-subnav .subnav-close {
    color: #e2e8f0 !important;
  }

  .admin-main {
    width: auto !important;
    max-width: calc(100vw - var(--admin-rail-w)) !important;
    padding: 12px 12px max(28px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .admin-main > *,
  .admin-main .card,
  .admin-main form {
    max-width: 100%;
    box-sizing: border-box;
  }

  .admin-main .card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-main .data-table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-main .data-table thead,
  .admin-main .data-table tbody,
  .admin-main .data-table tfoot {
    display: table;
    width: 100%;
    min-width: 560px;
    table-layout: auto;
  }

  .admin-main .data-table th,
  .admin-main .data-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    font-size: .82rem;
  }

  .admin-main .badge {
    white-space: nowrap !important;
    display: inline-block;
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    line-height: 1.2;
  }

  .admin-main [style*="grid-template-columns:1fr 1fr"],
  .admin-main [style*="grid-template-columns: 1fr 1fr"],
  .admin-main [style*="grid-template-columns:1fr 280px"],
  .admin-main [style*="grid-template-columns: 1fr 280px"] {
    grid-template-columns: 1fr !important;
  }

  .admin-mobile-bar {
    background: rgba(15,23,42,.92) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    color: #e2e8f0 !important;
    backdrop-filter: blur(8px);
  }
}

/* Narrow phones: pure icon rail */
@media (max-width: 520px) {
  .admin-shell {
    --admin-rail-w: 52px;
  }

  .admin-rail {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    padding: 8px 3px 12px !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .admin-rail .rail-item {
    width: 100%;
    justify-content: center !important;
    padding: 11px 2px !important;
    gap: 0 !important;
    min-height: 42px;
  }

  .admin-rail .rail-label,
  .admin-rail .rail-brand-text {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    clip: rect(0, 0, 0, 0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .admin-rail .rail-brand {
    justify-content: center !important;
    padding: 2px 0 8px !important;
    gap: 0 !important;
  }

  .admin-rail .rail-brand-mark {
    width: 34px;
    height: 34px;
    font-size: .95rem;
  }

  .admin-main {
    max-width: calc(100vw - 52px) !important;
    padding: 10px 10px max(22px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .admin-mobile-bar {
    padding: 8px 10px !important;
    font-size: .86rem;
  }

  .admin-main h1 { font-size: 1.12rem !important; letter-spacing: -.02em; }
  .admin-main h2 { font-size: 1.02rem !important; }
  .admin-main h3 { font-size: .98rem !important; }

  .admin-main .btn,
  .admin-main .btn-sm {
    font-size: .8rem;
  }

  /* action row stacks */
  .admin-main .card > div[style*="display:flex"] {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* Storefront phone */
@media (max-width: 600px) {
  .navbar .nav-inner {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .nav-brand {
    font-size: .95rem;
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .hero { padding: 28px 16px !important; }
  .container { padding-left: 12px; padding-right: 12px; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 18px !important; }
  .cart-fab { right: 14px; bottom: max(18px, env(safe-area-inset-bottom, 0px)); }
}
/* === END PHONE RESPONSIVE FIX mob7 === */

/* mob7 storefront nav polish */
@media (max-width: 600px) {
  .nav-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    max-width: min(62vw, 240px) !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }
  .nav-brand .logo-icon {
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff !important;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1;
  }
  .nav-brand .nav-brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
  }
  .price, .product-card .price, .old-price {
    font-family: "Noto Sans Bengali", "Segoe UI", system-ui, sans-serif !important;
  }
}



/* The Primeless logo icon-only PNG */
.nav-brand .logo-img,
.nav-brand .logo-icon.logo-img {
  width: 42px !important;
  height: 42px !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: 0 !important;
  display: block !important;
  flex: 0 0 auto;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
}
.rail-brand-logo,
img.rail-brand-mark {
  width: 36px !important;
  height: 36px !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: 0 !important;
  display: block !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
}
.logo-icon {
  background: transparent !important;
}
@media (max-width: 600px) {
  .nav-brand .logo-icon.logo-img {
    width: 34px !important;
    height: 34px !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
}
}
