/* ShopLoom — main stylesheet (storefront marketplace + admin + errors) */
* { box-sizing: border-box; }
:root {
  --accent: #0f172a;
  --accent-2: #334155;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e4e7ec;
  --text: #16181d;
  --muted: #69707d;
  --success: #059669;
  --danger: #dc2626;
  --warn: #d97706;
  --info: #2563eb;
  --deal: #ff2d55;          /* sale / flash accents */
  --deal-2: #ff6a00;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  --shadow-lg: 0 14px 34px rgba(15,23,42,.16);
  --focus: 0 0 0 3px rgba(99,102,241,.18);
}
html, body { margin: 0; padding: 0; overflow-x: clip; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
.text-link { text-decoration: underline; text-underline-offset: 2px; }
.muted { color: var(--muted); }
.info-text { color: var(--muted); font-size: .85rem; }
.error-text { color: var(--danger); }
.pos { color: var(--success); }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.ta-l { text-align: left; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }

/* Layout primitives */
.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.container-fluid { width: 100% - 32px; margin-inline: auto; }
.narrow { max-width: 620px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.align-end { align-items: end; }

/* Panels / cards / tables */
.panel, .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); }
.table th, .table td { padding: .6rem .65rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; }
.table tr:last-child td { border-bottom: 0; }
.totals-end td { border-top: 2px solid var(--text); font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .55rem 1.15rem; border-radius: 9px; font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .16s ease; line-height: 1.3; }
.btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.22); }
.btn-outline { background: transparent; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }
.btn-danger { color: var(--danger); border-color: #fecaca; background: #fef2f2; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: .32rem .7rem; font-size: .8rem; border-radius: 7px; }
.btn-lg { padding: .8rem 1.8rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
.btn-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; cursor: pointer; position: relative; vertical-align: middle; color: var(--text); transition: .15s; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: #f8fafc; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.has-dot::after { content: ""; position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; }
.badge-count { position: absolute; top: -5px; right: -5px; background: var(--deal); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 9px; line-height: 1.1; font-weight: 700; box-shadow: 0 0 0 2px #fff; }

/* Forms */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: .35rem; color: var(--text); }
.input { width: 100%; padding: .58rem .75rem; border: 1px solid var(--border); border-radius: 9px; font-size: .92rem; background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input-sm { padding: .34rem .55rem; font-size: .84rem; }
.textarea-mono, textarea.input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
input[type="color"].input { padding: .2rem; height: 42px; }
  .checkbox { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; cursor: pointer; font-size: .9rem; }
.cat-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem 1.2rem; align-items: start; max-height: 320px; overflow-y: auto; }
.cat-picker .checkbox { margin: .3rem 0; }
.cat-children { margin-left: 1.3rem; border-left: 1px dashed var(--border); padding-left: .5rem; }
.radio-inline { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; }
.input-group { display: flex; gap: .5rem; align-items: center; }
.form-actions { margin-top: 1.25rem; display: flex; gap: .6rem; align-items: center; }

/* Flash */
.flash { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.05rem; border-radius: 11px; margin: 1rem auto; max-width: min(1240px, 100% - 32px); font-size: .92rem; border: 1px solid; box-shadow: var(--shadow); }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.flash-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.flash-close { border: 0; background: none; font-size: 1.15rem; cursor: pointer; color: inherit; }

/* ================= STOREFRONT ================= */

/* Announcement + header */
.announcement { background: linear-gradient(90deg, var(--deal), var(--deal-2)); color: #fff; font-size: .8rem; font-weight: 600; letter-spacing: .01em; overflow: hidden; white-space: nowrap; }
.announcement-track { display: inline-flex; width: max-content; align-items: center; animation: announce-scroll var(--announce-speed, 26s) linear infinite; will-change: transform; }
.announcement:hover .announcement-track { animation-play-state: paused; }
.announcement-item { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 2.2rem; }
.announcement-item::after { content: "\2605"; font-size: .7rem; opacity: .85; }
@keyframes announce-scroll { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .announcement-track { animation: none; } .announcement { white-space: normal; text-align: center; } }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.util-bar { background: #fafbfc; border-bottom: 1px solid var(--border); font-size: .78rem; color: var(--muted); }
.util-row { display: flex; align-items: center; gap: 1.2rem; padding: .38rem 0; }
.util-loc { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }
.util-loc svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.util-loc b { color: var(--text); }
.util-links { display: flex; gap: 1.1rem; margin-left: auto; }
.util-links a { color: var(--muted); }
.util-links a:hover { color: var(--deal); }

.header-main { display: flex; align-items: center; gap: 1.1rem; padding: .85rem 0; }
.brand { display: inline-flex; align-items: center; gap: .5rem; flex: none; }
.brand-name { font-size: 1.6rem; font-weight: 900; letter-spacing: -.03em; color: var(--text); }
.logo img { display: block; max-height: 44px; }

.header-search { flex: 1; display: flex; align-items: stretch; max-width: 720px; border: 2px solid var(--accent); border-radius: 11px; overflow: hidden; background: #fff; min-width: 0; }
.header-search select { border: 0; border-right: 1px solid var(--border); background: #f7f8fa; padding: 0 .6rem; font-size: .82rem; color: var(--muted); max-width: 150px; cursor: pointer; outline: none; }
.header-search input { flex: 1; border: 0; padding: .68rem .9rem; font-size: .95rem; outline: none; min-width: 0; }
.header-search button { display: inline-flex; align-items: center; gap: .45rem; border: 0; background: linear-gradient(135deg, var(--deal), var(--deal-2)); color: #fff; font-weight: 700; font-size: .92rem; padding: 0 1.25rem; cursor: pointer; transition: filter .15s; }
.header-search button:hover { filter: brightness(1.08); }
.header-search button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.header-search:focus-within { box-shadow: 0 0 0 3px rgba(255,45,85,.18); }

.header-icons { display: flex; gap: .45rem; align-items: center; }
.icon-btn-badge { position: relative; }
.icon-btn.icon-account { width: auto; padding: 0 .8rem; gap: .5rem; font-size: .84rem; font-weight: 600; border: 0; background: transparent; height: auto; }
.icon-btn.icon-account span { line-height: 1.1; }
.cart-icon { color: var(--text); }
.cart-icon:hover { color: var(--deal); border-color: var(--deal); }
.cart-pop-root { position: relative; display: flex; }
.cart-popup {
  position: absolute; top: calc(100% + 12px); right: 0; width: 320px; max-width: 84vw;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14); z-index: 70; padding: .85rem .95rem 1rem;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.cart-popup::before {
  content: ""; position: absolute; top: -6px; right: 18px; width: 12px; height: 12px;
  background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.cart-pop-root:hover .cart-popup, .cart-pop-root:focus-within .cart-popup, .cart-popup.is-open {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.cart-pop-head { margin: 0 0 .6rem; font-weight: 700; font-size: .9rem; }
.cart-pop-empty { color: var(--muted); margin: .4rem 0 .8rem; text-align: center; }
.cart-pop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.cart-pop-list li { display: flex; align-items: center; gap: .7rem; }
.cart-pop-thumb { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--border); }
.cart-pop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-pop-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cart-pop-name { font-size: .82rem; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-pop-name:hover { color: var(--deal); }
.cart-pop-meta { font-size: .76rem; color: var(--muted); }
.cart-pop-total { font-size: .82rem; font-weight: 700; white-space: nowrap; }
.cart-pop-more { margin: .55rem 0 0; font-size: .78rem; color: var(--muted); }
.cart-pop-sub { display: flex; justify-content: space-between; align-items: center; margin: .7rem 0 .65rem; padding-top: .65rem; border-top: 1px dashed var(--border); font-size: .86rem; }
.cart-pop-sub strong { font-size: 1rem; }
.cart-pop-actions { display: grid; gap: .45rem; }
.menu-toggle { display: none; }

/* Nav */
.main-nav { border-top: 1px solid var(--border); background: var(--surface); position: relative; }
.main-nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-list { display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; overflow-x: auto; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-item { display: inline-flex; align-items: center; gap: .3rem; padding: .62rem .95rem; font-weight: 600; font-size: .9rem; color: var(--text); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; white-space: nowrap; }
.nav-item:hover { color: var(--deal); border-color: var(--deal); }
.nav-item.has-children { position: relative; cursor: pointer; }
.nav-item .caret { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.nav-shop { color: var(--deal); }
.has-children .dropdown { position: absolute; top: 100%; left: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; z-index: 50; }
.has-children:hover .dropdown, .has-children:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.has-children .dropdown a { display: block; padding: .5rem .7rem; border-radius: 8px; color: var(--text); font-size: .9rem; }
.has-children .dropdown a:hover { background: #f1f5f9; color: var(--deal); }
.nav-cat { position: relative; flex: none; }
.nav-cat > span { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--text); }
.nav-cat > span::before { content: "☰"; font-size: .95rem; color: var(--deal); }
.nav-cat-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .45rem; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; z-index: 50; }
.nav-cat:hover .nav-cat-list, .nav-cat:focus-within .nav-cat-list { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-cat-list a { display: block; padding: .5rem .7rem; border-radius: 8px; color: var(--text); font-size: .9rem; font-weight: 500; }
.nav-cat-list a:hover { background: #f1f5f9; color: var(--deal); }

.site-main { min-height: 40vh; padding-bottom: 1rem; }

/* Home hero */
.home-hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); padding-top: 1.4rem; }
.home-hero-grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 1.2rem; align-items: stretch; }
.hero-card { position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 2.6rem 2.4rem; background: radial-gradient(900px 400px at 12% -10%, rgba(255,255,255,.18), transparent 55%), linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 65%, #475569 100%); box-shadow: var(--shadow-lg); }
.hero-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(480px 260px at 92% 112%, rgba(255,255,255,.16), transparent 60%); pointer-events: none; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); padding: .32rem .75rem; border-radius: 999px; margin-bottom: 1.1rem; }
.hero-card h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 .8rem; letter-spacing: -.025em; line-height: 1.08; max-width: 15ch; }
.hero-card p.lead { color: rgba(255,255,255,.86); font-size: 1.05rem; max-width: 540px; margin-bottom: 1.5rem; }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; }
.hero-cta .btn { background: linear-gradient(135deg, var(--deal), var(--deal-2)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(255,45,85,.35); }
.hero-cta .btn:hover { color: #fff; filter: brightness(1.07); }
.hero-trust { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 2.1rem; font-size: .84rem; color: rgba(255,255,255,.82); }
.hero-trust b { display: block; font-size: .98rem; color: #fff; font-weight: 800; }

/* Flash panel */
.flash-panel { background: linear-gradient(180deg, #fff0f4 0%, #fff 55%); border: 1px solid #ffd6e0; border-radius: 20px; padding: 1.1rem 1.1rem 1.2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.flash-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }
.flash-panel-head h2 { font-size: 1.05rem; margin: 0; letter-spacing: -.01em; }
.countdown { font-size: .8rem; font-weight: 700; color: var(--deal); display: flex; align-items: center; gap: 2px; }
.cd-box { display: inline-block; background: var(--deal); color: #fff; min-width: 24px; text-align: center; border-radius: 6px; padding: 2px 4px; font-variant-numeric: tabular-nums; }
.flash-list { display: flex; flex-direction: column; gap: .55rem; }
.flash-row { display: grid; grid-template-columns: 58px 1fr auto; gap: .7rem; align-items: center; padding: .5rem; border-radius: 12px; transition: .15s; color: var(--text); }
.flash-row:hover { background: #fff; box-shadow: var(--shadow); transform: translateX(2px); }
.flash-thumb { width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #ffe0e8; display: flex; align-items: center; justify-content: center; }
.flash-thumb img { width: 100%; height: 100%; object-fit: cover; }
.flash-info { min-width: 0; }
.flash-name { display: block; font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flash-price { display: flex; align-items: baseline; gap: .4rem; color: var(--deal); font-weight: 800; font-size: .95rem; }
.flash-price del { color: var(--muted); font-weight: 400; font-size: .78rem; }
.flash-bar { display: block; height: 5px; background: #ffe0e8; border-radius: 4px; margin-top: .3rem; overflow: hidden; }
.flash-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--deal), var(--deal-2)); border-radius: 4px; }
.flash-left { display: block; font-size: .7rem; color: var(--deal); font-weight: 600; margin-top: .18rem; }
.flash-off { background: linear-gradient(135deg, var(--deal), var(--deal-2)); color: #fff; font-size: .7rem; font-weight: 800; padding: 4px 7px; border-radius: 8px; align-self: flex-start; margin-top: .3rem; }
.flash-all { margin-top: .8rem; background: linear-gradient(135deg, var(--deal), var(--deal-2)); border: 0; color: #fff; font-weight: 700; }
.flash-all:hover { color: #fff; filter: brightness(1.07); }

/* Mini banners */
.mini-banners { padding: 1.3rem 0 0; }
.mini-banner-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.mini-banner { display: flex; align-items: center; gap: .7rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1rem; color: var(--text); transition: .15s; }
.mini-banner:hover { border-color: var(--deal); box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--text); }
.mini-banner b { display: block; font-size: .9rem; }
.mini-banner span:last-child { font-size: .78rem; color: var(--muted); }
.mini-banner .mb-icon { font-size: 1.4rem; line-height: 1; }
.mb-ship { border-color: #bfdbfe; background: #f0f9ff; }
.mb-new { border-color: #fde68a; background: #fffbeb; }
.mb-cod { border-color: #bbf7d0; background: #f0fdf4; }
.mb-b2b { border-color: #ddd6fe; background: #f5f3ff; }
.mb-ship:hover, .mb-new:hover, .mb-cod:hover, .mb-b2b:hover { border-color: var(--deal); }
.mb-icon { font-size: 1.5rem; line-height: 1; }

/* Page head / breadcrumbs */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1.7rem 0 1.5rem; }
.page-head h1 { margin: 0; font-size: 1.65rem; letter-spacing: -.01em; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--deal); }
.page-hero { width: 100%; max-height: 340px; object-fit: cover; display: block; }
.page-block { padding: 2rem 0 3rem; }
.page-block h1 { margin-bottom: 1rem; }
.prose { line-height: 1.7; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.3rem; }
.prose h2, .prose h3 { margin-top: 1.5rem; }
.lead { font-size: 1.1rem; color: #334155; }

/* FAQ accordion */
.faq-accordion { max-width: 820px; }
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: .65rem; background: var(--surface); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: .9rem 1.1rem; font-weight: 600; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; transition: color .15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.faq-item summary:hover { color: var(--deal); }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-item[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq-body { padding: .9rem 1.1rem 1rem; line-height: 1.7; color: #334155; }
.faq-accordion h2 { margin: 0 0 1.2rem; font-size: 1.4rem; }

/* Home sections */
.home-section { padding: 2.4rem 0 1rem; }
.home-section + .home-section { padding-top: 2rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.section-head h2 { font-size: 1.4rem; letter-spacing: -.02em; margin: 0; }
.bolt { color: var(--deal-2); }
.flash-deals { background: linear-gradient(180deg, #fff1f2, transparent); }
.flash-deals .horiz-scroll:not(:empty) { padding-bottom: 1.2rem; }
.horiz-scroll { display: flex; gap: .9rem; overflow-x: auto; padding: 1rem .15rem 1.2rem; scroll-snap-type: x mandatory; }
.horiz-scroll::-webkit-scrollbar { height: 8px; }
.horiz-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.horiz-scroll .product-card { min-width: 224px; scroll-snap-align: start; }

/* Related / recently viewed grids (4-up desktop, 2-up tablet/mobile) */
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 240px)); gap: .95rem; padding: 1rem 0 1.4rem; }
.related-grid .product-card { min-width: 0; }
.related-grid .product-title { font-size: .84rem; }
@media (max-width: 900px) { .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; } }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; padding: 1.2rem 0 1.6rem; }
.cat-card { display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; color: var(--text); font-weight: 600; transition: .16s ease; }
.cat-card:hover { border-color: var(--deal); color: var(--text); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.cat-icon { width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center; background: #f4f6f8; border-radius: 50%; font-size: 1.35rem; }
.cat-card:hover .cat-icon { background: #fff0f4; }
.cat-text { min-width: 0; }
.cat-name { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-meta { display: block; font-size: .76rem; color: var(--muted); font-weight: 500; }
.cat-arrow { margin-left: auto; color: var(--muted); transition: .15s; }
.cat-card:hover .cat-arrow { color: var(--deal); transform: translateX(3px); }
@media (max-width: 1024px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Product grid + cards (marketplace style) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .95rem; padding: 1.5rem 0 2.6rem; }
.section-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .95rem; padding: 1.5rem 0 2.6rem; }
.section-grid .product-card { min-width: 0; }
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s, border-color .2s; }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #d5dbe5; }
.thumb-wrap { position: relative; }
.product-thumb { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; background: #f4f6f8; overflow: hidden; position: relative; border-bottom: 1px solid var(--border); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-thumb img { transform: scale(1.06); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .placeholder { color: var(--muted); font-size: 2rem; }
.sale-tag { position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, var(--deal), var(--deal-2)); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .02em; padding: 4px 8px; border-radius: 7px; box-shadow: 0 3px 8px rgba(255,45,85,.35); }
.hot-tag { position: absolute; top: 8px; left: 8px; background: var(--accent); color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: 7px; }
.sale-tag + .hot-tag { top: auto; bottom: 8px; left: 8px; }
.soldout-tag { position: absolute; top: 8px; right: 8px; background: rgba(15,23,42,.72); backdrop-filter: blur(4px); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.product-body { padding: .7rem .85rem .85rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.product-rating { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .78rem; }
.product-rating small { font-size: .76rem; }
.sold-count { color: var(--muted); font-size: .76rem; }
.product-title { font-weight: 500; font-size: .88rem; line-height: 1.35; min-height: 2.4em; margin: 0; }
.product-title a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-title a:hover { color: var(--deal); }
.product-price { display: flex; align-items: baseline; gap: .5rem; font-size: 1.02rem; }
.product-price del { color: var(--muted); font-size: .82rem; }
.product-price strong { color: var(--deal); font-weight: 800; letter-spacing: -.01em; }
.product-actions { margin-top: auto; padding-top: .5rem; }
.pc-add { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; background: var(--accent); border: 0; color: #fff; border-radius: 9px; padding: .5rem .8rem; font-size: .84rem; font-weight: 700; cursor: pointer; transition: .15s; }
.pc-add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.pc-add:hover { background: var(--deal); }
.pc-add-off { background: #f1f5f9; color: var(--muted); cursor: default; }
.thumb-wish { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); border: 1px solid rgba(15,23,42,.08); box-shadow: 0 2px 8px rgba(15,23,42,.12); opacity: 0; transition: .15s; }
.product-card:hover .thumb-wish, .thumb-wish.active { opacity: 1; }
.wish-btn { width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; color: var(--muted); transition: .15s; }
.wish-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.wish-btn:hover { border-color: var(--danger); color: var(--danger); }
.wish-btn.active { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.wish-btn.active svg { fill: var(--danger); }
.price { font-weight: 700; font-size: 1.02rem; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .85rem; }
.out-of-stock-msg { color: var(--danger); font-size: .8rem; font-weight: 600; }
.badge-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.badge { display: inline-block; font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-warn { background: #fffbeb; color: #92400e; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-info { background: #eff6ff; color: #1e40af; }
.badge-accent { background: var(--accent); color: #fff; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: #f59e0b; font-size: 13px; letter-spacing: 1px; }

/* Service bar */
.service-bar { background: var(--surface); border-top: 1px solid var(--border); margin-top: 2.6rem; padding: 1.6rem 0; }
.service-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.service-item { display: flex; align-items: center; gap: .7rem; font-size: .85rem; color: var(--muted); }
.service-item span { font-size: 1.5rem; }
.service-item b { display: block; color: var(--text); font-size: .92rem; }

/* Shop page */
.shop-layout { display: grid; grid-template-columns: 230px 1fr; gap: 1.5rem; padding: 1.5rem 0 2.4rem; align-items: start; }
@media (max-width: 860px) { .shop-layout { grid-template-columns: 1fr; } }
.shop-filters .filters, .shop-filters .filters-body { display: block; }
.filters, .filters-body { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem; height: fit-content; position: sticky; top: 150px; min-width: 0; overflow: hidden; }
.filters select, .filters-body select, .filters input, .filters-body input { max-width: 100%; box-sizing: border-box; }
.range-row input[type="number"] { flex: 1; min-width: 0; width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; background: #fff; }
.shop-per { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.shop-per select { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: .88rem; }
.shop-main { min-width: 0; }
.filters h4 { font-size: .8rem; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; margin-bottom: .7rem; }
.filter-group { padding: .55rem 0; border-bottom: 1px solid #f1f5f9; display: block; }
.filter-group:last-child { border-bottom: 0; }
.filter-group label { display: flex; align-items: center; gap: .45rem; font-size: .9rem; padding: .18rem 0; cursor: pointer; }
.filter-group > span { display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .4rem; }
.range-row { display: flex; gap: .5rem; align-items: center; font-size: .85rem; }
.filters-open, .filters-close, .filters-scrim { display: none; }
.shop-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.shop-count { color: var(--muted); font-size: .9rem; }
.shop-sort { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.toolbar { margin-bottom: 1rem; }
@media (max-width: 860px) {
  .filters-open { display: inline-flex; }
  .shop-filters { position: fixed; inset: 0 auto 0 0; width: min(82vw, 300px); background: var(--surface); z-index: 80; transform: translateX(-105%); transition: transform .22s ease; overflow-y: auto; padding: 1rem; }
  .shop-filters.open { transform: translateX(0); }
  .shop-filters .filters, .shop-filters .filters-body { border: 0; position: static; top: auto; padding: 0; }
  .filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
  .filters-close { display: inline-flex; }
  .filters-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 70; }
  .filters-scrim.show { display: block; }
}

/* Product single */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; padding: 1.8rem 0 2.4rem; align-items: start; }
@media (max-width: 860px) { .product-page { grid-template-columns: 1fr; } }
.product-gallery { position: relative; }
.gallery-main { aspect-ratio: 1/1; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .55rem; margin-top: .7rem; flex-wrap: wrap; }
.g-thumb { width: 68px; height: 68px; padding: 0; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; transition: .15s; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-thumb.active { border-color: var(--deal); box-shadow: 0 0 0 3px rgba(255,45,85,.18); }
.product-info h1 { font-size: 1.7rem; letter-spacing: -.01em; margin: 0 0 .4rem; }
.product-info .crumbs { margin-bottom: 1rem; }
.product-sku { color: var(--muted); font-size: .85rem; margin: 0 0 .9rem; }
.product-rating-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .88rem; margin-bottom: .9rem; }
.product-price-lg { display: flex; align-items: baseline; gap: .6rem; font-size: 1.9rem; font-weight: 900; margin-bottom: 1rem; letter-spacing: -.02em; }
.product-price-lg del { color: var(--muted); font-weight: 500; font-size: 1.05rem; }
.product-price-lg .sale-price { color: var(--deal); }
.product-price-lg .price-from { color: var(--muted); font-size: .92rem; font-weight: 500; }
.product-price-lg .price-range { color: var(--deal); }
.product-price-lg .price-var-sel { color: var(--deal); }
.gallery-main img { cursor: zoom-in; }

/* Product image lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(8, 10, 14, .92); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.lightbox[hidden] { display: none !important; }
.lightbox img { max-width: 94vw; max-height: 94vh; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox-close, .lightbox-nav { position: absolute; border: 0; cursor: pointer; color: #fff; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); }
.lightbox-close { top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; font-size: 1.5rem; line-height: 1; }
.lightbox-close:hover { background: rgba(255, 255, 255, .25); }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; font-size: 2rem; line-height: 1; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-nav:hover { background: rgba(255, 255, 255, .25); }
body.lightbox-open { overflow: hidden; }
@media (max-width: 600px) {
  .lightbox { padding: .4rem; }
  .lightbox img { max-width: 98vw; max-height: 96vh; }
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-close { top: 10px; right: 10px; }
}
.product-short { color: #334155; margin-bottom: 1.2rem; }
.product-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; border-top: 1px solid var(--border); margin-top: 1.2rem; padding-top: 1rem; color: var(--muted); font-size: .9rem; }
.product-meta strong { color: var(--text); }

/* Variations */
.variations { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.1rem; }
.var-group { display: block; }
.var-group > span { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .4rem; }
.var-options { display: flex; gap: .5rem; flex-wrap: wrap; }
.var-option { border: 1.5px solid var(--border); background: #fff; padding: .48rem 1rem; border-radius: 9px; cursor: pointer; font-size: .9rem; font-weight: 500; color: var(--text); transition: .15s; }
.var-option:hover { border-color: var(--deal); }
.var-option.is-selected { border-color: var(--deal); background: var(--deal); color: #fff; box-shadow: 0 3px 10px rgba(255,45,85,.28); }
.var-option.var-color { width: 40px; height: 40px; padding: 0; border-radius: 50%; position: relative; display: inline-flex; align-items: center; justify-content: center; }
.var-option.var-color::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--swatch, #ccc); border: 1px solid rgba(0,0,0,.12); }
.var-option.var-color.is-selected { border-color: var(--deal); box-shadow: 0 0 0 3px rgba(255,45,85,.25); }

.qty-row { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.qty-row label { font-weight: 600; font-size: .88rem; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.qty-stepper button { width: 38px; height: 40px; border: 0; background: var(--surface); font-size: 1.1rem; cursor: pointer; color: var(--text); transition: .15s; }
.qty-stepper button:hover { background: #f1f5f9; color: var(--deal); }
.qty-stepper input { width: 54px; height: 40px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; font-size: .95rem; }
.stock-state { color: var(--success); font-size: .88rem; font-weight: 600; }
.buy-row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.buy-row .btn-accent { background: linear-gradient(135deg, var(--deal), var(--deal-2)); border-color: transparent; }
.buy-row .btn-accent:hover { filter: brightness(1.07); box-shadow: 0 8px 20px rgba(255,45,85,.3); }
.buy-note { color: var(--muted); font-size: .85rem; margin-top: .9rem; }
.buy-form { margin-bottom: 1.1rem; }
.buy-form .buy-row .add-to-cart { flex: 1; justify-content: center; }
.product-name { font-size: 1.7rem; letter-spacing: -.01em; margin: 0 0 .4rem; }
.sale-tag-lg { top: 14px !important; left: 14px !important; font-size: .85rem !important; padding: 7px 12px !important; }

/* Tabs (front) */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab { border: 0; background: none; padding: .65rem 1.05rem; cursor: pointer; font-size: .95rem; color: var(--muted); border-bottom: 2px solid transparent; transition: .15s; }
.tab:hover { color: var(--deal); }
.tab.active, .tab.is-active { color: var(--deal); border-bottom-color: var(--deal); font-weight: 600; }
a.tab { text-decoration: none; }
.tab-panel { padding: 1.35rem 0; }
.tab-panel[hidden] { display: none; }
.product-section { padding: 1.2rem 0 1.6rem; }

/* Reviews */
.review { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.review-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.review-head strong { font-size: .95rem; }
.review-date { color: var(--muted); font-size: .8rem; margin-left: auto; }
.review-title { font-weight: 600; margin: .4rem 0 .2rem; }
.review-form { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem; margin-top: 1.2rem; max-width: 560px; }
.review-form h3 { font-size: 1rem; margin-bottom: .6rem; }
.rating-input { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; font-size: .9rem; }
.star-select { display: inline-flex; flex-direction: row-reverse; }
.star-select input { display: none; }
.star-select label { font-size: 1.4rem; color: #cbd5e1; cursor: pointer; transition: color .1s; }
.star-select label:hover, .star-select label:hover ~ label, .star-select input:checked ~ label { color: #f59e0b; }

/* Cart */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; padding: 1.5rem 0 2.4rem; align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-main { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .2rem 1.2rem; }
.cart-items { display: flex; flex-direction: column; }
.cart-item-row { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.cart-item-row:last-child { border-bottom: 0; }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; align-items: center; }
.cart-thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #f8fafc; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-body { min-width: 0; }
.cart-item-name { font-weight: 600; font-size: .98rem; }
.cart-item-name a { color: var(--text); }
.cart-item-name a:hover { color: var(--deal); }
.cart-item-attr { color: var(--muted); font-size: .85rem; margin-top: .2rem; }
.cart-item-total { font-weight: 700; font-size: 1rem; }
.cart-remove { color: var(--danger); font-size: .8rem; text-decoration: underline; display: inline-block; margin-top: .3rem; }
.btn-link-danger { border: 0; background: none; cursor: pointer; color: var(--danger); text-decoration: underline; font-size: .85rem; font-weight: 600; padding: 0; }
.btn-link-danger:hover { opacity: .8; }
.btn-link { border: 0; background: none; cursor: pointer; color: var(--accent); text-decoration: underline; font-size: .8rem; font-weight: 600; padding: 0; }
.btn-link:hover { opacity: .8; }
.cart-clear-form { text-align: right; margin-top: .8rem; padding-bottom: 1rem; }
.cart-summary { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.3rem; position: sticky; top: 150px; }
.cart-summary h2 { font-size: 1.1rem; margin-bottom: .8rem; }
.totals-row { display: flex; justify-content: space-between; padding: .4rem 0; font-size: .95rem; }
.totals-row.total { border-top: 2px solid var(--text); margin-top: .5rem; padding-top: .8rem; font-weight: 700; font-size: 1.1rem; }
.totals-row.grand { border-top: 2px solid var(--text); margin-top: .5rem; padding-top: .8rem; font-weight: 700; font-size: 1.1rem; }
.coupon-form { display: flex; gap: .5rem; margin-bottom: .9rem; }
.totals { display: grid; grid-template-columns: 1fr auto; row-gap: .25rem; align-items: baseline; margin: 0; }
.totals dt { color: var(--muted); font-size: .95rem; }
.totals dd { margin: 0; font-weight: 600; font-size: .95rem; text-align: right; }
.totals dd.grand { border-top: 2px solid var(--text); margin-top: .35rem; padding-top: .55rem; font-size: 1.2rem; font-weight: 800; color: var(--text); }
.coupon-row { display: flex; justify-content: space-between; align-items: center; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 9px; padding: .5rem .8rem; font-size: .88rem; margin-bottom: .9rem; }
.coupon-applied { font-weight: 600; }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 1.5rem; padding: 1.5rem 0 2.4rem; align-items: start; }
@media (max-width: 860px) { .checkout-layout { grid-template-columns: 1fr; } }
.checkout-col, .section-block { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.checkout-col > h2:first-child, .section-block h2 { font-size: 1.05rem; margin: 0 0 .9rem; }
.checkout-form { margin: 0; min-width: 0; }
.checkout-summary { position: sticky; top: 150px; }
.radio-card { border: 1px solid var(--border); border-radius: 10px; padding: .85rem 1rem; margin-bottom: .55rem; display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; transition: .15s; }
.radio-card:hover { border-color: #cbd5e1; }
.radio-card input { margin-top: 3px; }
.radio-card.active { border-color: var(--deal); background: #fff7f9; box-shadow: 0 0 0 1px var(--deal); }
.radio-card .title { font-weight: 600; }
.radio-card .desc { color: var(--muted); font-size: .85rem; }
.radio-body { flex: 1; }
.gateway-fields { margin-top: .7rem; display: none; padding-top: .7rem; border-top: 1px dashed var(--border); }
.radio-card.active.selected .gateway-fields { display: block; }
.co-items { border-bottom: 1px solid var(--border); margin-bottom: .6rem; padding-bottom: .4rem; }
.co-items .cart-item { grid-template-columns: 52px 1fr auto; gap: .7rem; padding: .5rem 0; }
.co-items .cart-thumb { width: 52px; height: 52px; }
.order-summary-item { display: flex; justify-content: space-between; font-size: .92rem; padding: .32rem 0; }
.secure-note { color: var(--success); font-size: .85rem; display: flex; align-items: center; gap: .4rem; margin-top: .8rem; }
.order-cta { width: 100%; margin-top: .6rem; }
.order-complete { max-width: 620px; margin: 2.5rem auto; text-align: center; }
.big-check { width: 84px; height: 84px; margin: 0 auto 1.2rem; border-radius: 50%; background: #ecfdf5; border: 1px solid #bbf7d0; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: var(--success); }
.order-table { width: 100%; }
.bank-box { background: #fffbeb; border: 1px dashed #f59e0b; border-radius: 12px; padding: 1rem; text-align: left; }
.bank-details { font-size: .95rem; }
.success-wrap { text-align: center; padding: 2.5rem 1rem; }
.success-icon { width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 50%; background: #ecfdf5; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: var(--success); }
.success-text { font-size: 1.2rem; font-weight: 700; }

/* Account */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; padding: 1.5rem 0 2.4rem; align-items: start; }
@media (max-width: 820px) { .account-layout { grid-template-columns: 1fr; } }
.account-nav { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.account-user { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 1.3rem 1rem 1rem; border-bottom: 1px solid var(--border); text-align: center; }
.account-user .avatar { width: 52px; height: 52px; font-size: 1.25rem; }
.account-user-name { font-weight: 700; font-size: .95rem; }
.account-user-email { color: var(--muted); font-size: .78rem; word-break: break-word; }
.account-links { display: flex; flex-direction: column; padding: .5rem; gap: 2px; }
.account-links a, .account-links button { width: 100%; }
.account-link { display: flex; align-items: center; gap: .65rem; padding: .62rem .8rem; color: var(--text); font-size: .92rem; border: 0; background: none; cursor: pointer; border-radius: 8px; border-bottom: 0 !important; transition: .12s; font-family: inherit; text-align: left; }
.account-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.account-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-nav a { border-bottom: 0; }
.account-nav a:hover, .account-link:hover { background: #f8fafc; color: var(--deal); }
.account-nav a.active, .account-nav a.active:hover { background: var(--accent); color: #fff; font-weight: 600; }
.account-logout { margin-top: .4rem; border-top: 1px solid var(--border); padding-top: .5rem; }
.account-logout button { color: var(--danger); }
.account-main { min-width: 0; }
.stat-grid { display: grid; gap: 1rem; padding: 1.25rem 0; }
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .stat-grid-4, .stat-grid-3 { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem; }
.stat-card strong { display: block; font-size: 1.35rem; }
.stat-card span { color: var(--muted); font-size: .84rem; }

/* Orders, timeline */
.timeline { list-style: none; margin: .5rem 0; padding: 0; }
.timeline li { position: relative; padding: .55rem 0 .55rem 1.4rem; border-left: 3px solid var(--border); margin-left: 4px; font-size: .92rem; }
.timeline li span { color: var(--muted); font-size: .82rem; display: block; }
.timeline li::before { content: ''; position: absolute; left: -6.5px; top: 1.05rem; width: 10px; height: 10px; border-radius: 50%; background: var(--border); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.timeline li:first-child::before { background: var(--deal); border-color: var(--surface); box-shadow: 0 0 0 1px var(--deal); }
.timeline li:first-child strong { color: var(--deal); }

/* Pagination */
.pagination { display: flex; gap: .4rem; justify-content: center; padding: 1.2rem 0; flex-wrap: wrap; }
.admin-pagination { display: flex; align-items: center; justify-content: space-between; gap: .9rem; flex-wrap: wrap; padding: .95rem .1rem .2rem; }
.pagination-info { font-size: .85rem; color: var(--muted); }
.per-page { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.per-page select { width: auto; }
.admin-pagination .pagination { padding: 0; margin-left: auto; }
.pg { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-size: .9rem; color: var(--text); transition: .12s; }
.pg:hover { border-color: var(--deal); color: var(--deal); }
.pg-active { background: var(--deal); border-color: var(--deal); color: #fff; }
.pg-active:hover { color: #fff; }

/* Empty state */
.empty-state { text-align: center; padding: 3.5rem 1rem; background: var(--surface); border: 1px dashed var(--border); border-radius: 16px; grid-column: 1 / -1; }
.empty-state p { color: var(--muted); }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; padding: 1.5rem 0 2.6rem; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: .16s; }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.placeholder-thumb { background: linear-gradient(135deg, #e2e8f0, #f1f5f9); }
.blog-body { padding: 1rem 1.1rem 1.2rem; }
.blog-body h2 { font-size: 1.05rem; }
.blog-date { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.blog-author { color: var(--muted); font-size: .9rem; }
.blog-layout { display: grid; grid-template-columns: 1fr 260px; gap: 2rem; padding: 1.5rem 0 3rem; }
@media (max-width: 860px) { .blog-layout { grid-template-columns: 1fr; } }
.blog-article { background: var(--surface); padding: 1.5rem; border: 1px solid var(--border); border-radius: 16px; }
.blog-hero { width: 100%; border-radius: 12px; margin-bottom: 1rem; }
.blog-recent h3 { font-size: 1rem; }
.recent-link { display: block; padding: .6rem 0; border-bottom: 1px solid var(--border); font-weight: 500; }
.recent-link small { display: block; color: var(--muted); font-weight: 400; }

/* Contact / auth / forms */
.contact-wrap { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.5rem 0 3rem; }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }
.form-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.6rem; }
.form-panel h2, .form-panel h3 { margin-top: 0; }
.contact-info { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-radius: 16px; padding: 1.6rem; }
.contact-info a { color: rgba(255,255,255,.85); }
.contact-info a:hover { color: #fff; }
.contact-map { padding: 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--border); background: #f8fafc; }
.contact-map iframe { width: 100%; height: 380px; min-height: 320px; border: 0; display: block; }
.form-links { display: flex; gap: 1rem; justify-content: space-between; align-items: center; font-size: .88rem; flex-wrap: wrap; }
.inline-form { display: inline-flex; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 3.5rem; padding: 2.8rem 0 1.6rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 2rem; }
.footer-col { min-width: 0; flex: 1 1 180px; }
.footer-col.footer-about { flex: 2 1 260px; }
@media (max-width: 820px) { .footer-col { overflow-wrap: anywhere; } }
.footer-col h4 { font-size: .84rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .8rem; }
.footer-col h4 a.footer-head-link { color: var(--muted); }
.footer-col h4 a.footer-head-link:hover { color: var(--deal); }
.footer-col a { display: block; padding: .22rem 0; color: var(--text); font-size: .92rem; }
.footer-col a:hover { color: var(--deal); }
.footer-about p { color: var(--muted); font-size: .92rem; }
.footer-social { display: flex; gap: .5rem; margin-top: 1rem; }
.social-btn, .footer-social a { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); transition: .15s; background: #fff; }
.social-btn:hover, .footer-social a:hover { border-color: currentColor; background: #fff; transform: translateY(-2px); }
.social-btn svg, .footer-social a svg { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.sb-facebook { color: #1877F2; }
.sb-instagram { color: #E4405F; }
.sb-twitter { color: #000; }
.sb-linkedin { color: #0A66C2; }
.sb-youtube { color: #FF0000; }
.sb-whatsapp { color: #25D366; }
.sb-tiktok { color: #000; }
.newsletter-row { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.newsletter-row input { flex: 1 1 120px; min-width: 0; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 9px; font-size: .9rem; }
.newsletter-row input:focus { outline: none; border-color: var(--deal); box-shadow: 0 0 0 3px rgba(255,45,85,.15); }
.newsletter-row button { border: 0; background: linear-gradient(135deg, var(--deal), var(--deal-2)); color: #fff; padding: .6rem 1.1rem; border-radius: 9px; font-weight: 600; font-size: .9rem; cursor: pointer; transition: .15s; }
.newsletter-row button:hover { filter: brightness(1.07); }
.newsletter-msg { display: block; color: var(--muted); margin-top: .5rem; font-size: .82rem; }
.footer-note { color: var(--muted); font-size: .86rem; margin-top: .8rem; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1.1rem; font-size: .84rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Drawer (mobile nav) */
.drawer-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 60; display: none; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(84vw, 320px); background: var(--surface); z-index: 70; transform: translateX(-105%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); }
.drawer-scrim.show { display: block; }
.drawer-search { padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); }
.drawer-search form { display: flex; gap: .4rem; }
.drawer-search input { flex: 1; padding: .58rem .8rem; border: 1px solid var(--border); border-radius: 9px; font-size: .9rem; }
.drawer-search button { border: 0; background: linear-gradient(135deg, var(--deal), var(--deal-2)); color: #fff; border-radius: 9px; padding: 0 .9rem; font-weight: 600; cursor: pointer; }
.drawer-nav { padding: .5rem 0; overflow-y: auto; flex: 1; }
.drawer-nav > a, .drawer-group > a { display: block; padding: .78rem 1.2rem; color: var(--text); font-weight: 600; border-bottom: 1px solid #f1f5f9; }
.drawer-nav a:hover, .drawer-group a:hover { color: var(--deal); }
.drawer-sub { font-weight: 400 !important; font-size: .9rem; padding-left: 2rem !important; color: var(--muted) !important; }
.drawer-cats { padding: 1rem 1.2rem; border-top: 1px solid var(--border); }
.drawer-cats strong { display: block; font-size: .8rem; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; margin-bottom: .5rem; }
.drawer-cats a { display: block; padding: .35rem 0; color: var(--text); font-size: .92rem; }
.drawer-foot { padding: 1rem 1.2rem 1.4rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .5rem; }
.drawer-account { padding: 1rem 1.2rem; border-top: 1px solid var(--border); }

/* Bottom mobile nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); display: none; z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: .6rem 0 .5rem; font-size: .68rem; color: var(--muted); }
.bottom-nav a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bottom-nav a.active { color: var(--deal); }
.bn-count { position: absolute; top: 2px; right: calc(50% - 16px); background: var(--deal); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 8px; line-height: 1.2; }
.bn-item { position: relative; }

@media (max-width: 960px) {
  .mini-banner-row { grid-template-columns: repeat(2, 1fr); }
  .home-hero-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: repeat(2, 1fr); }
  .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: 1.2rem 0 2rem; }
}
@media (max-width: 820px) {
  .util-bar { display: none; }
  .header-main { flex-wrap: wrap; gap: .7rem; padding: .6rem 0; }
  .header-search { order: 3; flex: 1 0 100%; max-width: none; }
  .header-search select { max-width: 110px; }
  .header-search button span { display: none; }
  .icon-btn.icon-account { display: none; }
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .bottom-nav { display: flex; }
  body { padding-bottom: 64px; }
  .hero-card { padding: 1.8rem 1.4rem; }
  .flash-panel { order: 0; }
}

/* Phone: 2 products per row + tighter rhythm */
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: 1.2rem 0 2rem; }
  .product-body { padding: .6rem .7rem .75rem; }
  .product-title { font-size: .82rem; }
  .product-price { font-size: .95rem; gap: .4rem; }
  .product-price del { font-size: .76rem; }
  .product-rating, .sold-count { font-size: .74rem; }
  .pc-add { font-size: .78rem; padding: .5rem .5rem; }
  .pc-add svg { width: 14px; height: 14px; }
  .page-head { padding: 1.3rem 0 1.2rem; }
  .page-head h1 { font-size: 1.4rem; }
  .product-info h1 { font-size: 1.4rem; }
  .product-price-lg { font-size: 1.55rem; }
  .section-head h2 { font-size: 1.2rem; }
  .hero-card h1 { font-size: 1.7rem; }
  .flash-row { grid-template-columns: 50px minmax(0, 1fr) auto; gap: .55rem; }
  .flash-off { display: none; }
  .shop-toolbar { gap: .6rem; }
  .shop-per { margin-left: auto; }
  .checkout-col, .section-block { padding: 1rem; }
  .cart-main { padding: .2rem .9rem; }
  .invoice-addresses { grid-template-columns: 1fr; }
  .g-thumb { width: 58px; height: 58px; }
  .var-option { padding: .42rem .8rem; font-size: .86rem; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .cat-card { padding: .7rem .9rem; }
}

/* Invoice / print */
.plain-body { background: #fff; }
.invoice { max-width: 760px; margin: 0 auto; padding: 1.5rem; }
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.invoice-addresses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.invoice-addresses h3 { font-size: .8rem; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.invoice-addresses p { font-size: .9rem; margin: 0; }
.invoice-note { font-size: .82rem; color: var(--muted); margin-top: 2rem; }
@page { margin: 2cm; }

/* Errors */
.err-wrap { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; text-align: center; padding: 2rem; }
.err-code { font-size: 5rem; font-weight: 800; color: var(--deal); line-height: 1; }
.err-wrap p { color: var(--muted); max-width: 420px; }

/* ---- ADMIN ---- */
.admin-body { background: #eef0f3; }
.admin-wrap { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: #16181d; color: #e5e7eb; display: flex; flex-direction: column; padding: 1rem .8rem; position: sticky; top: 0; height: 100vh; }
.admin-brand { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem 1rem; color: #fff; font-weight: 800; font-size: 1.05rem; }
.admin-brand img { max-height: 32px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.admin-nav-group { padding: .9rem .7rem .25rem; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #64748b; }
.admin-nav-group:first-child { padding-top: .2rem; }
.admin-nav-item { display: flex; align-items: center; gap: .6rem; color: #cbd5e1; font-size: .9rem; padding: .52rem .7rem; border-radius: 8px; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; }
.admin-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.admin-sidebar-foot { border-top: 1px solid rgba(255,255,255,.12); padding-top: .6rem; margin-top: .6rem; }
.admin-nav-logout { color: #fca5a5; }
.admin-nav-toggle { display: none; }
.admin-sidebar-back { display: none; }
.admin-sidebar-back + .admin-nav-scrim { display: none; }
.admin-stage { padding: 0 1.25rem 2rem; min-width: 0; }
.admin-topbar { display: flex; align-items: center; gap: .8rem; padding: .9rem 0; position: sticky; top: 0; background: #eef0f3; z-index: 30; }
.admin-page-title { font-size: 1.15rem; margin: 0; }
.admin-topbar-right { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.admin-user { display: flex; align-items: center; gap: .5rem; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.admin-user-name { font-weight: 600; font-size: .9rem; }
.admin-content { padding-top: .6rem; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
.filter-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
/* Keep the search box, filter dropdowns and the Filter button on one line. */
.filter-form-row { flex-wrap: nowrap; }
.filter-form-row > .input { flex: 0 1 auto; min-width: 0; }
.filter-form-row > input[type="search"] { flex: 1 1 220px; }
.filter-form-row > .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 720px) {
    .filter-form-row { flex-wrap: wrap; }
    .filter-form-row > input[type="search"] { flex: 1 1 100%; }
}
.toolbar-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.table-head-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 1rem; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--border); }
.btn-group { display: inline-flex; gap: .5rem; }
.admin-plain { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(180deg, #1f2937, #111827); padding: 1.5rem; }
.admin-plain-center { width: min(400px, 100%); }
.admin-plain-center .panel { box-shadow: var(--shadow-lg); border: 0; }
.admin-plain-foot { text-align: center; margin-top: 1rem; color: #9ca3af; font-size: .88rem; }
.admin-plain-foot a { color: #d1d5db; }

/* Admin responsive */
@media (max-width: 860px) {
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 80; transform: translateX(-105%); transition: transform .22s ease; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-nav-toggle { display: inline-flex; }
  .admin-sidebar-back { display: flex; align-items: center; justify-content: center; position: absolute; top: 0; right: 0; width: 44px; height: 44px; color: #fff; font-size: 1.4rem; cursor: pointer; }
  .admin-nav-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 70; display: none; }
  .admin-nav-scrim.show { display: block; }
}
.admin-content > h3:first-child { margin-top: 0; }

/* Admin data styles */
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid #ddd; }
.low-stock { color: var(--danger); font-weight: 700; }
.addr { font-size: .9rem; line-height: 1.6; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.order-meta p { margin: 0; }
.code { background: #f3f4f6; border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-size: .85em; }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 180px; padding-top: 1rem; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.chart-bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, var(--deal), var(--deal-2)); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; }
.chart-col span { font-size: .6rem; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; writing-mode: vertical-rl; transform: rotate(180deg); height: 34px; }
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.activity-action { font-weight: 600; }
.activity-meta { display: block; color: var(--muted); font-size: .8rem; }
.kv-list { list-style: none; margin: 0; padding: 0; }
.kv-list li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.kv-list dt { color: var(--muted); font-weight: 500; }
.kv-list dd { margin: 0; font-weight: 600; }

/* Media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .8rem; margin-top: 1rem; }
.media-grid-lg { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.media-item, .media-tile { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.media-item img, .media-tile img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.media-tile { cursor: pointer; }
.media-tile:hover { border-color: var(--accent); }
.media-file { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .8rem; }
.media-file-lg { aspect-ratio: auto; min-height: 90px; }
.media-item-actions { display: flex; flex-direction: column; gap: .3rem; padding: .45rem; }
.media-name { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone { border: 2px dashed var(--border); border-radius: 12px; text-align: center; padding: 1.6rem; cursor: pointer; }
.dropzone.hover { border-color: var(--accent); background: #f9fafb; }
.media-picker { padding: .6rem; background: #fff; }
.media-picker-bar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.upload-form { display: inline-flex; }

/* Modals */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 14px; padding: 1.4rem; max-width: 520px; width: 100%; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-box-lg { max-width: 860px; }
.modal-close { position: absolute; top: 10px; right: 12px; font-size: 1.4rem; border: 0; background: none; cursor: pointer; color: var(--muted); }

/* Attributes / galleries */
.attr-box { border: 1px solid var(--border); border-radius: 10px; padding: .7rem 1rem; margin-bottom: .6rem; background: #fff; }
.attr-terms { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .5rem; }
.checkbox-term { font-size: .84rem; }
.attr-list { display: flex; flex-direction: column; gap: 2px; }
.attr-list-row { display: flex; align-items: center; gap: .5rem; }
.attr-list-row .attr-list-item { flex: 1; min-width: 0; }
.attr-del-form { margin: 0; white-space: nowrap; }
.attr-list-item { display: flex; justify-content: space-between; align-items: center; padding: .6rem .8rem; border-radius: 8px; color: var(--text); font-size: .92rem; }
.attr-list-item small { color: var(--muted); }
.attr-list-item.is-active { background: var(--accent); color: #fff; }
.attr-list-item.is-active small { color: #d1d5db; }
.gallery-manager { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gallery-tile { position: relative; width: 104px; }
.gallery-tile img { width: 104px; height: 104px; object-fit: cover; border: 1px solid var(--border); border-radius: 10px; display: block; }
.gallery-tile-actions { display: flex; justify-content: space-between; align-items: center; gap: .3rem; margin-top: .3rem; font-size: .75rem; }
.import-col label { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); min-width: 120px; }
.import-cell { font-size: .8rem; color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-form { background: #f9fafb; border: 1px solid var(--border); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.perm-group h4 { font-size: .8rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.perm-group { margin-bottom: 1rem; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.notif-list .notif-unread { background: #f8fafc; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
.review-block { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.review-block-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.review-title { font-weight: 600; }
.drag-handle { cursor: grab; color: var(--muted); }
.menu-row td { vertical-align: middle; }

/* Payment gateways */
.gw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.gw-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.gw-settings { border-top: 1px dashed var(--border); padding-top: .6rem; margin-top: .6rem; }

/* Product form: open attribute input */
.attr-divider { border: 0; border-top: 1px dashed var(--border); margin: 1.3rem 0 1rem; }
.attr-create h4 { font-size: .88rem; margin: .4rem 0 .55rem; }
.attr-add-row { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; margin-bottom: .4rem; }
.attr-add-row .input { flex: 1; min-width: 220px; width: auto; }
.attr-add-row .btn { white-space: nowrap; }
@media (max-width: 700px) { .attr-add-row .input { min-width: 100%; flex: 1 0 100%; } }

/* Emoji picker */
.emoji-picker { position: fixed; z-index: 10000; width: 320px; max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 34px rgba(2,6,23,.16); padding: .55rem; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-picker[hidden] { display: none; }
.emoji-tile { border: 0; background: none; font-size: 1.15rem; line-height: 1; padding: .32rem; border-radius: 6px; cursor: pointer; }
.emoji-tile:hover { background: #f1f5f9; }