:root {
  --ink: #18363a;
  --muted: #66787a;
  --line: #dce5e3;
  --paper: #ffffff;
  --soft: #f5f8f7;
  --teal: #087f7a;
  --teal-dark: #08645f;
  --coral: #f06c5f;
  --yellow: #f4bd35;
  --radius: 8px;
  --shadow: 0 14px 34px rgba(24, 54, 58, .1);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.announcement { padding: 8px 24px; color: white; background: var(--ink); text-align: center; font-size: 12px; }
.site-header { height: 78px; display: flex; align-items: center; gap: 36px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; font-size: 17px; font-weight: 800; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 400; text-transform: uppercase; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 13px; font-weight: 800; }
.main-nav { display: flex; align-items: center; gap: 28px; margin-right: auto; font-size: 14px; }
.main-nav a { padding: 28px 0 25px; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: var(--teal); border-color: var(--teal); }
.header-actions { display: flex; gap: 6px; }
.icon-button { width: 42px; height: 42px; padding: 0; display: inline-grid; place-items: center; position: relative; border: 0; border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--soft); color: var(--teal); }
.icon-button svg { width: 20px; height: 20px; }
.cart-link span { min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; position: absolute; top: 2px; right: 0; border: 2px solid white; border-radius: 10px; color: white; background: var(--coral); font-size: 10px; font-weight: 700; }
.menu-button { display: none; }

