/* ===================== eTroniX — Components (cards, carousels, hero, promo, etc.) ===================== */

/* ---- PRODUCT CARD ---- */
.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; cursor: pointer;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column; min-width: 180px; max-width: 300px;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--line-2); }

.pcard-media { position: relative; padding: 14px; }
.pcard-media .ph { transition: transform .3s ease; }
.pcard:hover .pcard-media .ph { transform: scale(1.03); }
.pcard-media .prod-img {
  transition: transform .3s ease; border-radius: var(--r-md);
  background: #f5f7fc; aspect-ratio: 1/1; user-select: none; -webkit-user-drag: none; width: 100%;
}
.pcard:hover .pcard-media .prod-img { transform: scale(1.03); }

/* Оверлей «нет в наличии»: сетка поверх превью + плашка с надписью. */
.pcard-oos {
  position: absolute; inset: 0; z-index: 4; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; pointer-events: none;
  background:
    repeating-linear-gradient(45deg, rgba(35,38,48,.05) 0 9px, rgba(35,38,48,.13) 9px 18px);
}
.pcard-oos span {
  font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: rgba(28,30,38,.85); padding: 6px 12px; border-radius: 6px;
  transform: rotate(-7deg); box-shadow: 0 4px 14px rgba(0,0,0,.22); white-space: nowrap;
}
.pcard.oos .pcard-media .prod-img,
.pcard.oos .pcard-media .ph { filter: grayscale(.55) opacity(.82); }

