/* ==========================================================
   GOOGLE FONTS
========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* plynulé přeskočení na sekci přes odkazy s #kotvou (hero tlačítka atd.) */
html {
  scroll-behavior: smooth;
}


/* ==========================================================
   DESIGN TOKENS
   ─────────────────────────────────────────────────────────
   NAMING CONVENTION (project-agnostic, reusable kit):

   Raw palette  →  --sh-[role]-[scale]
                   e.g. --sh-brand-600, --sh-neutral-900

   Semantic     →  --sh-color-[intent]
                   e.g. --sh-color-cta, --sh-color-bg

   Shoptet      →  --color-*, --colors-*, --template-*
                   Overriding these means Shoptet's own
                   components pick up your brand automatically,
                   reducing the need for manual selector overrides.
========================================================== */

:root {

  /* ──────────────────────────────────────────────────────
     1. RAW PALETTE
     Only change this block when rebranding a new project.
     Everything else derives from these values.
  ────────────────────────────────────────────────────── */

  /* Brand — Šípek (Rosehip). Primary/transactional actions (Do košíku,
     Nakoupit teď, Odebírat) get the full color fill. */
  --sh-brand-900: #7A2A1C;   /* deepest — pressed / dark accents */
  --sh-brand-600: #C1442E;   /* main CTA color — šípek */
  --sh-brand-500: #9F3823;   /* hover */
  --sh-brand-200: #EFD3C9;   /* subtle / backgrounds */
  --sh-brand-100: #E5BFAC;   /* subtle hover */

  /* Cool secondary — muted neutral, for muted text/labels only
     (not a brand hue — kept deliberately quiet) */
  --sh-cool-600:  #857D72;
  --sh-cool-100:  #ECE8DF;

  /* Jedle (Fir) — druhá barva vedle šípku: udává "kde právě jsi"
     (aktivní kategorie, šipky slideru) a patičku. Šípek = akce,
     jedle = navigace/poloha. (Modrá Azul Golfinho zkoušena a
     zavržena — zelená sedí líp.) */
  --sh-jedle-900: #1F3A2E;   /* patička */
  --sh-jedle-600: #2F5245;   /* aktivní stav — výchozí sytá */
  --sh-jedle-400: #4F8A6D;   /* hover — zřetelně světlejší, ne jen o pár % tmavší */
  --sh-jedle-100: #DCE7E1;   /* bledá — momentálně nepoužita v komponentách */

  /* Neutral */
  --sh-neutral-900: #1B1712; /* text, headings */
  --sh-neutral-100: #FBF9F4; /* light background */
  --sh-neutral-50:  #F4F1E9; /* surface / cards */

  /* Utility — text on dark/brand backgrounds */
  --sh-on-brand:       #F7F4EC;
  --sh-on-brand-muted: rgba(247, 244, 236, 0.75);


  /* ──────────────────────────────────────────────────────
     2. SEMANTIC COLOR ALIASES
     Use these throughout all other CSS files.
     Never reference raw palette variables in other files.
  ────────────────────────────────────────────────────── */

  /* CTA — primary action color (šípek). Used for filled primary
     buttons AND as the quiet accent (links, active tab, focus,
     výrobce nad produktem) — same tone carries both roles now. */
  --sh-color-cta:              var(--sh-brand-600);
  --sh-color-cta-hover:        var(--sh-brand-500);
  --sh-color-cta-subtle:       var(--sh-brand-200);
  --sh-color-cta-subtle-hover: var(--sh-brand-100);
  --sh-color-cta-dark:         var(--sh-brand-900);

  /* Accent — alias of CTA, kept as a separate name so files can say
     *why* they're using the color (link/indicator) even though the
     value is identical. */
  --sh-color-accent:           var(--sh-color-cta);
  --sh-color-accent-hover:     var(--sh-color-cta-hover);
  --sh-color-accent-subtle:    var(--sh-color-cta-subtle);

  /* Sekundární tlačítka (Načíst další, Pokračovat v nákupu) — obrys,
     ne plná výplň, ale ve stejné barvě jako CTA. Segmentační dlaždice
     na homepage mají teď vlastní výplň v --sh-color-active, ne
     tenhle token. */
  --sh-color-secondary-btn:    var(--sh-color-cta);

  /* Secondary — muted neutral labels, tags, decorative elements */
  --sh-color-cool:             var(--sh-cool-600);
  --sh-color-cool-subtle:      var(--sh-cool-100);
  --sh-color-cool-dark:        var(--sh-jedle-900);

  /* Aktivní stav / navigace (kde v kategoriích právě jsi, šipky
     slideru, segmentace) — jedle. -hover je zřetelně světlejší tón
     (ztmavení o 900 bylo na hoveru málo vidět); -subtle zatím nikde
     nepoužíváme (bledá zelená nesedla). */
  --sh-color-active:           var(--sh-jedle-600);
  --sh-color-active-hover:     var(--sh-jedle-400);
  --sh-color-active-subtle:    var(--sh-jedle-100);

  /* Text */
  --sh-color-text:                var(--sh-neutral-900);
  --sh-color-text-muted:          var(--sh-cool-600);
  --sh-color-text-inverse:        var(--sh-on-brand);
  --sh-color-text-inverse-muted:  var(--sh-on-brand-muted);

  /* Backgrounds */
  --sh-color-bg:      var(--sh-neutral-100);
  --sh-color-surface: var(--sh-neutral-50);
  --sh-color-border:  rgba(27, 23, 17, 0.14);


  /* ──────────────────────────────────────────────────────
     3. SHOPTET NATIVE VARIABLE OVERRIDES
     These propagate your brand into Shoptet's own
     components automatically — header, nav, buttons,
     links, form controls — without needing extra selectors.
  ────────────────────────────────────────────────────── */

  /* Fonts */
  --template-font:          'Inter', sans-serif;
  --template-headings-font: 'Plus Jakarta Sans', sans-serif;

  /* Header & nav background = your light bg */
  --color-primary:          var(--sh-neutral-100);
  --color-primary-hover:    var(--sh-neutral-50);

  /* CTA / links / buttons = your brand color */
  --color-secondary:        var(--sh-brand-600);
  --color-secondary-hover:  var(--sh-brand-500);

  /* Page background & body text */
  --color-tertiary:         var(--sh-neutral-100);
  --color-tertiary-hover:   var(--sh-neutral-900);

  /* Surface & text tokens used by newer Shoptet components */
  --colors-surface-primary:               var(--sh-neutral-100);
  --colors-surface-secondary:             var(--sh-neutral-50);
  --colors-foregrounds-content-primary:   var(--sh-neutral-900);
  --colors-foregrounds-headlines-primary: var(--sh-neutral-900);
  --colors-foregrounds-content-secondary: var(--sh-cool-600);
  --colors-foregrounds-borders-secondary: var(--sh-color-border);

  /* slevový štítek (.flag-discount) používá na pozadí --colors-tags-blue
     (ne --colors-forms-informative, i když obě jsou defaultně stejná
     modrá main-14.css: ".flag.flag-discount{background-color:var(--colors-tags-blue)}")
     — přepsáno na náš CTA odstín */
  --colors-tags-blue: var(--sh-color-cta);


  /* ──────────────────────────────────────────────────────
     4. TYPOGRAPHY
  ────────────────────────────────────────────────────── */

  --sh-font-family-headings: 'Plus Jakarta Sans', sans-serif;
  --sh-font-family-body:     'Inter', sans-serif;

  --sh-text-xs:   clamp(1.18rem, calc(1.141rem + 0.147vw), 1.32rem);
  --sh-text-sm:   clamp(1.25rem, calc(1.21rem  + 0.16vw),  1.40rem);
  --sh-text-base: clamp(1.33rem, calc(1.286rem + 0.177vw), 1.50rem);
  --sh-text-lg:   clamp(1.375rem, 1.25rem + .5vw,  1.625rem);
  --sh-text-xl:   clamp(1.75rem,  1.55rem + .8vw,  2.125rem);

  --sh-heading-sm:   clamp(2rem,   1.6rem + 1.1vw, 2.6rem);
  --sh-heading-md:   clamp(2.5rem, 2rem   + 1.6vw, 3.6rem);
  --sh-heading-hero: clamp(4rem,   3rem   + 2.8vw, 6rem);

  --sh-font-weight-body:    400;
  --sh-font-weight-medium:  400;
  --sh-font-weight-bold:    405;
  --sh-font-weight-heading: 400;

  --sh-line-height-body:       1.75;
  --sh-line-height-heading-sm: 1.5;
  --sh-line-height-heading:    1.2;


  /* ──────────────────────────────────────────────────────
     5. SPACING
  ────────────────────────────────────────────────────── */

  --sh-space-page: clamp(20px, 5vw, 72px);

  --sh-space-xs: 8px;
  --sh-space-s:  clamp(12px, 1.5vw, 16px);
  --sh-space-sm: clamp(16px, 2vw,   24px);
  --sh-space-md: clamp(32px, 3vw,   48px);
  --sh-space-lg: clamp(48px, 4.5vw, 72px);
  --sh-space-xl: clamp(64px, 6vw,   96px);

  --sh-space-section:        clamp(56px, 6vw,   96px);
  --sh-space-section-mobile: clamp(48px, 5vw,   64px);
  --sh-space-card:           clamp(16px, 2vw,   32px);
  --sh-space-box:            clamp(16px, 2vw,   40px);

  /* rytmus "hlavní nadpis → podtext → tlačítko" (hero na homepage,
     H1 stránek, úvodní text na Spolku...) – vlastní menší škála,
     protože 20px/35px neodpovídá žádnému z tokenů výše */
  --sh-space-title-gap: clamp(14px, 2vw, 20px);
  --sh-space-lead-gap:  clamp(20px, 3vw, 35px);


  /* ──────────────────────────────────────────────────────
     6. LAYOUT
  ────────────────────────────────────────────────────── */

  --sh-container-width: 1440px;


  /* ──────────────────────────────────────────────────────
     7. RADIUS
  ────────────────────────────────────────────────────── */

  --sh-radius-sm:  clamp(2px, 0.15vw, 4px);
  --sh-radius-md:  0px;
  --sh-radius-btn: 999px;


  /* ──────────────────────────────────────────────────────
     8. ANIMATION & INTERACTION
  ────────────────────────────────────────────────────── */

  --sh-transition: all .4s cubic-bezier(.25, 1, .5, 1);

  /* Button hover — Option B: color only, no lift
     Change these two variables to restyle ALL button hovers
     across the whole project at once. */
  --sh-btn-hover-transform: none;
  --sh-btn-hover-shadow:    none;

}


