/* ============================================================
   indiedrinks.store — Stylesheet
   Mobile-first, clean, minimal
   ============================================================ */

:root {
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-accent: #c8553d;
  --color-accent-hover: #a8432f;
  --color-border: #e5e5e5;
  --color-success: #2d8a4e;
  --color-warning: #d4a017;
  --color-error: #c8553d;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --max-width: 1200px;
  --header-height: 64px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); }

img { max-width: 100%; height: auto; display: block; }

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-products {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 32px;
  width: auto;
}

.site-logo--full img {
  height: 28px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav a:hover { color: #ffffff; }

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.cart-count {
  background: var(--color-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  right: -10px;
}

.cart-count:empty, .cart-count[data-count="0"] { display: none; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero--photo {
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.6)),
              url('/images/photo-hero.jpg') center / cover no-repeat;
  padding: 6rem 0;
  min-height: 420px;
  display: flex;
  align-items: center;
}

.hero h1 {
  margin-bottom: 1rem;
  font-size: 3rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
}
.btn-primary:hover { background: var(--color-accent-hover); color: white; }

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.btn-secondary:hover {
  background: var(--color-accent);
  color: white;
}

.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   Product Card
   ============================================================ */
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.product-card:hover { box-shadow: var(--shadow-lg); }

.product-card__image {
  aspect-ratio: 1;
  background: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__image--placeholder {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.product-card__body {
  padding: 1rem;
}

.product-card__brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.product-card__meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.product-card__price {
  font-size: 1.1rem;
  font-weight: 700;
}

.product-card__price--campaign {
  color: var(--color-accent);
}

.product-card__price--original {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

.product-card__stock {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.product-card__stock--low { color: var(--color-warning); }
.product-card__stock--out { color: var(--color-error); }

.product-card__footer {
  padding: 0 1rem 1rem;
}

/* ============================================================
   Product Detail
   ============================================================ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .product-detail { grid-template-columns: 1fr 1fr; }
}

.product-detail__gallery {
  aspect-ratio: 1;
  background: #f0f0ee;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail__gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail__info h1 { margin-bottom: 0.5rem; }

.product-detail__brand {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.product-detail__price {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.product-detail__description {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.product-detail__specs {
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  margin-top: 1rem;
}

.product-detail__specs dt {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-detail__specs dd {
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.quantity-selector button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-selector input {
  width: 50px;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.4rem;
  font-size: 1rem;
}

/* ============================================================
   Filters
   ============================================================ */
.filters {
  padding: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.filter-group select,
.filter-group input {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--color-surface);
}

/* ============================================================
   Cart
   ============================================================ */
.cart-page { padding: 2rem 0; }

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
}

.cart-item__image {
  width: 80px;
  height: 80px;
  background: #f0f0ee;
  border-radius: var(--radius);
  overflow: hidden;
}

.cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__name { font-weight: 600; }
.cart-item__price { font-size: 0.9rem; color: var(--color-text-muted); }

.cart-item__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item__remove {
  color: var(--color-error);
  font-size: 0.85rem;
}

.cart-summary {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.cart-summary__total {
  border-top: 2px solid var(--color-text);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-empty {
  text-align: center;
  padding: 4rem 0;
  color: var(--color-text-muted);
}

/* ============================================================
   Checkout
   ============================================================ */
.checkout-page { padding: 2rem 0; }

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .checkout-grid { grid-template-columns: 1fr 400px; }
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 85, 61, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#revolut-payment-widget {
  min-height: 200px;
  padding: 1rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* ============================================================
   Age Gate
   ============================================================ */
.age-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.age-gate {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 3rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
}

.age-gate h2 { margin-bottom: 1rem; }
.age-gate p { color: var(--color-text-muted); margin-bottom: 2rem; }

.age-gate__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.age-gate__deny {
  color: var(--color-text-muted);
  padding: 0.65rem 1.5rem;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  color: white;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.footer-grid a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-grid a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  text-align: center;
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge--organic { background: #e8f5e9; color: #2d8a4e; }
.badge--vegan { background: #e8f5e9; color: #2d8a4e; }
.badge--campaign { background: #fff3e0; color: #e65100; }

/* ============================================================
   Loading & Messages
   ============================================================ */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert--error { background: #fde8e8; color: var(--color-error); }
.alert--success { background: #e8f5e9; color: var(--color-success); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .hero { padding: 2.5rem 0; }
  .hero h1 { font-size: 2rem; }
  .grid-products { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .cart-item { grid-template-columns: 60px 1fr; }
  .cart-item__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
