/* ══════════════════════════════════════════════════════════
   HERO PÁS + SEKCIA „VLASTNÁ VÝŠIVKA" — stránka /shop

   Štruktúra a rozmery prevzaté z
   projekty/embrolandia/src/pages/truckhody.astro (<style> blok).
   Farby a fonty sú prepísané na TruckHody tokeny zo style.css:
   svetlý papierový podklad + serify Embrolandie → tmavomodrá,
   --blue #2196F3, --accent #F5A623, Bebas Neue + Barlow.

   Prefix .cst- (custom) — nekoliduje so shop.css ani style.css.
══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   HERO PÁS
   Statický obrázok, žiadny scroll-scrub. Embrolandia mala
   42-framový canvas (2,0 MB) — ten sa zámerne nepreberá.
══════════════════════════════════════════════════════════ */
.shop-hero{
  position: relative;
  min-height: clamp(360px, 52vh, 520px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid rgba(33, 150, 243, 0.18);
}

.shop-hero__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

/* Scrim: dole tmavý kvôli čitateľnosti textu, hore jemný kvôli hĺbke. */
.shop-hero__scrim{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      rgba(15, 26, 46, 0.94) 0%,
      rgba(15, 26, 46, 0.80) 28%,
      rgba(15, 26, 46, 0.34) 58%,
      rgba(15, 26, 46, 0.55) 100%);
}

.shop-hero__inner{
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2.75rem;
}

.shop-hero__title{
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--white);
  margin: 0.75rem 0 0.6rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.shop-hero__title em{
  font-style: normal;
  color: var(--accent);
}

.shop-hero__sub{
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  max-width: 46ch;
  margin-bottom: 1.5rem;
}

.shop-hero__cta{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.shop-hero__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.shop-hero__btn--primary{
  background: var(--blue);
  color: var(--white);
  border: 1px solid var(--blue);
  box-shadow: 0 6px 22px var(--blue-glow);
}
.shop-hero__btn--primary:hover{
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-2px);
}

.shop-hero__btn--ghost{
  background: rgba(15, 26, 46, 0.45);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
}
.shop-hero__btn--ghost:hover{
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.shop-hero__btn:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════════
   SEKCIA #vlastna-vysivka
══════════════════════════════════════════════════════════ */
#vlastna-vysivka{
  padding: 5rem 1.5rem 6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(33, 150, 243, 0.07), transparent 60%),
    var(--black-2);
}

.cst-wrap{
  max-width: 860px;
  margin: 0 auto;
}

.cst-lead{
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 3rem;
}