/* ==========================================================
   GLOBAL ELEMENT RULES
   (must be outside :root — applies to HTML elements)
========================================================== */

strong,
b {
  font-weight: var(--sh-font-weight-bold);
}


/* ==========================================================
   ANIMATIONS
   Defined once here. Removed duplicate from my_homepage.css.
========================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ==========================================================
   CUSTOM BUTTONS
   .sh-btn = your own HTML block buttons
   Note: --sh-color-accent* renamed to --sh-color-cta*
         Update references in other files accordingly.
========================================================== */

.sh-btn {
  display: inline-block;
  padding: 14px 40px;

  font-family: var(--sh-font-family-headings);
  font-size: var(--sh-text-base);
  font-weight: var(--sh-font-weight-body);

  text-align: center;
  text-decoration: none !important;

  border: 1px solid transparent;
  border-radius: var(--sh-radius-btn);

  cursor: pointer;
  transition: var(--sh-transition);
}

.sh-btn--primary {
  background: var(--sh-color-cta);
  color: var(--sh-color-text-inverse) !important;
}

.sh-btn--primary:hover {
  background: var(--sh-color-cta-hover);
  transform: var(--sh-btn-hover-transform);
  box-shadow: var(--sh-btn-hover-shadow);
}

.sh-btn--secondary {
  background: var(--sh-color-bg);
  color: var(--sh-color-text) !important;
  border-color: var(--sh-color-bg);
}

