/* ===== Olympic Line Distribution — theme ===== */
:root {
  --green-900: #16281f;   /* deepest — footer, headings */
  --green-800: #1e3d32;   /* primary brand green (logo border/text) */
  --green-700: #2b5241;   /* buttons, links */
  --green-600: #3c5a49;   /* accents */
  --sage-500:  #6e8574;   /* muted accent green */
  --sage-300:  #9caf9e;   /* soft accent */
  --cream-100: #f6f3ea;   /* page background (logo cream) */
  --cream-200: #efeadd;   /* alt sections */
  --card:      #fbfaf5;   /* card surface */
  --ink:       #22302a;   /* body text */
  --ink-soft:  #52605a;   /* muted text */
  --line:      #dcd6c6;   /* borders */
  --white:     #ffffff;

  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;

  --maxw: 1120px;
  --radius: 12px;
  --shadow: 0 12px 30px rgba(22, 40, 31, 0.10);
  --shadow-sm: 0 4px 14px rgba(22, 40, 31, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--green-900);
  line-height: 1.1;
  letter-spacing: 0.5px;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-900); }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sage-500);
  margin: 0 0 12px;
}
.eyebrow.light { color: var(--sage-300); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-primary { background: var(--green-800); color: var(--cream-100); }
.btn-primary:hover { background: var(--green-900); color: var(--white); }
.btn-light { background: var(--cream-100); color: var(--green-900); text-transform: none; letter-spacing: 0.3px; }
.btn-light:hover { background: var(--white); color: var(--green-900); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 234, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--green-800); }
.brand-logo { height: 56px; width: 56px; display: block; object-fit: contain; }
.admin-tag { align-self: center; }
.brand-emblem { color: var(--green-800); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 1px;
  color: var(--green-900);
}
.brand-sub {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 3px;
  color: var(--sage-500);
  margin-top: 2px;
}
.header-nav { display: flex; align-items: center; gap: 22px; }
.header-link {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--green-900);
}
.header-link:hover { color: var(--sage-500); }

/* ===== Hero ===== */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(30,61,50,0.06), rgba(30,61,50,0) 40%),
    var(--cream-100);
  padding: 104px 0 96px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 100px;
  background: linear-gradient(180deg, transparent, rgba(60,90,73,0.07));
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  margin-bottom: 20px;
}
.hero-lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 0 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--cream-200); }
.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.section-lede { font-size: 1.1rem; color: var(--ink-soft); margin: 0; }

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--sage-300);
}
.card-icon {
  font-size: 1.9rem;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--cream-200);
  border-radius: 12px;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ===== Contact ===== */
.contact-section { background: var(--green-800); text-align: center; }
.contact-section h2 { color: var(--cream-100); font-size: clamp(2rem, 4vw, 2.8rem); }
.contact-inner { max-width: 620px; margin: 0 auto; }
.contact-lede { color: rgba(246,243,234,0.82); font-size: 1.1rem; margin: 0 0 30px; }

