/* ===== Veylora — design tokens ===== */
:root {
  --bg-dark: #1c1712;
  --bg-dark-2: #221b14;
  --bg-cream: #efe7da;
  --bg-cream-2: #f7f2e8;
  --text-dark: #221b14;
  --text-cream: #f0e9dd;
  --text-muted: #6b6156;
  --accent-gold: #c9a26b;
  --accent-gold-dark: #b3854a;
  /* A-03: darker bronze for small text on cream — ≈5.4:1 (WCAG AA 4.5:1).
     Gold stays for large headings and decoration only. */
  --text-bronze: #7a5a2e;
  --border-soft: rgba(201, 162, 107, 0.35);
  --border-dark-soft: rgba(240, 233, 221, 0.2);
  --radius-m: 10px;
  --radius-l: 20px;
  --radius-full: 999px;
  --shadow-1: 0 10px 30px rgba(28, 23, 18, 0.12);
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

/* 6f: wyraźny focus klawiatury na całej stronie. */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--bg-cream-2);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0 0 .5em;
  line-height: 1.15;
}

em, .accent { font-style: italic; color: var(--accent-gold-dark); }

p { margin: 0 0 1em; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: .04em;
  font-size: .85rem;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--bg-dark); color: var(--text-cream); }
.btn-dark:hover { background: #000; }
.btn-gold { background: var(--accent-gold); color: var(--bg-dark); }
.btn-gold:hover { background: var(--accent-gold-dark); }
.btn-outline { background: transparent; color: var(--text-dark); border-color: var(--text-dark); }
.btn-outline-cream { background: transparent; color: var(--text-cream); border-color: var(--border-dark-soft); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Header ===== */
.site-header {
  background: var(--bg-dark);
  color: var(--text-cream);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 24px;
}
.logo img { height: 26px; }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a {
  font-size: .95rem;
  opacity: .9;
  transition: opacity .15s ease, color .15s ease;
}
.main-nav a:hover, .main-nav a.is-active,
.nav-secondary a:hover, .nav-secondary a.is-active { opacity: 1; color: var(--accent-gold); }
.main-nav a.is-active, .nav-secondary a.is-active { text-decoration: underline; text-underline-offset: 6px; }
.nav-secondary { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-secondary a { font-size: .85rem; opacity: .8; }
.header-icons { display: flex; align-items: center; gap: 20px; }
.icon-btn {
  background: none; border: none; cursor: pointer; padding: 4px;
  display: inline-flex; align-items: center; color: var(--text-cream);
}
/* U-16: ikony 22px wg pomiaru z makiety. */
.icon-btn img { height: 22px; width: auto; }
.cart-badge {
  position: relative;
}
.cart-badge .count {
  position: absolute; top: -8px; right: -10px;
  background: var(--accent-gold); color: var(--bg-dark);
  font-size: .65rem; font-weight: 700; border-radius: 50%;
  width: 17px; height: 17px; display: flex; align-items: center; justify-content: center;
}
.burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 0;
}
.burger span { display: block; height: 1.5px; width: 22px; background: var(--text-cream); }

.search-box { position: relative; }
.search-panel {
  display: none;
  position: absolute; top: 100%; right: 0; margin-top: 12px;
  background: var(--bg-cream-2); color: var(--text-dark);
  border-radius: var(--radius-m); box-shadow: var(--shadow-1);
  width: 420px; padding: 12px;
}
.search-panel[hidden] { display: none; }
.search-panel.open { display: block; }
.search-panel-head { display: flex; align-items: center; gap: 8px; }
.search-panel input {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border-soft); font-family: var(--font-sans);
  background: #fff;
}
.search-close { display: none; color: var(--text-dark); }
/* The shared icon is drawn in cream for the dark header/drawers; invert it on
   the light search panel. */
.search-close img { filter: invert(1); }
.search-results { margin-top: 10px; max-height: 60vh; overflow-y: auto; }
.search-echo {
  font-family: var(--font-serif); font-style: italic; font-size: 1.15rem;
  margin: 4px 0 12px;
}
.search-empty {
  font-family: var(--font-serif); font-size: 1.4rem; text-align: center;
  padding: 24px 0 8px;
}

/* Idle / no-result fallback — mockups "Kiknięcie w lupę" and "Wpisanie hasła…" */
.search-intro {
  background: var(--bg-cream);
  border-radius: var(--radius-l);
  padding: 20px;
  margin-bottom: 16px;
}
.search-intro-claim { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 8px; }
.search-intro-text { font-size: .88rem; color: var(--text-muted); }
.search-intro-text a { text-decoration: underline; color: var(--text-bronze); }
.search-suggest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search-suggest-card {
  position: relative; display: block; border-radius: var(--radius-m);
  overflow: hidden; aspect-ratio: 3/4; background: #ddd3c0;
}
.search-suggest-card img { width: 100%; height: 100%; object-fit: cover; }
.search-suggest-body {
  position: absolute; inset: auto 0 0 0; padding: 12px;
  display: flex; flex-direction: column; gap: 2px; color: var(--text-cream);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.6));
}
.search-suggest-name { font-family: var(--font-serif); font-size: 1.05rem; font-style: italic; }
.search-suggest-cta { font-size: .75rem; text-decoration: underline; }

