/* ==========================================================================
   Kegljišče Triglav - design system
   ========================================================================== */
:root {
  --sky: #2E86AB;
  --sky-light: #AEE3F2;
  --sun: #F4C542;
  --sun-light: #FDE8A8;
  --navy: #163247;
  --ink: #1C3144;
  --paper: #FBF8F1;
  --white: #ffffff;
  --line: #D9E6EC;
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 18px 40px -20px rgba(22, 50, 71, .35);
  --shadow-card: 0 10px 24px -14px rgba(22, 50, 71, .3);
  --font-display: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 1180px;
}

html, body { overflow-x: clip; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.1; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--sky); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--sun); color: var(--navy); padding: .6em 1em; z-index: 999; }
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---- layout helpers ---- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(48px, 8vw, 96px) 0; position: relative; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 24px; }
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.eyebrow { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sky); font-size: .8rem; }

/* ---- reveal ---- */
.reveal { opacity: 0; clip-path: inset(0 0 25% 0); transform: translateY(24px); transition: opacity .6s ease, clip-path .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(0); }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(251,248,241,.9); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-header__inner { max-width: var(--max); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.logo__mark { flex: none; }
.logo__word { display: flex; flex-direction: column; font-family: var(--font-display); line-height: 1.1; }
.logo__word strong { font-size: 1.05rem; }
.logo__word span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); }

.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }
.nav-list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: var(--navy); font-weight: 600; font-size: .95rem; padding: 6px 2px; position: relative; }
.nav-list a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--sun); transition: width .25s ease; }
.nav-list a:hover::after, .nav-list a[aria-current]::after { width: 100%; }
.cart-link { position: relative; display: inline-flex; align-items: center; justify-content: center; color: var(--navy); min-width: 44px; min-height: 44px; }
.cart-count { position: absolute; top: 0; right: -2px; background: var(--sun); color: var(--navy); font-size: .68rem; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); background: var(--white); flex-direction: column; justify-content: flex-start; padding: 100px 24px 24px; transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s ease; box-shadow: var(--shadow-soft); }
  body.nav-open .main-nav { transform: translateX(0); visibility: visible; }
  .nav-list { flex-direction: column; gap: 18px; }
}

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: .95rem; border: 2px solid transparent; cursor: pointer; position: relative; overflow: hidden; isolation: isolate; }
.btn--sun { background: var(--sun); color: var(--navy); }
.btn--sky { background: var(--sky); color: var(--white); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn--sweep::before { content: ""; position: absolute; inset: 0; left: -100%; width: 100%; background: rgba(255,255,255,.35); z-index: -1; transition: left .35s ease; }
.btn--sweep:hover::before { left: 0; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 10vw, 110px) 0 clamp(40px,6vw,70px); }
.hero__inner { max-width: var(--max); margin: 0 auto; padding: 0 24px; display: grid; gap: 40px; position: relative; z-index: 2; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.1fr .9fr; align-items: center; } }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.hero__lede { font-size: 1.15rem; max-width: 46ch; }
.hero-shape { position: absolute; transition: transform .2s ease-out; pointer-events: none; }
.hero-visual { position: relative; aspect-ratio: 1/1; }

/* ---- map canvas home composition ---- */
.map-canvas { position: relative; padding: 40px 0; }
.map-pin-card { position: relative; background: var(--white); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-card); border: 1px solid var(--line); }
.map-pin-card .pin-icon { position: absolute; top: -18px; left: 24px; background: var(--sun); color: var(--navy); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-card); }

/* ---- cards ---- */
.card { background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-card); transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.card__media { aspect-ratio: 4/3; overflow: hidden; background: var(--sky-light); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 20px; }
.card__price { font-weight: 700; color: var(--sky); font-size: 1.1rem; }
.badge { display: inline-flex; align-items: center; background: var(--sun-light); color: var(--navy); font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

/* ---- product strip (home) scroll-snap on mobile ---- */
.product-strip { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.product-strip .card { flex: 0 0 82%; scroll-snap-align: start; }
@media (min-width: 760px) { .product-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); overflow: visible; } .product-strip .card { flex: initial; } }

