/* ===================================================
   1-64.ro — Design v2.0
   Syne (headings/prices) + DM Sans (UI/body)
   Aesthetic: Clean collector's gallery
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── Tokens ─────────────────────────────────────── */
:root {
  --red:      #E31212;
  --red-dark: #C00D0D;
  --red-bg:   #FFF1F1;

  --bg:       #F3F2EF;
  --card:     #FFFFFF;
  --img-bg:   #F9F8F6;

  --ink:      #0D0D0D;
  --ink-2:    #555;
  --ink-3:    #999;
  --ink-4:    #D0D0CE;

  --line:     #E8E7E3;

  --sh-card:  0 1px 3px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.04);
  --sh-lift:  0 8px 28px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.05);

  --r:  10px;
  --rl: 16px;
  --rp: 999px;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ── Nav ────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 54px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.05em;
  color: var(--ink);
  flex-shrink: 0;
  line-height: 1;
}
.nav-logo em { color: var(--red); font-style: normal; }

.nav-search {
  flex: 1;
  max-width: 440px;
  position: relative;
}
.nav-search input {
  width: 100%;
  height: 34px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: var(--rp);
  padding: 0 14px 0 36px;
  font: 400 13px 'DM Sans', sans-serif;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.nav-search input::placeholder { color: var(--ink-3); }
.nav-search input:focus {
  background: #fff;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227,18,18,.1);
}
.nav-srch-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
  font-size: 14px;
}

.nav-right {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-right strong { color: var(--ink); font-weight: 600; }

/* ── Filter bar ─────────────────────────────────── */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: stretch;
  height: 44px;
}

.brand-scroll {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px;
  display: flex;
  align-items: center;
}
.brand-scroll::-webkit-scrollbar { display: none; }

.brand-list {
  display: flex;
  gap: 5px;
  white-space: nowrap;
}

.bp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--rp);
  border: 1px solid var(--line);
  font: 500 11.5px 'DM Sans', sans-serif;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  transition: all .13s;
  user-select: none;
}
.bp:hover {
  border-color: var(--bc, var(--red));
  color: var(--bc, var(--red));
}
.bp.on {
  background: var(--bc, var(--red));
  border-color: var(--bc, var(--red));
  color: #fff;
}
.bpdot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.filter-sort {
  border-left: 1px solid var(--line);
  padding: 0 14px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sort-sel {
  border: none;
  background: transparent;
  font: 500 12px 'DM Sans', sans-serif;
  color: var(--ink-2);
  cursor: pointer;
  outline: none;
  appearance: none;
  padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}

/* ── Main wrap ──────────────────────────────────── */
.wrap {
  max-width: 1640px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

.grid-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.grid-label {
  font: 600 11.5px 'DM Sans', sans-serif;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.count-pill {
  background: var(--line);
  border-radius: var(--rp);
  padding: 1px 8px;
  font: 600 11px 'DM Sans', sans-serif;
  color: var(--ink-2);
}

/* ── Product Grid ───────────────────────────────── */
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
@media (min-width:1500px) { .pgrid { grid-template-columns: repeat(8,1fr); } }
@media (min-width:1200px) and (max-width:1499px) { .pgrid { grid-template-columns: repeat(6,1fr); } }
@media (min-width:900px)  and (max-width:1199px) { .pgrid { grid-template-columns: repeat(5,1fr); } }
@media (max-width: 440px) { .pgrid { grid-template-columns: repeat(2,1fr); gap: 7px; } }

/* ── Product Card ───────────────────────────────── */
.pc {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--sh-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  transition: transform .18s, box-shadow .18s;
  animation: rise .32s ease both;
}
.pc:hover { transform: translateY(-4px); box-shadow: var(--sh-lift); color: var(--ink); }
.pc.hidden { display: none !important; }

.pc-img {
  aspect-ratio: 4/3;
  background: var(--img-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px 8px;
  position: relative;
  overflow: hidden;
}
.pc-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .26s ease;
}
.pc:hover .pc-img img { transform: scale(1.06); }

.pc-badge {
  position: absolute;
  top: 7px; right: 7px;
  font: 600 9.5px 'DM Sans', sans-serif;
  padding: 2px 6px;
  border-radius: var(--rp);
}
.pc-badge.low { background: #FEF3C7; color: #92400E; }
.pc-badge.new { background: #DCFCE7; color: #15803D; }

.pc-body {
  padding: 9px 11px 11px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 5px;
}

.pc-brand {
  font: 700 9.5px 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--bc, var(--red));
  line-height: 1;
}
.pc-series-label {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 9px;
}

.pc-name {
  font: 600 13.5px 'Syne', sans-serif;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
@media (max-width:440px) { .pc-name { font-size: 12px; } }

.pc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  margin-top: 3px;
}

.pc-price {
  font: 700 16px 'Syne', sans-serif;
  letter-spacing: -.035em;
  color: var(--ink);
  line-height: 1;
}
.pc-price sub {
  font: 400 10px 'DM Sans', sans-serif;
  color: var(--ink-3);
  vertical-align: baseline;
  letter-spacing: 0;
}

.pc-cta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font: 600 10.5px 'DM Sans', sans-serif;
  background: var(--red);
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  transition: background .12s;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}
.pc-cta:hover { background: var(--red-dark); color: #fff; }

/* ── Empty state ─────────────────────────────────── */
.empty { display: none; text-align: center; padding: 80px 20px; }
.empty.show { display: block; }
.empty-ico { font-size: 36px; opacity: .2; }
.empty p { font-size: 15px; font-weight: 500; color: var(--ink-2); margin-top: 12px; }
.empty span { font-size: 13px; color: var(--ink-3); margin-top: 4px; display: block; }

/* ── Product Detail ─────────────────────────────── */
.detail-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.bc {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.bc a { color: var(--ink-3); }
.bc a:hover { color: var(--red); }
.bc-sep { font-size: 10px; }

.d-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width:760px) { .d-layout { grid-template-columns: 1fr; gap: 20px; } }

.d-main-img {
  background: var(--card);
  border-radius: var(--rl);
  box-shadow: var(--sh-card);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.d-main-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .3s;
}
.d-main-img:hover img { transform: scale(1.04); }
.d-color-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--bc2, var(--red));
}

.d-thumbs {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  overflow-x: auto;
  scrollbar-width: none;
}
.d-thumbs::-webkit-scrollbar { display: none; }
.dthumb {
  width: 58px; height: 58px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .13s;
}
.dthumb.on { border-color: var(--bc2, var(--red)); }
.dthumb img { width: 100%; height: 100%; object-fit: contain; }

/* Info */
.d-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 10.5px 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--bc2, var(--red));
  background: color-mix(in srgb, var(--bc2, var(--red)) 10%, transparent);
  padding: 4px 10px;
  border-radius: var(--rp);
  margin-bottom: 10px;
}

