@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #222b25;
  --muted: #68736b;
  --paper: #f6f5f1;
  --card: #fff;
  --line: #e5e7e1;
  --green: #24583e;
  --green-dark: #17442e;
  --green-soft: #e9f0e9;
  --orange: #d66c3a;
  --radius: 20px;
  font-family: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.site-header { height: 76px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.84); border-bottom: 1px solid var(--line); }
.wordmark { font: 800 22px 'Manrope', sans-serif; letter-spacing: -.06em; }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 600; }
.site-header nav a:hover, .text-link:hover { color: var(--green); }
.cart-link { display: flex; align-items: center; gap: 8px; }
.cart-count, .count-pill { min-width: 24px; height: 24px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 700; }
.page { width: min(1180px, calc(100% - 48px)); min-height: calc(100vh - 144px); margin: 0 auto; padding: 52px 0 76px; }
.intro { max-width: 700px; margin: 0 auto 42px; text-align: center; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
h1, h2, h3 { font-family: 'Manrope', sans-serif; letter-spacing: -.045em; }
.intro h1, .panel-heading h1, .login-card h1 { margin: 10px 0 8px; font-size: clamp(32px, 5vw, 52px); line-height: 1.08; }
.intro > p:last-child, .panel-heading p:last-child, .login-card > p { color: var(--muted); line-height: 1.65; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(33,56,41,.09); }
.product-image-link { display: block; overflow: hidden; aspect-ratio: 1.12; background: #eeeee8; }
.product-image { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-image { transform: scale(1.025); }
.image-placeholder { min-height: 180px; display: grid; place-items: center; background: linear-gradient(145deg, #edf0e8, #e5e8dd); color: #7c897b; font-size: 13px; }
.product-card-body { padding: 18px; }
.product-name { display: block; font: 700 17px 'Manrope', sans-serif; line-height: 1.35; }
.price-block { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 11px 0 16px; }
.old-price { color: #899189; font-size: 13px; text-decoration: line-through; }
.sale-price { color: var(--orange); font: 800 23px 'Manrope', sans-serif; }
.regular-price { color: var(--ink); font: 700 20px 'Manrope', sans-serif; }
.button { display: inline-flex; min-height: 46px; padding: 0 18px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 700; text-align: center; transition: background .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { color: var(--ink); background: #edf0ea; }
.button-whatsapp { color: white; background: #168648; }
.button-whatsapp:hover { background: #0e743b; }
.button-subtle { color: var(--green); background: transparent; border: 1px solid #cdd9cf; }
.button-wide { width: 100%; }
.empty-state { max-width: 560px; margin: 72px auto; padding: 46px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; text-align: center; }
.empty-state h2 { margin: 14px 0 8px; font-size: 25px; }
.empty-state p { color: var(--muted); line-height: 1.6; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 24px; }
.site-footer { min-height: 68px; padding: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.back-link { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--green); }
.product-detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 84px); align-items: center; max-width: 1050px; margin: 0 auto; }
.detail-image-wrap { overflow: hidden; min-height: 420px; border-radius: 26px; background: #eceee7; }
.detail-image { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.detail-placeholder { height: 100%; min-height: 420px; }
.detail-copy h1 { margin: 12px 0; font-size: clamp(34px, 4.5vw, 54px); line-height: 1.08; }
.detail-description { margin: 22px 0; color: var(--muted); line-height: 1.8; white-space: normal; }
.detail-price { margin: 26px 0; }
.detail-price .sale-price { font-size: 30px; }
.detail-price .regular-price { font-size: 27px; }
.compact-intro { margin-bottom: 32px; }
.compact-intro h1 { font-size: clamp(34px, 5vw, 46px); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 28px; align-items: start; }
.cart-list, .cart-summary, .login-card, .admin-form-card, .admin-product-list { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.cart-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.cart-image { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; background: #eeeee8; }
.cart-image.image-placeholder { min-height: 92px; font-size: 10px; }
.cart-item-info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cart-unit, .small-note, .muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.quantity-label { margin-top: 5px; color: var(--muted); font-size: 11px; }
.quantity-input { width: 72px; height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; }
.stock-caption { margin: 6px 0 10px; color: var(--muted); font-size: 12px; }
.detail-stock { margin: -14px 0 18px; }
.add-form, .detail-add-form { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: end; }
.add-form .quantity-label, .detail-add-form .quantity-label { grid-column: 1 / -1; }
.add-form .button, .detail-add-form .button { width: 100%; }
.add-form .quantity-input, .detail-add-form .quantity-input { width: 76px; }
.detail-add-form { max-width: 430px; }
.notice-info { background: #edf2eb; color: #315740; }
.cart-item-end { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.link-button { padding: 0; border: 0; background: none; color: #9b5134; cursor: pointer; font-size: 13px; text-decoration: underline; }
.hidden-form { display: none; }
.cart-summary { position: sticky; top: 18px; }
.cart-summary h2, .admin-form-card h2, .admin-product-list h2 { margin: 0 0 20px; font-size: 21px; }
.summary-line, .summary-total { display: flex; justify-content: space-between; gap: 10px; padding: 14px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.summary-total { margin-bottom: 18px; align-items: center; color: var(--ink); border: 0; }
.summary-total strong { font: 800 24px 'Manrope', sans-serif; }
.cart-summary .small-note { margin: 12px 0; }
.notice { padding: 13px 16px; margin: 0 0 18px; border-radius: 12px; font-size: 14px; }
.notice-success { background: #e9f3e9; color: #265a38; }
.notice-error { background: #fff0eb; color: #9b3e2b; }
.login-card { max-width: 470px; margin: 20px auto; padding: 34px; }
.login-card h1 { font-size: 34px; }
.form-stack { display: flex; flex-direction: column; gap: 10px; }
.form-stack label { margin-top: 6px; font-size: 13px; font-weight: 700; }
.text-input { width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid #d9ded6; border-radius: 10px; background: #fff; color: var(--ink); outline: none; }
.text-input:focus, .quantity-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,88,62,.12); }
.textarea { resize: vertical; }
.text-link { display: inline-block; margin-top: 20px; color: var(--green); font-size: 14px; font-weight: 700; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 30px; }
.panel-heading h1 { font-size: 42px; }
.admin-layout { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.optional { color: var(--muted); font-size: 11px; font-weight: 400; }
.file-input { width: 100%; font-size: 13px; }
.price-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.price-fields > div { display: flex; flex-direction: column; gap: 8px; }
.price-fields label { font-size: 12px; font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.edit-preview { width: 100px; height: 100px; border-radius: 12px; object-fit: cover; }
.admin-product-list h2 { display: flex; align-items: center; gap: 10px; }
.admin-product-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.admin-thumb { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; background: #eeeee8; }
.admin-thumb.image-placeholder { min-height: 62px; font-size: 9px; }
.admin-product-info { display: flex; min-width: 0; flex-direction: column; gap: 4px; font-size: 13px; }
.admin-product-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-product-info > span:not(.status-active):not(.status-archived) { color: var(--muted); font-size: 12px; }
.status-active, .status-archived { font-size: 11px; font-weight: 700; }
.status-active { color: #2d7447; }
.status-archived { color: #8a6b36; }
.admin-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.admin-actions .text-link { margin: 0; }

@media (max-width: 760px) {
  .site-header { height: 64px; padding: 0 18px; }
  .site-header nav { gap: 18px; font-size: 13px; }
  .page { width: min(100% - 32px, 560px); padding: 34px 0 52px; }
  .intro { margin-bottom: 28px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card { border-radius: 15px; }
  .product-image-link { aspect-ratio: .95; }
  .product-card-body { padding: 13px; }
  .product-name { font-size: 14px; }
  .price-block { margin: 9px 0 12px; }
  .sale-price { font-size: 19px; }
  .regular-price { font-size: 17px; }
  .old-price { font-size: 11px; }
  .button { min-height: 43px; padding: 0 12px; font-size: 13px; }
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  .detail-image-wrap, .detail-image, .detail-placeholder { min-height: 0; height: auto; aspect-ratio: 1.15; }
  .detail-copy h1 { font-size: 38px; }
  .cart-layout, .admin-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-list, .cart-summary, .admin-form-card, .admin-product-list { padding: 17px; }
  .panel-heading { align-items: center; }
  .panel-heading h1 { font-size: 34px; }
}

@media (max-width: 420px) {
  .page { width: calc(100% - 24px); }
  .product-grid { gap: 9px; }
  .product-card-body { padding: 11px; }
  .product-card .button { font-size: 11px; padding: 0 6px; }
  .cart-item { grid-template-columns: 68px minmax(0, 1fr) auto; gap: 10px; }
  .cart-image { width: 68px; height: 68px; }
  .cart-image.image-placeholder { min-height: 68px; }
  .cart-item-end strong { font-size: 13px; }
  .login-card { padding: 24px; }
  .price-fields { grid-template-columns: 1fr; }
  .admin-product-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px; }
  .admin-thumb { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
