:root {
  --red: #e2231a;
  --red-dark: #b81a12;
  --yellow: #ffd200;
  --ink: #1c1c1c;
  --grey: #6b7280;
  --line: #e5e7eb;
  --bg: #f3f4f6;
  --green: #0a8a3a;
}
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.inline { display: inline; }
.mono { font-variant-numeric: tabular-nums; }
.empty { color: var(--grey); padding: 20px 0; }

/* ===== TOP BAR ===== */
.topbar {
  background: var(--red);
  display: flex; align-items: center; gap: 20px;
  padding: 12px 24px; color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.brand { font-weight: 900; font-size: 24px; letter-spacing: .01em; color: #fff; line-height: 1; }
.brand span { display: block; font-size: 9px; font-weight: 700; letter-spacing: .3em; color: var(--yellow); }
.brand:hover { color: #fff; }
.searchbar { flex: 1; display: flex; max-width: 620px; }
.searchbar input {
  flex: 1; border: none; border-radius: 6px 0 0 6px;
  padding: 11px 14px; font: 600 15px "Nunito Sans", sans-serif;
}
.searchbar button {
  border: none; background: var(--yellow); color: var(--ink);
  border-radius: 0 6px 6px 0; padding: 0 18px; font-size: 20px; cursor: pointer;
}
.top-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.top-link { color: #fff; font-weight: 700; font-size: 14px; }
.top-link:hover { color: var(--yellow); }
.top-user { font-size: 13px; opacity: .9; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yellow); color: var(--ink); font-size: 11px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px; margin-left: 4px; padding: 0 5px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; border: none; border-radius: 6px; cursor: pointer;
  font: 800 14px "Nunito Sans", sans-serif; padding: 10px 18px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { box-shadow: 0 4px 12px rgba(0,0,0,.2); color: var(--ink); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); }
.btn-outline:hover { border-color: #fff; color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ===== SHOP LAYOUT ===== */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; max-width: 1360px; margin: 18px auto; padding: 0 20px; width: 100%; flex: 1; align-items: start; }
.cat-sidebar { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 78px; }
.cat-title { background: var(--ink); color: #fff; font-weight: 800; padding: 13px 16px; font-size: 14px; }
.cat-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: background .15s, padding-left .15s; }
.cat-item:hover { background: #fff7e0; padding-left: 20px; color: var(--ink); }
.cat-item.active { background: var(--yellow); font-weight: 800; }
.cat-n { background: var(--bg); border-radius: 10px; font-size: 12px; padding: 1px 8px; color: var(--grey); }

/* ===== SLIDER ===== */
.slider { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.slides { display: flex; width: 300%; animation: slide 15s infinite; }
@keyframes slide {
  0%, 28% { transform: translateX(0); }
  33%, 61% { transform: translateX(-33.3333%); }
  66%, 95% { transform: translateX(-66.6667%); }
  100% { transform: translateX(0); }
}
.slide { width: 33.3333%; min-height: 240px; display: flex; align-items: center; padding: 32px 44px; color: #fff; }
.slide-1 { background: radial-gradient(circle at 85% 20%, #ff6b5e, transparent 45%), linear-gradient(110deg, var(--red) 40%, var(--red-dark)); }
.slide-2 { background: radial-gradient(circle at 85% 80%, #3b82f6, transparent 45%), linear-gradient(110deg, #143a8a 40%, #0d2666); }
.slide-3 { background: radial-gradient(circle at 80% 30%, #16c05e, transparent 45%), linear-gradient(110deg, #0a8a3a 40%, #076a2c); }
.slide-kicker { font-size: 12px; font-weight: 800; letter-spacing: .25em; color: var(--yellow); margin-bottom: 8px; }
.slide h2 { font-size: clamp(22px, 3vw, 34px); font-weight: 900; line-height: 1.15; max-width: 560px; margin-bottom: 18px; }
.slide h2 em { font-style: normal; color: var(--yellow); }
.slider-dots { position: absolute; bottom: 12px; left: 44px; display: flex; gap: 6px; }
.slider-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); }
.slider-dots span:first-child { background: var(--yellow); }

/* ===== PRODUCT GRID ===== */
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 22px 0 14px; flex-wrap: wrap; }
.shop-head h1 { font-size: 22px; font-weight: 900; }
.lock-note { background: #fff7e0; border: 1.5px solid var(--yellow); border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.pcard { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.pcard:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.pcard-img { position: relative; display: block; aspect-ratio: 1 / .85; overflow: hidden; background: #fff; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pcard:hover .pcard-img img { transform: scale(1.05); }
.pcard-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pcard-ph span { font-size: 40px; font-weight: 900; color: rgba(0,0,0,.18); }
.pcard-ph[data-cat="Personal Care"] { background: linear-gradient(135deg, #d8f3dc, #b7e4c7); }
.pcard-ph[data-cat="Cosmetics"]     { background: linear-gradient(135deg, #ffe5ec, #ffc2d1); }
.pcard-ph[data-cat="Skincare"]      { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.pcard-ph[data-cat="Jewelry"]       { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.pcard-ph[data-cat="Home & Living"] { background: linear-gradient(135deg, #ede9e3, #ddd6cc); }
.pcard-ph[data-cat="Automotive"]    { background: linear-gradient(135deg, #e5e7eb, #d1d5db); }
.moq-badge { position: absolute; top: 8px; left: 8px; background: var(--yellow); font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 12px; }
.pcard-body { padding: 12px 14px 14px; display: grid; gap: 4px; flex: 1; align-content: start; }
.pcard-name { font-weight: 800; font-size: 15px; line-height: 1.3; min-height: 2.4em; }
.pcard-cat { color: var(--grey); font-size: 12.5px; }
.pcard-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.pcard-price { color: var(--red); font-weight: 900; font-size: 18px; }
.pcard-price small { color: var(--grey); font-weight: 600; font-size: 11px; }
.pcard-locked { font-size: 12.5px; font-weight: 700; color: var(--grey); }

/* ===== FEATURE STRIP ===== */
.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 26px 0 10px; }
.feature-strip > div { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); display: grid; gap: 2px; }
.feature-strip b { font-size: 14px; }
.feature-strip span { font-size: 12.5px; color: var(--grey); }

/* ===== PRODUCT PAGE ===== */
.product-page { max-width: 1160px; margin: 20px auto; padding: 0 20px 60px; flex: 1; width: 100%; }
.crumb { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: var(--grey); }
.product-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; background: #fff; border-radius: 12px; padding: 26px; box-shadow: 0 1px 6px rgba(0,0,0,.07); }
.pp-art { border-radius: 10px; min-height: 380px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pp-art img { width: 100%; height: 100%; object-fit: cover; }
.pp-art span { font-size: 64px; font-weight: 900; color: rgba(0,0,0,.15); }
.pp-art[data-cat="Personal Care"] { background: linear-gradient(135deg, #d8f3dc, #b7e4c7); }
.pp-art[data-cat="Cosmetics"]     { background: linear-gradient(135deg, #ffe5ec, #ffc2d1); }
.pp-art[data-cat="Skincare"]      { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.pp-art[data-cat="Jewelry"]       { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.pp-art[data-cat="Home & Living"] { background: linear-gradient(135deg, #ede9e3, #ddd6cc); }
.pp-art[data-cat="Automotive"]    { background: linear-gradient(135deg, #e5e7eb, #d1d5db); }
.cp-sku { color: var(--grey); font-size: 13px; font-weight: 700; }
.pp-info h1 { font-size: 30px; font-weight: 900; line-height: 1.15; margin: 6px 0 12px; }
.pp-desc { color: var(--grey); max-width: 480px; }
.pp-specs { display: grid; grid-template-columns: repeat(3, auto); gap: 24px; margin: 20px 0; justify-content: start; }
.pp-specs > div { display: grid; gap: 2px; }
.pp-specs .mono { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); font-weight: 800; }
.pp-specs .price { color: var(--red); font-size: 20px; }
.pp-buy { border-top: 1.5px solid var(--line); padding-top: 18px; display: grid; gap: 14px; }
.qty-label { max-width: 220px; font-weight: 700; font-size: 13px; display: grid; gap: 6px; }
.pp-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pp-pay { margin-top: 14px; }
.notice { background: #fff7e0; border: 1.5px solid var(--yellow); border-radius: 8px; padding: 12px 16px; font-weight: 700; font-size: 14px; }
.section-title { font-size: 20px; font-weight: 900; margin: 30px 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card-product { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s; }
.card-product:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); color: var(--ink); }
.cp-art { height: 130px; display: flex; align-items: center; justify-content: center; }
.cp-art span { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: #fff; border-radius: 12px; padding: 3px 10px; }
.cp-art[data-cat="Personal Care"] { background: linear-gradient(135deg, #d8f3dc, #b7e4c7); }
.cp-art[data-cat="Cosmetics"]     { background: linear-gradient(135deg, #ffe5ec, #ffc2d1); }
.cp-art[data-cat="Skincare"]      { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.cp-art[data-cat="Jewelry"]       { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.cp-art[data-cat="Home & Living"] { background: linear-gradient(135deg, #ede9e3, #ddd6cc); }
.cp-art[data-cat="Automotive"]    { background: linear-gradient(135deg, #e5e7eb, #d1d5db); }
.cp-body { padding: 12px 14px; display: grid; gap: 4px; }
.cp-body h3 { font-size: 15px; }
.cp-meta { color: var(--grey); font-size: 12.5px; }

/* ===== FORMS ===== */
.form-page { max-width: 560px; margin: 26px auto; padding: 0 20px 60px; flex: 1; width: 100%; }
.form-page h1 { font-size: 28px; font-weight: 900; }
.form-sub { color: var(--grey); margin: 8px 0 20px; }
.card { background: #fff; border-radius: 12px; padding: 26px; display: grid; gap: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.07); }
.card.center { text-align: center; justify-items: center; }
label { display: grid; gap: 6px; font-weight: 700; font-size: 13.5px; }
input, select, textarea {
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff;
  padding: 11px 12px; font: 600 15px "Nunito Sans", sans-serif; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); }
small { font-weight: 500; color: var(--grey); }
.reg-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; }
.errors { border: 1.5px solid var(--red); background: #fdeceb; color: #8a1710; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; font-weight: 600; display: grid; gap: 4px; }
.form-foot { font-size: 14px; color: var(--grey); text-align: center; }
.form-foot a { color: var(--red); font-weight: 700; }
.stamp { display: inline-block; border: 3px solid var(--red); color: var(--red); font-weight: 900; letter-spacing: .15em; padding: 5px 16px; transform: rotate(-3deg); font-size: 16px; border-radius: 6px; }

/* ===== ANIMATIONS ===== */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: riseIn .55s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--d, 0) * 80ms); }
.reveal { opacity: 1; }
@keyframes shakeX { 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)} 30%,50%,70%{transform:translateX(-4px)} 40%,60%{transform:translateX(4px)} }
.shake { animation: shakeX .5s ease; }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; opacity: 1; } .slides { animation: none; } * { transition: none !important; } }

/* ===== ADMIN / TABLES / ORDERS ===== */
.admin { max-width: 1000px; margin: 24px auto; padding: 0 20px 60px; flex: 1; width: 100%; }
.admin h1 { font-size: 26px; font-weight: 900; }
.admin h2 { margin: 30px 0 12px; font-size: 18px; font-weight: 800; }
.count { display: inline-block; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 10px; margin-left: 6px; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; font-size: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.admin-row.muted { opacity: .75; }
.admin-row form { display: flex; gap: 8px; align-items: center; }
.table-head { display: grid; gap: 12px; padding: 10px 12px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.row { display: grid; gap: 12px; align-items: center; background: #fff; padding: 12px; margin-bottom: 6px; border-radius: 8px; font-size: 14px; }
.cart-head, .cart-row { grid-template-columns: 100px 1fr 80px 100px 110px 100px; }
.pname { font-weight: 700; }
.right { text-align: right; }
.price { color: var(--red); font-weight: 900; }
.redacted { display: inline-block; width: 78px; height: 16px; border-radius: 4px; background: repeating-linear-gradient(45deg, #cbd5e1, #cbd5e1 6px, #e2e8f0 6px, #e2e8f0 12px); vertical-align: middle; }
.locked-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; background: #fff7e0; border: 1.5px dashed var(--yellow); border-radius: 10px; padding: 12px 18px; font-size: 13px; font-weight: 700; }
.cart-total { display: flex; justify-content: flex-end; gap: 30px; padding: 16px 12px; font-weight: 900; font-size: 18px; }
.checkout-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 16px; flex-wrap: wrap; }
.status-pill { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-radius: 12px; padding: 4px 12px; }
.status-pending { background: #fff3c4; }
.status-confirmed, .status-processing { background: #dbeafe; }
.status-shipped { background: #c7ddff; }
.status-delivered { background: #d1f2d9; }
.status-cancelled { background: #fddedd; }
.order-link:hover { color: var(--ink); box-shadow: 0 6px 16px rgba(0,0,0,.12); }

/* Tracking */
.track { display: flex; align-items: flex-start; margin: 24px 0 36px; }
.track-step { display: grid; justify-items: center; gap: 8px; width: 90px; }
.track-dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); background: #fff; transition: background .3s; }
.track-step.done .track-dot { background: var(--green); border-color: var(--green); }
.track-step.current .track-dot { box-shadow: 0 0 0 5px rgba(10,138,58,.18); animation: pulse 1.6s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(10,138,58,.08); } }
.track-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.track-line { flex: 1; height: 3px; background: var(--line); margin-top: 8px; }
.track-line.done { background: var(--green); }

/* Verify */
.verify-form { display: grid; gap: 14px; justify-items: center; margin: 10px 0; }
.code-input { font-size: 34px; letter-spacing: .5em; text-align: center; width: 280px; padding: 12px 0 12px 12px; font-weight: 800; }

/* Payment badges */
.pay-badges { display: flex; gap: 8px; align-items: center; }
.pay-badge { display: inline-flex; align-items: center; justify-content: center; height: 28px; min-width: 48px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: 4px; background: #fff; font-weight: 800; font-size: 12px; }
.pay-visa { color: #1a1f71; font-style: italic; }
.pay-amex { color: #fff; background: #2e77bc; border-color: #2e77bc; font-size: 11px; }
.pay-mc { gap: 0; }
.pay-mc i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.pay-mc i:first-child { background: #eb001b; }
.pay-mc i:nth-child(2) { background: #f79e1b; margin-left: -7px; mix-blend-mode: multiply; }
.pay-mc b { font-size: 9px; font-weight: 700; margin-left: 4px; color: var(--grey); }

/* Invoice */
.invoice-body { background: #fff; display: block; }
.invoice { max-width: 780px; margin: 0 auto; padding: 48px 32px; }
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--ink); padding-bottom: 18px; }
.invoice .brand { color: var(--red); }
.invoice .brand span { color: var(--ink); }
.inv-title h1 { font-size: 32px; font-weight: 900; }
.inv-title { text-align: right; }
.inv-meta { color: var(--grey); font-size: 13px; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px 0; font-size: 14px; }
.inv-label { font-size: 11px; letter-spacing: .14em; color: var(--grey); margin-bottom: 6px; font-weight: 800; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.inv-table th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 10px 8px; }
.inv-table th.right, .inv-table td.right { text-align: right; }
.inv-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; }
.inv-table tfoot td { border-top: 2px solid var(--ink); border-bottom: none; font-weight: 900; font-size: 16px; padding-top: 14px; }
.inv-foot { margin-top: 30px; display: grid; gap: 12px; font-size: 13px; color: var(--grey); }
.inv-actions { margin-top: 30px; display: flex; gap: 12px; }
@media print { .no-print { display: none !important; } .invoice { padding: 0; } }

/* Footer */
.footer { background: var(--ink); color: #d1d5db; padding: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.footer-brand { font-weight: 900; color: #fff; font-size: 16px; }
.footer-note { font-size: 12.5px; }

/* Admin product form */
.prod-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 16px; }
.prod-form .span2 { grid-column: span 2; }
.prod-form .span4 { grid-column: span 4; }

/* Responsive */
@media (max-width: 960px) {
  .shop-layout { grid-template-columns: 1fr; }
  .cat-sidebar { position: static; display: flex; overflow-x: auto; border-radius: 10px; }
  .cat-title { display: none; }
  .cat-item { border-bottom: none; white-space: nowrap; }
  .product-layout { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .topbar { flex-wrap: wrap; }
  .searchbar { order: 3; min-width: 100%; }
  .cart-head { display: none; }
  .cart-row { grid-template-columns: 1fr auto; }
  .cart-row span:nth-child(1), .cart-row span:nth-child(4) { display: none; }
  .prod-form { grid-template-columns: 1fr 1fr; }
  .prod-form .span2, .prod-form .span4 { grid-column: span 2; }
  .track-step { width: 60px; }
}

/* ===== V5: AUTH PAGE ANIMATION ===== */
.auth-page { position: relative; }
.auth-page::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(120deg, #fff5f5, #fff, #fff8e1, #fff, #fdeaea);
  background-size: 300% 300%;
  animation: authbg 12s ease infinite;
}
@keyframes authbg { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.auth-card {
  opacity: 0; transform: translateY(26px) scale(.97);
  animation: cardIn .65s cubic-bezier(.2,.8,.25,1) .15s forwards;
}
@keyframes cardIn { to { opacity: 1; transform: none; } }
.auth-card label { opacity: 0; animation: riseIn .5s ease forwards; }
.auth-card label:nth-of-type(1) { animation-delay: .25s; }
.auth-card label:nth-of-type(2) { animation-delay: .32s; }
.auth-card label:nth-of-type(3) { animation-delay: .39s; }
.auth-card label:nth-of-type(4) { animation-delay: .46s; }
.auth-card label:nth-of-type(5) { animation-delay: .53s; }
.auth-card label:nth-of-type(6) { animation-delay: .6s; }
.auth-card label:nth-of-type(7) { animation-delay: .67s; }
.auth-card label:nth-of-type(8) { animation-delay: .74s; }
.auth-card .reg-grid, .auth-card button[type=submit], .auth-card .form-foot { opacity: 0; animation: riseIn .5s ease .5s forwards; }
.auth-card button[type=submit] { animation-delay: .8s; }
.auth-card .form-foot { animation-delay: .9s; }
.auth-card input:focus, .auth-card select:focus, .auth-card textarea:focus {
  box-shadow: 0 0 0 4px rgba(226,35,26,.12); transition: box-shadow .2s;
}
.auth-card button[type=submit]:active { transform: scale(.97); }

/* ===== FLY TO CART ===== */
.fly-ghost {
  position: fixed; z-index: 200; width: 48px; height: 48px; border-radius: 50%;
  background: var(--yellow) center/cover no-repeat;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: transform .7s cubic-bezier(.3,.7,.4,1), opacity .7s;
  pointer-events: none;
}
.cart-badge.pop { animation: badgePop .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes badgePop { 40% { transform: scale(1.6); } }
button.added { background: var(--green) !important; color: #fff !important; }

/* ===== TOAST ===== */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 80px);
  background: var(--ink); color: #fff; font-weight: 800; font-size: 14px;
  padding: 12px 22px; border-radius: 30px; box-shadow: 0 6px 20px rgba(0,0,0,.3);
  opacity: 0; transition: transform .35s cubic-bezier(.2,.8,.25,1), opacity .35s;
  z-index: 300; pointer-events: none; max-width: 90vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ===== V7: LOGO & BANNERS ===== */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 38px; height: 38px; background: #fff; border-radius: 9px; padding: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.brand-text { line-height: 1; }
.brand-text span { display: block; font-size: 9px; font-weight: 700; letter-spacing: .3em; color: var(--yellow); }
.slides { transition: transform .6s cubic-bezier(.25,.8,.3,1); animation: none; }
.slide { min-width: 100%; }
.slide-img { padding: 0; min-height: 0; display: block; }
.slide-img img { width: 100%; height: auto; max-height: 340px; object-fit: cover; display: block; }
.slider-dots span { cursor: pointer; transition: background .2s, transform .2s; }
.slider-dots span.on { background: var(--yellow); transform: scale(1.25); }
.invoice .inv-logo { height: 54px; }

/* ===== V8: ADMIN DASHBOARD ===== */
.admin-wide { max-width: 1160px; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; background: #fff; padding: 8px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.admin-tabs a { padding: 10px 16px; border-radius: 8px; font-weight: 800; font-size: 14px; }
.admin-tabs a:hover { background: #fff0ef; color: var(--ink); }
.admin-tabs a.on { background: var(--red); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 18px 0; }
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); border-top: 3px solid var(--red); }
.stat-alert { border-top-color: var(--yellow); background: #fffbea; }
.stat-label { font-size: 12px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: 24px; font-weight: 900; margin-top: 4px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.chart-card { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.chart-card h2 { margin: 0 0 12px; font-size: 15px; }

/* Category chips */
.cat-manage { display: grid; gap: 12px; background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 16px; }
.cat-add { display: flex; gap: 10px; max-width: 420px; }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 16px; padding: 6px 8px 6px 14px; font-weight: 700; font-size: 13px; }
.chip button { border: none; background: var(--red); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1; }

/* Dropzone */
.dropzone { border: 2px dashed #cbd5e1; border-radius: 10px; min-height: 110px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; overflow: hidden; background: #fafafa; transition: border-color .2s, background .2s; }
.dropzone.dz-over { border-color: var(--red); background: #fff0ef; }
.dropzone.dz-busy { opacity: .6; pointer-events: none; }
.dropzone.dz-done { border-style: solid; border-color: var(--green); }
.dz-inner { display: grid; justify-items: center; gap: 4px; padding: 14px; text-align: center; color: var(--grey); font-size: 12.5px; font-weight: 700; }
.dz-icon { font-size: 22px; }
.dz-preview { max-height: 140px; max-width: 100%; object-fit: contain; display: block; }
.dz-wide { min-height: 140px; }
.banner-thumb { height: 60px; border-radius: 8px; }

/* product rows */
.prow { display: flex; align-items: center; gap: 14px; }
.prow-img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; }
.prow-noimg { display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 22px; }
.row-actions { display: flex; gap: 8px; align-items: center; }

/* customers table */
.cust-head, .cust-row { grid-template-columns: 1.6fr 1.2fr 100px 70px 110px 100px 90px; }

@media (max-width: 960px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .cust-head { display: none; }
  .cust-row { grid-template-columns: 1fr auto; }
  .cust-row span:nth-child(2), .cust-row span:nth-child(6) { display: none; }
}

/* ===== V9: MOBILE POLISH ===== */
@media (max-width: 700px) {
  /* Header: compact two-row layout */
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand-icon { width: 32px; height: 32px; padding: 3px; border-radius: 8px; }
  .brand-text { font-size: 17px; }
  .brand-text span { font-size: 7.5px; letter-spacing: .24em; }
  .top-actions { gap: 10px; }
  .top-link { font-size: 13px; }
  .top-user { display: none; }
  .btn-outline { padding: 7px 12px; font-size: 12.5px; }
  .top-actions .btn-primary { padding: 8px 14px; font-size: 13px; }
  .searchbar { order: 3; min-width: 100%; margin-top: 2px; }
  .searchbar input { padding: 10px 13px; font-size: 14px; }

  /* Category chips row */
  .shop-layout { margin: 12px auto; padding: 0 12px; gap: 12px; }
  .cat-sidebar { background: transparent; box-shadow: none; gap: 8px; padding: 2px 0; scrollbar-width: none; }
  .cat-sidebar::-webkit-scrollbar { display: none; }
  .cat-item { background: #fff; border-radius: 20px; padding: 8px 14px; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.08); gap: 6px; }
  .cat-item:hover { padding-left: 14px; }
  .cat-item.active { background: var(--ink); color: #fff; }
  .cat-item.active .cat-n { background: var(--yellow); color: var(--ink); }
  .cat-n { padding: 0 7px; font-size: 11px; }

  /* Slider: shorter, tighter text */
  .slide { min-height: 170px; padding: 20px 22px; }
  .slide h2 { font-size: 19px; margin-bottom: 12px; }
  .slide-kicker { font-size: 10px; margin-bottom: 5px; }
  .slide .btn { padding: 9px 16px; font-size: 13px; }
  .slide-img img { max-height: 190px; }
  .slider { border-radius: 10px; }
  .slider-dots { left: 22px; bottom: 10px; }

  /* Products: true 2-column mobile grid */
  .shop-head { margin: 16px 0 10px; }
  .shop-head h1 { font-size: 18px; }
  .lock-note { width: 100%; font-size: 12px; padding: 8px 12px; }
  .pgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pcard-body { padding: 10px 11px 12px; }
  .pcard-name { font-size: 13.5px; min-height: 2.6em; }
  .pcard-cat { font-size: 11.5px; }
  .pcard-price { font-size: 15px; }
  .pcard-bottom { flex-wrap: wrap; gap: 6px; }
  .btn-sm { padding: 6px 12px; font-size: 12px; }
  .moq-badge { font-size: 10px; padding: 2px 8px; }

  /* Feature strip & footer */
  .feature-strip { grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 8px; }
  .feature-strip > div { padding: 11px 12px; }
  .feature-strip b { font-size: 12.5px; }
  .feature-strip span { font-size: 11px; }
  .footer { padding: 18px 16px; font-size: 12px; }
  .pay-badge { height: 24px; min-width: 40px; font-size: 10.5px; }

  /* Product page */
  .product-page { margin: 12px auto; padding: 0 12px 40px; }
  .product-layout { padding: 16px; gap: 16px; }
  .pp-art { min-height: 240px; }
  .pp-info h1 { font-size: 22px; }
  .pp-specs { gap: 14px; }
  .pp-actions .btn-lg { padding: 12px 18px; font-size: 14px; width: 100%; text-align: center; }
  .pp-actions { flex-direction: column; }

  /* Forms & admin on mobile */
  .form-page { margin: 14px auto; padding: 0 14px 40px; }
  .card { padding: 18px; }
  .admin { padding: 0 12px 40px; margin: 14px auto; }
  .admin-tabs { gap: 4px; padding: 6px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .admin-tabs a { padding: 8px 12px; font-size: 12.5px; white-space: nowrap; }
  .stat-grid, .stat-grid-4 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 12px; }
  .stat-value { font-size: 19px; }
  .admin-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .admin-row form { width: 100%; flex-wrap: wrap; }
  .prod-form { grid-template-columns: 1fr; }
  .prod-form .span2, .prod-form .span4 { grid-column: span 1; }
  .checkout-bar { flex-direction: column; align-items: stretch; }
  .checkout-bar .btn { width: 100%; text-align: center; }
  .code-input { width: 100%; font-size: 28px; }
  .track { overflow-x: auto; padding-bottom: 6px; }
}

/* ===== V10: BIG FOOTER & STATIC PAGES ===== */
.footer-big { display: block; padding: 34px 24px 18px; }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 28px; max-width: 1360px; margin: 0 auto; }
.footer-col { display: grid; gap: 8px; align-content: start; font-size: 13.5px; }
.footer-col a { color: #d1d5db; }
.footer-col a:hover { color: var(--yellow); }
.footer-logo { width: 26px; height: 26px; background: #fff; border-radius: 6px; padding: 2px; vertical-align: middle; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.footer-about { color: #9ca3af; font-size: 13px; line-height: 1.55; max-width: 320px; }
.footer-head { font-weight: 900; color: #fff; text-transform: uppercase; font-size: 12px; letter-spacing: .1em; margin-bottom: 2px; }
.footer-line { color: #d1d5db; }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; max-width: 1360px; margin: 24px auto 0; padding-top: 14px; border-top: 1px solid #374151; font-size: 12px; color: #9ca3af; }
.static-page .card { display: block; }
.static-page .card p { margin-bottom: 14px; line-height: 1.65; }
@media (max-width: 700px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-col:first-child { grid-column: span 2; }
}
.bulk-ok { background: #d1f2d9; border: 1.5px solid var(--green); border-radius: 8px; padding: 12px 16px; margin-bottom: 14px; font-weight: 700; font-size: 14px; }

/* ===== V13: SHOPIFY-STYLE DASHBOARD ===== */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.dash-controls { display: flex; gap: 10px; align-items: center; }
.period-select { border-radius: 8px; font-weight: 700; padding: 10px 12px; background: #fff; }
.customize-menu { background: #fff; border-radius: 10px; padding: 12px 16px; box-shadow: 0 2px 10px rgba(0,0,0,.12); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; font-size: 13.5px; }
.customize-menu label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.customize-menu input { width: auto; }
.delta { font-size: 12px; font-weight: 800; margin-top: 4px; border-radius: 10px; padding: 2px 8px; display: inline-block; }
.delta.up { color: #0a8a3a; background: #d1f2d9; }
.delta.down { color: #b3261e; background: #fddedd; }
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.card-head h2 { margin: 0; font-size: 15px; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: none; }
.mini-img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.mini-noimg { display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 18px; }
.mini-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px; }
.mini-info { flex: 1; display: grid; }
.mini-info small { color: var(--grey); font-size: 12px; }
.mini-right { display: grid; justify-items: end; gap: 3px; }
.mini-right small { color: var(--grey); font-size: 12px; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } }

/* ===== V16: SUGGEST, QTY, PAY ===== */
.searchbar { position: relative; }
.suggest-box { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.22); overflow: hidden; z-index: 100; }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink); }
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item.focus { background: #fff0ef; color: var(--ink); text-decoration: none; }
.suggest-item img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.suggest-ph { width: 36px; height: 36px; border-radius: 6px; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.suggest-name { flex: 1; font-weight: 700; font-size: 13.5px; }
.suggest-meta { color: var(--grey); font-size: 12px; }
.qty-form { display: flex; gap: 6px; align-items: center; }
.qty-input { width: 84px; padding: 7px 8px; }
.pay-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0 4px; }
@media (max-width: 700px) { .pay-actions .btn-lg { width: 100%; text-align: center; } .suggest-meta { display: none; } }

/* ===== V18: ORDER FILE IMPORT ===== */
.import-box { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; background: #fff; border: 2px dashed var(--yellow); border-radius: 12px; padding: 16px 18px; margin-bottom: 18px; }
.import-label { cursor: pointer; white-space: nowrap; }
#import-result { margin-top: 8px; font-size: 13px; }
#import-result ul { margin: 6px 0 0 18px; }
.imp-ok { color: var(--green); font-weight: 800; }
.imp-err { color: #b3261e; font-weight: 700; display: block; margin-top: 4px; }
@media (max-width: 700px) { .import-box { flex-direction: column; } .import-label { width: 100%; text-align: center; } }

/* ===== V21: EPS BRANDING, PREVIEW, STATEMENT ===== */
.eps-footer-strip { width: 100%; max-width: 720px; height: auto; border-radius: 8px; }
.eps-checkout-badge { max-width: 340px; width: 100%; height: auto; }
.cart-head, .cart-row { grid-template-columns: 90px 1fr 110px 90px 110px 100px; }
.qty-form { display: block; }
.qty-input { width: 88px; padding: 8px; }
.preview-card { background: #fff; border: 2px solid var(--yellow); border-radius: 12px; padding: 16px; margin-top: 12px; font-size: 14px; }
.preview-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13.5px; }
.preview-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--grey); border-bottom: 2px solid var(--ink); padding: 6px 8px; }
.preview-table td { border-bottom: 1px solid var(--line); padding: 7px 8px; }
.preview-total td { font-weight: 900; border-top: 2px solid var(--ink); border-bottom: none; }
.preview-actions { display: flex; gap: 10px; margin-top: 12px; }
@media (max-width: 700px) { .eps-checkout-badge { max-width: 100%; } }

/* ===== V26: GONHIA AI ===== */
.ai-quick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ai-chat { background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.07); padding: 18px; min-height: 320px; max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 78%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.ai-user { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 4px; }
.ai-bot { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 4px; }
.ai-wait { color: var(--grey); font-style: italic; }
.ai-inputrow { display: flex; gap: 10px; margin-top: 12px; }
.ai-inputrow input { flex: 1; }
@media (max-width: 700px) { .ai-msg { max-width: 92%; } }

/* ===== V27: AI UPLOAD POPUP ===== */
.ai-attach-btn { font-size: 18px; padding: 10px 14px; }
.ai-modal-backdrop { position: fixed; inset: 0; background: rgba(20,20,20,.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 300; animation: aiFade .25s ease; }
.ai-modal { background: #fff; border-radius: 18px; padding: 26px; width: min(480px, 92vw); position: relative; box-shadow: 0 24px 70px rgba(0,0,0,.3); animation: aiPop .38s cubic-bezier(.34,1.56,.64,1); }
.ai-modal h2 { margin: 0 0 14px; font-size: 18px; }
.ai-modal-x { position: absolute; top: 12px; right: 14px; border: none; background: none; font-size: 16px; cursor: pointer; color: var(--grey); }
.ai-drop { border: 2.5px dashed var(--yellow); border-radius: 14px; padding: 34px 20px; text-align: center; cursor: pointer; display: grid; gap: 6px; transition: all .25s ease; }
.ai-drop small { color: var(--grey); }
.ai-drop:hover, .ai-drop.ai-drag { border-color: var(--red); background: #fff5f4; transform: scale(1.02); }
.ai-drop-icon { font-size: 34px; animation: aiFloat 2.4s ease-in-out infinite; }
.ai-purpose { text-align: center; animation: aiFade .3s ease; }
.ai-purpose img { max-height: 130px; border-radius: 10px; margin-bottom: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.ai-purpose-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ai-busy { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 26px 0; }
.ai-spinner { width: 26px; height: 26px; border: 3.5px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: aiSpin .8s linear infinite; }
.ai-done { display: flex; justify-content: center; padding: 22px 0; }
.ai-check { width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: #fff; font-size: 28px; font-weight: 900; display: flex; align-items: center; justify-content: center; animation: aiPop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes aiFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes aiPop { from { opacity: 0; transform: scale(.75) } to { opacity: 1; transform: scale(1) } }
@keyframes aiSpin { to { transform: rotate(360deg) } }
@keyframes aiFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
