/* =========================================================
   TK Comercio — catálogo (the mall)
   A trade counter laid out like a marketplace: four to a row,
   photo on top, name under it, stock where the eye lands, and
   the TK price in the brand's green so the buyer sees which
   number is ours.
   ========================================================= */

.cat-hero {
  padding: clamp(130px, 16vw, 180px) 0 clamp(36px, 5vw, 56px);
  text-align: center;
  background: var(--bg);
}
.cat-hero h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); margin-top: 6px; }
.cat-hero h1 em { font-style: normal; color: var(--second); }
.cat-hero .lede { margin: 22px auto 0; max-width: 62ch; }

.cat-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
  margin-top: clamp(32px, 4vw, 48px);
}
.cat-stats > div { background: var(--bg-soft); padding: 22px 16px; }
.cat-stats b {
  display: block; font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500; color: var(--main); line-height: 1.2;
}
.cat-stats span {
  display: block; margin-top: 8px;
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(23, 32, 28, .58);
}

/* ---------- toolbar: sticks under the header while scrolling ---------- */
.cat-bar {
  position: sticky; top: 64px; z-index: 40;
  background: var(--hdr-bg);
  backdrop-filter: saturate(160%) blur(10px);
  border-block: 1px solid var(--line-soft);
}
.cat-bar__in { display: flex; gap: 12px; align-items: center; padding: 14px 0; flex-wrap: wrap; }
.cat-q, .cat-sel {
  font-family: inherit; font-size: 14px; color: var(--main);
  background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 0;
  padding: 11px 14px;
}
.cat-q { flex: 1 1 260px; min-width: 200px; }
.cat-q::placeholder { color: var(--ph); }
.cat-q:focus, .cat-sel:focus { outline: none; border-color: var(--second); }
.cat-sel { flex: 0 1 auto; max-width: 230px; cursor: pointer; }
.cat-count {
  margin-left: auto; font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--dimmer); white-space: nowrap;
}
.cat-count b { color: var(--second); font-size: 13px; letter-spacing: 0; }

.cat-section { padding-top: clamp(30px, 4vw, 46px); }
.cat-zoomhint {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--dimmer); text-align: center; margin-bottom: 26px;
}

/* ---------- the grid: four across ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.pc { background: var(--bg-soft); display: flex; flex-direction: column; }

.pc__ph {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: zoom-in;
  border-bottom: 1px solid var(--line-soft);
}
.pc__ph img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  transition: transform .45s var(--ease);
}
.pc__ph:hover img { transform: scale(1.06); }
.pc__ph:focus-visible { outline: 2px solid var(--second); outline-offset: -2px; }
.pc__noimg { color: var(--dimmer); font-size: 26px; }
/* The catalogue number is what a buyer writes down and sends back,
   so it is labelled and sits where the eye lands first. */
.pc__n {
  position: absolute; top: 0; left: 0;
  font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
  color: #F7F6F2;
  background: var(--main);
  padding: 5px 11px;
}

.pc__b { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }

/* The product name sits directly under the photograph */
.pc__t {
  font-size: 1rem; font-weight: 500; line-height: 1.3;
  color: var(--main); letter-spacing: -0.2px;
}
.pc__m {
  margin-top: 5px; font-size: 11.5px;
  color: var(--dimmer); letter-spacing: .04em;
}

