:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #68736c;
  --cream: #f5f1e7;
  --paper: #fffdf7;
  --line: #d9ded7;
  --green: #174f36;
  --green-2: #25704e;
  --orange: #ff6846;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--cream); }
button, input { font: inherit; }
button { cursor: pointer; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .2; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E"); }
.topbar { max-width: 1240px; margin: auto; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: white; background: var(--green); border-radius: 12px 12px 12px 3px; font: 700 24px Georgia, serif; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 2px; }
main { max-width: 1240px; margin: auto; padding: 32px 28px 72px; }
.hero { min-height: 330px; padding: 54px 56px; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; color: white; background: var(--green); border-radius: 32px 32px 8px 32px; box-shadow: 0 24px 60px rgb(23 79 54 / 18%); }
.eyebrow { margin: 0 0 20px; color: #a9d7bf; font-size: 12px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font: 500 clamp(42px, 6vw, 78px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
h1 em { color: #ffa087; font-weight: 400; }
.hero-copy { max-width: 540px; margin: 28px 0 0; color: #dcebe2; font-size: 17px; line-height: 1.7; }
.stats { display: flex; gap: 12px; }
.stats div { min-width: 150px; padding: 22px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 18px; background: rgb(255 255 255 / 8%); backdrop-filter: blur(12px); }
.stats span, .stats small { display: block; }
.stats span { font: 500 32px Georgia, serif; }
.stats small { margin-top: 8px; color: #b9d1c3; }
.toolbar { display: flex; gap: 12px; margin: 34px 0 18px; }
.search-box { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.search-box span { font-size: 26px; color: var(--green); transform: rotate(-20deg); }
.search-box input { width: 100%; padding: 16px 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.primary-button, .ghost-button { border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 750; }
.primary-button { color: white; background: var(--orange); box-shadow: 0 8px 20px rgb(255 104 70 / 20%); }
.primary-button:hover { background: #ed5535; }
.ghost-button { color: var(--green); background: rgb(255 255 255 / 55%); border: 1px solid var(--line); }
.status { min-height: 24px; margin: 0 0 10px; color: var(--muted); }
.status.error { color: #a63220; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card { overflow: hidden; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 18px 18px 6px 18px; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgb(35 49 40 / 10%); }
.product-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e8e5dc; }
.image-placeholder { display: grid; place-items: center; color: #839087; font: 500 48px Georgia, serif; }
.card-body { padding: 18px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.source-pill { padding: 5px 8px; color: var(--green); background: #dfeee5; border-radius: 99px; font-weight: 800; text-transform: uppercase; }
.product-card h2 { margin: 14px 0 12px; min-height: 48px; font-size: 17px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price { font: 600 24px Georgia, serif; color: var(--green); }
.original-price { color: #90978f; text-decoration: line-through; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; margin-top: 12px; }
.card-tags span, .chip-list span { padding: 5px 8px; color: var(--green); background: #edf3ee; border-radius: 99px; font-size: 12px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid #e7e9e4; color: var(--muted); font-size: 13px; }
.link-button { padding: 0; color: var(--green-2); background: transparent; border: 0; font-weight: 750; }
.empty-state { padding: 70px 20px; text-align: center; background: rgb(255 255 255 / 40%); border: 1px dashed #bdc7bf; border-radius: 20px; }
.empty-state span { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: white; background: var(--green); font-size: 28px; }
.empty-state h2 { margin-bottom: 4px; }
.empty-state p { color: var(--muted); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 30px; }
.pagination button:disabled { opacity: .45; cursor: default; }
dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px rgb(0 0 0 / 30%); }
dialog::backdrop { background: rgb(12 29 20 / 60%); backdrop-filter: blur(5px); }
dialog form { position: relative; padding: 34px; }
dialog .eyebrow { color: var(--green-2); }
dialog h2 { margin: 0 0 8px; font: 500 32px Georgia, serif; }
dialog p { color: var(--muted); }
dialog label { display: grid; gap: 8px; margin: 22px 0; color: var(--muted); font-size: 13px; font-weight: 700; }
dialog input { padding: 13px 14px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px; outline-color: var(--green-2); }
.dialog-close { position: absolute; top: 16px; right: 18px; border: 0; background: transparent; font-size: 28px; color: var(--muted); }
.detail-dialog { width: min(780px, calc(100vw - 32px)); }
.detail-dialog article { padding: 34px; }
.detail-head { display: grid; grid-template-columns: 180px 1fr; gap: 24px; }
.detail-head img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.detail-head h2 { margin: 12px 0; font: 500 28px/1.2 Georgia, serif; }
.detail-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.detail-grid div { padding: 14px; background: #f2f1eb; border-radius: 10px; }
.detail-grid small, .detail-grid strong { display: block; }
.detail-grid small { color: var(--muted); margin-bottom: 6px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.attribute-table { margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.attribute-table div { display: grid; grid-template-columns: minmax(120px, .7fr) 2fr; border-bottom: 1px solid var(--line); }
.attribute-table div:last-child { border-bottom: 0; }
.attribute-table span, .attribute-table strong { padding: 11px 13px; font-size: 13px; line-height: 1.5; }
.attribute-table span { color: var(--muted); background: #f2f1eb; }
.attribute-table strong { font-weight: 600; }
.image-gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.image-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #e8e5dc; }
.sku-list { display: grid; gap: 8px; margin-top: 14px; }
.sku-list > div { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 12px; background: #f2f1eb; border-radius: 10px; }
.sku-list span { font-size: 12px; }
.sku-list small { display: block; color: var(--muted); margin-bottom: 3px; }
.danger-button { color: #a63220; background: #fff1ed; border: 0; border-radius: 9px; padding: 10px 12px; }

@media (max-width: 900px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .topbar, main { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 36px 24px; border-radius: 24px 24px 6px 24px; }
  .stats { width: 100%; }
  .stats div { min-width: 0; flex: 1; }
  .toolbar { flex-direction: column; }
  .product-grid { grid-template-columns: 1fr; }
  .detail-head { grid-template-columns: 1fr; }
  .detail-head img { max-height: 280px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .image-gallery { grid-template-columns: repeat(3, 1fr); }
  .attribute-table div { grid-template-columns: 1fr; }
}
