/* === 3DAKVARIA / Homepage CSS FINAL (BOXED, WHITE ONLY) ===
   Finální udržitelná verze:
   - žádné full-bleed / 100vw / breakout
   - žádná modrá plocha (všude bílé pozadí)
   - jedna pravda pro šířku a odsazení (tokens níže)
   - cílený hotfix proti Shoptet limitu .welcome div/h1 { max-width:800px; }
*/

/* =========================
   Design tokens (JEDINÁ pravda)
   ========================= */
:root {
  --c-text: #0f172a;
  --c-muted: #64748b;
  --c-border: #e5e7eb;
  --c-bg: #ffffff;
  --c-bg2: #f8fafc;
  --c-accent: #2fa4a9;

  /* nastavte dle headeru (u vás aktuálně funguje 1420px) */
  --hp-page-width: 1420px;
  --hp-gutter: 16px;
}

/* =========================
   Base: container a typografie
   ========================= */
.hp-container {
  max-width: var(--hp-page-width);
  width: 100%;
  margin: 0 auto;
  padding-left: var(--hp-gutter);
  padding-right: var(--hp-gutter);
}

.hp-muted {
  color: var(--c-muted);
}

.hp-h2 {
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.2;
  margin: 0 0 10px;
  font-weight: 650;
  color: var(--c-text);
}

/* =========================
   Rytmus sekcí
   ========================= */
.hp-hero {
  padding: 40px 0 28px;
  background: #fff;
}
.hp-section {
  padding: 40px 0;
  background: #fff;
}
.hp-section--alt {
  background: var(--c-bg2);
}

@media (max-width: 640px) {
  .hp-hero {
    padding: 28px 0 18px;
  }
  .hp-section {
    padding: 28px 0;
  }
}

/* =========================
   HERO
   ========================= */
.hp-hero h1 {
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.08;
  margin: 0 0 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--c-text);
}

.hp-hero p {
  color: var(--c-muted);
  margin: 0 0 18px;
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.65;
}

/* layout hero: dvousloupec (bez pozadí) */
.hp-hero .hp-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}
.hp-hero-text {
  min-width: 0;
}

/* vizuální plocha (jen jemná karta) */
.hp-hero .hp-hero-media {
  min-height: 320px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(
      circle at 25% 25%,
      rgba(47, 164, 169, 0.14),
      transparent 55%
    ),
    radial-gradient(circle at 80% 70%, rgba(15, 23, 42, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(248, 250, 252, 1), rgba(255, 255, 255, 1));
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.06);
}

@media (max-width: 900px) {
  .hp-hero .hp-container {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .hp-hero .hp-hero-media {
    min-height: 180px;
  }
}

/* CTA */
.hp-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}

/* =========================
   Buttons
   ========================= */
.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 650;
  border: 1px solid var(--c-text);
  text-decoration: none !important;
  line-height: 1.1;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease;
  color: var(--c-text);
  background: #fff;
  font-size: 16px;
}
.hp-btn:active {
  transform: translateY(1px);
}

.hp-btn--primary {
  background: var(--c-text);
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}
.hp-btn--primary:hover {
  background: #111827;
  color: #fff !important;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}
.hp-btn--secondary {
  background: #fff;
  color: var(--c-text) !important;
}
.hp-btn--secondary:hover {
  background: var(--c-bg2);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
}

/* =========================
   Top kategorie – dlaždice
   ========================= */
.hp-cats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.hp-cat {
  border: 1px solid var(--c-border);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  display: block;
  min-height: 86px;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
  text-decoration: none !important;
  color: var(--c-text) !important;
}
.hp-cat:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 164, 169, 0.35);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
}
.hp-cat span {
  display: block;
  font-weight: 650;
  line-height: 1.25;
  font-size: 17px;
  text-decoration: none !important;
}
.hp-cat-sub {
  display: block;
  margin-top: 6px;
  color: var(--c-muted) !important;
  font-size: 15.5px;
  line-height: 1.4;
  text-decoration: none !important;
}
.hp-cat * {
  text-decoration: none !important;
}