/* ── bloky krokov ─────────────────────────────────────── */
.cst-form{
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.cst-block{
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cst-legend{
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--white);
  padding: 0 0 0.75rem;
  width: 100%;
  border-bottom: 1px solid rgba(33, 150, 243, 0.35);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

/* Číslo kroku pred nadpisom. */
.cst-legend::before{
  content: attr(data-krok);
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--blue);
}

.cst-field{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cst-field label,
.cst-label-as-legend,
.cst-gdpr span{
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.cst-gdpr span{
  text-transform: none;
  letter-spacing: 0.01em;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

/* ── polia ────────────────────────────────────────────── */
.cst-form input[type="text"],
.cst-form input[type="tel"],
.cst-form input[type="email"],
.cst-form select,
.cst-form textarea{
  width: 100%;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.cst-form textarea{
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

/* Šípka selectu — natívna je po appearance:none preč. */
.cst-form select{
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232196F3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.cst-form input::placeholder,
.cst-form textarea::placeholder{
  color: rgba(255, 255, 255, 0.2);
}

.cst-form input:focus,
.cst-form select:focus,
.cst-form textarea:focus{
  outline: none;
  border-color: var(--blue);
  background: rgba(33, 150, 243, 0.06);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.12);
}

/* ── kartové voľby (produkt, umiestnenie) ─────────────── */
.cst-choice{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.15rem;
}

.cst-card{
  position: relative;
  cursor: pointer;
}

.cst-card input{
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cst-card-in{
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 62px;
  justify-content: center;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.cst-card:hover .cst-card-in{
  border-color: rgba(33, 150, 243, 0.5);
  background: rgba(255, 255, 255, 0.06);
}
.cst-card:active .cst-card-in{ transform: translateY(1px); }

.cst-card-name{
  font-family: var(--font-condensed);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}

.cst-card-meta{
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.cst-card input:checked + .cst-card-in{
  border-color: var(--blue);
  background: rgba(33, 150, 243, 0.1);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.cst-card input:checked + .cst-card-in .cst-card-name{ color: var(--blue); }
.cst-card input:focus-visible + .cst-card-in{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── swatch grid farieb ───────────────────────────────── */
.cst-farba-vybrana{
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--blue);
  margin: 0.1rem 0 0.35rem;
}

.cst-swatches{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
}

.cst-swatch{
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 46px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cst-swatch:hover{
  border-color: rgba(33, 150, 243, 0.5);
  background: rgba(255, 255, 255, 0.07);
}
.cst-swatch:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cst-swatch.is-selected{
  border-color: var(--blue);
  background: rgba(33, 150, 243, 0.1);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.cst-swatch-dot{
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.cst-swatch-name{
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.2;
}
.cst-swatch.is-selected .cst-swatch-name{ color: var(--blue); }

.cst-farba-hint{
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 0.15rem;
}

/* ── fotka ────────────────────────────────────────────── */
.cst-file{
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cst-file-btn{
  align-self: flex-start;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-condensed);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cst-file-btn:hover{
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(33, 150, 243, 0.07);
}

.cst-preview{
  display: flex;
  gap: 0.875rem;
  align-items: center;
  margin-top: 0.75rem;
}

.cst-preview img{
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.cst-preview-meta{
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.62);
}

.cst-link-btn{
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}
.cst-link-btn:hover{ color: var(--accent); }

.cst-note{
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}
.cst-note a{ color: var(--blue); }
.cst-note-center{ text-align: center; margin-top: 0.75rem; }

/* ── GDPR + honeypot ──────────────────────────────────── */
.cst-gdpr{
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.cst-gdpr input[type="checkbox"]{
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* Honeypot — skrytý cez CSS, nie type="hidden" (boti hidden preskočia). */
.cst-hp{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── chyby ────────────────────────────────────────────── */
.cst-err{
  display: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 0.15rem;
}
.cst-err.show{ display: block; }

.cst-form-err{
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  margin-top: 1rem;
}

/* ── odoslanie ────────────────────────────────────────── */
.cst-submit{
  width: 100%;
  min-height: 54px;
  margin-top: 0.5rem;
  font-family: var(--font-condensed);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 22px var(--blue-glow);
}
.cst-submit:hover:not(:disabled){
  background: var(--blue-dark);
  transform: translateY(-2px);
}
.cst-submit:disabled{
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

/* ── hotovo ───────────────────────────────────────────── */
.cst-done{
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px solid rgba(33, 150, 243, 0.3);
  border-radius: var(--radius);
  background: rgba(33, 150, 243, 0.05);
}

.cst-done h3{
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  text-transform: uppercase;
  color: var(--white);
  margin: 0.75rem 0 0.5rem;
}

.cst-done-order{
  display: inline-block;
  font-family: var(--font-condensed);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: var(--radius);
  padding: 0.4rem 1rem;
  margin-bottom: 0.875rem;
}

.cst-done-text{
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 48ch;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════
   MODAL NÁHĽADU FARBY
══════════════════════════════════════════════════════════ */
.cst-modal{
  position: fixed;
  inset: 0;
  /* 2000 = rovnaká hladina ako .size-chart-modal. Prebraných 120 zo zdroja
     by na tejto stránke skončilo pod sticky hlavičkou (300). */
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.125rem;
}
.cst-modal[hidden]{ display: none; }

.cst-modal-overlay{
  position: absolute;
  inset: 0;
  background: rgba(9, 16, 28, 0.78);
  backdrop-filter: blur(3px);
}

.cst-modal-card{
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--black-2);
  border: 1px solid rgba(33, 150, 243, 0.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.cst-modal-imgwrap{
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cst-modal-img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.cst-modal-noimg{
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.5);
  padding: 1.875rem 1.25rem;
  text-align: center;
}

.cst-modal-name{
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0.875rem 0.125rem 0.25rem;
}

.cst-modal-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin-top: 0.875rem;
}

.cst-btn-primary,
.cst-btn-secondary{
  font-family: var(--font-condensed);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 48px;
  padding: 0.75rem 1.125rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cst-btn-primary{
  background: var(--blue);
  color: var(--white);
  border: 1px solid var(--blue);
}
.cst-btn-primary:hover{ background: var(--blue-dark); border-color: var(--blue-dark); }

.cst-btn-secondary{
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.cst-btn-secondary:hover{ border-color: var(--white); color: var(--white); }

/* ══════════════════════════════════════════════════════════
   MOBILE — 90 % trafficu
══════════════════════════════════════════════════════════ */
@media (max-width: 768px){
  .shop-hero{ min-height: clamp(320px, 62vh, 440px); }
  .shop-hero__inner{ padding: 2rem 1.125rem 2.25rem; }
  .shop-hero__cta{ flex-direction: column; }
  .shop-hero__btn{ width: 100%; }

  #vlastna-vysivka{ padding: 3.5rem 1.125rem 4rem; }
  .cst-lead{ margin-bottom: 2.25rem; }
  .cst-form{ gap: 2.25rem; }
  .cst-swatches{ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 480px){
  /* Pri dvoch kartách vedľa seba by sa názvy lámali — pod seba. */
  .cst-choice{ grid-template-columns: 1fr; }
  .cst-swatches{ grid-template-columns: 1fr 1fr; }
  .cst-swatch-name{ font-size: 0.82rem; }

  /* 16px zabráni zoomu na iOS pri fokuse. */
  .cst-form input[type="text"],
  .cst-form input[type="tel"],
  .cst-form input[type="email"],
  .cst-form select,
  .cst-form textarea{ font-size: 1rem; }
}
