@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;600;700&display=swap');

:root {
  --green:        #2c5c18;
  --green-dark:   #1d3e0f;
  --green-light:  #3d7a22;
  --gold:         #c49a25;
  --gold-light:   #f2e8c4;
  --gold-pale:    #faf5e4;
  --bg:           #f4ede0;
  --surface:      #ffffff;
  --border:       #ddd0bc;
  --text:         #231a0e;
  --muted:        #8a7060;
  --shadow:       0 2px 16px rgba(44,92,24,.10);
  --shadow-hover: 0 6px 24px rgba(44,92,24,.18);
  --radius:       10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Lato', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-weight: 400;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
header {
  background: var(--green-dark);
  color: #fff;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
  border-bottom: 2px solid var(--gold);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1240px; margin: 0 auto;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  line-height: 1.2;
}
.logo span {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: .72rem;
  font-weight: 300;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 1px;
}
nav a {
  color: rgba(255,255,255,.72);
  text-decoration: none;
  padding: .4rem .9rem;
  border-radius: 6px;
  font-size: .9rem;
  letter-spacing: .03em;
  transition: all .2s;
}
nav a:hover { color: #fff; background: rgba(255,255,255,.10); }
nav a.active { color: var(--gold); font-weight: 600; }
.nav-logout {
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.8) !important;
}
.nav-logout:hover { background: rgba(220,50,50,.4) !important; color: #fff !important; }
.header-right { display: flex; align-items: center; gap: 1rem; }
.lang-switcher { display: flex; gap: 2px; }
.lang-btn {
  background: none; border: 1px solid transparent; border-radius: 4px;
  padding: .2rem .45rem; font-size: .72rem; font-weight: 700; cursor: pointer;
  color: rgba(255,255,255,.55); letter-spacing: .07em; font-family: 'Lato', sans-serif;
  transition: all .15s;
}
.lang-btn:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.lang-btn.lang-active { color: var(--gold); border-color: rgba(196,154,37,.6); }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--green);
  color: #fff;
  border: none;
  padding: .65rem 1.5rem;
  border-radius: var(--radius);
  font-family: 'Lato', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-primary:hover { background: var(--green-light); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  font-family: 'Lato', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.btn-secondary:hover { background: var(--green); color: #fff; }

.btn-danger {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: .4rem .85rem;
  border-radius: 6px;
  font-size: .85rem;
  cursor: pointer;
  transition: background .2s;
}
.btn-danger:hover { background: #a93226; }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  padding: .35rem .7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--muted);
  transition: all .2s;
}
.btn-icon:hover { border-color: var(--green); color: var(--green); }

/* ─── Forms ───────────────────────────────────────────────────────────────── */
label {
  display: flex; flex-direction: column; gap: .3rem;
  font-size: .85rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}
input, select, textarea {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(44,92,24,.10);
}
textarea { resize: vertical; }
.checkbox-label { flex-direction: row; align-items: center; gap: .5rem; cursor: pointer; text-transform: none; letter-spacing: normal; }
.checkbox-label input { width: auto; }
.error-msg { color: #b03010; font-size: .875rem; min-height: 1.2em; margin-top: .25rem; }

/* ─── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 1rem;
}
.modal {
  background: var(--surface);
  border-radius: 14px;
  padding: 2.25rem;
  max-width: 480px; width: 100%;
  box-shadow: 0 12px 50px rgba(0,0,0,.28);
  text-align: center;
}
.modal-form { text-align: left; max-width: 520px; }
.modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  color: var(--green-dark);
  margin-bottom: 1.4rem;
}
.modal-icon { font-size: 3rem; margin-bottom: .75rem; }
.modal p { color: var(--muted); margin-bottom: 1.5rem; line-height: 1.65; font-size: .95rem; }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ─── Shop layout ─────────────────────────────────────────────────────────── */
.shop-layout {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 1.75rem;
  max-width: 1240px;
  margin: 1.75rem auto;
  padding: 0 1.5rem;
  align-items: start;
}

.catalog h2, .order-panel h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--green-dark);
  margin-bottom: 1.1rem;
}

/* ─── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.filter-btn {
  padding: .38rem .95rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  font-size: .85rem;
  font-family: 'Lato', sans-serif;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  transition: all .2s;
  color: var(--muted);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* ─── Wine grid ───────────────────────────────────────────────────────────── */
.wine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
}
.wine-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.1rem;
  border: 1.5px solid transparent;
  transition: all .22s;
  cursor: pointer;
  position: relative;
}
.wine-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.wine-type-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .2rem .55rem;
  border-radius: 4px;
  margin-bottom: .7rem;
}
.wine-name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: .98rem;
  color: var(--text);
  margin-bottom: .3rem;
}
.wine-year { font-size: .78rem; color: var(--muted); margin-bottom: .4rem; }
.wine-desc { font-size: .82rem; color: var(--muted); line-height: 1.45; margin-bottom: .85rem; min-height: 2.4em; }
.wine-footer { display: flex; align-items: center; justify-content: space-between; }
.wine-price { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); }
.wine-stock { font-size: .77rem; color: var(--muted); }

