/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

a { text-decoration: none; }
a:hover { text-decoration: none; }

:root {
  --white: #ffffff;
  --off-white: #f5f4f1;
  --light: #e8e4de;
  --mid: #9a9188;
  --dark: #111111;
  --text: #222222;
  --muted: #555555;
  --accent: #7a6245;
  --sidebar-w: 240px;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--text);
  overflow: hidden;
}

/* ── LAYOUT ── */
.layout {
  display: flex;
  height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-right: 1px solid var(--light);
  z-index: 10;
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
}

/* Mobile header — matches sidebar logo, menu overlays when open */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--light);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 24px;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.mobile-header-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  line-height: 1.1;
  margin: 0;
  padding: 0;
  /* Optiskā centrēšana — Playfair Display ascenders rada vizuālu nobīdi */
  transform: translateY(6px);
}

.mobile-header-logo .logo-main {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--dark);
  line-height: 1;
}

.mobile-header-logo .logo-sub {
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--mid);
  text-transform: uppercase;
  line-height: 1;
}

/* Hamburger — inside header on mobile */
.hamburger {
  display: none;
  background: none;
  border: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: -8px -8px -8px 0;
  transition: opacity 0.2s;
}
.hamburger:hover { opacity: 0.7; }
.hamburger span { display: block; width: 20px; height: 1px; background: var(--dark); }

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.2); z-index: 9;
}

/* ── SIDEBAR TOP ── */
.sidebar-top {
  padding: 32px 28px 0;
  flex-shrink: 0;
}

.logo {
  display: block;
  text-decoration: none;
  margin-bottom: 4px;
}

.logo-main {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--dark);
  display: block;
  line-height: 1;
}

.logo-sub {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--mid);
  text-transform: uppercase;
  display: block;
  margin-top: 5px;
  margin-bottom: 14px;
}

/* Language switcher — immediately below slogan */
.lang-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 0 12px;
}

.lang-btn {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--mid);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.18s;
  text-transform: uppercase;
}

.lang-btn.active { color: var(--dark); font-weight: 500; }
.lang-btn:hover { color: var(--accent); }

.lang-sep { font-size: 10px; color: var(--light); }

/* ── NAV ── */
nav {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 20px 28px 10px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  transition: all 0.18s;
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.18s;
}

.nav-item:hover { color: var(--accent); }

.nav-item.active {
  color: var(--dark);
  font-weight: 500;
  background: var(--off-white);
}

.nav-item.active::before { opacity: 1; }

/* ── SIDEBAR BOTTOM ── */
.sidebar-bottom {
  flex-shrink: 0;
  border-top: 1px solid var(--light);
  padding-bottom: 20px;
}

/* Cart row — spans full column width with border-bottom */
.sidebar-cart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 28px;
  border-bottom: 1px solid var(--light);
  text-decoration: none;
  transition: background 0.18s;
  cursor: pointer;
}
.sidebar-cart:hover { background: var(--off-white); }

.sidebar-cart-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-cart svg {
  width: 16px; height: 16px;
  stroke: var(--dark); fill: none;
  stroke-width: 1.6;
  stroke-linejoin: round; stroke-linecap: round;
  flex-shrink: 0;
}

.sidebar-cart-label {
  font-size: 14px;
  font-weight: 300;
  color: var(--dark);
  letter-spacing: 0.02em;
}