.sh-btn--secondary:hover {
  background: var(--sh-color-surface);
  border-color: var(--sh-color-surface);
  color: var(--sh-color-text) !important;
  transform: var(--sh-btn-hover-transform);
  box-shadow: var(--sh-btn-hover-shadow);
}

.sh-btn--outline {
  background: transparent;
  color: var(--sh-color-text) !important;
  border: 1.5px solid var(--sh-color-text);
}

.sh-btn--outline:hover {
  background: var(--sh-color-text);
  color: var(--sh-color-bg) !important;
  transform: var(--sh-btn-hover-transform);
  box-shadow: var(--sh-btn-hover-shadow);
}


/* ==========================================================
   SHOPTET SYSTEM BUTTONS
   .btn = Shoptet's own class — now mostly handled via
   --color-secondary override above. These rules remain for
   layout/radius/font overrides Shoptet doesn't expose as
   variables.
========================================================== */

.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 14px 40px;

  border: none;
  border-radius: var(--sh-radius-btn);

  font-family: var(--sh-font-family-body);
  font-size: var(--sh-text-base);
  font-weight: var(--sh-font-weight-medium);
  line-height: var(--sh-line-height-body);
  text-decoration: none;

  cursor: pointer;
  box-shadow: none !important;

  transition: var(--sh-transition);
}