/* ===== Section headings ===== */
.section { padding: 72px 0; }
.section-dark { background: var(--bg-dark); color: var(--text-cream); }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-header .eyebrow { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-bronze); margin-bottom: 6px; }
.section-header .see-all { font-size: .85rem; font-weight: 600; white-space: nowrap; }

/* ===== Product grid / cards ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card { display: block; }
.product-card .thumb {
  aspect-ratio: 1 / 1.1; border-radius: var(--radius-l); overflow: hidden;
  background: #ddd3c0; position: relative; margin-bottom: 12px;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .artist { font-size: .78rem; color: var(--text-muted); }
.product-card .name { font-family: var(--font-serif); font-size: 1.05rem; margin: 2px 0 4px; }
.product-card .price { font-weight: 600; }
.price-current { display: block; }
.product-card .price-reference {
  display: block; margin-top: 3px; color: var(--text-muted); font-size: .72rem;
  font-weight: 400; line-height: 1.35;
}

/* ===== Filters / category page ===== */
/* ===== Category listing (legacy sidebar removed — see components.css .filters) ===== */

/* ===== Cart ===== */
/* The drawer chrome itself lives in components.css (.drawer); these rules only
   style the cart content rendered inside it. */
.cart-line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-dark-soft); }
.cart-line img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cart-line .info { flex: 1; }
.cart-line .artist { font-size: .75rem; color: var(--accent-gold); }
.cart-line .name { font-style: italic; }
.cart-line .remove { background: none; border: none; color: var(--text-cream); opacity: .6; cursor: pointer; }
.cart-empty { padding: 40px 0; text-align: center; color: var(--text-muted); }
.cart-upsell { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-dark-soft); }
.cart-upsell .eyebrow { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-gold); margin-bottom: 6px; }
.cart-upsell .cart-line { border-bottom: none; }

/* U-09: upsell as drawn in the "Otwarty panel koszyka" mockup. */
.cart-upsell-head {
  display: block; text-align: right;
  font-size: .72rem; color: var(--text-cream); opacity: .75;
  margin-bottom: 8px;
}
.cart-upsell-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-cream); color: var(--text-dark);
  border-radius: 12px; padding: 12px;
}
.cart-upsell-card .cart-line { flex: 1; border-bottom: none; padding: 0; }
.cart-upsell-card .cart-line .artist { color: var(--text-muted); }
.cart-upsell-card .price s { opacity: .55; margin-right: 6px; }
.btn-pill-cream {
  flex: none;
  background: var(--bg-cream); color: var(--text-dark);
  border: 1.5px solid var(--text-dark);
  border-radius: 9999px; padding: 10px 18px;
  font-family: var(--font-sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; cursor: pointer; white-space: nowrap;
}
.secure-note {
  display: block; text-align: center;
  font-size: .78rem; color: var(--text-cream); opacity: .7;
  margin-top: 10px;
}
.totals { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-dark-soft); }
.totals-row { display: flex; justify-content: space-between; margin-bottom: 12px; }
.cart-page { padding: 56px 0; }
.cart-page-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.discount-form { display: flex; gap: 10px; margin: 16px 0; }
.discount-form input { flex: 1; padding: 12px 16px; border-radius: var(--radius-full); border: 1px solid var(--border-soft); }
.discount-error { color: #c0392b; font-size: .85rem; margin-top: 8px; }
.discount-success { color: #4c7a4f; font-size: .85rem; margin-top: 8px; }

/* ===== Forms ===== */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: 4px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 14px 18px; border-radius: var(--radius-m);
  border: 1px solid var(--border-soft); font-family: var(--font-sans); background: var(--bg-cream-2);
}
.form-field textarea { border-radius: var(--radius-m); resize: vertical; }
.checkbox-field { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--text-muted); }