/* Count on SAME LINE as label — part of sidebar-cart-left flow */
.sidebar-cart-count {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Bottom links (par mums, noteikumi, kontakti) */
.sidebar-bottom-links {
  padding: 14px 28px 0;
}

.sidebar-bottom-links a {
  display: block;
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 0;
  letter-spacing: 0.02em;
  transition: color 0.18s;
}

.sidebar-bottom-links a:hover { color: var(--accent); }
.sidebar-bottom-links a.active-page { color: var(--dark); font-weight: 400; }

.copyright {
  margin-top: 14px;
  font-size: 8.5px;
  color: var(--mid);
  letter-spacing: 0.08em;
  line-height: 1.6;
  font-weight: 300;
}

/* ── MAIN ── */
.main {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  background: var(--white);
  scrollbar-width: thin;
  scrollbar-color: var(--light) transparent;
  min-width: 0;
}

.main::-webkit-scrollbar { width: 4px; }
.main::-webkit-scrollbar-track { background: transparent; }
.main::-webkit-scrollbar-thumb { background: var(--light); border-radius: 2px; }

.main-inner {
  padding: 52px 52px 80px;
  max-width: 1300px;
}

/* ── CONTENT PAGES ── */
.content-page { max-width: 580px; }

.content-page h2 {
  font-family: 'Playfair Display', serif;
  font-size: 38px;
  font-weight: 300;
  color: var(--dark);
  margin-bottom: 14px;
}

.content-line {
  width: 36px; height: 1px;
  background: var(--accent);
  margin-bottom: 36px;
}

.content-page p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

.field-label {
  font-size: 8.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 5px;
  display: block;
}

.contact-item { margin-bottom: 28px; }

.contact-item a {
  font-size: 16px; font-weight: 300;
  color: var(--dark);
  transition: color 0.2s;
}
.contact-item a:hover { color: var(--accent); }
.contact-val { font-size: 16px; font-weight: 300; color: var(--dark); }

/* Inline links — match page design (no blue, no underline) */
a.link-inline,
.content-page a, .about-wrap a, .terms-wrap a, .agree-text a {
  color: var(--dark);
  transition: color 0.2s;
}
a.link-inline:hover,
.content-page a:hover, .about-wrap a:hover, .terms-wrap a:hover, .agree-text a:hover {
  color: var(--accent);
}

/* ── CART DRAWER ── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.15);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-panel {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: 360px;
  background: var(--white);
  border-left: 1px solid var(--light);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  z-index: 101;
  display: flex;
  flex-direction: column;
  padding: 36px 32px;
}
.cart-panel.open { transform: translateX(0); }

.cart-panel-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.cart-panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 300;
  letter-spacing: 0.05em; color: var(--dark);
}

.cart-close {
  background: none; border: none;
  cursor: pointer; font-size: 17px;
  color: var(--mid); padding: 4px;
  line-height: 1; transition: color 0.2s;
}
.cart-close:hover { color: var(--dark); }

.cart-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

.cart-empty {
  flex: 1; display: flex;
  align-items: center; justify-content: center;
  font-size: 11px; font-weight: 400;
  color: var(--mid); letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cart-item-row {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--light);
  align-items: center;
}

.cart-item-thumb {
  width: 52px; height: 52px;
  overflow: hidden; flex-shrink: 0;
  background: var(--off-white);
  aspect-ratio: 1/1;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info { flex: 1; }
.cart-item-name { font-size: 12.5px; font-weight: 400; color: var(--dark); margin-bottom: 3px; }
.cart-item-variant { font-size: 11px; color: var(--mid); margin-bottom: 3px; }
.cart-item-price { font-size: 13px; color: var(--accent); font-weight: 400; }

.cart-item-remove {
  background: none; border: none;
  cursor: pointer; color: var(--mid);
  font-size: 13px; padding: 4px;
  transition: color 0.2s;
}
.cart-item-remove:hover { color: var(--dark); }

.cart-footer {
  padding-top: 22px;
  border-top: 1px solid var(--light);
  margin-top: 6px;
}

.cart-total {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 18px;
}

.cart-total-label { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mid); }
.cart-total-val { font-size: 16px; font-weight: 400; color: var(--dark); }

.btn-dark {
  display: block; width: 100%; padding: 15px;
  background: var(--dark); color: var(--white);
  border: none; font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase;
  cursor: pointer; transition: background 0.25s;
  text-align: center; text-decoration: none;
}
.btn-dark:hover { background: var(--accent); }

.btn-outline {
  display: block; width: 100%; padding: 14px;
  background: transparent; color: var(--dark);
  border: 1px solid var(--light);
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.25em; text-transform: uppercase;
  cursor: pointer; transition: all 0.25s;
  text-align: center; text-decoration: none; margin-top: 10px;
}
.btn-outline:hover { border-color: var(--dark); color: var(--dark); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  html, body { overflow: auto; }

  .layout { display: block; height: auto; min-height: 100vh; }

  .mobile-header { display: flex; }
  .hamburger { display: flex; }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 250;
    transform: translateX(-100%);
    overflow-y: auto;
    height: 100%;
  }

  .sidebar.mobile-open { transform: translateX(0); }

  .sidebar-backdrop.visible {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 200;
  }

  .main {
    height: auto; overflow-y: visible;
    padding-top: 56px;
  }

  .main-inner { padding: 24px 24px 60px; }

  .cart-panel { width: 100%; max-width: 420px; }
}

@media (max-width: 600px) {
  .main-inner { padding: 20px 16px 60px; }
}

/* Admin floating buttons — top-right, visible when logged in */
.admin-float-btns {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 999;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-float-btn {
  padding: 12px 20px;
  background: var(--white);
  color: var(--accent);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--light);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.admin-float-btn:hover {
  border-color: var(--accent);
  color: var(--dark);
  background: var(--off-white);
}
@media (max-width: 720px) {
  .admin-float-btns { top: 72px; right: 12px; }
  .admin-float-btn { font-size: 10px; padding: 10px 16px; letter-spacing: 0.08em; }
}