.btn:hover,
a.btn:hover,
button[class*="btn"]:hover,
a[class*="btn"]:hover {
  transform: var(--sh-btn-hover-transform);
  box-shadow: var(--sh-btn-hover-shadow);
  text-decoration: none;
}

.btn:focus,
a.btn:focus,
button[class*="btn"]:focus,
a[class*="btn"]:focus {
  outline: none;
  box-shadow: none !important;
}

.btn:disabled,
button[class*="btn"]:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* menší postranní padding na tabletu/mobilu — jinak se text s ikonou
   (např. "Do košíku") zalamuje na dva řádky */
@media (max-width: 767px) {
  .btn,
  a.btn {
    padding: 14px 20px;
  }
}

/* .btn-primary – tlačítko Hledat v search widgetu + potvrzovací
   tlačítka ve formulářích. main-14 mu dává obrysovou variantu (bílé
   pozadí, --color-secondary text/border = naše šípková). Přebarveno
   na plnou "jedle" zelenou — stejná paleta jako aktivní stavy
   navigace/kategorií (--sh-color-active). */
.btn.btn-primary,
a.btn.btn-primary {
  background: var(--sh-color-active) !important;
  border-color: var(--sh-color-active) !important;
  color: var(--sh-color-text-inverse) !important;
}

.btn.btn-primary:hover,
a.btn.btn-primary:hover {
  background: var(--sh-color-active-hover) !important;
  border-color: var(--sh-color-active-hover) !important;
  color: var(--sh-color-text-inverse) !important;
}


/* ==========================================================
   FORM ELEMENTS
========================================================== */

.form-control,
input,
select,
textarea {
  border-radius: var(--sh-radius-md) !important;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--sh-color-accent) !important;
  box-shadow: 0 0 0 3px var(--sh-color-accent-subtle) !important;
}

/* prohlížečovo/heslenkářovo výchozí modré pozadí vyplněného pole
   (Chrome autofill) — background-color samo o sobě autofill nepřebije,
   potřebuje se tenhle inset box-shadow trik + přepsání barvy textu */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--sh-color-surface) inset !important;
  box-shadow: 0 0 0 1000px var(--sh-color-surface) inset !important;
  -webkit-text-fill-color: var(--sh-color-text) !important;
  caret-color: var(--sh-color-text);
  transition: background-color 5000s ease-in-out 0s;
}


/* ==========================================================
   COOKIE LIŠTA
   Umístěno v base.css — jde o globální UI prvek nezávislý na
   layoutu stránky (podobně jako .btn/.form-control výše), ne
   o obsah hlavičky/patičky.
========================================================== */

/* plovoucí karta vpravo dole (inspirace: viz zadání úkolu) místo
   pruhu přes celou šířku – main-14 dává .siteCookies přes CSS
   left:0;right:0, což roztahuje box na celou šířku; zrušením left
   a ponecháním jen right/bottom se box zmenší na obsah, přesně jako
   Shoptetova vlastní varianta ".siteCookies--right", jen bez závislosti
   na tom, jestli je v adminu nastavená */