/* Sleva */
.wine-price-wrap { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.wine-price-original { font-size: .88rem; color: var(--muted); text-decoration: line-through; }
.wine-price-discounted { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); }
.wine-discount-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  background: #e8f4ea; color: #1b6a30;
  border: 1px solid #b8ddb8;
  border-radius: 4px; padding: .1rem .35rem;
}

.add-to-cart {
  background: var(--gold);
  color: #fff;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}
.add-to-cart:hover { background: #a87e18; transform: scale(1.1); }

/* ─── Order panel ─────────────────────────────────────────────────────────── */
.order-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  position: sticky; top: 80px;
  border-top: 3px solid var(--gold);
}
.empty-note { color: var(--muted); font-size: .9rem; padding: .75rem 0; }
.cart-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.cart-item-name { flex: 1; font-weight: 600; }
.cart-qty-controls { display: flex; align-items: center; gap: .3rem; }
.qty-btn {
  width: 26px; height: 26px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  transition: all .2s;
}
.qty-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.cart-item-price { font-weight: 700; color: var(--green-dark); min-width: 62px; text-align: right; }
.cart-total {
  padding: .8rem 0; font-size: 1rem;
  border-top: 2px solid var(--border);
  margin-top: .5rem; text-align: right;
}
.order-panel h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; color: var(--green-dark);
  margin: 1.1rem 0 .7rem;
  padding-top: .8rem;
  border-top: 1px solid var(--border);
}

/* ─── Wine card photo ────────────────────────────────────────────────────── */
.wine-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: .75rem;
  display: block;
}

/* ─── Delivery choice ────────────────────────────────────────────────────── */
.delivery-choice { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.1rem; }
.dc-option {
  display: flex; align-items: flex-start; gap: .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
}
.dc-option input[type="radio"] { margin-top: .15rem; accent-color: var(--green); flex-shrink: 0; }
.dc-option:hover { border-color: var(--green); background: var(--gold-pale); }
.dc-option.dc-selected { border-color: var(--green); background: #edf5e8; }
.dc-body { display: flex; flex-direction: column; gap: .2rem; }
.dc-title { font-weight: 700; font-size: .95rem; color: var(--text); }
.dc-info  { font-size: .82rem; color: var(--muted); }

/* ─── Wine card preview (no cursor/hover on landing) ─────────────────────── */
.wine-card-preview { cursor: default; }
.wine-card-preview:hover { border-color: var(--border); transform: none; box-shadow: var(--shadow); }

/* ─── Room badge (order page header) ─────────────────────────────────────── */
.room-badge {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
}
.room-label {
  font-size: .68rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--gold); opacity: .85;
}
.room-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 600; color: #fff;
}

