/* Brand and catalog controls */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.header-start { display: flex; align-items: center; gap: 12px; }
.catalog-burger { display: grid; width: 42px; height: 42px; padding: 10px; place-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); box-shadow: 0 5px 14px #19332612; }
.catalog-burger span { display: block; width: 20px; height: 2px; border-radius: 3px; background: var(--green); transition: width .2s ease, transform .2s ease; }
.catalog-burger span:nth-child(2) { width: 15px; }
.catalog-burger:hover span:nth-child(2) { width: 20px; }
.catalog-burger:hover { transform: translateY(-1px); box-shadow: 0 8px 18px #19332620; }
.cart-icon-link { position: absolute; top: 13px; right: max(20px, calc((100% - 1180px) / 2)); z-index: 20; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 5px 14px #19332618; text-decoration: none; }
.cart-icon-link svg { width: 24px; height: 24px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-icon-link .badge { position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; border: 2px solid var(--paper); font-size: 10px; }
.cart-icon-link:hover { transform: translateY(-1px); box-shadow: 0 9px 20px #19332624; }
.site-header > nav { margin-right: 58px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 9px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.user-chip > span:last-child { display: grid; line-height: 1.15; }
.user-chip strong { max-width: 150px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { max-width: 150px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 12px; font-weight: 800; }
.user-menu { position: relative; }
.user-menu-toggle { border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.user-menu-chevron { margin-left: 2px; color: var(--muted); font-size: 16px; transition: transform .2s ease; }
.user-menu.open .user-menu-chevron { transform: rotate(180deg); }
.user-menu-dropdown { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; display: none; width: 190px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 16px 38px #14271d30; }
.user-menu.open .user-menu-dropdown { display: grid; animation: menuIn .18s ease both; }
.user-menu-dropdown a,.user-menu-logout { width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.user-menu-dropdown a:hover,.user-menu-logout:hover { background: #ece8de; box-shadow: none; transform: none; }
.user-menu-logout { color: #9a3f31; }
.user-menu-dropdown form { margin: 0; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.forgot-link { justify-self: center; color: var(--green); font-size: 14px; text-underline-offset: 3px; }
.hero.hero-compact { padding-top: 34px; padding-bottom: 30px; }
.qty-control { display: inline-grid; grid-template-columns: 32px minmax(42px, 58px) 32px; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; }
.qty-control .qty-button { min-width: 0; padding: 0; border: 0; border-radius: 0; background: #f6f3eb; box-shadow: none; color: var(--green); font-size: 20px; font-weight: 700; line-height: 1; }
.qty-control .qty-button:hover { transform: none; box-shadow: none; background: #ebe7dc; }
.qty-control input[type="number"] { width: 100%; min-width: 0; padding: 8px 2px; border-width: 0 1px; border-color: var(--line); border-radius: 0; text-align: center; -moz-appearance: textfield; }
.qty-control input[type="number"]::-webkit-inner-spin-button,.qty-control input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.cart-toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; padding: 12px 18px; border-radius: 11px; background: var(--green); box-shadow: 0 14px 35px #19332644; color: white; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(18px); transition: opacity .25s ease, transform .25s ease; }
.cart-toast.show { opacity: 1; transform: none; }
button:disabled { cursor: wait; opacity: .65; }
.login-hint { padding: 10px 20px; background: linear-gradient(110deg, #1d3f30, var(--green)); color: white; }
.login-hint-inner { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: min(1140px, 100%); margin: auto; }
.login-hint-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #ffffff40; border-radius: 50%; background: #ffffff18; font-size: 18px; }
.login-hint-copy { display: grid; line-height: 1.25; }
.login-hint-copy strong { font-size: 14px; }
.login-hint-copy small { color: #ffffffc9; font-size: 12px; }
.login-hint a { padding: 8px 18px; border-radius: 8px; background: white; color: var(--green); font-weight: 800; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.login-hint a:hover { transform: translateY(-1px); box-shadow: 0 8px 20px #0003; }
.product-card button:disabled { cursor: not-allowed; background: #9aa69f !important; border-color: #9aa69f !important; box-shadow: none; opacity: 1; transform: none; }
.product-card .add-to-cart.ordered { background: var(--accent) !important; border-color: var(--accent) !important; color: white; }
.product-card .add-to-cart.syncing { opacity: .7; }
.product-card .add-to-cart.sync-saved { box-shadow: 0 0 0 4px #d8793d35; transform: scale(1.02); }
.product-in-cart { border-color: #d8793d88; box-shadow: inset 0 0 0 1px #d8793d38; }
.logout-dialog { width: min(420px, calc(100% - 28px)); padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); text-align: center; box-shadow: 0 24px 70px #14271d66; }
.logout-dialog::backdrop { background: #14271d8c; backdrop-filter: blur(3px); }
.logout-dialog-icon { display: grid; width: 52px; height: 52px; margin: 0 auto 14px; place-items: center; border-radius: 50%; background: #d8793d20; color: var(--accent); font-size: 28px; font-weight: 800; }
.logout-dialog h2 { margin: 0 0 8px; font: 700 25px Georgia, serif; }
.logout-dialog p { margin: 0 0 22px; color: var(--muted); }
.logout-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.catalog-toolbar .catalog-meta { margin-bottom: 0; }
.photo-filter { display: inline-flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.photo-filter a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.photo-filter a.active { color: white; background: var(--green); }

@media (max-width: 560px) {
  .container { width: min(100% - 20px, 1180px); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-image { aspect-ratio: 1; }
  .product-body { padding: 10px; }
  .product-body h2 { margin: 5px 0 10px; font-size: 13px; }
  .product-body small { font-size: 11px; }
  .product-body form { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .product-body .qty-control { grid-template-columns: 30px minmax(32px, 1fr) 30px; width: 100%; }
  .product-body .qty-control input[type="number"] { width: 100%; padding: 7px 1px; }
  .product-body .qty-button { font-size: 17px; }
  .cart-toast { right: 10px; bottom: 10px; left: 10px; text-align: center; }
  .login-hint { margin: 10px 10px 0; padding: 14px; border: 1px solid #315e48; border-radius: 14px; box-shadow: 0 10px 24px #19332625; }
  .login-hint-inner { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; }
  .login-hint-icon { width: 42px; height: 42px; font-size: 20px; }
  .login-hint-copy strong { font-size: 15px; }
  .login-hint-copy small { margin-top: 3px; font-size: 12px; }
  .login-hint a { grid-column: 1 / -1; padding: 10px; text-align: center; }
  .product-body button { padding: 8px 7px; font-size: 12px; }
  .catalog-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .photo-filter { width: 100%; }
  .photo-filter a { flex: 1; padding: 7px 5px; text-align: center; }
  .user-chip { order: -1; }
  .user-menu { order: -1; }
  .user-menu-dropdown { right: auto; left: 0; }
  .site-header .header-start { margin-bottom: 10px; }
  .site-header { position: relative; }
  .cart-icon-link { top: 10px; right: 12px; }
  .site-header > nav { margin-right: 0; padding-right: 54px; }
}