.pcard-badges { position: absolute; top: 20px; left: 20px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pcard-fav {
  position: absolute; top: 20px; right: 20px; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; color: var(--ink-3);
  box-shadow: var(--sh-1); transition: all .15s; cursor: pointer;
}
.pcard-fav:hover { color: var(--red); }
.pcard-fav.on { color: var(--red); }
.pcard-fav svg { width: 18px; height: 18px; }

.pcard-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard-brand { font-size: 11px; color: var(--ink-4); letter-spacing: .02em; }
.pcard-name {
  font-size: 14.5px; font-weight: 700; line-height: 1.28; letter-spacing: -0.01em;
  min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-rate { display: flex; align-items: center; gap: 7px; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.pcard-add {
  width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: all .15s; cursor: pointer;
}
.pcard-add:hover { background: var(--blue); color: #fff; box-shadow: var(--sh-blue); }
.pcard-add svg { width: 20px; height: 20px; }
.pcard-stock { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.pcard-stock .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
@media (max-width: 640px) { .pgrid { grid-template-columns: 1fr; gap: 12px; } }

/* ---- STARS ---- */
.stars { position: relative; display: inline-flex; }
.stars-empty { display: inline-flex; color: var(--line-2); }
.stars-filled { position: absolute; inset: 0; overflow: hidden; display: inline-flex; color: #f5a623; }

/* ---- PRODUCT CAROUSEL (infinite draggable) ---- */
.crow-wrap { position: relative; }
.crow {
  display: flex; gap: 18px; overflow-x: scroll; padding: 8px 2px 28px; cursor: grab;
  scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: auto;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.crow::-webkit-scrollbar { display: none; }
.crow.grabbing { cursor: grabbing; }
.crow-clone { display: flex; gap: 18px; }
.crow .pcard { flex: 0 0 auto; width: var(--cardw, 220px); }
.crow .pcard:hover { box-shadow: 0 10px 24px rgba(11,21,38,.12); }
.crow .pcard * { -webkit-user-drag: none; user-select: none; }
@media (max-width: 640px) { .crow, .crow-clone { gap: 12px; } }

/* ---- HERO BANNER CAROUSEL ---- */
.hero-row { display: grid; grid-template-columns: 5fr 2fr; gap: 18px; margin-top: 24px; }
@media (max-width: 980px) { .hero-row { grid-template-columns: 1fr; } }

.hero-row { --hero-ratio: 16 / 9; }
.hero-carousel {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  width: 100%; aspect-ratio: var(--hero-ratio); cursor: grab; touch-action: pan-y; user-select: none;
}
.hero-carousel.grabbing { cursor: grabbing; }
.hero-track {
  display: flex; gap: 20px; height: 100%;
  transition: transform .55s cubic-bezier(.22,.61,.36,1); will-change: transform;
}
.hero {
  flex: 0 0 100%; min-width: 0; height: 100%; position: relative; overflow: hidden;
  border-radius: var(--r-xl); display: flex; align-items: center; padding: 48px; color: #fff;
  background: radial-gradient(130% 120% at 85% 15%, #2f80ff 0%, #1257e6 38%, #0a2a8f 100%);
}
.hero.has-img { background: none; }
.hero.theme-gaming:not(.has-img) { background: radial-gradient(130% 120% at 85% 15%, #9a6bff 0%, #6a3bdb 40%, #2a1170 100%); }
.hero.theme-cyan:not(.has-img)   { background: radial-gradient(130% 120% at 85% 15%, #1cc6e0 0%, #0a8fb0 40%, #064457 100%); }
.hero.theme-watch:not(.has-img)  { background: radial-gradient(130% 120% at 85% 15%, #2bc88a 0%, #11a36b 40%, #064d33 100%); }
.hero-bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.hero > *:not(.hero-bg-img) { position: relative; z-index: 1; }
.hero:not(.has-img)::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 80% 50%, rgba(120,180,255,.45), transparent 60%);
  mix-blend-mode: screen;
}
.hero:not(.has-img)::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 380px; height: 380px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(80% 80% at 30% 50%, #000, transparent);
}
.hero-dots { position: absolute; bottom: 26px; left: 48px; display: flex; gap: 8px; z-index: 3; }
.hero-dots i { width: 9px; height: 9px; border-radius: 20px; background: rgba(255,255,255,.4); cursor: pointer; transition: all .2s; display: block; }
.hero-dots i.on { width: 28px; background: #fff; }

@media (max-width: 480px) {
  /* .hero { padding: 30px 26px; min-height: 300px; }
  .hero-track, .hero-carousel { min-height: 300px; } */
}

/* ---- SIDE BANNERS ---- */
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 18px; }
.sbanner {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 130px; cursor: pointer; transition: transform .16s, box-shadow .2s;
}
.sbanner:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.sbanner.dark  { background: linear-gradient(150deg, #13203a, #0b1526); color: #fff; }
.sbanner.light { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.sbanner.blue  { background: linear-gradient(150deg, var(--blue-bright), var(--blue-deep)); color: #fff; }
.sbanner.amber { background: linear-gradient(150deg, #ffb43d, #e07c00); color: #fff; }
.sbanner .eyebrow { color: inherit; opacity: .75; }
.sbanner h3 { font-size: 21px; margin: 6px 0; letter-spacing: -0.02em; }
.sbanner .big { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.sbanner .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; opacity: .9; }
.sbanner .ph { position: absolute; right: -20px; bottom: -20px; width: 120px; height: 120px; opacity: .5; background: repeating-linear-gradient(135deg, currentColor 0 6px, transparent 6px 14px); -webkit-mask: radial-gradient(circle at 70% 70%, #000 60%, transparent 72%); }

/* ---- PROMO GRID ---- */
.promo-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
@media (max-width: 980px) { .promo-grid { grid-template-columns: repeat(2,1fr); } }

.promo {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 26px;
  min-height: 200px; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .16s, box-shadow .2s;
}
.promo:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.promo.blue  { background: linear-gradient(150deg, var(--blue-bright), var(--blue-deep)); color: #fff; }
.promo.dark  { background: linear-gradient(150deg, #1a2740, #0b1526); color: #fff; }
.promo.light { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.promo.amber { background: linear-gradient(150deg, #ffb43d, #e07c00); color: #fff; }
.promo .eyebrow { color: inherit; opacity: .7; position: relative; z-index: 2; }
.promo h3 { font-size: 23px; margin: 6px 0 3px; position: relative; z-index: 2; letter-spacing: -0.02em; }
.promo .sub { font-size: 14px; opacity: .85; position: relative; z-index: 2; font-weight: 600; }
.promo .ph { position: absolute; right: -30px; top: -30px; width: 160px; height: 160px; opacity: .35; background: repeating-linear-gradient(135deg, currentColor 0 7px, transparent 7px 16px); -webkit-mask: radial-gradient(circle at 70% 30%, #000 58%, transparent 70%); }

/* ---- CATEGORY TILES (horizontal scroll) ---- */
.tiles { gap: 16px; padding-bottom: 8px; scroll-snap-type: x proximity; }
.tile { flex: 0 0 182px; cursor: pointer; scroll-snap-align: start; }
.tile-img { width: 182px; height: 152px; border-radius: var(--r-md); transition: transform .18s, box-shadow .2s; }
.tile:hover .tile-img { transform: translateY(-3px); box-shadow: var(--sh-2); }
.tile-nm { font-weight: 700; font-size: 14.5px; margin-top: 11px; letter-spacing: -0.01em; }
.tile-cnt { font-size: 11px; color: var(--ink-4); margin-top: 2px; }

/* ---- WEEKLY DEALS + COUNTDOWN ---- */
.deal-row {
  display: flex; flex-direction: row; gap: 18px; align-items: stretch;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.deal-row::-webkit-scrollbar { display: none; }
.deal-row .deal-timer { flex: 0 0 280px; }
.deal-row .pcard { flex: 0 0 var(--cardw, 220px); min-width: var(--cardw, 220px); max-width: var(--cardw, 220px); }

.deal-timer {
  background: radial-gradient(120% 130% at 15% 10%, #1b2c4d, #0b1526 70%); color: #fff;
  border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 8px;
  justify-content: center; position: relative; overflow: hidden;
}
.deal-timer::after { content: ''; position: absolute; right: -30px; bottom: -30px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 65%); }
.deal-timer h3 { font-size: 23px; letter-spacing: -0.02em; position: relative; }
.deal-timer p  { font-size: 13px; color: #aebbd2; margin: 0 0 6px; line-height: 1.4; position: relative; }

.cd { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; position: relative; }
.cd-cell { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 9px 10px; text-align: center; min-width: 0; }
.cd-cell b { font-size: 25px; font-weight: 800; display: block; line-height: 1; letter-spacing: -0.01em; }
.cd-cell span { font-size: 9.5px; color: #9fb0cc; text-transform: uppercase; letter-spacing: .07em; margin-top: 4px; display: block; }

@media (max-width: 560px) {
  .cd-cell { min-width: 46px; padding: 8px 7px; }
  .cd-cell b { font-size: 21px; }
}

/* ---- VALUE PROPS ---- */
.vprops { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media (max-width: 900px) { .vprops { grid-template-columns: repeat(2,1fr); } }
.vprop { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.vprop .vic { width: 46px; height: 46px; border-radius: 13px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.vprop .vic svg { width: 24px; height: 24px; }
.vprop .vt { font-weight: 700; font-size: 14.5px; }
.vprop .vs { font-size: 12.5px; color: var(--ink-3); }

/* ---- BRAND STRIP ---- */
.brandstrip {
  overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.brandstrip-track { display: flex; align-items: center; width: max-content; animation: brandscroll 55s linear infinite; will-change: transform; }
.brandstrip:hover .brandstrip-track { animation-play-state: paused; }
.brandstrip .bl { flex: 0 0 auto; padding: 0 28px; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; color: var(--ink-3); opacity: .7; white-space: nowrap; transition: color .15s, opacity .15s; cursor: pointer; }
.brandstrip .bl:hover { color: var(--blue); opacity: 1; }
@keyframes brandscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- FORM FIELDS (shared: auth, profile, checkout) ----
   Базовая система полей. Лежит здесь (а не в auth.css), потому что используется
   и на странице корзины/оформления, которая auth.css не подключает. */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; font-family: var(--ff-mono); }
.field input, .field textarea, .field select {
  height: 48px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 0 14px;
  font-size: 15px; font-weight: 600; font-family: inherit; background: var(--bg); color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 4px var(--glow-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); font-weight: 500; }
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field-opt { font-style: normal; font-weight: 600; color: var(--ink-4); font-size: 12px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-grid { grid-template-columns: 1fr; } }
.col2 { grid-column: 1 / -1; }

/* ---- MODAL OVERLAY (shared backdrop, centers the dialog) ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(11,21,38,.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 24px; }

/* ---- QUICK VIEW MODAL ---- */
.qv-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(11,21,38,0); backdrop-filter: blur(0px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  transition: background .22s, backdrop-filter .22s;
  pointer-events: none;
}
.qv-overlay.on { background: rgba(11,21,38,.52); backdrop-filter: blur(5px); pointer-events: all; }
.qv-modal {
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: 0 32px 80px rgba(11,21,38,.28);
  width: 100%; max-width: 760px; max-height: 88vh; overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; position: relative;
  transform: translateY(28px) scale(.96); opacity: 0;
  transition: transform .25s cubic-bezier(.22,.61,.36,1), opacity .22s ease;
}
.qv-overlay.on .qv-modal { transform: none; opacity: 1; }
.qv-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s;
}
.qv-close:hover { background: var(--line); }
.qv-close svg { width: 16px; height: 16px; }
.qv-left {
  background: var(--bg); border-radius: var(--r-xl) 0 0 var(--r-xl);
  padding: 32px 24px; display: flex; align-items: center; justify-content: center;
}
.qv-img-el { width: 100%; max-height: 320px; object-fit: contain; }
.qv-right { padding: 32px 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.qv-name { font-size: 19px; font-weight: 800; line-height: 1.22; letter-spacing: -.01em; margin: 8px 0 4px; }
.qv-tag { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.qv-rate { display: flex; align-items: center; }
.qv-colors { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 600px) {
  .qv-modal { grid-template-columns: 1fr; }
  .qv-left { border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 20px; max-height: 220px; }
  .qv-right { padding: 20px; }
}

/* ---- LOGOUT CONFIRM DIALOG ---- */
.logout-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(11,21,38,0); backdrop-filter: blur(0px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  transition: background .2s, backdrop-filter .2s;
  pointer-events: none;
}
.logout-overlay.on { background: rgba(11,21,38,.52); backdrop-filter: blur(5px); pointer-events: all; }
.logout-dialog {
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: 0 24px 64px rgba(11,21,38,.28);
  width: 100%; max-width: 360px;
  padding: 32px 28px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transform: translateY(20px) scale(.97); opacity: 0;
  transition: transform .22s cubic-bezier(.22,.61,.36,1), opacity .2s ease;
  text-align: center;
}
.logout-overlay.on .logout-dialog { transform: none; opacity: 1; }
.logout-dialog-icon { width: 48px; height: 48px; object-fit: contain; margin-bottom: 4px; }
.logout-dialog-title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.logout-dialog-sub { font-size: 13px; color: var(--ink-3); margin: 2px 0 14px; }
.logout-dialog-btns { display: flex; gap: 10px; width: 100%; }
.logout-dialog-btns .btn { flex: 1; height: 42px; font-size: 14px; }