/* ─── Delivery banner (order page) ───────────────────────────────────────── */
.delivery-banner {
  padding: .7rem 1.5rem;
  font-size: .93rem; font-weight: 500;
  text-align: center; letter-spacing: .01em;
}
.banner-delivery  { background: #d4edda; color: #155724; border-bottom: 2px solid #b8dfc4; }
.banner-reception { background: #fff3cd; color: #7a5a00; border-bottom: 2px solid #ffe8a0; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, #1a3a0a 60%, #2c4a10 100%);
  color: #fff;
  padding: 4rem 1.5rem 3.5rem;
}
.hero-inner {
  max-width: 820px; margin: 0 auto; text-align: center;
}
.hero-eyebrow {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--gold); margin-bottom: 1rem; opacity: .9;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 700; line-height: 1.15;
  margin-bottom: 1.1rem; color: #fff;
}
.hero-sub {
  font-size: 1.05rem; line-height: 1.65;
  color: rgba(255,255,255,.78); margin-bottom: 2.25rem;
}
.hero-steps {
  display: flex; align-items: center; justify-content: center;
  gap: .75rem; flex-wrap: wrap;
}
.hero-step {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 40px;
  padding: .5rem 1.1rem;
  font-size: .9rem; font-weight: 600; color: #fff;
}
.hs-icon { font-size: 1.1rem; }
.hs-arrow { color: var(--gold); font-size: 1.1rem; font-weight: 700; }

/* ─── How it works ────────────────────────────────────────────────────────── */
.hiw-section { background: var(--surface); padding: 3.5rem 1.5rem; }
.hiw-inner   { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem; font-weight: 700;
  color: var(--green-dark); text-align: center;
  margin-bottom: .5rem;
}
.section-sub {
  text-align: center; color: var(--muted);
  font-size: .95rem; margin-bottom: 2.25rem;
}
.hiw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.hiw-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  border: 1.5px solid var(--border);
  text-align: center;
}
.hiw-icon { font-size: 2.5rem; margin-bottom: .9rem; }
.hiw-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; color: var(--green-dark);
  margin-bottom: .65rem;
}
.hiw-card p { font-size: .9rem; color: var(--muted); line-height: 1.6; }
.hiw-card p strong { color: var(--text); }
.hiw-card-discount {
  border-color: var(--gold);
  background: linear-gradient(135deg, #faf5e4 0%, #fffdf8 100%);
}

/* ─── Delivery info section ───────────────────────────────────────────────── */
.di-section { background: var(--green-dark); padding: 2rem 1.5rem; }
.di-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 2.5rem; flex-wrap: wrap;
}
.di-item {
  display: flex; align-items: flex-start; gap: 1rem;
  color: rgba(255,255,255,.9); max-width: 340px;
}
.di-emoji { font-size: 1.8rem; flex-shrink: 0; margin-top: .1rem; }
.di-item strong { display: block; font-size: .95rem; color: var(--gold); margin-bottom: .25rem; }
.di-item p { font-size: .88rem; color: rgba(255,255,255,.7); line-height: 1.5; margin: 0; }
.di-divider {
  width: 1px; height: 60px;
  background: rgba(255,255,255,.2);
  flex-shrink: 0;
}

/* ─── Catalog section (landing) ──────────────────────────────────────────── */
.catalog-section { padding: 3.5rem 1.5rem; }
.catalog-section-inner { max-width: 1200px; margin: 0 auto; }

.catalog-cta {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.cta-icon { font-size: 2rem; flex-shrink: 0; }
.catalog-cta strong { display: block; font-size: 1rem; color: var(--green-dark); margin-bottom: .3rem; }
.catalog-cta p { font-size: .9rem; color: var(--muted); margin: 0; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .shop-layout { grid-template-columns: 1fr; }
  .order-panel { position: static; }
  .wine-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .hero { padding: 2.5rem 1rem 2rem; }
  .hs-arrow { display: none; }
  .di-divider { display: none; }
  .di-inner { gap: 1.5rem; }
}

@media (max-width: 480px) {
  .wine-grid { grid-template-columns: 1fr; }
}
