:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #767676;
  --line: #e7e7e7;
  --soft: #f7f7f8;
  --accent: #111111;
  --sale: #e60023;
  --star: #ffb800;
  --radius: 10px;
  --max: 1240px;
  --shadow: 0 8px 30px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.container { width: 95%; max-width: none; margin: 0 auto; }
.hidden { display: none !important; }

/* promo bar */
.promo { background: #111; color: #fff; font-size: 11px; letter-spacing: .5px; text-align: center; padding: 6px 10px; }
.promo b { color: #ffd166; }

/* header */
header.top { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(0,0,0,.03); }
.top-bar { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.logo { font-weight: 900; font-size: 22px; letter-spacing: -1px; line-height: 1; }
.logo span { color: var(--sale); }
.search { flex: 1; min-width: 180px; position: relative; }
.search input {
  width: 100%; padding: 9px 40px 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--soft); outline: none; font-size: 13.5px;
}
.search input:focus { border-color: #bbb; background: #fff; }
.search button {
  position: absolute; right: 3px; top: 3px; bottom: 3px; width: 34px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; display: grid; place-items: center; font-size: 16px;
}
.icon-links { display: flex; align-items: center; gap: 18px; }
.icon-link { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: #333; cursor: pointer; position: relative; background: none; border: 0; padding: 0; }
.icon-link .ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.icon-link .ico svg, .search button svg { width: 20px; height: 20px; display: block; }
.search button svg { width: 18px; height: 18px; }
.icon-link:hover { color: var(--sale); }
.cart-badge {
  position: absolute; top: -4px; right: -8px; background: var(--sale); color: #fff; font-size: 10px;
  min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; font-weight: 700;
}
.cat-nav { border-top: 1px solid var(--line); }
.cat-nav .container { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.cat-nav .container::-webkit-scrollbar { display: none; }
.cat-nav a { padding: 9px 0; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: #333; border-bottom: 2px solid transparent; transition: color .15s; }
.cat-nav a:hover, .cat-nav a.active { color: var(--sale); border-color: var(--sale); }

/* sections */
main { padding: 18px 0 70px; }
.section { margin: 24px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; font-weight: 800; }
.section-head h2 .fire { color: var(--sale); }
.section-head a { font-size: 13px; color: var(--muted); }
.section-head a:hover { color: var(--text); }

/* hero */
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.hero .big {
  position: relative; border-radius: 14px; overflow: hidden; min-height: 260px; color: #fff;
  background:
    linear-gradient(90deg, rgba(8,8,10,.84) 0%, rgba(8,8,10,.38) 55%, rgba(8,8,10,.6) 100%),
    url('/uploads/hero-big.webp') center/cover no-repeat,
    linear-gradient(120deg,#111,#c2183a);
  display: flex; flex-direction: column; justify-content: center; padding: 40px;
}
.hero .big h1, .hero .big p { text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.hero .big h1 { font-size: clamp(24px,3.4vw,38px); line-height: 1.05; margin: 0 0 10px; letter-spacing: -1.2px; }
.hero .big p { margin: 0 0 22px; opacity: .85; max-width: 420px; }
.hero .side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.hero .tile { border-radius: 14px; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; min-height: 124px; }
.hero .tile:nth-child(1) { background: linear-gradient(160deg, rgba(175,0,45,.72), rgba(60,0,15,.55)), url('/uploads/hero-tile1.webp') center/cover no-repeat, #af002d; }
.hero .tile:nth-child(2) { background: linear-gradient(160deg, rgba(20,30,120,.72), rgba(0,40,80,.6)), url('/uploads/hero-tile2.webp') center/cover no-repeat, #1488cc; }
.hero .tile b { font-size: 18px; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.hero .tile span { font-size: 12px; opacity: .85; }

/* category chips */
.chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; white-space: nowrap; cursor: pointer; font-size: 13px; color: #333; }
.chip:hover, .chip.active { background: #111; color: #fff; border-color: #111; }

/* product grid */
.grid { display: grid; gap: 16px 12px; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); align-items: start; }
@media (max-width: 1080px) { .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); } }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero .side { grid-template-rows: none; grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px 8px; } .hero .side { grid-template-columns: 1fr; } .top-bar { gap: 10px; } .icon-link span.label { display: none; } }

.card { position: relative; cursor: pointer; }
.card .thumb { position: relative; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; background: var(--soft); transition: box-shadow .2s; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .thumb img { transform: scale(1.04); }
.card:hover .thumb { box-shadow: 0 6px 20px rgba(0,0,0,.09); }
.badge { position: absolute; top: 6px; left: 6px; background: var(--sale); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 5px; }
.badge.sold-out { background: #666; }
.fav-btn {
  position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.94); display: grid; place-items: center; cursor: pointer; color: #333;
}
.fav-btn svg { width: 15px; height: 15px; }
.fav-btn.on svg { fill: var(--sale); stroke: var(--sale); }
.fav-btn.on { color: var(--sale); }
.card .info { padding: 7px 2px 0; }
.card .name { font-size: 12px; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 31px; }
.card .price-row { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.card .price { font-size: 14px; font-weight: 800; }
.card .price.sale { color: var(--sale); }
.card .was { font-size: 11px; color: #a0a0a0; text-decoration: line-through; }
.card .meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 10px; color: var(--muted); }
.stars { color: var(--star); letter-spacing: -.5px; }
.card .quick { margin-top: 5px; }
.add-mini { width: 100%; border: 1px solid #111; background: #fff; color: #111; border-radius: 6px; padding: 5px; font-size: 11px; font-weight: 700; cursor: pointer; }
.add-mini:hover { background: #111; color: #fff; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.empty .big-emoji { font-size: 46px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid #ddd; background: #fff; color: #111; cursor: pointer; font-weight: 700; font-size: 14px; transition: .15s; }
.btn:hover { background: #f3f3f3; }
.btn.primary { background: #111; color: #fff; border-color: #111; }
.btn.primary:hover { background: #000; }
.btn.sale { background: var(--sale); border-color: var(--sale); color: #fff; }
.btn.ghost { border-color: #ddd; background: #fff; }
.btn.small { padding: 7px 12px; font-size: 12px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; display: block; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* product detail */
.pd { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 40px; margin-top: 10px; }
@media (max-width: 820px) { .pd { grid-template-columns: 1fr; gap: 22px; } }
.gallery .main-img { border-radius: 14px; overflow: hidden; background: var(--soft); aspect-ratio: 3/4; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.thumbs img.active { border-color: #111; }
.pd-info h1 { font-size: 24px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.4px; }
.brand-line { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.pd-price { display: flex; align-items: baseline; gap: 12px; margin: 14px 0; }
.pd-price .now { font-size: 30px; font-weight: 900; color: var(--sale); }
.pd-price .was { font-size: 15px; color: #aaa; text-decoration: line-through; }
.pd-price .off { background: #ffe9ec; color: var(--sale); font-weight: 800; font-size: 13px; padding: 2px 8px; border-radius: 6px; }
.rating-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.opt-group { margin: 16px 0; }
.opt-group .lbl { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: block; }
.opt-list { display: flex; gap: 8px; flex-wrap: wrap; }
.opt { border: 1px solid #ccc; background: #fff; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 13px; }
.opt.active { border-color: #111; background: #111; color: #fff; }
.qty { display: inline-flex; align-items: center; border: 1px solid #ccc; border-radius: 8px; overflow: hidden; }
.qty button { width: 38px; height: 40px; border: 0; background: #fff; cursor: pointer; font-size: 18px; }
.qty span { min-width: 44px; text-align: center; font-weight: 700; }
.buy-row { display: flex; gap: 10px; margin-top: 20px; }
.buy-row .btn { flex: 1; padding: 14px; }
.seller-box { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.seller-box .nm { font-weight: 700; }
.seller-box .sub { font-size: 12px; color: var(--muted); }
.pd-desc { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 20px; }
.pd-desc h3 { margin: 0 0 10px; font-size: 16px; }
.pd-desc p { white-space: pre-wrap; color: #444; line-height: 1.7; }

/* reviews */
.reviews { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.rev-summary { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.rev-summary .big-num { font-size: 42px; font-weight: 900; }
.rev-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.rev-item .head { display: flex; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.rev-item .head b { font-weight: 700; }
.rev-form { margin-top: 16px; background: var(--soft); border-radius: 12px; padding: 16px; }
.rev-form textarea { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 10px; min-height: 70px; resize: vertical; margin-top: 8px; }
.star-pick { display: flex; gap: 4px; font-size: 24px; cursor: pointer; }
.star-pick span { color: #ddd; }
.star-pick span.on { color: var(--star); }

/* cart drawer */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: .2s; z-index: 60; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: #fff; z-index: 70; transform: translateX(100%); transition: transform .25s; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 18px; }
.drawer-body { flex: 1; overflow: auto; padding: 8px 18px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 18px; }
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 70px; height: 88px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.cart-line .grow { flex: 1; min-width: 0; }
.cart-line .t { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-line .v { font-size: 12px; color: var(--muted); margin: 3px 0; }
.cart-line .p { font-weight: 800; }
.cart-line .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0; }
.mini-qty { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; margin-top: 6px; }
.mini-qty button { width: 26px; height: 26px; border: 0; background: #fff; cursor: pointer; }
.mini-qty span { min-width: 28px; text-align: center; font-size: 13px; }
.subtotal-row { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 12px; }
.subtotal-row b { font-size: 20px; }

/* pages / forms */
.page-wrap { max-width: 940px; margin: 0 auto; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 12px; font-weight: 700; color: #444; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid #ddd; border-radius: 9px; background: #fff; color: #111; outline: none; font: inherit;
}
input:focus, textarea:focus, select:focus { border-color: #111; }
textarea { resize: vertical; min-height: 90px; }
.msg { padding: 11px 14px; border-radius: 10px; font-size: 13px; display: none; margin-bottom: 16px; }
.msg.show { display: block; }
.msg.error { background: #fdecef; color: #b3122f; border: 1px solid #f7c9d2; }
.msg.ok { background: #eafaf0; color: #137a3c; border: 1px solid #bdeccd; }
.tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.tabs .btn.active { background: #111; color: #fff; border-color: #111; }
.auth-wrap { max-width: 440px; margin: 30px auto; }

/* checkout */
.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 820px) { .checkout-grid { grid-template-columns: 1fr; } }
.summary-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary-item img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; }
.summary-item .grow { flex: 1; }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.summary-line.total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }

/* orders */
.order-card { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; overflow: hidden; }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: var(--soft); font-size: 13px; flex-wrap: wrap; }
.status-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #fff3d6; color: #8a6100; }
.status-pill.shipped { background: #e3f0ff; color: #1a5fb4; }
.order-items { padding: 6px 16px 12px; }
.order-line { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-line:last-child { border-bottom: 0; }
.order-line img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--soft); }

/* seller dashboard */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2,1fr); } }
.filter-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 14px; }
.filter-grid input, .filter-grid select { width: 100%; }
.attr-block { margin-top: 18px; }
.attr-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.attr-table th { text-align: left; font-size: 12px; color: #666; font-weight: 700; width: 40%; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--soft); }
.attr-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.status-pill.draft { background: #eee; color: #555; }
.status-pill.sold { background: #fdecef; color: #b3122f; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: 12px; color: #666; padding: 8px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table img { width: 44px; height: 54px; object-fit: cover; border-radius: 6px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); font-size: 13px; }
.mini-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mini-item { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.mini-item img, .mini-item .ph { width: 54px; height: 66px; border-radius: 8px; object-fit: cover; background: var(--soft); display: grid; place-items: center; font-size: 22px; }
.mini-item .grow { flex: 1; min-width: 0; }
.mini-item .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item .grow span { color: var(--muted); font-size: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
h1.page { font-size: 26px; letter-spacing: -.5px; margin: 8px 0 20px; }
.steps { display: flex; gap: 10px; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.steps b { color: #111; }
.drawer-close { background: none; border: 0; font-size: 26px; cursor: pointer; line-height: 1; }


/* ================= MOTION & POLISH ================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes kenburns { 0% { transform: scale(1) translate(0,0); } 100% { transform: scale(1.1) translate(-1%, -1%); } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.4); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes rippleAnim { to { transform: scale(2.6); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glowMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* hero real photo + ken burns */
.hero .big { position: relative; isolation: isolate; background: linear-gradient(120deg, #111, #c2183a); }
.hero .big::before {
  content: ''; position: absolute; inset: -8%; z-index: -1;
  background:
    linear-gradient(90deg, rgba(8,8,10,.86) 0%, rgba(8,8,10,.38) 55%, rgba(8,8,10,.62) 100%),
    url('/uploads/hero-big.webp') center/cover no-repeat;
  animation: kenburns 22s ease-in-out infinite alternate;
}
.hero .big::after {
  content: ''; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; z-index: -1;
  background: radial-gradient(circle, rgba(230,0,35,.55), transparent 65%);
  filter: blur(10px); animation: floaty 7s ease-in-out infinite;
}
.hero .big h1 { animation: fadeUp .7s .05s both; }
.hero .big p { animation: fadeUp .7s .15s both; }
.hero .big .btn { animation: fadeUp .7s .25s both; }
.hero .big > div:first-child { animation: fadeIn .8s both; }
.hero .tile { transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s; }
.hero .tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.18); }

/* cards entrance */
.grid > .card { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
.grid > .card:nth-child(1) { animation-delay: .02s; }
.grid > .card:nth-child(2) { animation-delay: .05s; }
.grid > .card:nth-child(3) { animation-delay: .08s; }
.grid > .card:nth-child(4) { animation-delay: .11s; }
.grid > .card:nth-child(5) { animation-delay: .14s; }
.grid > .card:nth-child(6) { animation-delay: .17s; }
.grid > .card:nth-child(7) { animation-delay: .2s; }
.grid > .card:nth-child(8) { animation-delay: .23s; }
.grid > .card:nth-child(9) { animation-delay: .26s; }
.grid > .card:nth-child(10) { animation-delay: .29s; }
.card { transition: transform .28s cubic-bezier(.2,.7,.2,1); }
.card:hover { transform: translateY(-5px); }
.card .thumb img { transition: transform .55s cubic-bezier(.2,.7,.2,1), opacity .45s; }
.card:hover .thumb img { transform: scale(1.08); }
.card:hover .add-mini { background: #111; color: #fff; }
.img-fade { opacity: 0; }
.img-fade.loaded { opacity: 1; }
.fav-btn { transition: transform .18s, background .18s; }
.fav-btn:hover { transform: scale(1.12); }
.fav-btn:active { transform: scale(.88); }

/* skeleton */
.sk-card { display: flex; flex-direction: column; }
.sk-thumb { aspect-ratio: 3/4; border-radius: 8px; }
.sk-line { height: 9px; margin-top: 8px; border-radius: 5px; }
.skeleton { position: relative; overflow: hidden; background: #f0f0f2; }
.skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  animation: shimmer 1.25s infinite;
}

/* buttons & interactive */
.btn, .chip { position: relative; overflow: hidden; }
.btn { transition: background .18s, color .18s, border-color .18s, transform .12s, box-shadow .22s; }
.btn:hover { box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.btn:active { transform: scale(.97); }
.btn.primary:hover { box-shadow: 0 10px 26px rgba(0,0,0,.2); }
.icon-link { transition: color .18s, transform .18s; }
.icon-link:hover { transform: translateY(-1px); }
.ripple-ink { position: absolute; border-radius: 50%; background: rgba(0,0,0,.14); transform: scale(0); animation: rippleAnim .6s ease-out; pointer-events: none; }
.btn.primary .ripple-ink, .btn.sale .ripple-ink, .chip.active .ripple-ink { background: rgba(255,255,255,.38); }
.cart-badge.bump { animation: bump .42s cubic-bezier(.2,.7,.2,1); }

/* inputs */
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px rgba(17,17,17,.07); transition: border-color .18s, box-shadow .18s; }
.search:focus-within input { background: #fff; box-shadow: 0 0 0 4px rgba(17,17,17,.05); }
.opt, .chip { transition: background .18s, color .18s, border-color .18s, transform .12s; }
.opt:hover { border-color: #111; }
.thumbs img { transition: transform .2s, border-color .2s; }
.thumbs img:hover { transform: translateY(-2px); }
.gallery .main-img img { transition: opacity .3s; }
.gallery .main-img img.swap { animation: fadeIn .35s ease; }
.thumbs img.active { animation: fadeIn .3s; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 200; padding: 12px 20px; border-radius: 999px;
  font-weight: 700; font-size: 13px; color: #fff; background: #111; box-shadow: 0 14px 36px rgba(0,0,0,.28);
  opacity: 0; transform: translate(-50%, 18px); transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--sale); }

/* drawer lines */
.cart-line { animation: fadeUp .3s both; }
.drawer.open .drawer-body > * { animation: fadeUp .3s both; }

/* misc life */
.panel { transition: box-shadow .25s, transform .25s; }
.section-head h2 { transition: color .2s; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
.btn.loading { opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================= UX / UI POLISH ================= */
:focus-visible { outline: 2px solid #111; outline-offset: 2px; border-radius: 8px; }
.section-head h2 .hi { display: inline-flex; width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; color: var(--sale); }
.section-head h2 .hi svg { width: 20px; height: 20px; }

.empty .empty-icon { display: inline-flex; margin-bottom: 8px; color: #c9c9cf; }
.empty .empty-icon svg { width: 46px; height: 46px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 12px 0 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: #111; }
.breadcrumb .sep { display: inline-flex; opacity: .55; }
.breadcrumb .sep svg { width: 13px; height: 13px; }
.breadcrumb .cur { color: #111; font-weight: 600; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.trust-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.trust-badges .tb { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12px; color: #333; background: #fff; }
.trust-badges .tb svg { width: 20px; height: 20px; flex: 0 0 auto; color: #111; }
.trust-badges .tb b { display: block; font-size: 12px; }
.trust-badges .tb span { color: var(--muted); font-size: 11px; }
@media (max-width: 560px) { .trust-badges { grid-template-columns: 1fr; } }

/* password toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: #666; display: grid; place-items: center; cursor: pointer; }
.pw-toggle:hover { background: var(--soft); color: #111; }
.pw-toggle svg { width: 18px; height: 18px; }
.otp-input { letter-spacing: .45em; text-align: center; font-size: 20px; font-weight: 800; padding-left: .45em; }

/* buttons with icons spacing */
.btn svg { flex: 0 0 auto; }

/* status pill icon spacing */
.status-pill { display: inline-flex; align-items: center; gap: 5px; }
.status-pill svg { width: 13px; height: 13px; }

/* mobile: bottom nav + hide top icons */
.mobile-nav { display: none; }
@media (max-width: 820px) {
  body.has-mobile-nav { padding-bottom: 66px; }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(0,0,0,.05);
  }
  .mn-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: #6b6b70; background: none; border: 0; padding: 6px 0; cursor: pointer; transition: color .18s, transform .12s; }
  .mn-item:active { transform: scale(.93); }
  .mn-item.active { color: var(--sale); font-weight: 700; }
  .mn-ico { position: relative; display: inline-flex; }
  .mn-ico svg { width: 22px; height: 22px; }
  .mn-badge { position: absolute; top: -6px; right: -10px; background: var(--sale); color: #fff; font-size: 9px; min-width: 15px; height: 15px; border-radius: 999px; display: grid; place-items: center; padding: 0 3px; font-weight: 700; }
  header.top .icon-links { display: none; }
}

/* mobile buy bar */
.buy-bar-mobile { display: none; }
@media (max-width: 820px) {
  body.product-page { padding-bottom: 120px; }
  body.product-page .mobile-nav { display: none; }
  .buy-bar-mobile {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
    background: #fff; border-top: 1px solid var(--line); gap: 12px; align-items: center;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 28px rgba(0,0,0,.1);
  }
  .buy-bar-mobile .bb-price { font-size: 18px; font-weight: 900; color: var(--sale); line-height: 1.1; }
  .buy-bar-mobile .bb-old { font-size: 12px; color: #a0a0a0; text-decoration: line-through; }
  .buy-bar-mobile .btn { flex: 1; }
}

/* nicer forms */
.form-grid label { display: flex; align-items: center; gap: 6px; }
.form-grid label svg { width: 14px; height: 14px; opacity: .7; }
.panel .form-grid { margin-top: 4px; }
.msg { animation: fadeUp .25s both; }

/* nicer order head */
.order-head { border-left: 3px solid var(--sale); }
.status-pill { border: 1px solid rgba(0,0,0,.05); }

/* admin table hover */
.admin-table tbody tr { transition: background .15s; }
.admin-table tbody tr:hover { background: #fafafa; }

/* link arrow */
.link-arrow { display: inline-flex; align-items: center; gap: 4px; }
.link-arrow svg { width: 14px; height: 14px; }
.mini-item .ph svg { width: 22px; height: 22px; color: #777; }
.admin-table .ph svg { width: 20px; height: 20px; color: #777; }
.tiny-ico { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: currentColor; }
.tiny-ico svg { width: 16px; height: 16px; }
.pay-opt { display: flex; gap: 8px; align-items: center; font-weight: 400; margin-bottom: 8px; cursor: pointer; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; transition: border-color .15s, background .15s; }
.pay-opt:hover { border-color: #bbb; background: #fafafa; }
.pay-opt input { width: auto; }
.pay-opt:has(input:checked) { border-color: #111; background: #fafafa; }
.auth-intro { text-align: center; margin-bottom: 18px; }
.auth-intro h1 { font-size: 24px; margin: 10px 0 6px; letter-spacing: -.5px; }
.auth-intro p { color: var(--muted); margin: 0 auto; font-size: 13.5px; max-width: 380px; }
.auth-ico { display: inline-flex; width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, #111, #3a3a3a); color: #fff; align-items: center; justify-content: center; box-shadow: 0 12px 28px rgba(0,0,0,.2); }
.auth-ico svg { width: 28px; height: 28px; }
.auth-wrap .panel { padding: 26px; }
.status-pill.delivered { background: #eafaf0; color: #137a3c; }
.status-pill.cancelled { background: #fdecef; color: #b3122f; }
.status-pill.paid { background: #e3f0ff; color: #1a5fb4; }
.status-pill.active { background: #eafaf0; color: #137a3c; }
.status-pill.paused { background: #fff3d6; color: #8a6100; }

/* order timeline & breakdown */
.timeline { display: flex; gap: 6px; margin: 10px 0 6px; }
.tl-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; color: #aaa; position: relative; }
.tl-step::before { content: ''; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: #eee; z-index: 0; }
.tl-step:first-child::before { display: none; }
.tl-dot { width: 26px; height: 26px; border-radius: 50%; background: #f1f1f3; display: grid; place-items: center; z-index: 1; color: #999; }
.tl-dot svg { width: 14px; height: 14px; }
.tl-step.done { color: #137a3c; }
.tl-step.done .tl-dot { background: #eafaf0; color: #137a3c; }
.tl-step.done::before { background: #bdeccd; }
.tl-step.current { color: #111; font-weight: 700; }
.tl-step.current .tl-dot { background: #111; color: #fff; }
.order-breakdown { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #555; font-size: 12px; padding: 8px 0; border-top: 1px dashed var(--line); margin-top: 6px; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.reserve-note { display: flex; align-items: center; gap: 6px; background: #fff7e6; border: 1px solid #ffe2a8; color: #8a6100; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin-top: 8px; }
.reserve-note svg { width: 15px; height: 15px; }
.notif-badge { position: absolute; top: -5px; right: -9px; background: var(--sale); color: #fff; font-size: 9px; min-width: 15px; height: 15px; border-radius: 999px; display: grid; place-items: center; padding: 0 3px; font-weight: 700; }
.notif-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notif-item .n-ico { width: 38px; height: 38px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; flex: 0 0 auto; color: #333; }
.notif-item .n-ico svg { width: 18px; height: 18px; }
.notif-item.unread .n-ico { background: #eaf0ff; color: #2f5fe0; }
.notif-item .n-body { flex: 1; min-width: 0; }
.notif-item .n-body b { display: block; font-size: 14px; }
.notif-item .n-body p { margin: 2px 0; color: #555; font-size: 13px; }
.notif-item .n-body time { color: var(--muted); font-size: 11px; }
.notif-item.unread { background: #fbfcff; }

/* ================= PROFESSIONAL RE-TONE ================= */
:root {
  --text: #0e1116;
  --muted: #69707d;
  --line: #e6e7ea;
  --soft: #f5f6f7;
  --sale: #d81e3f;
  --star: #f5a623;
}
body { color: var(--text); }
h1, h2, h3, .section-head h2, .logo { letter-spacing: -.02em; }
.section-head h2 .hi { color: var(--text); }
.section-head h2 .hi svg { stroke-width: 1.6; }

/* hero: neutral, cinematic (no cartoon glow) */
.hero .big::after { display: none !important; }
.hero .big::before {
  background:
    linear-gradient(90deg, rgba(11,13,17,.9) 0%, rgba(11,13,17,.5) 55%, rgba(11,13,17,.74) 100%),
    url('/uploads/hero-big.webp') center/cover no-repeat;
  animation: kenburns 28s ease-in-out infinite alternate;
}
.hero .tile:nth-child(1),
.hero .tile:nth-child(2) {
  background:
    linear-gradient(160deg, rgba(24,27,32,.62), rgba(11,13,17,.86)),
    url('/uploads/hero-tile1.webp') center/cover no-repeat,
    #15181d;
}
.hero .tile:nth-child(2) {
  background:
    linear-gradient(160deg, rgba(24,27,32,.62), rgba(11,13,17,.86)),
    url('/uploads/hero-tile2.webp') center/cover no-repeat,
    #15181d;
}
.hero .big, .hero .tile { border-radius: 10px; }

/* buttons & surfaces more sober */
.btn { border-radius: 9px; }
.btn.primary { background: #0e1116; border-color: #0e1116; }
.btn.sale { background: var(--sale); border-color: var(--sale); }
.search input { border-radius: 9px; }
.panel { border-radius: 12px; }
.filter-panel { border-radius: 12px; }
.card .thumb { border: 1px solid var(--line); }
.card .name { font-weight: 500; color: #232830; }
.card .price { color: #0e1116; }
.card .price.sale { color: var(--sale); }
.badge { background: var(--sale); }
.thumbs img { width: 60px; height: 80px; }
.status-pill { border-radius: 6px; }
.auth-ico { background: #0e1116; }
.notif-item.unread { background: #f8fafc; }
.tl-step.current .tl-dot { background: #0e1116; }
.step, .chip.active { background: #0e1116; border-color: #0e1116; }

/* jobs */
.jobs-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0 8px; flex-wrap: wrap; }
.jobs-hero h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.6px; }
.jobs-hero p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.jobs-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 560px) { .jobs-grid { grid-template-columns: 1fr; } }
.job-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.job-card:hover { box-shadow: 0 12px 30px rgba(15,18,22,.08); transform: translateY(-2px); border-color: #d7d9de; }
.job-top { display: flex; gap: 12px; align-items: flex-start; }
.job-ico { width: 42px; height: 42px; border-radius: 9px; background: #0e1116; color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.job-ico svg { width: 20px; height: 20px; }
.job-main { flex: 1; min-width: 0; }
.job-main h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.job-company { color: var(--muted); font-size: 12px; margin-top: 2px; }
.job-type { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: #eef1f5; color: #39414d; white-space: nowrap; }
.job-type.full { background: #eafaf0; color: #137a3c; }
.job-type.part { background: #fff4e5; color: #8a6100; }
.job-type.remote { background: #e8f4ff; color: #1a5fb4; }
.job-type.internship { background: #f3ecff; color: #5b3fb0; }
.job-type.freelance { background: #fdecef; color: #b3122f; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: #4a515c; }
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-meta svg { width: 14px; height: 14px; opacity: .65; }
.job-snippet { margin: 0; color: #5a616c; font-size: 13px; line-height: 1.55; }
.job-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-size: 11px; color: var(--muted); gap: 10px; }
.job-detail h2 { margin: 0 0 6px; }
.job-detail .jd-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.job-detail .desc { white-space: pre-wrap; color: #3f4650; line-height: 1.7; }
.job-detail .contact { margin-top: 14px; font-weight: 700; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(10,12,16,.6); display: none; place-items: center; z-index: 90; padding: 16px; }
.modal.open { display: grid; }
.modal .box { background: #fff; border-radius: 14px; width: min(680px, 96vw); max-height: 90vh; overflow: auto; box-shadow: 0 30px 70px rgba(0,0,0,.32); position: relative; }
.modal .content { padding: 22px; }
.close-x { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 26px; cursor: pointer; line-height: 1; color: #666; }
.job-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ================= RESPONSIVE HARDENING ================= */
.search { flex: 1 1 140px; min-width: 0; }
@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .jobs-hero { align-items: flex-start; }
  .jobs-hero .btn { width: 100%; }
  .top-bar { flex-wrap: nowrap; }
}
@media (max-width: 380px) {
  .logo { font-size: 19px; }
  .top-bar { gap: 8px; }
  .promo { font-size: 10px; padding: 5px 8px; letter-spacing: .2px; }
  .hero .big { padding: 24px; }
  .hero .big h1 { font-size: 22px; }
  .timeline .tl-label { font-size: 9px; }
  .tl-dot { width: 22px; height: 22px; }
  .cart-line img { width: 68px !important; height: 86px !important; }
  .section-head h2 { font-size: 16px; }
  .container { width: 96%; }
}
@media (max-width: 340px) {
  .grid { grid-template-columns: 1fr !important; }
}

/* jobs cards: prevent min-content overflow on tiny screens */
.jobs-grid { min-width: 0; }
.jobs-grid > * { min-width: 0; }
.job-card { min-width: 0; }
.job-main { min-width: 0; }
.job-main h3 { overflow-wrap: anywhere; }
.job-top { flex-wrap: wrap; }
@media (max-width: 560px) { .job-type { margin-left: 0; } }

/* ================= MOBILE-FIRST UX ================= */
.cat-nav .cat-ico { display: none; }
.filters-toggle { display: none; }
.add-fab { display: none; }

@media (max-width: 820px) {
  input, select, textarea, .search input { font-size: 16px; }

  /* categorías como chips con iconos y scroll */
  .cat-nav { border-top: 1px solid var(--line); background: #fff; }
  .cat-nav .container { gap: 8px; padding: 8px 0 10px; scroll-snap-type: x proximity; }
  .cat-nav a {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 12.5px; font-weight: 600; color: #333; background: #fff;
    white-space: nowrap; scroll-snap-align: start;
    transition: background .15s, color .15s, border-color .15s;
  }
  .cat-nav a:hover, .cat-nav a.active { color: #fff; background: #0e1116; border-color: #0e1116; }
  .cat-nav .cat-ico { display: inline-flex; }
  .cat-nav .cat-ico svg { width: 15px; height: 15px; }

  /* filtros colapsables */
  .filters-toggle { display: inline-flex; }
  .filter-panel.collapsible { display: none; }
  .filter-panel.collapsible.open { display: block; animation: fadeUp .25s both; }

  /* carruseles horizontales de secciones */
  #ofertas, #recent, #foryou, #viewed {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 2px 2.5% 10px; margin: 0 -2.5%;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  #ofertas::-webkit-scrollbar, #recent::-webkit-scrollbar, #foryou::-webkit-scrollbar, #viewed::-webkit-scrollbar { display: none; }
  #ofertas > *, #recent > *, #foryou > *, #viewed > * { flex: 0 0 46%; max-width: 46%; scroll-snap-align: start; }

  /* tarjetas más limpias + botón rápido */
  .card .quick { display: none; }
  .add-fab {
    display: grid; position: absolute; right: 6px; bottom: 6px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%; border: 0; background: #0e1116; color: #fff;
    place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.28);
  }
  .add-fab svg { width: 16px; height: 16px; }
  .card .name { font-size: 12px; min-height: 31px; }
  .card .price { font-size: 14px; }
  .card .meta { font-size: 10px; }
  .fav-btn { width: 32px; height: 32px; }
  .fav-btn svg { width: 16px; height: 16px; }

  /* targets táctiles */
  .btn.small { min-height: 38px; }
  .mn-item { min-height: 48px; }

  /* hero */
  .hero .big { min-height: 210px; padding: 24px; }
  .hero .big h1 { font-size: 26px; }
  .hero .big p { font-size: 13px; }
  .hero .side { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero .tile { min-height: 96px; padding: 14px; }
  .hero .tile b { font-size: 14.5px; }
  .hero .tile span { font-size: 10.5px; }

  .section { margin: 20px 0; }
  .section-head h2 { font-size: 16.5px; }
  .promo-extra { display: none; }
  .gallery .main-img { touch-action: pan-y; }
  .thumbs img { width: 54px; height: 72px; }
}

@media (max-width: 560px) {
  .timeline { gap: 4px; }
  .tl-dot { width: 22px; height: 22px; }
  .tl-label { font-size: 9px; }
  .cart-line { gap: 10px; }
  .cart-line img { width: 64px !important; height: 80px !important; }
  .hero .big h1 { font-size: 24px; }
}

@media (max-width: 480px) {
  #ofertas > *, #recent > *, #foryou > *, #viewed > * { flex-basis: 60%; max-width: 60%; }
}

@media (max-width: 380px) {
  #ofertas > *, #recent > *, #foryou > *, #viewed > * { flex-basis: 68%; max-width: 68%; }
  .hero .side { grid-template-columns: 1fr; }
  .hero .tile { min-height: 84px; }
}
