/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --bg:           #FDFCF7;
  --surface:      #FFFFFF;
  --surface-alt:  #F5F5EE;
  --primary:      #3D6B4F;
  --primary-light:#5A8F6B;
  --primary-xlight:#D4E8DC;
  --accent:       #8FB89A;
  --text:         #2C3B2D;
  --text-muted:   #6B7D6C;
  --text-light:   #9AAD9B;
  --sold-out-bg:  #C0392B;
  --sold-out-text:#FFFFFF;
  --border:       #DDE8DE;
  --shadow-sm:    0 1px 4px rgba(44,59,45,.08);
  --shadow-md:    0 4px 16px rgba(44,59,45,.12);
  --radius:       12px;
  --radius-sm:    6px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-main { flex: 1; padding: 2rem 0 4rem; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  transition: opacity .2s;
}
.site-logo:hover { opacity: .8; }
.logo-leaf { font-size: 1.4rem; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ig-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s;
}
.ig-link:hover { color: var(--primary); }
.ig-icon { width: 18px; height: 18px; flex-shrink: 0; }

.lang-toggle {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--surface);
  background: var(--primary);
  padding: .3rem .75rem;
  border-radius: 99px;
  transition: background .2s;
}
.lang-toggle:hover { background: var(--primary-light); }

/* ============================================================
   Page hero
   ============================================================ */
.page-hero {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
}

.page-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--primary);
  margin-bottom: .75rem;
}

.page-hero__sub {
  font-size: .95rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

.page-hero__sub a {
  color: var(--primary);
  font-weight: 500;
  border-bottom: 1px dotted var(--primary);
}

/* ============================================================
   Variety grid
   ============================================================ */
.variety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ============================================================
   Variety card
   ============================================================ */
.variety-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .25s;
}
.variety-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.variety-card--sold-out { opacity: .75; }

/* image wrapper */
.variety-card__image-link {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-alt);
}

.variety-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.variety-card:hover .variety-card__image { transform: scale(1.04); }

.variety-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-light);
}

/* sold-out badge */
.sold-out-badge {
  position: absolute;
  bottom: .75rem;
  left: .75rem;
  background: var(--sold-out-bg);
  color: var(--sold-out-text);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: var(--radius-sm);
}
.sold-out-badge--large {
  font-size: .85rem;
  padding: .35rem .8rem;
}

/* card body */
.variety-card__body {
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .75rem;
}

.variety-card__name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  font-style: italic;
}

/* stock rows */
.variety-card__stock { display: flex; flex-direction: column; gap: .3rem; }

.stock-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: baseline;
  column-gap: .5rem;
}
.stock-label {
  font-size: .8rem;
  color: var(--text-muted);
  grid-column: 1;
}
.stock-qty {
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
  grid-column: 2;
  grid-row: 1;
}
.stock-price {
  font-size: .8rem;
  color: var(--text-muted);
  grid-column: 2;
  grid-row: 2;
  text-align: right;
}

.sold-out-text {
  font-size: .85rem;
  color: var(--sold-out-bg);
  font-weight: 500;
}

/* actions */
.variety-card__actions {
  display: flex;
  gap: .5rem;
  margin-top: auto;
}

/* ============================================================
   Buttons (public)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  flex: 1;
}
.btn--primary:hover { background: var(--primary-light); }

.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  flex: 1;
}
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   Variety detail page
   ============================================================ */
.back-link {
  display: inline-block;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  transition: color .2s;
}
.back-link:hover { color: var(--primary); }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 720px) {
  .detail-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}

.detail-image-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--surface-alt);
  box-shadow: var(--shadow-md);
}

.detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.detail-info { display: flex; flex-direction: column; gap: 1.5rem; padding-top: .5rem; }

.detail-name {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  line-height: 1.2;
}

.detail-stock {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.detail-stock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.detail-stock-row + .detail-stock-row {
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.detail-stock-label {
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-stock-values { display: flex; flex-direction: column; align-items: flex-end; }

.detail-qty {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}
.detail-price {
  font-size: .9rem;
  color: var(--text-muted);
}
.detail-price small { font-size: .8em; }

.detail-sold-out {
  font-size: 1rem;
  color: var(--sold-out-bg);
  font-weight: 600;
  padding: 1rem;
  background: #FDF0EE;
  border-radius: var(--radius);
  border: 1px solid #F5C6BF;
}

.detail-order {
  background: var(--primary-xlight);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}
.detail-order p {
  font-size: .9rem;
  color: var(--primary);
  margin-bottom: .6rem;
}
.ig-order-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  color: var(--primary);
  font-size: .95rem;
  border-bottom: 1px solid var(--primary);
}
.ig-order-link svg { width: 18px; height: 18px; }
.ig-order-link:hover { color: var(--primary-light); }

.detail-share { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.detail-share__label { font-size: .85rem; color: var(--text-muted); }

.share-btn { min-width: 140px; }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
}
.empty-state__icon { font-size: 3rem; display: block; margin-bottom: 1rem; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: .8rem;
  color: var(--text-light);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 480px) {
  .header-inner { height: 56px; }
  .ig-link span { display: none; }
  .ig-order-link span { display: none; }
  .variety-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 2rem .5rem 1.5rem; }
}

.page-hero__sub { overflow-wrap: break-word; }