.split-panel { display: grid; grid-template-columns: 1fr 1fr; min-height: 640px; }
.split-panel .media { background-size: cover; background-position: center; }
.split-panel .form-col { display: flex; align-items: center; padding: 64px; background: var(--bg-cream); }
.split-panel .form-col > div { max-width: 480px; width: 100%; }

/* ===== Gate (password) page ===== */
.gate-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-dark); color: var(--text-cream); }
.gate-box { max-width: 420px; width: 100%; padding: 24px; text-align: center; }
.gate-box .logo { margin: 0 auto 24px; height: 30px; }
.gate-box input {
  width: 100%; padding: 14px 18px; border-radius: var(--radius-full); text-align: center;
  border: 1px solid var(--border-dark-soft); background: transparent; color: var(--text-cream); margin-bottom: 16px;
}
.gate-box .error { color: #e0938c; font-size: .85rem; margin-bottom: 12px; }

/* ===== Footer ===== */
.site-footer { background: var(--bg-dark); color: var(--text-cream); padding: 56px 0 24px; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; }
.footer-top .logo img { height: 24px; margin-bottom: 12px; }
.footer-links { display: flex; gap: 56px; }
.footer-links h5 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }
.footer-links a { display: block; margin-bottom: 8px; font-size: .92rem; opacity: .9; }
/* U-15: social jako ikony w złotych kołach (jak .social-icons). */
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--accent-gold); transition: background .2s ease;
}
.footer-social a:hover { background: rgba(201, 162, 107, .15); }
.footer-social img { height: 18px; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--border-dark-soft); font-size: .8rem; color: var(--text-muted); flex-wrap: wrap; gap: 8px; }

/* ===== Utility ===== */
.text-center { text-align: center; }
.badge {
  display: inline-block; background: var(--accent-gold); color: var(--bg-dark);
  font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full);
}
.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.messages li { background: var(--accent-gold); color: var(--bg-dark); padding: 12px 18px; border-radius: var(--radius-m); font-weight: 600; }

/* ===== Responsive =====
 * Project-wide breakpoints: 1200 (tablet landscape), 900 (tablet / mobile
 * switch), 600 (phone). No other values are used anywhere in the codebase.
 */
@media (max-width: 1200px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-secondary { display: none; }
  .main-nav { gap: 22px; }
}

@media (max-width: 900px) {
  /* Mobile header — logo left, lupa / koszyk / burger right. */
  .site-header .container { height: 64px; gap: 12px; }
  .main-nav, .nav-secondary { display: none; }
  .burger { display: flex; }
  .header-icons { margin-left: auto; gap: 14px; }

  /* Search becomes a full-screen overlay under the header. */
  .search-box { position: static; }
  .search-panel {
    position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    width: auto; margin: 0; border-radius: 0;
    padding: 16px 18px calc(24px + env(safe-area-inset-bottom));
    overflow-y: auto;
    box-shadow: none;
  }
  .search-close { display: inline-flex; }
  .search-results { max-height: none; overflow: visible; }

  .hero-panels { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .product-card .thumb { aspect-ratio: 1 / 1; border-radius: var(--radius-m); }
  .cart-page-layout { grid-template-columns: 1fr; }
  .split-panel { grid-template-columns: 1fr; }
  .split-panel .form-col { padding: 32px 20px; }
  .footer-top { flex-direction: column; }
  .footer-links { gap: 32px; flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .product-grid { gap: 12px; }
  .section { padding: 48px 0; }
  .cart-page { padding: 32px 0; }
  .discount-form { flex-direction: column; }
}