@media (max-width: 1024px) {
  .hp-cats {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .hp-cats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .hp-cat {
    padding: 14px;
    min-height: 78px;
  }
}

/* =========================
   Proč 3DAkvaria – karty
   ========================= */
.hp-grid-4 {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.hp-card {
  border: 1px solid var(--c-border);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.hp-card-title {
  font-weight: 650;
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.25;
}
.hp-card-text {
  color: var(--c-muted);
  line-height: 1.55;
  font-size: 16px;
}

@media (max-width: 1024px) {
  .hp-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .hp-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Akvárium na klíč – split
   ========================= */
.hp-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
.hp-split-media {
  background: linear-gradient(135deg, #e6f4f5, #ffffff);
  border-radius: 20px;
  min-height: 240px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
@media (max-width: 768px) {
  .hp-split {
    grid-template-columns: 1fr;
  }
  .hp-split-media {
    min-height: 180px;
  }
}

/* =========================
   Products feed – karty
   ========================= */
.hp-rowhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.hp-link {
  color: var(--c-muted);
  text-decoration: none;
  font-weight: 650;
}
.hp-link:hover {
  color: var(--c-text);
}

.hp-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.hp-prod {
  border: 1px solid var(--c-border);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}
.hp-prod:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 164, 169, 0.35);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
}
.hp-prod-img {
  aspect-ratio: 4/3;
  background: var(--c-bg2);
  position: relative;
}
.hp-prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hp-products .hp-prod-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.hp-products .hp-prod-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(2, 6, 23, 0.06));
  pointer-events: none;
}
.hp-prod-body {
  padding: 12px 12px 14px;
}
.hp-prod-title {
  margin: 0 0 8px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--c-text);
}
.hp-prod-meta {
  color: var(--c-muted);
  font-size: 0.95rem;
  line-height: 1.35;
  opacity: 0.92;
}

@media (max-width: 1024px) {
  .hp-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .hp-products {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Kategorie integrace (pokud používáte i na kategoriích)
   ========================= */
.hp-category .hp-section {
  padding-bottom: 24px;
}
.hp-category h1,
.hp-category .hp-h1 {
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 10px;
}
@media (max-width: 640px) {
  .hp-category h1,
  .hp-category .hp-h1 {
    font-size: 1.6rem;
  }
}

/* Skrytí "Nejprodávanější" promo bloku (pokud používáte) */
html.hp-cat .products-top-wrapper {
  display: none !important;
}

/* =========================
   HOMEPAGE: odstranění systémového oddělovače pod bannerem (homepage-only)
   ========================= */
html.hp-home hr {
  display: none !important;
}
html.hp-home .content-wrapper > *:first-child {
  border-bottom: none !important;
}
html.hp-home .slider-wrapper,
html.hp-home .banner-wrapper {
  border-bottom: none !important;
}

/* =========================
   HOMEPAGE: sjednocení shoptetích wrapperů na stejnou šířku (homepage-only)
   ========================= */
html.hp-home .content-wrapper.homepage-box .container,
html.hp-home .content-wrapper.homepage-box .content-wrapper-in,
html.hp-home .content-wrapper.homepage-box .content-inner {
  max-width: var(--hp-page-width) !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--hp-gutter);
  padding-right: var(--hp-gutter);
}

/* =========================
   HOMEPAGE: hotfix proti Shoptet limitu .welcome div/h1 { max-width:800px; }
   Cíleně jen v welcome wrapperu, kde je váš marker.
   ========================= */
html.hp-home .welcome-wrapper.hp-unlock-target .welcome div,
html.hp-home .welcome-wrapper.hp-unlock-target .welcome h1 {
  max-width: none !important;
}

/* Pojistka: žádné barevné pozadí (bílé všude) */
html.hp-home .hp-hero,
html.hp-home .hp-section,
html.hp-home .hp-section--cats,
html.hp-home .hp-section--alt {
  background: #fff;
  background-image: none;
}
/* =========================
   PREMIUM polish #1: Typografie (homepage-only)
   ========================= */
html.hp-home .hp-root {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* H1: mírně kultivovanější tracking + stabilnější rytmus */
html.hp-home .hp-hero h1 {
  letter-spacing: -0.015em; /* jemně víc premium než -0.01 */
}

/* Sekundární text: lehce vyšší kontrast = méně "vyblité" */
html.hp-home .hp-muted,
html.hp-home .hp-hero p,
html.hp-home .hp-card-text,
html.hp-home .hp-prod-meta {
  color: color-mix(in srgb, var(--c-muted) 88%, var(--c-text));
}

/* Titulky karet a dlaždic: optické sjednocení */
html.hp-home .hp-card-title,
html.hp-home .hp-cat span,
html.hp-home .hp-prod-title {
  letter-spacing: -0.005em;
}
/* =========================
   PREMIUM polish #2: Rytmus sekcí (homepage-only)
   ========================= */

/* Znovu povolit "alt" podklad – stále bílé/šedobílé, žádná modrá */
html.hp-home .hp-section--alt {
  background: var(--c-bg2) !important;
}

/* Sjednocení vertikálních mezer pro head + perex + obsah */
html.hp-home .hp-h2 {
  margin: 0 0 12px;
}
html.hp-home .hp-rowhead {
  margin-bottom: 16px;
}
html.hp-home .hp-section .hp-muted {
  margin-top: 0;
  margin-bottom: 14px;
}

/* Jemně větší "dýchání" mezi hero a další sekcí bez změny layoutu */
html.hp-home .hp-hero {
  padding-bottom: 32px;
}
html.hp-home .hp-section {
  padding: 44px 0;
}

@media (max-width: 640px) {
  html.hp-home .hp-section {
    padding: 30px 0;
  }
}
/* =========================
   PREMIUM polish #3: Micro-interakce (homepage-only)
   ========================= */

/* Univerzální "ring" bez posunu layoutu */
html.hp-home .hp-cat,
html.hp-home .hp-prod,
html.hp-home .hp-btn {
  outline: none;
}

/* Hover: jemně konzistentnější stín a ring */
html.hp-home .hp-cat:hover,
html.hp-home .hp-prod:hover {
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.06),
    0 0 0 3px rgba(47, 164, 169, 0.1);
}

/* Focus-visible: jasné, ale ne agresivní (a11y) */
html.hp-home .hp-cat:focus-visible,
html.hp-home .hp-prod:focus-visible,
html.hp-home .hp-btn:focus-visible,
html.hp-home .hp-link:focus-visible {
  box-shadow:
    0 0 0 3px rgba(47, 164, 169, 0.22),
    0 10px 18px rgba(0, 0, 0, 0.06);
  border-color: rgba(47, 164, 169, 0.45);
}

/* Produkty: mikro zoom na obrázku (působí "moderně") */
html.hp-home .hp-prod-img img {
  transition: transform 0.18s ease;
  transform: translateZ(0);
}
html.hp-home .hp-prod:hover .hp-prod-img img {
  transform: scale(1.02);
}

/* CTA: drobné zjemnění hover chování (méně "skákavé") */
html.hp-home .hp-btn:hover {
  transform: translateY(-1px);
}
html.hp-home .hp-btn:active {
  transform: translateY(0);
}
/* Homepage – odstranit falešný scrollbar u prázdných media boxů */
html.hp-home .hp-hero-media,
html.hp-home .hp-split-media {
  overflow: hidden;
}
/* HERO – hlavní vizuál */
html.hp-home .hp-hero-media {
  background: url("https://cdn.myshoptet.com/usr/www.3dakvaria.cz/user/documents/upload/mceclip1-2.jpg")
    center / cover no-repeat;
  border-radius: 18px;
  min-height: 320px;
  overflow: hidden;
}

/* SLUŽBA – akvárium na klíč */
html.hp-home .hp-split-media {
  background: url("https://cdn.myshoptet.com/usr/www.3dakvaria.cz/user/documents/upload/mceclip0-5.jpg")
    center / cover no-repeat;
  border-radius: 18px;
  min-height: 320px;
  overflow: hidden;
}
/* HERO layout – zajistí, že media má reálnou šířku */
html.hp-home .hp-hero .hp-container {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
}

/* Media box musí vyplnit svůj grid sloupec */
html.hp-home .hp-hero-media {
  width: 100%;
  min-height: 360px;
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  overflow: hidden;
}
@media (max-width: 900px) {
  html.hp-home .hp-hero .hp-container {
    grid-template-columns: 1fr;
  }

  html.hp-home .hp-hero-media {
    min-height: 220px;
    margin-top: 24px;
  }
}

/* =========================
   SPLIT layout – Akvárium na klíč (homepage-only)
   ========================= */
html.hp-home .hp-container.hp-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 48px;
}

/* Media box vyplní svůj sloupec a bude držet rozumnou výšku */
html.hp-home .hp-split-media {
  width: 100%;
  min-height: 360px;
  border-radius: 18px;
  overflow: hidden;

  /* pokud už máš background url nastavený, stačí tyto 2 řádky */
  background-size: cover;
  background-position: center;
}

/* Mobil: pod sebe */
@media (max-width: 900px) {
  html.hp-home .hp-container.hp-split {
    grid-template-columns: 1fr;
  }

  html.hp-home .hp-split-media {
    min-height: 220px;
    margin-top: 24px;
  }
}
/* =========================
   Homepage – dlaždice místo slideru
   ========================= */

html.hp-home .hp-section--tiles {
  padding-top: 36px;
  padding-bottom: 20px;
}

html.hp-home .hp-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}

html.hp-home .hp-tile {
  display: block;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

html.hp-home .hp-tile-title {
  display: block;
  font-weight: 650;
  margin-bottom: 6px;
  color: var(--c-text);
}

html.hp-home .hp-tile-text {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.45;
}

html.hp-home .hp-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

/* Mobil */
@media (max-width: 900px) {
  html.hp-home .hp-tiles {
    grid-template-columns: 1fr;
  }
}