/* ---- lane planner (signature feature) ---- */
.lane-planner { background: var(--navy); color: var(--white); border-radius: var(--radius-lg); padding: clamp(24px,5vw,48px); position: relative; overflow: hidden; }
.lane-planner__grid { display: grid; gap: 28px; }
@media (min-width: 820px) { .lane-planner__grid { grid-template-columns: .9fr 1.1fr; align-items: start; } }
.lane-planner .field label { color: var(--sky-light); }
.lane-planner__controls { display: flex; gap: 16px; flex-wrap: wrap; }
.lane-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
@media (min-width: 480px) { .lane-grid { grid-template-columns: repeat(8, 1fr); } }
.lane-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: var(--radius-sm); border: 2px solid transparent; font-weight: 700; min-height: 56px; cursor: pointer; }
.lane-cell.is-free { background: var(--sun); color: var(--navy); }
.lane-cell.is-free:hover { border-color: var(--white); }
.lane-cell.is-busy { background: rgba(255,255,255,.1); color: rgba(255,255,255,.5); cursor: not-allowed; }
.lane-planner__status { margin-top: 14px; font-weight: 600; color: var(--sun-light); }

/* ---- forms ---- */
.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea { font: inherit; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--white); accent-color: var(--sky); min-height: 48px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sky); }
.field-error { color: #B3261E; font-size: .82rem; }
.form-msg { font-weight: 600; min-height: 1.4em; }
.form-msg.is-success { color: #237a4f; }
.form-msg.is-error { color: #B3261E; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.newsletter-form .field { flex-direction: row; gap: 8px; }
.newsletter-form input { flex: 1; }

/* ---- page hero (inner pages) ---- */
.page-hero { background: linear-gradient(135deg, var(--sky-light), var(--paper)); padding: 56px 0; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }

/* ---- breadcrumbs ---- */
.breadcrumbs { display: flex; gap: 8px; list-style: none; padding: 16px 0 0; margin: 0; font-size: .85rem; color: var(--sky); }
.breadcrumbs a { color: var(--sky); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--line); }

/* ---- notice ---- */
.notice { border-radius: var(--radius-md); padding: 18px 20px; border: 1.5px solid var(--line); background: var(--white); }
.notice--info { border-color: var(--sky); background: var(--sky-light); }
.notice--warning { border-color: var(--sun); background: var(--sun-light); }

/* ---- prose (legal pages) ---- */
.prose { max-width: 70ch; margin: 0 auto; }
.prose h2 { margin-top: 2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* ---- legal TOC ---- */
.legal-toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; margin: 0 auto 32px; max-width: 70ch; }
.legal-toc h2 { font-size: 1rem; margin-bottom: .6em; }
.legal-toc ol { margin: 0; padding-left: 1.2em; }

/* ---- faq ---- */
.faq { max-width: 70ch; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 6px 20px; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--sky); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 14px; }

/* ---- product detail ---- */
.product-detail { display: grid; gap: 32px; }
@media (min-width: 820px) { .product-detail { grid-template-columns: 1fr 1fr; } }
.product-detail__media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__price { font-size: 1.6rem; font-weight: 700; color: var(--sky); }

/* ---- cart ---- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px; display: grid; gap: 12px; }
.cart-summary__total { font-size: 1.3rem; font-weight: 700; display: flex; justify-content: space-between; }

/* ---- contact layout ---- */
.contact-layout { display: grid; gap: 32px; }
@media (min-width: 820px) { .contact-layout { grid-template-columns: 1fr 1fr; } }
.contact-info { display: grid; gap: 16px; }
.contact-info__item { display: flex; gap: 12px; align-items: flex-start; }
.contact-info__item svg { flex: none; color: var(--sky); }

/* ---- dividers / decorative ---- */
.divider { display: block; width: 100%; height: auto; }
.grain-overlay { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: .5; mix-blend-mode: multiply; z-index: 1; }

/* ---- footer ---- */
.site-footer { background: var(--navy); color: var(--sky-light); position: relative; margin-top: 60px; }
.footer-wave { width: 100%; height: 40px; display: block; transform: translateY(-100%); }
.site-footer__inner { max-width: var(--max); margin: 0 auto; padding: 0 24px 40px; display: grid; gap: 32px; }
@media (min-width: 760px) { .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer-col h3 { color: var(--white); font-size: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--sky-light); }
.footer-col a:hover { color: var(--sun); }
.logo--footer .logo__word strong { color: var(--white); }
.footer-contact a { color: var(--sun); font-weight: 700; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 16px 24px; text-align: center; font-size: .85rem; }

/* ---- cookie banner ---- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; background: var(--navy); color: var(--white); border-radius: var(--radius-md); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; box-shadow: var(--shadow-soft); max-width: 720px; margin: 0 auto; }
.cookie-banner a { color: var(--sun-light); }
.cookie-banner__actions { display: flex; gap: 10px; }

/* COMPONENTS: .wrap - centered max-width container */
/* COMPONENTS: .section - vertical page section padding */
/* COMPONENTS: .grid / .grid-2 / .grid-3 - responsive grid helpers */
/* COMPONENTS: .reveal - scroll-reveal animation target (add .in-view via JS) */
/* COMPONENTS: .site-header - sticky top header */
/* COMPONENTS: .logo / .logo__mark / .logo__word - brand logo mark + wordmark */
/* COMPONENTS: .main-nav / .nav-list / .nav-toggle - primary navigation + mobile toggle */
/* COMPONENTS: .cart-link / .cart-count - header cart icon and animated count badge */
/* COMPONENTS: .btn / .btn--sun / .btn--sky / .btn--outline / .btn--ghost / .btn--sweep - button variants incl. fill-sweep hover */
/* COMPONENTS: .hero / .hero__inner / .hero__lede / .hero-shape / .hero-visual - home hero with parallax shapes */
/* COMPONENTS: .map-canvas / .map-pin-card - map-like pinned content card composition */
/* COMPONENTS: .card / .card__media / .card__body / .card__price - generic content/product card */
/* COMPONENTS: .badge - small pill label */
/* COMPONENTS: .product-strip - horizontal scroll-snap strip on mobile, grid on desktop */
/* COMPONENTS: .lane-planner / .lane-grid / .lane-cell - signature lane-availability planner widget */
/* COMPONENTS: .form-grid / .field / .field-error / .form-msg / .hp-field - form layout, inputs, error + status + honeypot */
/* COMPONENTS: .newsletter-form - footer newsletter signup form */
/* COMPONENTS: .page-hero - inner page hero/title band */
/* COMPONENTS: .breadcrumbs - breadcrumb trail list */
/* COMPONENTS: .notice / .notice--info / .notice--warning - callout boxes */
/* COMPONENTS: .prose - readable long-form legal/content text measure */
/* COMPONENTS: .legal-toc - table of contents box for legal pages */
/* COMPONENTS: .faq / .faq-item - details/summary FAQ accordion */
/* COMPONENTS: .product-detail / .product-detail__media / .product-detail__price - product/service detail layout */
/* COMPONENTS: .cart-table / .cart-summary - booking basket table and totals box */
/* COMPONENTS: .contact-layout / .contact-info / .contact-info__item - contact page split layout */
/* COMPONENTS: .divider / .grain-overlay - decorative SVG divider and grain texture overlay */
/* COMPONENTS: .site-footer / .footer-col / .footer-wave - footer layout and wave divider */
/* COMPONENTS: .cookie-banner - GDPR cookie consent banner */

.lane-planner-section {
  background-color: var(--sky-light);
}

.qty-input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--white);
  color: var(--ink);
  min-width: 60px;
  text-align: center;
  width: 100%;
}

@media (min-width: 720px) {
  .qty-input {
    width: 80px;
  }
}

.btn-remove {
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover {
  color: var(--sky);
}