/* Stock, as a traffic light — the first thing a buyer checks */
.pc__s {
  display: flex; align-items: center; gap: 7px;
  margin-top: 11px; font-size: 12.5px; font-weight: 500;
}
.pc__s i { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.pc__s--in  { color: #146B4C; } .pc__s--in i  { background: #2FA876; }
.pc__s--low { color: #A8701A; } .pc__s--low i { background: #E0A33A; }
.pc__s--out { color: rgba(23,32,28,.44); } .pc__s--out i { background: rgba(23,32,28,.26); }

/* Two prices side by side: the market, then ours */
.pc__px {
  margin-top: 13px; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; align-items: baseline;
}
.pc__px dt {
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dimmer); white-space: nowrap;
}
.pc__px dd { margin: 0; text-align: right; }
/* tier under the TK label, e.g. "1–50 pairs · plus VAT" */
.pc__px dt span { display: block; margin-top: 3px; font-size: 9.5px; letter-spacing: 0; text-transform: none; color: var(--dimmer); }
.pc__mkt { font-size: 13px; color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(23,32,28,.3); }
/* Ours is the number that should be seen */
.pc__tk {
  font-size: 15px; font-weight: 600; color: var(--second);
  letter-spacing: -0.2px;
}

/* discount against the market price */
.pc__off {
  display: inline-block; margin-left: 6px; padding: 2px 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0;
  color: #FFFFFF; background: #C0392B; vertical-align: 2px;
}

.pc__ask {
  margin-top: 14px; align-self: flex-start;
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--second); border-bottom: 1px solid var(--accent-line);
  padding-bottom: 5px; transition: color .3s var(--ease), border-color .3s var(--ease);
}
.pc__ask:hover { color: var(--main); border-color: var(--main); }
.pc__meta {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px; color: var(--dimmer); line-height: 1.6;
}

.cat-more { text-align: center; margin-top: 40px; }
.cat-empty { text-align: center; color: var(--dim); padding: 60px 0; }

/* ---------- lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(16, 20, 18, .93);
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw;
}
.lb[hidden] { display: none; }
.lb__fig { margin: 0; text-align: center; max-width: 100%; max-height: 100%; }
.lb__fig img {
  max-width: min(92vw, 1100px); max-height: 82vh;
  width: auto; height: auto;
  background: #fff; padding: 10px;
  /* The source photographs top out around 520 px, so never blow them
     up past their own pixels — a sharp small image beats a soft big one. */
  image-rendering: auto;
}
.lb__fig figcaption {
  margin-top: 18px; color: rgba(255,255,255,.76);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.lb__x {
  position: absolute; top: 18px; right: 22px;
  width: 44px; height: 44px; border: 0; border-radius: 0;
  background: rgba(255,255,255,.1); color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer;
}
.lb__x:hover { background: rgba(255,255,255,.2); }

/* ---------- the big way in, on the home page ---------- */
.mall {
  background: var(--main);
  padding: clamp(56px, 7vw, 86px) 0;
  text-align: center;
}
.mall .kicker { color: #7FD0AC; }
.mall h2 {
  color: #F7F6F2; font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  margin-top: 18px; font-weight: 500; letter-spacing: -0.5px;
}
.mall p {
  color: rgba(247,246,242,.72); max-width: 62ch;
  margin: 20px auto 0; font-size: 1rem; line-height: 1.85;
}
.mall__btn {
  display: inline-flex; align-items: center; gap: 16px;
  margin-top: 36px; padding: 24px 52px;
  background: #2FA876; color: #06241A;
  font-size: 15px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.mall__btn:hover { background: #7FD0AC; transform: translateY(-2px); }
.mall__btn .arw { font-size: 19px; }

/* Spec line under the model — slippers show size, sole and height */
.pc__sp { margin-top: 6px; font-size: 11.5px; line-height: 1.55; color: var(--dim); }

/* ---------- the entrance: one large card per product line ---------- */
.cat-back { margin-bottom: 18px; font-size: 12px; letter-spacing: .08em; }
.cat-back a { color: var(--second); border-bottom: 1px solid var(--accent-line); padding-bottom: 3px; }
.cat-back a:hover { color: var(--main); border-color: var(--main); }

.lines {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft);
}
.line { background: var(--bg-soft); display: flex; flex-direction: column; color: inherit; }
.line__ph {
  aspect-ratio: 4 / 3; background: #FFFFFF; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line-soft);
}
.line__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.line:hover .line__ph img { transform: scale(1.04); }
.line__b { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 10px; }
.line__t { font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 500; color: var(--main); letter-spacing: -0.3px; }
.line__d { font-size: .95rem; line-height: 1.7; color: var(--dim); }
.line__n { font-size: 13px; color: var(--dim); }
.line__n b { color: var(--second); font-weight: 600; }
.line__go {
  margin-top: 8px; align-self: flex-start;
  padding: 14px 26px; background: var(--second); color: #F7F6F2;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: background .3s var(--ease);
}
.line:hover .line__go { background: var(--main); }
@media (max-width: 760px) { .lines { grid-template-columns: 1fr; } .line__b { padding: 20px 18px 24px; } }

@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-stats { grid-template-columns: repeat(2, 1fr); }
  .cat-bar { top: 56px; }
  .cat-count { margin-left: 0; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .pc__b { padding: 12px 11px 14px; }
  .pc__t { font-size: .9rem; }
  .pc__px dt { font-size: 8.5px; }
  .mall__btn { padding: 20px 32px; font-size: 13px; width: 100%; justify-content: center; }
}