/* ===== Footer ===== */
.site-footer { background: var(--green-900); color: var(--cream-100); padding: 48px 0 24px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(246,243,234,0.14);
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-emblem { color: var(--sage-300); display: flex; flex-shrink: 0; }
.footer-name { color: var(--cream-100); font-size: 1.15rem; display: block; }
.footer-tag { color: rgba(246,243,234,0.6); margin: 4px 0 0; font-size: 0.9rem; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.footer-links a {
  color: rgba(246,243,234,0.85);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--white); }
.footer-signin {
  color: var(--sage-300) !important;
  border: 1px solid rgba(156,175,158,0.45);
  padding: 6px 15px;
  border-radius: 6px;
}
.footer-signin:hover { background: rgba(246,243,234,0.08); color: var(--white) !important; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 0.85rem;
  color: rgba(246,243,234,0.55);
}

/* ===== Catalog ===== */
.catalog-head {
  background:
    linear-gradient(180deg, rgba(30,61,50,0.06), rgba(30,61,50,0) 60%),
    var(--cream-100);
  padding: 64px 0 40px;
}
.catalog-head h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 12px; }
.catalog-lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 560px; margin: 0 0 26px; }
.catalog-tools { display: flex; gap: 12px; flex-wrap: wrap; }
.search-input, .category-select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}
.search-input { flex: 1 1 260px; max-width: 360px; }
.search-input:focus, .category-select:focus {
  outline: none;
  border-color: var(--sage-500);
  box-shadow: 0 0 0 3px rgba(110,133,116,0.2);
}
.catalog-section { padding: 48px 0 88px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--sage-300);
}
.product-media {
  aspect-ratio: 4 / 3;
  background: var(--cream-200);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-noimg {
  font-family: var(--font-head);
  font-size: 3rem;
  color: var(--sage-500);
}
.product-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.product-cat {
  align-self: flex-start;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.68rem;
  color: var(--green-700);
  background: var(--cream-200);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.product-body h3 { font-size: 1.1rem; margin-bottom: 8px; text-transform: none; }
.product-desc { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 16px; }
.product-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.product-price { font-family: var(--font-head); font-size: 1.3rem; color: var(--green-800); }
.product-sku { font-size: 0.78rem; color: var(--ink-soft); }
.empty-state {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.1rem;
  padding: 60px 20px;
}

/* ===== Admin ===== */
.admin-wrap { padding: 44px 24px 80px; }
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.admin-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.admin-title { font-size: 1.5rem; margin-bottom: 20px; }
.count-badge {
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: var(--cream-200);
  color: var(--green-800);
  padding: 2px 10px;
  border-radius: 20px;
  vertical-align: middle;
}
.admin-form .field { margin-bottom: 16px; }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }
.field label {
  display: block;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  color: var(--green-900);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage-500);
  box-shadow: 0 0 0 3px rgba(110,133,116,0.2);
}
.field textarea { resize: vertical; }
.btn-block { width: 100%; }
.form-note { margin: 12px 0 0; font-size: 0.95rem; color: var(--green-700); min-height: 1.2em; }
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-empty { color: var(--ink-soft); }
.admin-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream-100);
}
.admin-thumb {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cream-200);
  display: grid;
  place-items: center;
}
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-thumb-noimg { font-family: var(--font-head); font-size: 1.4rem; color: var(--sage-500); }
.admin-item-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.admin-item-body strong { color: var(--green-900); }
.admin-item-meta { font-size: 0.85rem; color: var(--ink-soft); }
.btn-delete {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--cream-200);
  color: var(--green-800);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-delete:hover { background: #b23b2e; color: #fff; }

/* ===== Logout button (admin header) ===== */
.logout-form { margin: 0; }
.logout-btn {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--green-900);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.logout-btn:hover { color: var(--sage-500); }

/* ===== Login page ===== */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(30,61,50,0.10), transparent),
    var(--cream-100);
  padding: 24px;
}
.login-wrap { width: 100%; max-width: 400px; }
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px 32px;
  text-align: center;
}
.login-emblem { color: var(--green-800); display: inline-flex; margin-bottom: 12px; }
.login-logo { width: 130px; height: 130px; object-fit: contain; display: block; margin: 0 auto 6px; }
.login-title { font-size: 1.8rem; margin-bottom: 4px; }
.login-sub {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.72rem;
  color: var(--sage-500);
  margin: 0 0 26px;
}
.login-card .field { text-align: left; margin-bottom: 16px; }
.login-error {
  display: none;
  background: #f7e2df;
  color: #a5311f;
  border: 1px solid #e6b3aa;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  margin-bottom: 18px;
  text-align: left;
}
.login-back {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.login-back:hover { color: var(--green-900); }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .section { padding: 64px 0; }
  .brand-name { font-size: 1.15rem; }
  .field-row { flex-direction: column; gap: 0; }
}