.d-title {
  font: 800 30px 'Syne', sans-serif;
  letter-spacing: -.04em;
  line-height: 1.05;
  margin-bottom: 12px;
}
@media (max-width:760px) { .d-title { font-size: 22px; } }

.d-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 18px; }
.d-tag {
  font: 500 11px 'DM Sans', sans-serif;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--line);
  color: var(--ink-2);
}
.d-tag.s { background: var(--red-bg); color: var(--red); font-weight: 700; }

.d-price {
  font: 800 44px 'Syne', sans-serif;
  letter-spacing: -.05em;
  line-height: 1;
  margin-bottom: 6px;
}
.d-price sub {
  font: 400 18px 'DM Sans', sans-serif;
  color: var(--ink-3);
  vertical-align: baseline;
  letter-spacing: 0;
}

.d-stock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.sdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.d-stock.ok .sdot  { background: #16A34A; }
.d-stock.low .sdot { background: #CA8A04; }
.d-stock.out .sdot { background: var(--red); }

.btn-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: var(--red);
  color: #fff;
  border-radius: var(--r);
  font: 700 15px 'Syne', sans-serif;
  letter-spacing: -.01em;
  border: none;
  cursor: pointer;
  transition: background .12s, transform .12s;
  margin-bottom: 18px;
  text-decoration: none;
}
.btn-buy:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }

.d-meta { width: 100%; border-collapse: collapse; font-size: 13px; }
.d-meta td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.d-meta tr:last-child td { border: none; }
.d-meta td:first-child { color: var(--ink-3); width: 42%; }
.d-meta td:last-child { font-weight: 500; }

.d-desc { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.d-desc h3 { font: 700 17px 'Syne', sans-serif; letter-spacing: -.02em; margin-bottom: 8px; }
.d-desc p { color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }

.rel-title {
  font: 700 17px 'Syne', sans-serif;
  letter-spacing: -.02em;
  margin: 44px 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.d-note {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 14px;
  line-height: 1.5;
}

/* ── Footer ─────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.ft-logo { font: 800 17px 'Syne', sans-serif; letter-spacing: -.04em; }
.ft-logo em { color: var(--red); font-style: normal; }
footer small { font-size: 11.5px; color: var(--ink-3); }
.ft-links { display: flex; gap: 14px; }
.ft-links a { font-size: 11.5px; color: var(--ink-3); }
.ft-links a:hover { color: var(--red); }

/* ── Animations ─────────────────────────────────── */
@keyframes rise {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0);   }
}
.pc:nth-child(1)  { animation-delay:.02s }
.pc:nth-child(2)  { animation-delay:.04s }
.pc:nth-child(3)  { animation-delay:.06s }
.pc:nth-child(4)  { animation-delay:.08s }
.pc:nth-child(5)  { animation-delay:.10s }
.pc:nth-child(6)  { animation-delay:.12s }
.pc:nth-child(7)  { animation-delay:.14s }
.pc:nth-child(8)  { animation-delay:.16s }
.pc:nth-child(n+9){ animation-delay:.18s }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 2px; }
