@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&display=swap');

:root {
  --brand: #087640;
  --brand-dark: #075a32;
  --brand-pale: #eaf4ec;
  --ink: #1c3325;
  --ink-soft: #43564a;
  --muted: #6e7e72;
  --paper: #f8faf7;
  --white: #fff;
  --line: #dce7de;
  --lime: #f1ca55;
  --lime-dark: #e5ba40;
  --danger: #a23e35;
  --shadow: 0 10px 28px rgba(18, 62, 35, .07);
}

body, button, input, select, textarea {
  font-family: 'Golos Text', 'Segoe UI', sans-serif;
}
body { font-size: 14px; line-height: 1.5; }
:is(button, input, select, textarea, a):focus-visible {
  outline: 3px solid #d4ad35;
  outline-offset: 2px;
}

/* The supplier's identity stays visible; the catalogue remains the main event. */
.sidebar {
  width: 228px;
  background: #fff;
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 18px 12px 16px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0 14px;
}
.brand img { display: block; width: 152px; height: 81px; object-fit: contain; }
.brand-caption {
  display: block;
  margin: -1px 0 0 3px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 600;
}
.sidebar-divider { background: var(--line); margin: 22px 13px 19px; }
.sidebar-label {
  color: #829287;
  font-size: 10px;
  letter-spacing: .09em;
  padding: 0 14px;
  margin-bottom: 10px;
}
.main-nav { gap: 3px; }
.nav-item {
  min-height: 45px;
  border-radius: 8px;
  color: #425348;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 13px;
}
.nav-item:hover { background: #f1f7f2; color: var(--brand-dark); }
.nav-item.active { background: var(--brand-pale); color: var(--brand-dark); font-weight: 700; }
.nav-icon { width: 22px; font-size: 18px; }
.nav-count { background: var(--brand); color: white; font-size: 10px; }
.help-note {
  border-color: var(--line);
  background: #f6faf6;
  padding: 12px;
  margin-bottom: 8px;
}
.help-note strong { font-size: 12px; }
.help-note small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.help-dot { background: var(--brand); box-shadow: 0 0 0 4px #dceee0; }
.content-column { margin-left: 228px; width: calc(100% - 228px); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 72px;
  padding: 0 clamp(22px, 3.2vw, 48px);
  background: #fff;
}
.breadcrumb { color: #819085; font-size: 11px; letter-spacing: .05em; }
.breadcrumb strong { color: var(--brand-dark); }
.account-picker { position: relative; min-width: 0; }
.account-picker-label { color: #778b7b; font-size: 10px; }
.account-picker select[hidden] { display: none; }
.account-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  max-width: 290px;
  min-height: 36px;
  padding: 2px 5px 2px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.account-menu-trigger span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-trigger span:last-child { flex: none; color: var(--brand-dark); }
.account-menu-trigger:focus-visible, .account-menu button:focus-visible, .product-comment-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(340px, calc(100vw - 26px));
  max-height: min(70vh, 440px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 50, 32, .16);
}
.account-menu[hidden] { display: none; }
.account-menu button { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 7px; background: #fff; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.account-menu button:hover, .account-menu-option.selected { background: var(--brand-pale); }
.account-menu-divider { height: 1px; margin: 7px 4px; background: var(--line); }
.account-menu .account-menu-logout { color: #7f3e39; }
.account-menu .account-menu-logout:hover { background: #fff3f1; }
.account-menu .account-menu-logout:disabled { opacity: .5; cursor: wait; }
.cart-trigger { border-radius: 8px; width: 42px; height: 42px; }
.cart-trigger:hover { border-color: var(--brand); color: var(--brand); }
.cart-trigger b { background: var(--brand); color: #fff; }
.demo-banner {
  background: #fff7e6;
  color: #6e582b;
  border-bottom: 1px solid #f0e3c6;
  padding: 9px clamp(22px, 3.2vw, 48px);
  font-size: 12px;
}
.main-content { max-width: 1320px; padding: 27px clamp(22px, 3.2vw, 48px) 90px; }
.floating-cart { display: none; }
.floating-cart[hidden] { display: none !important; }
.view { animation-duration: .18s; }
.eyebrow { color: var(--brand); font-size: 10px; letter-spacing: .1em; }
.eyebrow-dark { color: var(--brand); }
.catalog-head {
  margin: 0 0 22px;
  align-items: end;
}
.catalog-head h1, .section-intro h1 {
  font-family: 'Golos Text', 'Segoe UI', sans-serif;
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.035em;
  margin: 6px 0 5px;
}
.catalog-head p, .section-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.catalog-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.search-row {
  position: sticky;
  top: 72px;
  z-index: 10;
  background: var(--paper);
  padding: 10px 0 12px;
  margin: -10px 0 5px;
  gap: 18px;
}
.search-box { height: 50px; border-radius: 8px; }
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px #dcefe1; }
.search-box input { font-size: 14px; }
.search-box input::placeholder { color: #8c9b8f; }
.search-box kbd { color: #8b998d; font-family: 'Golos Text', sans-serif; }
.search-icon { color: var(--brand); font-size: 25px; }
.stock-filter { color: var(--ink-soft); font-size: 12px; }
.switch { background: #bcc9be; }
.stock-filter input:checked + .switch { background: var(--brand); }
.categories { margin: 0 0 15px; gap: 7px; }
.category-chip {
  min-height: 37px;
  border-radius: 7px;
  padding: 8px 13px;
  color: #526757;
  font-size: 12px;
  font-weight: 500;
}
.category-chip:hover { border-color: #95baa0; color: var(--brand-dark); }
.category-chip.active { background: var(--brand); color: white; border-color: var(--brand); }
.products { border-radius: 10px; box-shadow: 0 2px 10px rgba(25, 66, 37, .025); }
.product-row {
  grid-template-columns: minmax(220px, 1fr) 120px 145px 205px;
  min-height: 73px;
  gap: 14px;
  padding: 12px 17px;
  border-bottom-color: #eaf0eb;
}
.product-row:hover { background: #f8fbf8; }
.product-name { color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.4; }
.product-category { color: #849488; font-size: 11px; margin-top: 3px; }
.stock-label { color: #42764d; font-size: 11px; font-weight: 600; }
.stock-label:before { background: var(--brand); }
.stock-label.out { color: #9a753c; }
.product-price {
  font-family: 'Golos Text', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
}
.product-price small { color: #77897b; font-family: 'Golos Text', sans-serif; font-size: 10px; }
.product-price.request { color: #946e32; font-family: 'Golos Text', sans-serif; font-size: 12px; }
.add-btn {
  min-height: 39px;
  border-radius: 7px;
  background: var(--brand);
  color: white;
  font-size: 12px;
  font-weight: 600;
}
.add-btn:hover { background: var(--brand-dark); }
.add-btn.in-cart { background: var(--brand-pale); color: var(--brand-dark); }
.add-btn.in-cart:hover { background: #d7eadb; }
.add-btn.secondary { background: #f5f1e6; color: #775a2c; }
.add-btn.secondary:hover { background: #ece3cf; }
.more-btn { border-radius: 7px; color: var(--brand-dark); font-size: 12px; }

.section-intro { margin: 4px 0 24px; }
.section-intro h1 { margin: 6px 0 5px; }
.panel, .order-card { border-radius: 10px; box-shadow: none; }
.cart-row { padding: 16px; }
.cart-notice { margin: -12px 0 16px; padding: 10px 14px; border-radius: 8px; background: #edf5ef; color: var(--brand-dark); font-size: 12px; }
.cart-notice.warning { background: #fff3dc; color: #77521b; }
.cart-row strong { font-size: 13px; font-weight: 600; }
.cart-row small { color: var(--muted); font-size: 11px; }
.qty-control { border-radius: 7px; height: 39px; }
.qty-control button { min-width: 37px; }
.qty-control span { font-size: 12px; }
.cart-price, .order-total { font-family: 'Golos Text', sans-serif; }
.addon-panel { padding: 20px; }
.addon-panel h3, .summary-panel h3, .admin-grid h3 {
  font-family: 'Golos Text', sans-serif;
  font-weight: 700;
  letter-spacing: -.02em;
}
.addon-panel p { color: var(--muted); font-size: 12px; }
.addon-badge { background: #fff5dd; color: #8d6a2c; font-size: 9px; }
.addon-form input, .login-form input, .dialog-label select, .dialog-label textarea { border-radius: 7px; }
.small-dark-btn, .empty-cart button { background: var(--brand); border-radius: 7px; }
.small-dark-btn:hover, .empty-cart button:hover { background: var(--brand-dark); }
.summary-panel { padding: 21px; }
.summary-panel > small { color: var(--muted); font-size: 11px; }
.summary-total strong, .dialog-total strong { font-family: 'Golos Text', sans-serif; }
.primary-btn {
  min-height: 47px;
  border-radius: 7px;
  background: var(--brand);
  color: white;
  font-size: 13px;
  font-weight: 600;
}
.primary-btn:hover { background: var(--brand-dark); }
.primary-btn:disabled { background: #b9c8bc; color: #f9fbf9; }
.order-card h3 { font-family: 'Golos Text', sans-serif; }
.order-status { background: var(--brand-pale); color: var(--brand-dark); }
.manager-avatar { background: var(--brand-pale); color: var(--brand-dark); border-radius: 8px; }
.chat-bubble { background: #eef6ef; }
.chat-bubble.mine { background: var(--brand); }
.admin-user-row strong { font-size: 13px; }
#integrationErrorsPanel { margin-top: 18px; }
.notification-panel, .manager-orders { margin-top: 18px; }
.manager-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 18px; }
.manager-grid .admin-user-row small, .manager-orders .admin-user-row small { overflow-wrap: anywhere; line-height: 1.4; }
.manager-grid .admin-user-row button, .manager-orders .admin-user-row button {
  color: var(--brand-dark); border-color: #c9e2cf; flex: none;
}
.admin-user-actions { display: flex; gap: 7px; align-items: center; }

.partner-sync-panel { margin-bottom: 18px; }
.partner-sync-row { display: flex; gap: 9px; align-items: center; }
.partner-sync-row input { max-width: 260px; }
.partner-sync-row button { min-height: 41px; }
.admin-form-panel select { display: block; width: 100%; margin-top: 6px; height: 41px; border: 1px solid var(--line); border-radius: 7px; padding: 0 11px; background: #fff; }
@media (max-width: 600px) { .partner-sync-row { flex-direction: column; align-items: stretch; } .partner-sync-row input { max-width: none; } }
.admin-cancel-btn { margin-top: 10px; border: 0; background: transparent; color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.review-dialog { border-radius: 12px; }
.review-dialog h2 { font-family: 'Golos Text', sans-serif; letter-spacing: -.025em; }
.review-dialog::backdrop { background: rgba(18, 37, 25, .55); }
.toast { background: var(--brand-dark); border-radius: 7px; font-size: 12px; }

.login-screen { background: #fff; }
.login-art {
  min-height: 100vh;
  background: #edf5ed;
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 40px clamp(32px, 5vw, 78px);
}
.login-art:before, .login-art:after { display: none; }
.login-art-logo img { display: block; width: 190px; height: 102px; object-fit: contain; }
.login-art-center { max-width: 500px; }
.login-art h1 {
  font-family: 'Golos Text', 'Segoe UI', sans-serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 700;
  letter-spacing: -.055em;
  margin: 14px 0 17px;
}
.login-art-center p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; max-width: 340px; }
.login-art-footer { color: #6b8d74; font-size: 10px; letter-spacing: .1em; }
.login-form-wrap { padding: 48px; }
.login-form { width: min(380px, 100%); }
.login-form h2 { font-family: 'Golos Text', sans-serif; font-size: 29px; letter-spacing: -.035em; }
.login-form > p { color: var(--muted); font-size: 13px; }
.login-form label { font-size: 12px; font-weight: 600; }
.login-form input { height: 47px; font-size: 14px; }
.login-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px #dcefe1; }
.login-bottom { color: #819084; font-size: 11px; }
.login-mobile-logo { display: none; }

@media (max-width: 1100px) {
  .sidebar { width: 205px; }
  .content-column { margin-left: 205px; width: calc(100% - 205px); }
  .product-row {
    grid-template-columns: minmax(0, 1fr) 205px;
    grid-template-areas: 'name actions' 'meta price';
    gap: 10px 14px;
  }
  .product-row > div:first-child { grid-area: name; min-width: 0; }
  .product-row .product-meta { grid-area: meta; }
  .product-row .product-price { grid-area: price; }
  .product-row > .product-actions { grid-area: actions; justify-self: end; }
}

@media (max-width: 800px) {
  .sidebar { display: none; }
  .content-column { margin-left: 0; width: 100%; }
  .topbar { height: 63px; }
  .mobile-brand { display: block; line-height: 0; }
  .mobile-brand img { display: block; width: 91px; height: 49px; object-fit: contain; }
  .search-row { top: 63px; }
  .main-content { padding-bottom: calc(87px + env(safe-area-inset-bottom)); }
  #catalogView { padding-bottom: 70px; }
  .floating-cart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    z-index: 29;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    max-width: 460px;
    min-height: 58px;
    margin: 0 auto;
    padding: 9px 15px;
    border: 1px solid var(--brand-dark);
    border-radius: 14px;
    background: var(--brand-dark);
    color: #fff;
    box-shadow: 0 8px 24px rgba(7, 90, 50, .2);
    text-align: left;
    cursor: pointer;
  }
  .floating-cart-copy { display: flex; flex-direction: column; min-width: 0; }
  .floating-cart-copy small { font-size: 11px; color: #d5eadb; }
  .floating-cart-copy strong { font-size: 16px; white-space: nowrap; }
  .floating-cart-action { font-size: 12px; font-weight: 700; white-space: nowrap; }
  .floating-cart-action span { margin-left: 4px; }
  .floating-cart:hover { background: var(--brand); }
  .mobile-nav {
    height: calc(62px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -3px 16px rgba(25, 62, 37, .05);
  }
  .mobile-nav button { color: #6d7e71; font-size: 10px; min-width: 58px; }
  .mobile-nav button span { font-size: 20px; }
  .mobile-nav button.active { color: var(--brand-dark); }
  .mobile-nav button.active:before { background: var(--brand); }
  .mobile-nav button b { background: var(--brand); color: white; }
  .manager-grid { grid-template-columns: 1fr; }
  .mobile-nav { overflow-x: auto; justify-content: flex-start; }
  .mobile-nav button { flex: 1 0 57px; }
  .login-art { display: none; }
  .login-form-wrap { width: 100%; min-height: 100vh; }
  .login-mobile-logo { display: block; width: 150px; height: 80px; object-fit: contain; margin: 0 0 26px; }
}

@media (max-width: 590px) {
  .topbar { padding: 0 13px; gap: 5px; }
  .account-menu { position: fixed; top: 62px; right: 13px; width: calc(100vw - 26px); }
  .mobile-brand img { width: 72px; height: 49px; }
  .top-actions { gap: 5px; min-width: 0; }
  .account-menu-trigger { max-width: min(48vw, 190px); min-height: 44px; font-size: 11px; }
  .account-picker-label { font-size: 9px; }
  .main-content { padding: 20px 13px calc(84px + env(safe-area-inset-bottom)); }
  .demo-banner { padding: 8px 13px; font-size: 11px; }
  .catalog-head { margin-bottom: 17px; }
  .catalog-head h1, .section-intro h1 { font-size: 26px; }
  .catalog-head p { max-width: 330px; font-size: 12px; }
  .catalog-count { display: none; }
  .search-row { display: block; margin-top: -7px; padding: 7px 0 11px; }
  .search-box { height: 47px; }
  .stock-filter { margin: 10px 2px 0; font-size: 12px; }
  .categories { margin-bottom: 11px; }
  .category-chip { min-height: 36px; }
  .product-row {
    grid-template-columns: minmax(0, 1fr) 124px;
    grid-template-areas: 'name name' 'meta meta' 'price button';
    gap: 7px 10px;
    min-height: 0;
    padding: 14px 13px;
  }
  .product-row > div:first-child { grid-area: name; min-width: 0; }
  .product-name { font-size: 13px; overflow-wrap: anywhere; }
  .product-meta { grid-area: meta; }
  .product-price { grid-area: price; text-align: left; align-self: center; font-size: 14px; }
  .product-price small { font-size: 10px; }
  .product-row > .add-btn { grid-area: button; width: 124px; min-height: 40px; padding: 7px; }
  .cart-row { grid-template-columns: minmax(0, 1fr) 103px 24px; gap: 8px; }
  .cart-row strong { font-size: 12px; }
  .cart-row .cart-price { font-size: 12px; }
  .addon-form input:first-child { flex-basis: 100%; }
  .login-form-wrap { align-items: flex-start; padding: 38px 26px 60px; }
  .login-form { margin: auto 0; }
  .login-form h2 { font-size: 27px; }
  .login-bottom { left: 26px; right: 26px; text-align: center; }
  .toast { bottom: calc(74px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.catalog-tools {
  position: sticky;
  top: 72px;
  z-index: 10;
  background: var(--paper);
  padding: 8px 0 3px;
  margin-bottom: 12px;
}
.catalog-tools .search-row { position: static; margin: 0 0 8px; padding: 0; }
.catalog-tools .categories { margin: 0; padding-bottom: 5px; }
.clear-search {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 25px;
  line-height: 1;
}
.clear-search:hover { color: var(--brand); }
.search-box input::-webkit-search-cancel-button { display: none; }
.pull-refresh-hint { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 50; padding: 10px 16px; border-radius: 0 0 9px 9px; background: var(--brand); color: #fff; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; }
@media (max-width: 768px) { html, body { overscroll-behavior-y: contain; } }
@media (max-width: 800px) { .catalog-tools { top: 63px; } }
.search-box input { font-size: 16px; }
.product-heading { display: flex; align-items: flex-start; gap: 6px; }
.product-heading .product-title { flex: 1; min-width: 0; color: var(--ink); font-family: 'Golos Text', 'Segoe UI', sans-serif; font-size: 17px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.favorite-toggle { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: #708477; border-radius: 7px; }
.favorite-toggle svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.favorite-toggle.active { color: #a74251; }
.favorite-toggle.active svg { fill: currentColor; }
.favorite-toggle:hover { background: var(--brand-pale); }
.product-actions { display: flex; align-items: end; gap: 7px; min-width: 0; }
.product-actions .add-btn { min-width: 98px; min-height: 44px; }
.product-quantity { display: grid; gap: 2px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.catalog-qty, .qty-control input, #productDialogQuantity {
  width: 62px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 7px;
  text-align: center;
  font-size: 16px;
}
.qty-wrap { display: grid; gap: 3px; color: var(--muted); font-size: 10px; }
.qty-control { height: 44px; }
.qty-control button { min-width: 38px; min-height: 42px; }
.qty-control input { min-width: 0; width: 48px; min-height: 38px; padding: 0 2px; border: 0; }
.product-dialog .dialog-label { display: grid; gap: 5px; margin: 0 0 16px; }
.product-dialog #productDialogQuantity { width: 104px; }
.order-items { list-style: none; padding-left: 0; display: grid; gap: 0; }
.order-items li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.order-items li:last-child { border-bottom: 0; }
.order-items li span { min-width: 0; overflow-wrap: anywhere; }
.order-items li strong { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.order-total small { display: block; margin-top: 2px; color: var(--muted); font: 500 11px/1.3 'Golos Text', sans-serif; }
.repeat-order { min-height: 44px; border: 1px solid var(--brand); border-radius: 7px; background: white; color: var(--brand); padding: 8px 13px; font-size: 12px; font-weight: 600; }
.repeat-order:hover { background: var(--brand-pale); }
@media (max-width: 590px) {
  .catalog-tools { margin: 0 -13px 12px; padding: 7px 13px 4px; }
  .catalog-tools .search-row { margin: 0 0 7px; padding: 0; }
  .catalog-tools .categories { margin: 0 -13px; padding: 0 13px 5px; }
  .product-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name name' 'meta meta' 'price actions'; }
  .product-row > .product-actions { grid-area: actions; }
  .product-actions .add-btn { min-width: 92px; }
  .catalog-qty { width: 56px; }
  .cart-row { grid-template-columns: minmax(0, 1fr) 142px 24px; }
  .cart-row .qty-wrap { grid-column: 2; grid-row: 1; }
  .cart-row .cart-price { grid-column: 2; grid-row: 2; }
  .cart-row .remove-btn { grid-column: 3; grid-row: 1; }
}

@media (max-width: 380px) {
  .product-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'name' 'meta' 'price' 'actions';
  }
  .product-row > .product-actions { justify-self: start; }
}

.review-pending-notice { padding: 10px 12px; border-radius: 8px; background: #fff3dc; color: #77521b; font-size: 12px; line-height: 1.45; }
.chat-more-btn { display: block; width: 100%; min-height: 44px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.chat-more-btn:hover { background: var(--brand-pale); }

@media (max-width: 480px) {
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 56px;
    height: calc(112px + env(safe-area-inset-bottom));
    overflow: visible;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav button { min-width: 0; min-height: 56px; padding: 2px; flex: none; font-size: 9px; }
  .main-content { padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
  .floating-cart { bottom: calc(120px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(120px + env(safe-area-inset-bottom)); }
}

.product-comment-label, .cart-comment-label {
  display: grid;
  gap: 4px;
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
}
.product-comment, .cart-comment { grid-column: 1 / -1; min-width: 0; }
.product-comment-toggle { display: inline-block; min-height: 44px; max-width: 100%; margin-top: 0; padding: 7px 0; border: 0; background: transparent; color: var(--brand-dark); font-size: 12px; font-weight: 500; text-align: left; text-decoration: underline; text-underline-offset: 3px; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.product-comment-toggle:hover { color: var(--brand-dark); text-decoration: underline; }
.product-comment-toggle[aria-expanded="true"] { color: var(--brand-dark); }
.product-comment-preview { color: #778b7b; font-weight: 400; }
.product-comment-label[hidden], .cart-comment-label[hidden] { display: none; }
.product-comment-label input, .cart-comment-label input, #productDialogComment {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 14px;
}
.product-comment-label input, .cart-comment-label input { max-width: 360px; }
.cart-row { grid-template-columns: minmax(0, 1fr) 190px 100px 48px; gap: 12px; }
.cart-info { min-width: 0; }
.cart-info > strong { color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.qty-control { width: max-content; max-width: 100%; height: 44px; gap: 8px; border: 0; }
.qty-control button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 7px;
  background: var(--brand-pale);
  color: var(--brand-dark);
  padding: 0;
  touch-action: manipulation;
}
.qty-control button:hover { background: #d7eadb; }
.qty-control input { width: 64px; min-height: 44px; border: 1px solid var(--line); border-radius: 7px; }
.remove-btn {
  width: 48px;
  height: 48px;
  border: 1px solid #efd9d4;
  border-radius: 7px;
  background: #fff8f6;
  color: var(--danger);
  touch-action: manipulation;
}
.remove-btn:hover { background: #ffefeb; }
html.modal-open { overflow: hidden; overscroll-behavior: none; }
body.modal-open { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.review-dialog { position: fixed; max-height: min(calc(100vh - 32px), 860px); max-height: min(calc(100dvh - 32px), 860px); overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
#reviewDialog .review-lines { max-height: none; overflow: visible; }
.review-dialog .dialog-close-form { position: sticky; top: 0; z-index: 2; }
.review-dialog .dialog-close-form .dialog-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); touch-action: manipulation; }
.dialog-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.review-dialog .dialog-close-form .dialog-close:hover { background: var(--brand-pale); color: var(--brand-dark); }
.dialog-close:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.review-dialog > h2 { padding-right: 48px; }
.delivery-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.delivery-fields .dialog-label { min-width: 0; margin: 0 0 12px; }
.delivery-fields input { display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.delivery-fields input:disabled { background: #f3f5f2; color: var(--ink-soft); }
.review-line small, .order-items li small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.review-comment-block { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.review-comment-block .dialog-label { margin: 0 0 8px; }
.save-comment-btn {
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: 7px;
  background: #fff;
  color: var(--brand-dark);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}
.save-comment-btn:hover { background: var(--brand-pale); }
.save-comment-btn:disabled { opacity: .5; cursor: not-allowed; }
#defaultCommentStatus { display: block; min-height: 17px; margin-top: 5px; color: var(--ink-soft); font-size: 11px; }

@media (max-width: 1100px) {
  .cart-row { grid-template-columns: minmax(0, 1fr) 190px 90px 48px; }
}
@media (max-width: 590px) {
  .delivery-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .product-row { grid-template-areas: 'name name' 'meta meta' 'price actions' 'comment comment'; }
  .product-row > .product-comment { grid-area: comment; }
  .product-comment-label input, .cart-comment-label input, #productDialogComment { min-height: 44px; font-size: 16px; }
  .cart-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    grid-template-areas: 'info remove' 'qty qty' 'price price' 'comment comment';
    gap: 12px 10px;
    align-items: start;
  }
  .cart-row .cart-info { grid-area: info; }
  .cart-row .qty-wrap { grid-area: qty; }
  .cart-row .cart-price { grid-area: price; text-align: left; }
  .cart-row .remove-btn { grid-area: remove; }
  .cart-row .cart-comment { grid-area: comment; }
}

@media (max-width: 380px) {
  .product-row { grid-template-areas: 'name' 'meta' 'price' 'actions' 'comment'; }
}
