:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-alt: #f3ede4;
  --ink: #2f2a26;
  --muted: #6f665e;
  --accent: #b26b4b;
  --accent-dark: #8f5036;
  --sage: #71806a;
  --line: #e7ded3;
  --shadow: 0 12px 34px rgba(58, 45, 36, 0.09);
  --radius: 14px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 16px;
}
h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 16px; }
ul { margin: 0 0 16px; padding-left: 20px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-alt { background: var(--surface-alt); }
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { color: var(--muted); font-size: 1.08rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 22px rgba(178, 107, 75, 0.25); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-dark:hover { background: var(--ink); color: #fff; }

/* Header */
.topbar {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar strong { color: #fff; font-weight: 600; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: Georgia, serif; font-size: 1.2rem; font-weight: 700;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-family: Georgia, serif; font-size: 1.22rem; letter-spacing: 0.02em; }
.logo-text span { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: 0.95rem; padding: 8px 0; position: relative; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 2px; width: 0; height: 2px;
  background: var(--accent); transition: width 0.2s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-pill {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  font-size: 0.78rem; font-weight: 700; color: var(--muted); background: #fff;
}
.menu-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.menu-toggle span::before, .menu-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

/* Hero */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(47, 42, 38, 0.82) 0%, rgba(47, 42, 38, 0.5) 48%, rgba(47, 42, 38, 0.08) 100%), url("../images/hero-woven-baskets-clean.png");
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "Handwoven  ·  Eco-friendly  ·  OEM";
  position: absolute; right: 24px; bottom: 24px;
  background: rgba(255, 255, 255, 0.9); color: var(--ink);
  padding: 10px 18px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  box-shadow: var(--shadow);
}
.hero-content { position: relative; max-width: 660px; padding: 96px 0; }
.hero h1 { color: #fff; margin-bottom: 22px; }
.hero p { color: rgba(255, 255, 255, 0.88); font-size: 1.12rem; max-width: 560px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 34px; }
.hero-badges span {
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
  padding: 7px 14px; font-size: 0.8rem; font-weight: 600;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Cards and grids */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(58, 45, 36, 0.14); }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.card:hover .card-img img { transform: scale(1.02); }
.card-body { padding: 22px; }
.card-body p { color: var(--muted); font-size: 0.94rem; }
.card-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.text-link { font-weight: 700; font-size: 0.92rem; }

.feature { display: flex; gap: 16px; padding: 24px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.feature-icon {
  flex: 0 0 46px; height: 46px; border-radius: 12px; background: var(--surface-alt);
  display: grid; place-items: center; color: var(--accent); font-size: 1.25rem; font-weight: 700;
}
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Stats */
.stats { background: var(--accent-dark); color: #fff; }
.stats .grid { text-align: center; }
.stat strong { display: block; font-family: Georgia, serif; font-size: 2.6rem; line-height: 1; margin-bottom: 8px; }
.stat span { color: rgba(255, 255, 255, 0.8); font-size: 0.9rem; letter-spacing: 0.06em; }

/* Split about */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split-image img { width: 100%; height: 100%; object-fit: cover; min-height: 420px; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--sage); font-weight: 700;
}

/* Page banner */
.page-banner {
  background: linear-gradient(120deg, #4a3a31, #7c5a47);
  color: #fff; padding: 70px 0 60px;
}
.page-banner h1 { color: #fff; margin-bottom: 10px; font-size: clamp(2rem, 4vw, 3rem); }
.page-banner p { color: rgba(255, 255, 255, 0.82); margin: 0; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 8px; }

/* Product filters */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 32px;
}
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 8px 15px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.filter-btn:hover, .filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.search-box { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.search-box input {
  border: 0; padding: 10px 16px; min-width: 220px; outline: none; font: inherit; font-size: 0.9rem; background: transparent;
}
.search-box button { border: 0; background: var(--ink); color: #fff; padding: 0 18px; cursor: pointer; font-weight: 700; }
.product-card .card-img { aspect-ratio: auto; }
.product-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.product-card .card-body { display: flex; flex-direction: column; height: calc(100% - 0px); }
.product-card .text-link { margin-top: auto; }
.no-result { display: none; text-align: center; padding: 60px 20px; color: var(--muted); }
.product-card.is-hidden { display: none; }
.category-group { margin-bottom: 60px; scroll-margin-top: 110px; }
.category-group.is-hidden { display: none; }
.category-group .section-head { margin-bottom: 24px; }

/* Left vertical category sidebar */
.shop-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 38px; align-items: start; }
.category-sidebar {
  position: sticky; top: 108px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 18px; box-shadow: var(--shadow);
}
.category-sidebar h3 { font-size: 1.15rem; margin-bottom: 16px; padding-left: 10px; }
.category-sidebar .filter-group { display: flex; flex-direction: column; gap: 2px; }
.category-sidebar .filter-btn {
  width: 100%; text-align: left; border: 0; background: transparent;
  border-radius: 9px; padding: 10px 12px; font-size: 0.9rem; color: var(--muted);
}
.category-sidebar .filter-btn:hover { background: var(--surface-alt); color: var(--ink); }
.category-sidebar .filter-btn.active { background: var(--accent); color: #fff; font-weight: 700; }
.sidebar-note { font-size: 0.78rem; color: var(--muted); margin: 18px 10px 0; }
.shop-main { min-width: 0; }
.shop-main > .search-box { max-width: 520px; margin-bottom: 14px; }
.shop-hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 36px; }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 52px; align-items: start; }
.detail-gallery { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.detail-gallery { background: #fff; border-radius: var(--radius); overflow: hidden; }
.detail-gallery img { width: 100%; height: auto; object-fit: contain; background: #fff; }
.detail-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.detail-thumbs img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.detail-thumbs img.active { border-color: var(--accent); }
.spec-table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 0.94rem; }
.spec-table th, .spec-table td { border-bottom: 1px solid var(--line); padding: 12px 8px; text-align: left; }
.spec-table th { width: 40%; color: var(--muted); font-weight: 600; }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 7px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font: inherit; font-size: 0.94rem; background: #fff; color: var(--ink); outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); }
.form-group textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.8rem; color: var(--muted); }
.form-message { display: none; margin-top: 14px; padding: 12px 16px; border-radius: 10px; background: #e9f2e6; color: #41613b; font-weight: 600; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; }
.contact-item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-icon {
  flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--surface-alt);
  display: grid; place-items: center; color: var(--accent); font-weight: 700;
}
.contact-item h3 { font-size: 1rem; margin-bottom: 4px; }
.contact-item p { color: var(--muted); margin: 0; font-size: 0.94rem; }

/* News */
.article-card { padding: 28px; }
.article-card time { color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; }
.article-card h3 { margin-top: 10px; }
.article-card p { color: var(--muted); font-size: 0.94rem; }
.news-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; margin-bottom: 28px; }
.news-article h2 { font-size: 1.8rem; }
.news-article p { color: var(--muted); }

/* CTA band */
.cta-band { background: var(--sage); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 620px; margin: 0 auto 26px; }

/* Footer */
.site-footer { background: #2b2723; color: rgba(255, 255, 255, 0.72); padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 18px; }
.site-footer a { color: rgba(255, 255, 255, 0.72); display: block; margin-bottom: 9px; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-about p { font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 50px; padding: 22px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--bg);
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 20px;
    border-bottom: 1px solid var(--line); display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: inline-flex; }
  .nav-actions .lang-pill { display: none; }
  .split, .detail-grid, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .shop-layout { grid-template-columns: 1fr; gap: 22px; }
  .category-sidebar { position: static; padding: 16px; }
  .category-sidebar h3 { margin-bottom: 12px; }
  .category-sidebar .filter-group { flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
  .category-sidebar .filter-btn { width: auto; flex: 0 0 auto; white-space: nowrap; }
  .sidebar-note { display: none; }
  .shop-hint { margin-bottom: 26px; }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; text-align: center; }
  .topbar span:last-child { display: none; }
  .hero { min-height: 560px; background-position: 65% center; }
  .hero::after { right: 12px; bottom: 12px; font-size: 0.68rem; padding: 7px 12px; }
  .detail-thumbs { grid-template-columns: repeat(3, 1fr); }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-box input { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* ===== Admin panel ===== */
.admin-wrap { min-height: 70vh; }
.admin-login { max-width: 420px; margin: 70px auto; padding: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.admin-login h1 { font-size: 1.6rem; margin-bottom: 12px; }
.admin-login p { color: var(--muted); margin-bottom: 26px; }
.btn-workbuddy { display: inline-flex; align-items: center; gap: 10px; border: 0; background: var(--ink); color: #fff; padding: 13px 26px; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 1rem; }
.btn-workbuddy:hover { background: var(--accent-dark); color: #fff; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-bar h1 { font-size: 1.7rem; margin: 0; }
.admin-user { color: var(--muted); font-size: 0.9rem; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sm { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.btn-sm.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-sm.danger { color: #b3261e; border-color: #e6bdb9; }
.btn-sm:hover { opacity: 0.9; }
.admin-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-pill { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; }
.stat-pill strong { font-size: 1.4rem; display: block; color: var(--accent); }
.stat-pill span { font-size: 0.82rem; color: var(--muted); }
.admin-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-toolbar input, .admin-toolbar select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 0.92rem; }
.admin-toolbar input { flex: 1; min-width: 200px; }
.product-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.product-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.product-table th, .product-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.product-table th { background: var(--surface-alt); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.product-table tr:last-child td { border-bottom: 0; }
.product-thumb { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.row-actions { display: flex; gap: 6px; }
.row-actions button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: 0.8rem; }
.row-actions button.del { color: #b3261e; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.badge.on { background: #e6f2e6; color: #2f6b2f; }
.badge.off { background: #f2e6e6; color: #9b2c2c; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(47,42,38,0.55); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 1000; overflow-y: auto; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 640px; padding: 28px; box-shadow: 0 24px 70px rgba(0,0,0,0.25); }
.modal h2 { margin-bottom: 18px; font-size: 1.35rem; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 0.95rem; }
.field textarea { min-height: 80px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.img-preview { width: 120px; height: 120px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.admin-msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; display: none; }
.admin-msg.ok { background: #e6f2e6; color: #2f6b2f; display: block; }
.admin-msg.err { background: #f9e4e2; color: #9b2c2c; display: block; }
.admin-loading { text-align: center; padding: 50px; color: var(--muted); }
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; } }