.siteCookies {
  left: auto !important;
  right: var(--sh-space-page) !important;
  bottom: var(--sh-space-page) !important;
}

.siteCookies__form {
  background-color: var(--sh-color-surface) !important;
  border-radius: var(--sh-radius-md) !important;
  box-shadow: 0 12px 40px rgba(27, 23, 17, .16) !important;

  margin: 0 !important;
  max-width: min(400px, calc(100vw - 2 * var(--sh-space-page))) !important;
  padding: var(--sh-space-md) !important;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sh-space-sm);
}

/* main-14 balí text a odkaz "Nastavení" do jednoho .siteCookies__content
   – display:contents ho z boxového stromu odstraní, takže .siteCookies__text
   a .siteCookies__links se chovají jako přímé flex položky .siteCookies__form
   a "Nastavení" tak může sedět vedle "Přijmout vše" ve stejné řadě,
   místo aby zůstal přilepený pod odstavcem textu */
.siteCookies__content {
  display: contents;
}

.siteCookies__text {
  font-family: var(--sh-font-family-body);
  font-size: var(--sh-text-sm);
  font-weight: var(--sh-font-weight-body);
  line-height: var(--sh-line-height-body);
  color: var(--sh-color-text);

  margin: 0;
}

.siteCookies__text a {
  color: var(--sh-color-accent);
  text-decoration: underline;
  transition: var(--sh-transition);
}

.siteCookies__text a:hover {
  color: var(--sh-color-accent-hover);
}

/* společná řada tlačítek: "Nastavení" (odkaz) + "Přijmout vše" */
.siteCookies__links,
.siteCookies__buttonWrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sh-space-xs);
  margin: 0;
  width: 100%;
}

/* "Nastavení" – main-14 mu dává vzhled orámovaného tlačítka
   (border/padding/line-height), jen v našich barvách místo
   Shoptetových cookies-notice proměnných */
.siteCookies__link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  background: transparent !important;
  border: 1.5px solid var(--sh-color-text) !important;
  border-radius: var(--sh-radius-btn) !important;
  padding: 14px 28px !important;

  font-family: var(--sh-font-family-body);
  font-size: var(--sh-text-base);
  font-weight: var(--sh-font-weight-medium);
  line-height: var(--sh-line-height-body) !important;
  color: var(--sh-color-text) !important;
  text-decoration: none !important;

  cursor: pointer;
  transition: var(--sh-transition);
}

.siteCookies__link:hover {
  background: var(--sh-color-text) !important;
  color: var(--sh-color-bg) !important;
  transform: var(--sh-btn-hover-transform);
  box-shadow: var(--sh-btn-hover-shadow);
}

.siteCookies__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 28px;
  border-radius: var(--sh-radius-btn);
  border: none;

  font-family: var(--sh-font-family-body);
  font-size: var(--sh-text-base);
  font-weight: var(--sh-font-weight-medium);
  line-height: var(--sh-line-height-body);

  cursor: pointer;
  transition: var(--sh-transition);
}

/* Přijmout vše — primární CTA (jediné tlačítko, vedle odkazu
   "Nastavení" – tenhle shop nemá samostatné tlačítko "Odmítnout") */
.siteCookies__button[value="all"] {
  background: var(--sh-color-cta);
  color: var(--sh-color-text-inverse);
}

.siteCookies__button[value="all"]:hover {
  background: var(--sh-color-cta-hover);
  transform: var(--sh-btn-hover-transform);
  box-shadow: var(--sh-btn-hover-shadow);
}

/* na mobilu je plovoucí karta se third-button řadou příliš úzká –
   vrací se na pruh přes celou šířku dole, tlačítka pod sebou */
@media (max-width: 767px) {
  .siteCookies {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
  }

  .siteCookies__form {
    max-width: none !important;
    border-radius: var(--sh-radius-md) var(--sh-radius-md) 0 0 !important;
    padding: var(--sh-space-sm) var(--sh-space-page) !important;
  }

  .siteCookies__link,
  .siteCookies__button {
    flex: 1 1 0;
  }
}