main { min-height: 70vh; }
.container { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.page { padding: 52px 0 80px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.eyebrow { color: var(--teal); font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(34px, 5vw, 64px); line-height: 1.02; letter-spacing: 0; }
h2 { margin-bottom: 10px; font-family: Georgia, 'Times New Roman', serif; font-size: 34px; line-height: 1.1; letter-spacing: 0; }
h3 { font-size: 18px; letter-spacing: 0; }
.lead { max-width: 670px; color: var(--muted); font-size: 17px; line-height: 1.6; }

.hero { min-height: 620px; display: flex; align-items: center; position: relative; overflow: hidden; background: #f4f3ee url('assets/hero.png') center/cover no-repeat; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.9) 31%, rgba(255,255,255,.18) 62%, transparent 100%); }
.hero-content { width: min(1240px, calc(100% - 48px)); margin: auto; position: relative; z-index: 1; }
.hero-copy { max-width: 570px; }
.hero h1 { margin: 12px 0 20px; }
.hero p { max-width: 500px; color: #4f6466; font-size: 18px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; }
.button { min-height: 46px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--teal); border-radius: 5px; color: white; background: var(--teal); cursor: pointer; font-weight: 700; }
.button:hover { background: var(--teal-dark); }
.button.secondary { color: var(--ink); background: white; border-color: var(--line); }
.button.secondary:hover { color: var(--teal); border-color: var(--teal); }
.button.danger { color: #a13830; background: #fff; border-color: #efc3bf; }
.button.small { min-height: 38px; padding: 0 14px; font-size: 13px; }
.button svg { width: 18px; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.trust-item { padding: 22px 28px; display: flex; align-items: center; justify-content: center; gap: 12px; border-right: 1px solid var(--line); }
.trust-item:last-child { border: 0; }
.trust-item svg { color: var(--teal); }
.home-section { padding: 72px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); font-weight: 700; }
.text-link svg { width: 18px; }
.category-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.category-tile { min-height: 280px; padding: 28px; display: flex; flex-direction: column; justify-content: end; overflow: hidden; position: relative; border-radius: var(--radius); background: var(--soft); }
.category-tile:nth-child(1) { background: #dcefeb; }
.category-tile:nth-child(2) { background: #fbe0d9; }
.category-tile:nth-child(3) { background: #fff0c6; }
.category-tile .sprite { width: 70%; height: 82%; position: absolute; top: -3%; right: -6%; background-image: url('assets/products.png'); background-size: 400% 200%; mix-blend-mode: multiply; }
.category-tile h3, .category-tile span { position: relative; z-index: 1; }
.category-tile h3 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 26px; }
.category-tile span { font-size: 13px; font-weight: 700; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 16px; }
.product-card { min-width: 0; position: relative; }
.product-card-media { aspect-ratio: 1/1.08; position: relative; overflow: hidden; border-radius: var(--radius); background: #f7f5f2; }
.product-image { width: 100%; height: 100%; background-image: url('assets/products.png'); background-size: 400% 200%; background-repeat: no-repeat; transition: transform .35s ease; }
.product-card:hover .product-image { transform: scale(1.035); }
.product-card-info { padding: 14px 2px 0; }
.product-card .category { color: var(--muted); font-size: 12px; }
.product-card h3 { min-height: 42px; margin: 6px 0; font-size: 15px; line-height: 1.35; }
.price-row { display: flex; align-items: baseline; gap: 9px; }
.price { font-size: 17px; font-weight: 800; }
.old-price { color: #9ba7a7; font-size: 13px; text-decoration: line-through; }
.quick-add { position: absolute; right: 12px; bottom: 12px; color: white; background: var(--teal); box-shadow: 0 5px 18px rgba(8,127,122,.25); }
.badge { padding: 6px 9px; position: absolute; top: 12px; left: 12px; z-index: 2; border-radius: 3px; color: white; background: var(--coral); font-size: 10px; font-weight: 800; text-transform: uppercase; }

.catalog-layout { display: grid; grid-template-columns: 230px 1fr; gap: 44px; }
.filters { align-self: start; position: sticky; top: 110px; }
.filter-group { padding: 18px 0; border-bottom: 1px solid var(--line); }
.filter-group:first-child { padding-top: 0; }
.filter-group strong { display: block; margin-bottom: 13px; font-size: 13px; text-transform: uppercase; }
.check-row { margin: 8px 0; display: flex; align-items: center; gap: 9px; color: #475f61; font-size: 14px; cursor: pointer; }
.check-row input { accent-color: var(--teal); }
.price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-inputs input { width: 100%; }
.catalog-toolbar { min-height: 46px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.catalog-toolbar span { color: var(--muted); font-size: 13px; }
.catalog-toolbar select { width: auto; }
.empty { padding: 70px 20px; text-align: center; background: var(--soft); border-radius: var(--radius); }
.empty svg { width: 38px; height: 38px; margin-bottom: 14px; color: var(--teal); }

input, select, textarea { width: 100%; padding: 12px 13px; border: 1px solid #cbd8d6; border-radius: 5px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,122,.1); }
label.field { display: grid; gap: 7px; color: #40585a; font-size: 13px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .wide { grid-column: 1/-1; }

.product-detail { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: start; }
.product-detail-media { aspect-ratio: 1/1; overflow: hidden; position: sticky; top: 110px; border-radius: var(--radius); background: #f7f5f2; }
.product-detail .product-image { background-size: 400% 200%; }
.breadcrumbs { margin-bottom: 28px; color: var(--muted); font-size: 12px; }
.breadcrumbs a:hover { color: var(--teal); }
.product-detail h1 { font-size: 44px; }
.stock { margin: 16px 0; display: flex; align-items: center; gap: 8px; color: var(--teal); font-size: 13px; font-weight: 700; }
.stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #37a963; }
.detail-price { margin: 20px 0; font-size: 28px; font-weight: 800; }
.detail-description { color: var(--muted); line-height: 1.7; }
.buy-row { margin: 26px 0; display: grid; grid-template-columns: 100px 1fr; gap: 12px; }
.quantity-control { height: 48px; display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; border: 1px solid var(--line); border-radius: 5px; text-align: center; }
.quantity-control button { height: 100%; border: 0; background: transparent; cursor: pointer; }
.specs { margin-top: 28px; border-top: 1px solid var(--line); }
.spec-row { padding: 13px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.spec-row span:first-child { color: var(--muted); }

.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start; }
.cart-list { border-top: 1px solid var(--line); }
.cart-item { padding: 18px 0; display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); }
.cart-thumb { aspect-ratio: 1; border-radius: 6px; background-image: url('assets/products.png'); background-size: 400% 200%; }
.cart-item h3 { margin-bottom: 8px; }
.cart-actions { margin-top: 12px; display: flex; gap: 16px; align-items: center; }
.text-button { padding: 0; border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 12px; }
.text-button:hover { color: var(--coral); }
.cart-item-total { text-align: right; font-weight: 800; }
.summary { padding: 26px; position: sticky; top: 110px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.summary h3 { margin-bottom: 22px; }
.summary-row { margin: 11px 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.summary-row.total { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); color: var(--ink); font-size: 18px; font-weight: 800; }
.summary .button { width: 100%; margin-top: 16px; }
.checkout-form { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); }
.checkout-form h3:not(:first-child) { margin-top: 30px; }
.radio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card { padding: 15px; display: flex; gap: 9px; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--teal); background: #f0faf8; }

.tabs { margin-bottom: 28px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { padding: 12px 16px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: none; cursor: pointer; font-weight: 700; }
.tab.active { color: var(--teal); border-color: var(--teal); }
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; }
.profile-card { padding: 22px; border-radius: var(--radius); background: var(--soft); }
.avatar { width: 54px; height: 54px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-weight: 800; }
.order-card { margin-bottom: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.order-head { display: flex; justify-content: space-between; gap: 20px; }
.status { padding: 5px 9px; border-radius: 3px; color: var(--teal-dark); background: #dff2ee; font-size: 11px; font-weight: 800; }
.login-box { width: min(440px, 100%); margin: 20px auto; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); }
.login-box .field { margin-bottom: 16px; }
.login-box .button { width: 100%; }

.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 720px; }
.admin-nav { padding: 34px 20px; color: white; background: var(--ink); }
.admin-nav h3 { margin: 0 12px 28px; }
.admin-nav button { width: 100%; padding: 12px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 5px; color: #d4e0df; background: transparent; cursor: pointer; text-align: left; }
.admin-nav button.active, .admin-nav button:hover { color: white; background: rgba(255,255,255,.1); }
.admin-nav svg { width: 18px; }
.admin-content { min-width: 0; padding: 42px; background: #f5f7f7; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-head h1 { margin: 0; font-family: Arial, sans-serif; font-size: 28px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.stat span { color: var(--muted); font-size: 12px; }
.stat strong { display: block; margin-top: 8px; font-size: 26px; }
.data-table { width: 100%; border-collapse: collapse; background: white; }
.data-table th, .data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.data-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.table-product { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.mini-thumb { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 4px; background-image: url('assets/products.png'); background-size: 400% 200%; }
.table-actions { display: flex; gap: 2px; }
.table-actions .icon-button { width: 34px; height: 34px; }
.modal { width: min(620px, calc(100% - 32px)); max-height: 90vh; padding: 28px; overflow: auto; position: fixed; top: 50%; left: 50%; z-index: 60; transform: translate(-50%, -50%); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(14,35,38,.55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-head h2 { margin: 0; font-family: Arial, sans-serif; font-size: 22px; }
.modal .button-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.info-band { padding: 72px 0; background: var(--soft); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.info-grid svg { color: var(--teal); }
.info-grid h3 { margin-top: 16px; }
.info-grid p { color: var(--muted); line-height: 1.6; }
.site-footer { padding: 54px max(24px, calc((100vw - 1240px) / 2)) 24px; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; color: #d7e3e2; background: var(--ink); font-size: 13px; }
.site-footer > div:not(.footer-brand) { display: flex; flex-direction: column; gap: 10px; }
.site-footer strong { color: white; }
.site-footer a:hover { color: var(--yellow); }
.footer-brand { display: flex; align-items: start; gap: 12px; }
.footer-brand p { max-width: 240px; margin: 8px 0; color: #a9bcba; line-height: 1.5; }
.copyright { grid-column: 1/-1; padding-top: 22px; margin: 10px 0 0; border-top: 1px solid rgba(255,255,255,.13); color: #93a9a7; }

.mobile-menu { width: min(340px, 88vw); height: 100vh; padding: 80px 28px 28px; display: flex; flex-direction: column; gap: 6px; position: fixed; top: 0; right: 0; z-index: 55; transform: translateX(100%); background: white; transition: transform .25s ease; box-shadow: var(--shadow); }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-weight: 700; }
.close-menu { position: absolute; top: 20px; right: 20px; }
.scrim { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(14,35,38,.48); }
.scrim.open { display: block; }
.search-panel { width: 100%; padding: 24px; position: fixed; top: 110px; left: 0; z-index: 45; transform: translateY(-160%); border-bottom: 1px solid var(--line); background: white; box-shadow: var(--shadow); transition: transform .25s ease; }
.search-panel.open { transform: translateY(0); }
.search-panel-inner { width: min(760px, 100%); margin: auto; display: grid; grid-template-columns: 28px 1fr 42px; align-items: center; }
.search-panel input { border: 0; font-size: 20px; box-shadow: none; }
.search-results { width: min(760px, 100%); max-height: 330px; margin: 12px auto 0; overflow: auto; }
.search-result { padding: 10px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.toast { max-width: min(400px, calc(100% - 32px)); padding: 13px 18px; position: fixed; right: 24px; bottom: 24px; z-index: 80; transform: translateY(120px); border-radius: 5px; color: white; background: var(--ink); box-shadow: var(--shadow); transition: transform .25s ease; }
.toast.show { transform: translateY(0); }

.img-0 { background-position: 0% 0%; }
.img-1 { background-position: 33.333% 0%; }
.img-2 { background-position: 66.666% 0%; }
.img-3 { background-position: 100% 0%; }
.img-4 { background-position: 0% 100%; }
.img-5 { background-position: 33.333% 100%; }
.img-6 { background-position: 66.666% 100%; }
.img-7 { background-position: 100% 100%; }

@media (max-width: 920px) {
  .main-nav { display: none; }
  .site-header { padding: 0 20px; }
  .header-actions { margin-left: auto; }
  .menu-button { display: grid; }
  .hero { min-height: 560px; background-position: 62% center; }
  .hero::after { background: linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,255,255,.82) 58%, rgba(255,255,255,.18)); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .category-tile:first-child { grid-column: 1/-1; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { padding: 18px; position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
  .filter-group { padding: 0; border: 0; }
  .product-detail { gap: 32px; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr 310px; gap: 24px; }
  .admin-shell { grid-template-columns: 76px 1fr; }
  .admin-nav { padding: 26px 10px; }
  .admin-nav h3 { font-size: 0; }
  .admin-nav h3::after { content: 'BM'; font-size: 16px; }
  .admin-nav button { justify-content: center; }
  .admin-nav button span { display: none; }
  .admin-content { padding: 28px; }
}

@media (max-width: 680px) {
  .announcement { font-size: 11px; }
  .site-header { height: 68px; }
  .brand > span:last-child { font-size: 14px; }
  .brand small { display: none; }
  .header-actions .icon-button:first-child { display: none; }
  .container, .hero-content { width: min(100% - 32px, 1240px); }
  .page { padding: 34px 0 60px; }
  .page-head { display: block; }
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .hero { min-height: 640px; align-items: end; background-position: 69% center; }
  .hero::after { background: linear-gradient(0deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.93) 45%, rgba(255,255,255,.05) 82%); }
  .hero-content { padding-bottom: 42px; }
  .hero p { font-size: 16px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-item { justify-content: start; padding: 16px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .home-section { padding: 52px 0; }
  .category-grid, .product-grid { grid-template-columns: 1fr 1fr; }
  .category-tile:first-child { grid-column: auto; }
  .category-tile { min-height: 220px; padding: 18px; }
  .category-tile h3 { font-size: 21px; }
  .product-grid { gap: 24px 10px; }
  .product-card h3 { font-size: 14px; }
  .product-card .price { font-size: 15px; }
  .quick-add { width: 38px; height: 38px; right: 8px; bottom: 8px; }
  .filters { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .product-detail-media { position: static; }
  .product-detail h1 { font-size: 36px; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 82px 1fr; }
  .cart-item-total { grid-column: 2; text-align: left; }
  .summary { position: static; }
  .form-grid, .radio-grid { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { padding: 8px; display: flex; overflow-x: auto; }
  .admin-nav h3 { display: none; }
  .admin-nav button { min-width: 48px; }
  .admin-content { padding: 24px 16px; }
  .admin-head { align-items: start; gap: 14px; }
  .admin-head h1 { font-size: 24px; }
  .stat-grid { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .data-table { min-width: 680px; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .footer-brand, .copyright { grid-column: 1/-1; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 410px) {
  .brand-mark { width: 34px; height: 34px; }
  .header-actions { gap: 0; }
  .header-actions .icon-button { width: 38px; }
  .category-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card-media { aspect-ratio: 1.2/1; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer > div { grid-column: 1; }
}
