:root {
  --bg: #fff8f0;
  --bg-soft: #ffeef5;
  --surface: #ffffff;
  --text: #2d1b2e;
  --muted: #7a6b7c;
  --primary: #e84393;
  --primary-hover: #d63384;
  --accent: #74b9ff;
  --mint: #55efc4;
  --cream: #ffeaa7;
  --danger: #e17055;
  --success: #00b894;
  --border: #f0dce8;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(232, 67, 147, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 234, 167, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(116, 185, 255, 0.2) 0%, transparent 40%);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: clip;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1140px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(135deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom: 2px solid var(--border);
  padding: 14px 0;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px 20px;
  min-width: 0;
}

.logo {
  align-self: center;
  flex-shrink: 0;
}

.header-contact-nav {
  display: flex;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
  gap: 16px 28px;
  flex-wrap: wrap;
}

.header-phone-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
  align-self: flex-start;
  padding-top: 2px;
}

.header-nav a {
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--primary);
  text-decoration: none;
}

.header-nav .user-info {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-nav .user-info-guest {
  justify-content: flex-start;
}

.header-nav .user-info-logout {
  padding: 6px 12px;
  font-size: 0.85rem;
  min-height: auto;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo:hover {
  text-decoration: none;
  color: var(--primary);
}

.logo-icon {
  font-size: 2.1rem;
  line-height: 1;
}

.header-info-icon {
  flex-shrink: 0;
  line-height: 1;
}

.header-phone-link {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-phone-link:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

.header-address {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.header-phone {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  word-break: keep-all;
  flex-shrink: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-phone:hover {
  text-decoration: none;
  color: var(--primary-hover);
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

header:not([data-site-header]) nav a {
  font-weight: 500;
  color: var(--muted);
}

nav a:hover,
nav a.active {
  color: var(--primary);
  text-decoration: none;
}

.cart-badge {
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
}

.cart-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 10px;
  flex-shrink: 0;
}

.cart-nav-link:hover,
.cart-nav-link.active {
  color: var(--primary);
  text-decoration: none;
}

.cart-nav-icon {
  width: 24px;
  height: 24px;
}

.cart-nav-link .cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  line-height: 1;
  border: 2px solid var(--surface);
}

.favorites-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 10px;
  flex-shrink: 0;
}

.favorites-nav-link:hover,
.favorites-nav-link.active {
  color: var(--primary);
  text-decoration: none;
}

.favorites-nav-icon {
  width: 22px;
  height: 22px;
}

.product-favorite-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.product-favorite-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.product-favorite-btn:hover {
  transform: scale(1.05);
  color: var(--primary);
}

.product-favorite-btn.is-active {
  color: #fff;
  background: var(--primary);
}

.product-favorite-btn.is-active svg {
  fill: currentColor;
}

.product-image-placeholder .product-favorite-btn {
  bottom: 12px;
  right: 12px;
}

.page-subtitle {
  margin: -8px 0 24px;
  color: var(--muted);
  line-height: 1.5;
}

.user-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.user-info-link {
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.user-info-link:hover {
  text-decoration: none;
  color: var(--primary-hover);
}

.user-info-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.user-info-logout {
  flex-shrink: 0;
  margin: 0;
}

.user-info-login {
  font-weight: 500;
}

/* Hero / search */
.hero {
  text-align: center;
  padding: 24px 0 16px;
}

.page-home .hero {
  padding: 0 0 12px;
}

.page-home .hero-brand {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 20px;
  padding: 28px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left));
  border: none;
  border-radius: 0;
  box-shadow: none;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 245, 250, 0.94) 55%, rgba(255, 238, 245, 0.88) 100%);
  border-bottom: 1px solid rgba(232, 67, 147, 0.1);
  overflow: hidden;
}

.hero h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 2.15rem;
  margin-bottom: 8px;
}

.page-home .hero h1 {
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(1.7rem, 5.2vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 12px;
}

.hero-icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.page-home .hero-icon {
  font-size: 2.5rem;
}

.hero-title {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-home .hero-title {
  background: linear-gradient(120deg, #be185d 0%, #e84393 42%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.85));
}

.page-home .logo {
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.48rem;
  letter-spacing: -0.02em;
}

.page-home .logo-icon {
  font-size: 2.25rem;
}

.hero p {
  color: var(--muted);
  margin-bottom: 20px;
}

.page-home .hero-lead {
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(0.95rem, 2.8vw, 1.08rem);
  font-weight: 600;
  color: #4f3f51;
  line-height: 1.5;
  letter-spacing: 0.01em;
  max-width: 520px;
  margin: 0 auto 14px;
}

.page-home .hero-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-phone {
  margin-top: -12px;
  margin-bottom: 20px;
  font-size: 1.05rem;
  font-weight: 600;
}

.hero-phone a {
  color: var(--primary);
  text-decoration: none;
}

.hero-phone a:hover {
  color: var(--primary-hover);
}

.hero a[href^="tel:"] {
  white-space: nowrap;
}

.search-bar {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto 24px;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.search-bar .search-input-wrap {
  width: 100%;
}

.search-input-wrap input {
  width: 100%;
  padding-right: 42px;
}

.search-input-wrap input[type="search"]::-webkit-search-cancel-button,
.search-input-wrap input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.search-input-wrap input[type="search"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

.search-input-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.search-input-clear:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}

.search-input-clear[hidden] {
  display: none;
}

.password-input-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 44px;
  box-sizing: border-box;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.15s, background 0.15s;
}

.password-toggle-btn:hover {
  color: var(--primary);
  background: rgba(0, 0, 0, 0.05);
}

.password-toggle-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle-btn.is-visible .password-toggle-icon--show {
  display: none;
}

.password-toggle-btn:not(.is-visible) .password-toggle-icon--hide {
  display: none;
}

.search-bar input {
  padding: 12px 42px 12px 16px;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 1rem;
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  border-color: var(--primary);
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 0;
}

.category-quick-filters {
  display: none;
}

.catalog-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-category-dropdown {
  display: none;
}

.catalog-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 8px 0 18px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.catalog-toolbar:has(.catalog-filter-dropdown.open),
.catalog-toolbar:has(.catalog-category-dropdown.open) {
  position: relative;
  z-index: 120;
}

.catalog-filter-dropdown,
.catalog-category-dropdown {
  position: relative;
}

.catalog-filter-dropdown.open,
.catalog-category-dropdown.open {
  z-index: 121;
}

.catalog-dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.catalog-dropdown-backdrop[hidden] {
  display: none;
}

.catalog-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.catalog-filter-toggle:hover,
.catalog-filter-dropdown.open .catalog-filter-toggle,
.catalog-category-dropdown.open .catalog-filter-toggle {
  border-color: rgba(232, 67, 147, 0.45);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(232, 67, 147, 0.1);
}

.catalog-filter-toggle-icon {
  width: 14px;
  height: 12px;
  flex-shrink: 0;
  background:
    linear-gradient(currentColor, currentColor) 0 0/14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 5px/10px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 10px/14px 2px no-repeat;
  opacity: 0.75;
}

.catalog-category-toggle-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border: 2px solid currentColor;
  border-radius: 3px;
  opacity: 0.75;
  box-shadow: inset 0 -5px 0 currentColor;
}

.catalog-filter-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s;
  opacity: 0.7;
}

.catalog-filter-dropdown.open .catalog-filter-chevron,
.catalog-category-dropdown.open .catalog-filter-chevron {
  transform: rotate(-135deg) translateY(2px);
}

.catalog-filter-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 120;
  min-width: 280px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.catalog-filter-section + .catalog-filter-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.catalog-filter-section-title {
  margin: 0 0 6px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.catalog-filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.catalog-filter-option::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
}

.catalog-filter-option:hover {
  background: var(--bg);
}

.catalog-filter-option.active {
  background: rgba(232, 67, 147, 0.08);
  color: var(--primary);
  font-weight: 600;
}

.catalog-filter-option.active::after {
  background: var(--primary);
}

.category-chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.page-home .category-chip {
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.category-chip:hover,
.category-chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.category-chip-highlight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  border-width: 1.5px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.category-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  font-size: 0.72em;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.category-chip--new {
  border-color: rgba(5, 150, 105, 0.35);
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #047857;
}

.category-chip--new .category-chip-icon {
  background: rgba(5, 150, 105, 0.14);
  color: #059669;
}

.category-chip--new:hover,
.category-chip--new.active {
  border-color: #059669;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.32);
}

.category-chip--new:hover .category-chip-icon,
.category-chip--new.active .category-chip-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.category-chip--sale {
  border-color: rgba(234, 88, 12, 0.35);
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
}

.category-chip--sale .category-chip-icon {
  background: rgba(234, 88, 12, 0.14);
  color: #ea580c;
}

.category-chip--sale:hover,
.category-chip--sale.active {
  border-color: #ea580c;
  background: linear-gradient(135deg, #fb923c 0%, #ef4444 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.32);
}

.category-chip--sale:hover .category-chip-icon,
.category-chip--sale.active .category-chip-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #fd79a8);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #d63031;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
  width: 100%;
  min-width: 0;
}

.catalog-load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.catalog-load-more-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.catalog-load-more-btn {
  min-width: 220px;
}

@media (max-width: 960px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(232, 67, 147, 0.15);
}

@media (hover: none) {
  .product-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
}

.product-image-wrap {
  position: relative;
  cursor: zoom-in;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.product-image-placeholder {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--bg-soft), var(--cream));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 3rem;
}

.product-hit-sticker,
.product-sale-sticker {
  position: absolute;
  top: 10px;
  z-index: 2;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  max-width: calc(100% - 20px);
}

.product-hit-sticker {
  left: 10px;
}

.product-sale-sticker {
  right: 10px;
}

.product-oos-sticker {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 3;
  background: rgba(31, 41, 55, 0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  white-space: nowrap;
}

.product-card-out-of-stock .product-image,
.product-card-out-of-stock .product-image-wrap {
  opacity: 0.72;
}

.product-card-out-of-stock .product-image-wrap img {
  filter: grayscale(0.35);
}

.product-card-out-of-stock .product-footer {
  opacity: 0.85;
}

.product-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 4px;
}

.product-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.product-category-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-prices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.price-line-main .price-current {
  font-size: 1.5rem;
}

.price-line-main .price-old {
  font-size: 1.2rem;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.price-old {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: line-through;
  color: #9ca3af;
}

.price-sale {
  color: #e11d48 !important;
}

.price-unit {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
}

.product-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.badge-new {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-sale {
  background: linear-gradient(135deg, #fb923c 0%, #ef4444 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-hit {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
}

.badge-oos {
  background: #6b7280;
  color: #fff;
}

.product-desc {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 6px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0.88;
}

.product-desc.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.desc-toggle {
  background: none;
  border: none;
  color: var(--primary, #2563eb);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  margin-bottom: 12px;
  text-align: left;
}

.desc-toggle:hover {
  text-decoration: underline;
}

.product-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unit-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.unit-btn {
  padding: 6px 8px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  text-align: center;
  min-width: 0;
}

.unit-btn.active {
  border-color: var(--primary);
  background: var(--bg-soft);
  color: var(--primary);
}

.unit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  cursor: zoom-out;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.lightbox.lightbox-opening,
.lightbox.lightbox-closing {
  opacity: 0;
}

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(96vw, 1100px);
  max-width: 100%;
  will-change: transform;
}

.lightbox-content.is-animating {
  transition: transform 0.28s cubic-bezier(0.22, 0.85, 0.32, 1);
}

.lightbox-stage {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
}

.lightbox-track {
  display: flex;
  will-change: transform;
}

.lightbox-track.is-animating {
  transition: transform 0.38s cubic-bezier(0.22, 0.85, 0.32, 1);
}

.lightbox-slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.lightbox-slide img,
.lightbox-single,
.lightbox-zoom-img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  touch-action: none;
  pointer-events: auto;
  transform-origin: center center;
  will-change: transform;
}

.lightbox-zoom-viewport {
  width: 100%;
  height: 100%;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.lightbox-zoom-viewport-single {
  min-height: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: white;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Cart */
.cart-desktop-only,
.cart-mobile-only,
.admin-desktop-only,
.admin-mobile-only {
  min-width: 0;
}

.admin-mobile-only,
.cart-mobile-only {
  display: none !important;
}

.admin-desktop-only {
  display: block;
}

.cart-desktop-only {
  display: block;
}

.cart-desktop-only.cart-layout {
  display: grid;
}

.order-meta-block {
  display: none;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 24px;
  align-items: start;
}

.cart-table-wrap {
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cart-table {
  width: 100%;
  min-width: 560px;
  table-layout: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: none;
  border-collapse: collapse;
  overflow: hidden;
}

.cart-table th,
.cart-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.cart-table th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.cart-table .qty-stepper {
  margin: 0 auto;
}

.cart-summary {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-checkout-hint,
.cart-bar-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.cart-checkout-hint a,
.cart-bar-note a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.cart-checkout-hint a:hover,
.cart-bar-note a:hover {
  text-decoration: underline;
}

.cart-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-summary-actions .btn {
  width: 100%;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.summary-total {
  font-size: 1.3rem;
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 8px;
  color: var(--primary);
}

.cart-page-body {
  display: block;
}

.cart-top-actions {
  margin-bottom: 16px;
}

.cart-top-actions .btn {
  width: 100%;
}

@media (min-width: 769px) {
  .cart-top-actions .btn {
    width: auto;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .cart-desktop-only.cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
    max-width: 420px;
  }
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.cart-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.cart-item-unavailable {
  border-color: #fca5a5;
  background: #fff7f7;
}

.cart-item-warning {
  margin: 0 0 8px;
  color: #b91c1c;
  font-size: 0.88rem;
  font-weight: 700;
}

.cart-item-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.35;
  word-break: break-word;
}

.cart-item-sub {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.cart-item-total {
  color: var(--primary);
  font-size: 1.05rem;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

.cart-item-remove {
  flex-shrink: 0;
}

.cart-alert {
  margin-bottom: 12px;
}

.cart-bar {
  display: none;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: sticky;
  top: 16px;
}

.cart-bar-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-bar-inner .cart-bar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cart-bar-inner .cart-bar-actions .btn {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.cart-bar-inner .cart-bar-actions .cart-checkout-btn {
  grid-column: 1 / -1;
}

.cart-bar-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  gap: 12px;
}

.cart-bar-total strong {
  font-size: 1.35rem;
  white-space: nowrap;
}

/* Floating mini cart bar (catalog and other pages) */
.mini-cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(232, 67, 147, 0.2);
  text-decoration: none;
  color: inherit;
  max-width: 560px;
  margin: 0 auto;
}

.mini-cart-bar[hidden] {
  display: none !important;
}

.mini-cart-bar-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mini-cart-bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--primary);
  flex-shrink: 0;
}

.mini-cart-bar-icon svg {
  width: 22px;
  height: 22px;
}

.mini-cart-bar-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini-cart-bar-count {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.mini-cart-bar-total {
  font-size: 1.05rem;
  color: var(--primary);
  white-space: nowrap;
}

.mini-cart-bar-action {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.mini-cart-bar:hover {
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 36px rgba(232, 67, 147, 0.28);
}

.mini-cart-bar--pulse {
  animation: miniCartPulse 0.45s ease;
}

@keyframes miniCartPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.scroll-to-top {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 115;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(232, 67, 147, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.scroll-to-top[hidden] {
  display: none !important;
}

.scroll-to-top svg {
  width: 22px;
  height: 22px;
}

.scroll-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(232, 67, 147, 0.42);
}

.scroll-to-top:active {
  transform: translateY(0);
}

body.has-mini-cart-bar:not(.cart-page) .scroll-to-top {
  bottom: calc(96px + env(safe-area-inset-bottom));
}

body.has-mini-cart-bar:not(.cart-page) {
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

body.has-mini-cart-bar:not(.cart-page) .site-footer {
  margin-bottom: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state h2 {
  margin-bottom: 8px;
  color: var(--text);
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, var(--bg-soft), var(--surface));
  border-top: 1px solid var(--border);
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.3;
}

.site-footer p {
  margin: 0;
}

.site-footer-brand {
  margin-bottom: 4px !important;
}

.site-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 6px;
  row-gap: 2px;
}

.site-footer-sep {
  opacity: 0.45;
  user-select: none;
}

.site-footer a {
  font-weight: 600;
  font-size: inherit;
}

.site-footer-wa-link {
  color: #128c7e;
}

.site-footer-wa-link:hover {
  text-decoration: underline;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 10px;
  margin: 6px 0 4px;
}

.site-footer-nav a {
  font-weight: 500;
}

.site-footer-copy {
  font-size: 0.62rem;
  opacity: 0.8;
}

/* Forms */
.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 480px;
  margin: 40px auto;
  border: 1px solid var(--border);
}

.form-card h1 {
  margin-bottom: 24px;
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.form-check input {
  width: auto;
}

.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-picker-empty {
  margin: 0;
}

.category-picker-chip {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.category-picker-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.category-picker-chip span {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.category-picker-chip:hover span {
  border-color: var(--primary);
  color: var(--primary);
}

.category-picker-chip input:checked + span,
.category-picker-chip:has(input:checked) span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.category-picker-chip input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Admin */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  min-height: calc(100vh - 100px);
}

.admin-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-width: 0;
}

.admin-sidebar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
  border: 1px solid var(--border);
}

.admin-sidebar h3 {
  margin-bottom: 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.admin-sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
  text-decoration: none;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--bg-soft);
  color: var(--primary);
  text-decoration: none;
}

.admin-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.admin-stat-card {
  background: var(--bg);
  padding: 20px;
  border-radius: var(--radius);
}

.admin-stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.admin-stat-label {
  color: var(--muted);
  margin-top: 4px;
}

.admin-mobile-nav {
  display: none;
}

.admin-mobile-more-sheet {
  display: none;
}

.admin-order-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  max-width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
}

.admin-order-toast {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.admin-order-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.admin-order-toast-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-order-toast-body strong {
  color: var(--primary);
  font-size: 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-order-toast-body span {
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-order-toast-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-order-toast-actions .btn {
  min-width: 0;
}

.admin-sound-prompt {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: min(520px, calc(100vw - 32px));
  max-width: min(520px, calc(100vw - 32px));
  box-sizing: border-box;
}

.admin-sound-prompt.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.admin-sound-prompt span {
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.admin-sound-prompt-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.admin-sound-hint {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  z-index: 9999;
  max-width: min(320px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.92);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.admin-sound-hint.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}

.admin-content h1 {
  margin-bottom: 20px;
}

.admin-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.admin-section-title {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.admin-section-hint {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.admin-sort-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.admin-sort-toolbar .admin-section-hint {
  margin: 0;
  flex: 1 1 220px;
}

.admin-sort-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-sort-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.admin-sort-handle {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  padding: 4px 6px;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 6px;
  touch-action: none;
}

.admin-sort-handle:active {
  cursor: grabbing;
}

.admin-sort-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  padding: 2px 7px;
  font-size: 0.82rem;
  line-height: 1.2;
  border-radius: 6px;
  min-height: 28px;
}

.admin-sort-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.sortable-dragging {
  opacity: 0.45;
}

.sortable-over {
  box-shadow: inset 0 -2px 0 var(--primary);
}

.admin-card-row .admin-sort-controls {
  margin-right: 4px;
}

.admin-row-num {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.data-table .admin-row-num {
  width: 2.5rem;
  text-align: center;
}

.admin-inline-form {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-product-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.admin-product-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  padding: 10px 8px;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-product-tab:hover {
  color: var(--text);
}

.admin-product-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.admin-products-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-products-export-hint {
  margin: -8px 0 16px;
}

.admin-products-toolbar .search-input-wrap {
  flex: 1 1 200px;
  min-width: 0;
}

.admin-products-search {
  width: 100%;
  min-width: 0;
  padding: 10px 42px 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
}

.admin-products-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 67, 147, 0.12);
}

.admin-products-category-filter {
  flex: 0 1 220px;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
}

.admin-card-category-featured {
  background: rgba(232, 67, 147, 0.12);
  color: var(--accent);
  border: 1px solid rgba(232, 67, 147, 0.35);
}

.category-picker-chip-admin {
  border-style: dashed;
}

.form-hint-inline {
  font-style: normal;
  color: var(--muted);
  font-size: 0.88em;
}

.admin-featured-add-form {
  margin-bottom: 18px;
}

.admin-featured-add-form .admin-products-category-filter {
  flex: 1 1 260px;
}

.admin-product-date,
.admin-card-date {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.admin-card-date {
  margin-top: 4px;
}

.admin-product-date-cell {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-product-added-at {
  margin-top: -4px;
  margin-bottom: 12px;
}

.admin-inline-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
}

.admin-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.admin-card-muted {
  opacity: 0.65;
}

.admin-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.35;
  word-break: break-word;
}

.admin-card-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.admin-card-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.admin-card-grid strong {
  font-weight: 600;
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-card-actions .btn {
  flex: 0 0 auto;
  width: auto;
}

.order-meta-block {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.45;
  word-break: break-word;
}

.order-meta-block div + div {
  margin-top: 4px;
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.data-table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--muted);
}

.data-table-compact th,
.data-table-compact td {
  padding: 8px 10px;
  font-size: 0.85rem;
}

.data-table-actions {
  white-space: nowrap;
  text-align: right;
}

.data-table-badges {
  white-space: normal;
}

.data-table-badges .badge {
  margin: 1px 2px 1px 0;
}

.admin-table-edit {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-table-edit input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
}

.admin-inline-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-inline-edit input {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

.admin-card-compact {
  padding: 10px 12px;
}

.admin-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-card-main {
  min-width: 0;
  flex: 1;
}

.admin-card-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.admin-card-category {
  display: inline-block;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-card-price {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
}

.admin-card-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.admin-card-actions-row {
  flex-direction: row;
  flex-wrap: wrap;
}

.admin-card-actions-row .btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.admin-cards-compact {
  gap: 8px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-deleted {
  background: #fee2e2;
  color: var(--danger);
}

.badge-active {
  background: #d1fae5;
  color: var(--success);
}

.badge-piece {
  background: #dbeafe;
  color: var(--accent);
}

.badge-pending {
  background: #fef3c7;
  color: #b45309;
}

.badge-accepted {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-completed {
  background: #d1fae5;
  color: var(--success);
}

.badge-archived {
  background: #e5e7eb;
  color: #4b5563;
}

.order-card.order-archived {
  opacity: 0.85;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.qty-row-label {
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.qty-stepper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  -webkit-tap-highlight-color: transparent;
}

.qty-step {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: var(--bg-soft);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary);
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.qty-step:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qty-step:active:not(:disabled) {
  background: var(--border);
}

.qty-value {
  min-width: 2.75rem;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  padding: 0 4px;
  user-select: none;
}

.qty-input {
  width: 70px;
  padding: 6px 8px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.account-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.account-page .page-title {
  margin-bottom: 16px;
}

.about-wa {
  margin-top: 16px;
}

.about-wa .contact-link-wa {
  font-weight: 600;
  color: #128c7e;
  text-decoration: none;
}

.about-wa .contact-link-wa:hover {
  text-decoration: underline;
}

.account-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.account-tab {
  appearance: none;
  border: none;
  background: none;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  font-family: inherit;
}

.account-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.account-tab-panel {
  display: none;
}

.account-tab-panel.active {
  display: block;
}

.about-content {
  margin-bottom: 0;
}

.about-text {
  line-height: 1.6;
  color: var(--text);
}

.orders-empty {
  color: var(--muted);
}

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.admin-user-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 4px 0 10px;
}

.admin-users-toolbar {
  margin-bottom: 16px;
}

.admin-users-toolbar .search-input-wrap {
  max-width: 420px;
}

.admin-user-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.admin-user-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.admin-user-profile {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px 0 24px;
}

.admin-user-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-user-profile-head h1 {
  margin-bottom: 4px;
}

.admin-user-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.admin-user-profile-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-user-profile-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.order-date {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

.order-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.order-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-width: 0;
  overflow: hidden;
}

.order-card.order-deleted {
  opacity: 0.6;
}

.order-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.order-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.order-items {
  margin: 0 0 12px 20px;
  font-size: 0.9rem;
}

.order-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.order-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
}

.order-items-edit {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.order-items-edit .order-item-edit:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.order-item-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  list-style: none;
  margin-left: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.order-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.order-item-name {
  min-width: 0;
  font-weight: 600;
  line-height: 1.35;
}

.order-item-unit {
  font-size: 0.85rem;
  color: var(--muted);
  flex-shrink: 0;
}

.order-item-price {
  white-space: nowrap;
  font-size: 0.9rem;
  margin-left: auto;
}

.order-item-remove {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
}

.filter-chip.category-chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #d1fae5;
  color: #166534;
}

.image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.image-preview-item {
  position: relative;
}

.image-preview-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
}

.form-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.product-photo-count {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  pointer-events: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-nav.is-disabled {
  opacity: 0.25;
  pointer-events: none;
}

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
  z-index: 2;
}

.image-preview {
  width: 80px;
  height: 80px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  flex-shrink: 0;
}

.page-title {
  margin-bottom: 24px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 20px;
  overscroll-behavior: contain;
}

.product-reorder-overlay {
  z-index: 1400;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.modal h2 {
  margin-bottom: 20px;
}

.modal-reorder {
  max-width: 760px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.modal-reorder-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 20px 20px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-reorder-title-row h2 {
  margin-bottom: 4px;
}

.modal-reorder-title-row .admin-section-hint {
  margin: 0;
}

.modal-reorder-actions {
  justify-content: flex-start;
}

.product-reorder-category-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.product-reorder-category-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

.product-reorder-category-select {
  width: 100%;
  flex: none;
  min-width: 0;
}

.product-reorder-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.admin-collapsible-section {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: visible;
}

.admin-collapsible-summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  list-style: none;
  user-select: none;
  scroll-margin-top: 72px;
}

.admin-collapsible-summary::-webkit-details-marker {
  display: none;
}

.admin-collapsible-summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform 0.15s ease;
}

.admin-collapsible-section[open] .admin-collapsible-summary::before {
  transform: rotate(90deg);
}

.admin-collapsible-body {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}

.admin-section-flat {
  padding-top: 12px;
  margin-bottom: 0;
  box-shadow: none;
  border: none;
  background: transparent;
}

.admin-collapsible-section + .admin-collapsible-section,
.admin-collapsible-section + details,
details + .admin-collapsible-section {
  margin-top: 16px;
}

#products-list-section .admin-collapsible-body {
  padding-bottom: 4px;
}

.admin-reorder-bar {
  margin: 0 0 12px;
}

.admin-reorder-bar .admin-sort-toolbar {
  margin-bottom: 0;
}

#products-list {
  padding-bottom: 4px;
}

#products-list .admin-mobile-only.admin-cards {
  padding-bottom: 8px;
}

.admin-reorder-bar[hidden] {
  display: none !important;
}

.product-reorder-collapsed-hint {
  display: none;
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-reorder--list-collapsed .product-reorder-list {
  display: none;
}

.product-reorder--list-collapsed .product-reorder-collapsed-hint {
  display: block;
}

.product-reorder-list {
  overflow-y: auto;
  padding: 8px 12px 16px;
  flex: 1;
  min-height: 0;
}

.product-reorder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

.product-reorder-row--mobile {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.product-reorder-list--mobile {
  padding: 8px 12px 16px;
}

.product-reorder-row--mobile:last-child {
  margin-bottom: 0;
}

.product-reorder-row.sortable-dragging {
  opacity: 0.55;
}

.product-reorder-row.sortable-over {
  background: var(--bg-soft);
}

.product-reorder-row--mobile.sortable-over {
  border-color: rgba(232, 67, 147, 0.35);
}

.product-reorder-row-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.product-reorder-num {
  width: 1.8rem;
  flex-shrink: 0;
  text-align: right;
  color: var(--muted);
  font-weight: 600;
}

.product-reorder-row--mobile .product-reorder-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  text-align: center;
  color: var(--primary);
  background: var(--bg-soft);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.product-reorder-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-reorder-row--mobile .product-reorder-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.product-reorder-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.product-reorder-pos-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  cursor: text;
}

.product-reorder-pos-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 67, 147, 0.12);
  background: var(--surface);
}

.product-reorder-pos-label {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.product-reorder-pos-select {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-align-last: center;
  padding: 10px 28px 10px 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4.7 6 5.3 10.6.7 12 2.1 6 8.1 0 2.1z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px 8px;
}

.product-reorder-pos-select:focus {
  outline: none;
}

.product-reorder-arrows {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.product-reorder-arrow {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 10px;
}

.admin-sort-controls-compact {
  flex-shrink: 0;
  gap: 1px;
}

.admin-sort-pos-input {
  width: 3rem;
  padding: 4px 4px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
}

.admin-sort-pos-input:focus {
  outline: 2px solid rgba(232, 67, 147, 0.25);
  border-color: var(--primary);
}

@media (max-width: 768px) {
  .product-reorder-overlay {
    padding: 0;
    align-items: stretch;
  }

  .product-reorder-overlay--mobile {
    position: fixed;
    inset: 0;
    overflow: hidden;
    height: 100%;
  }

  .modal-reorder--mobile {
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: 100svh;
    border-radius: 0;
  }

  .modal-reorder--mobile .modal-reorder-header {
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
    gap: 10px;
  }

  .modal-reorder--mobile .modal-reorder-title-row h2 {
    font-size: 1.05rem;
    line-height: 1.25;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
  }

  .modal-reorder--mobile .modal-reorder-title-row .admin-section-hint {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .modal-reorder--mobile .product-reorder-category-select {
    font-size: 16px;
    min-height: 44px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .modal-reorder--mobile .admin-products-search {
    font-size: 16px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .modal-reorder--mobile .modal-reorder-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .modal-reorder--mobile .modal-reorder-actions .btn-block,
  .modal-reorder--mobile .modal-reorder-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .modal-reorder--mobile .product-reorder-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  body.scroll-locked.product-reorder-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
  }

  body.admin-page.product-reorder-open {
    padding-bottom: 0 !important;
  }

  body.product-reorder-open .admin-mobile-nav,
  body.product-reorder-open .admin-mobile-more-sheet {
    display: none !important;
  }

  .product-reorder-row--mobile:focus-within {
    border-color: rgba(232, 67, 147, 0.45);
    box-shadow: 0 0 0 2px rgba(232, 67, 147, 0.12);
  }
}

@media (max-width: 640px) {
  .product-reorder-overlay {
    padding: 0;
    align-items: stretch;
  }

  .modal-reorder {
    max-width: none;
    max-height: 100vh;
    border-radius: 0;
  }

  .admin-sort-controls-compact .admin-sort-btn {
    min-width: 1.6rem;
    padding: 2px 4px;
  }

  .admin-sort-controls-compact .admin-sort-pos-input {
    width: 2.6rem;
  }
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

html.scroll-locked,
body.scroll-locked {
  overflow: hidden;
}

body.scroll-locked {
  position: fixed;
  width: 100%;
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .search-bar {
    flex-direction: column;
  }

  .hero h1 {
    font-size: 1.65rem;
  }

  .page-home .hero-brand {
    padding: 22px max(16px, env(safe-area-inset-right)) 20px max(16px, env(safe-area-inset-left));
    margin-bottom: 16px;
  }

  .page-home .hero h1 {
    font-size: clamp(1.55rem, 7vw, 1.85rem);
    gap: 8px;
  }

  .page-home .hero-icon {
    font-size: 2rem;
  }

  .hero-icon {
    font-size: 2rem;
  }

  .page-home .logo {
    font-size: 1.42rem;
  }

  .page-home .logo-icon {
    font-size: 2.05rem;
  }
}

/* --- Mobile-first enhancements --- */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.container {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

@media (max-width: 960px) {
  body {
    overflow-x: clip;
  }

  header {
    padding: max(10px, env(safe-area-inset-top)) 0 10px;
    margin-bottom: 16px;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .logo {
    width: 100%;
    justify-content: center;
    align-self: center;
    min-width: 0;
    font-size: 1.32rem;
    line-height: 1.3;
    text-align: center;
  }

  .logo-icon {
    font-size: 1.9rem;
    flex-shrink: 0;
  }

  .header-contact-nav {
    flex: none;
    width: 100%;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .header-phone-col {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
  }

  .header-phone-link {
    font-size: 0.84rem;
  }

  .header-address {
    font-size: 0.8rem;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    max-width: none;
  }

  .header-nav {
    width: 100%;
    flex: none;
    align-self: stretch;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-top: 0;
  }

  .header-nav > a,
  .header-nav .user-info-link,
  .header-nav .user-info-login {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    flex-shrink: 0;
    padding: 2px 0;
    font-size: 0.88rem;
  }

  .header-nav .user-info {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 0;
    margin: 0;
    border: none;
  }

  .header-nav .user-info-name {
    display: none;
  }

  .header-nav .user-info-logout {
    padding: 2px 8px;
    font-size: 0.82rem;
    min-height: 32px;
    line-height: 1.2;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: auto;
  }

  .admin-sidebar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(45, 27, 46, 0.06);
  }

  .admin-sidebar h3,
  .admin-sidebar hr {
    display: none;
  }

  .admin-sidebar::-webkit-scrollbar {
    display: none;
  }

  .admin-sidebar a {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .admin-content {
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  header {
    padding: max(10px, env(safe-area-inset-top)) 0 10px;
    margin-bottom: 16px;
  }

  body {
    overflow-x: clip;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .logo {
    width: 100%;
    justify-content: center;
    align-self: center;
    min-width: 0;
    font-size: 1.32rem;
    line-height: 1.3;
    text-align: center;
  }

  .header-contact-nav {
    flex: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .header-phone-col {
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
  }

  .header-phone-link {
    font-size: 0.84rem;
  }

  .header-address {
    font-size: 0.8rem;
    white-space: nowrap;
    line-height: 1.2;
    max-width: none;
  }

  .logo-icon {
    font-size: 1.9rem;
    flex-shrink: 0;
  }

  .header-phone {
    display: none;
  }

  .header-nav {
    width: 100%;
    flex: none;
    align-self: stretch;
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 8px 14px;
    padding-bottom: 0;
    padding-top: 0;
    border-top: none;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }

  .header-nav > a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    flex-shrink: 0;
    padding: 2px 0;
    font-size: 0.88rem;
  }

  .header-nav .user-info {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin: 0;
    border: none;
  }

  .header-nav .user-info-name {
    display: none;
  }

  .header-nav .user-info-link,
  .header-nav .user-info-login {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
  }

  .header-nav .user-info-link:hover,
  .header-nav .user-info-login:hover {
    color: var(--primary);
    text-decoration: none;
  }

  .header-nav .user-info-logout {
    padding: 2px 8px;
    font-size: 0.82rem;
    min-height: 32px;
    line-height: 1.2;
  }

  .hero {
    padding: 12px 0 6px;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .search-bar {
    margin-bottom: 16px;
  }

  .category-filters--desktop {
    display: none;
  }

  .category-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 0;
  }

  .catalog-toolbar-controls {
    width: 100%;
    gap: 8px;
  }

  .catalog-category-dropdown {
    display: block;
    flex: 1;
    min-width: 0;
  }

  .catalog-filter-dropdown {
    flex: 1;
    min-width: 0;
  }

  .catalog-category-dropdown .catalog-filter-toggle,
  .catalog-filter-dropdown .catalog-filter-toggle {
    width: 100%;
    justify-content: space-between;
    min-width: 0;
    padding: 9px 12px;
    font-size: 0.84rem;
  }

  #catalog-category-label,
  #catalog-filter-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    text-align: left;
  }

  .catalog-filter-option--desktop-only {
    display: none;
  }

  .category-quick-filters .category-chip {
    flex: 1;
    min-width: 0;
    max-width: 180px;
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .category-quick-filters .category-chip-highlight {
    padding: 10px 12px;
  }

  .catalog-toolbar {
    margin-top: 4px;
    margin-bottom: 14px;
    padding: 8px 0;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }

  .catalog-load-more-wrap {
    margin-bottom: 24px;
  }

  .catalog-load-more-btn {
    width: 100%;
    max-width: 320px;
  }

  .product-card .product-body {
    padding: 8px;
  }

  .product-card .product-name {
    font-size: 0.86rem;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .product-card .product-meta {
    font-size: 0.68rem;
    margin-bottom: 4px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .product-card .product-prices {
    gap: 2px;
    margin-bottom: 6px;
  }

  .product-card .price-line {
    gap: 4px;
    flex-wrap: wrap;
    align-items: baseline;
  }

  .product-card .price-line-main .price-current {
    font-size: 0.95rem;
  }

  .product-card .price-current {
    font-size: 0.88rem;
  }

  .product-card .price-old {
    font-size: 0.72rem;
  }

  .product-card .price-unit {
    font-size: 0.65rem;
  }

  .product-card .product-badges {
    display: none;
  }

  .product-card .product-desc {
    font-size: 0.72rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
  }

  .product-card .desc-toggle {
    font-size: 0.68rem;
    margin-bottom: 4px;
    padding: 0;
  }

  .product-card .product-category-tag {
    font-size: 0.58rem;
    padding: 2px 6px;
    line-height: 1.25;
  }

  .product-card .product-categories {
    gap: 4px;
    margin-bottom: 4px;
  }

  .product-hit-sticker,
  .product-sale-sticker {
    font-size: 0.55rem;
    padding: 3px 5px;
    top: 5px;
  }

  .product-hit-sticker {
    left: 5px;
  }

  .product-sale-sticker {
    right: 5px;
  }

  .product-oos-sticker {
    font-size: 0.58rem;
    padding: 4px 6px;
    bottom: 5px;
    max-width: calc(100% - 10px);
    white-space: normal;
    text-align: center;
  }

  .product-favorite-btn {
    width: 32px;
    height: 32px;
    bottom: 5px;
    right: 5px;
  }

  .product-favorite-btn svg {
    width: 16px;
    height: 16px;
  }

  .product-card .product-footer {
    gap: 6px;
  }

  .product-card .unit-select {
    gap: 4px;
  }

  .product-card .unit-btn {
    min-height: 32px;
    padding: 5px 2px;
    font-size: 0.64rem;
    line-height: 1.15;
    border-radius: 6px;
  }

  .product-card .qty-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    font-size: 0.68rem;
  }

  .product-card .qty-row-label {
    font-size: 0.68rem;
  }

  .product-card .qty-stepper {
    width: 100%;
    border-radius: 8px;
  }

  .product-card .qty-step {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 1rem;
  }

  .product-card .qty-value {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    padding: 0 2px;
  }

  .product-card .product-actions {
    flex-direction: column;
    gap: 6px;
  }

  .product-card .product-actions .btn,
  .product-card .product-actions .btn-primary {
    width: 100%;
    flex: none;
    min-width: 0;
    min-height: 36px;
    padding: 8px 6px;
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .btn {
    min-height: 44px;
    padding: 12px 18px;
  }

  .btn-sm {
    min-height: 40px;
    padding: 8px 14px;
  }

  .unit-btn {
    min-height: 44px;
    padding: 10px 8px;
    font-size: 0.85rem;
  }

  .product-card .unit-btn {
    min-height: 32px;
    padding: 5px 2px;
    font-size: 0.64rem;
  }

  .product-card .product-actions .btn-sm {
    min-height: 36px;
    padding: 8px 6px;
  }

  .qty-input,
  .form-group input,
  .form-group textarea,
  .form-group select,
  .search-bar input {
    font-size: 16px;
  }

  .form-card {
    padding: 20px 16px;
    margin: 20px auto;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .page-title {
    font-size: 1.35rem;
    margin-bottom: 16px;
  }

  .cart-page-body {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cart-item-row {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "stepper total"
      "remove remove";
    gap: 12px;
    align-items: center;
  }

  .qty-stepper {
    grid-area: stepper;
  }

  .cart-item-total {
    grid-area: total;
    justify-self: end;
    font-size: 1.15rem;
    margin-left: 0;
  }

  .cart-item-remove {
    grid-area: remove;
    width: 100%;
  }

  body.cart-page {
    padding-bottom: calc(190px + env(safe-area-inset-bottom));
  }

  body.cart-page.cart-has-hint {
    padding-bottom: calc(250px + env(safe-area-inset-bottom));
  }

  .cart-mobile-only .cart-items {
    padding-bottom: 8px;
  }

  body.cart-page .cart-bar:not([hidden]) {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 100;
    margin: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 14px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .cart-bar-inner {
    gap: 8px;
  }

  .cart-bar-inner .cart-bar-actions {
    gap: 8px;
  }

  .cart-bar-inner .cart-bar-actions .btn {
    padding: 12px 10px;
    font-size: 0.88rem;
    min-height: 44px;
  }

  body.cart-page .site-footer {
    margin-bottom: 0;
  }

  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .order-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .order-actions .btn,
  .order-actions a.btn {
    width: 100%;
    text-align: center;
  }

  .order-item-controls {
    width: 100%;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: auto;
  }

  body.admin-page {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  body.admin-page header {
    padding: max(8px, env(safe-area-inset-top)) 0 8px;
    margin-bottom: 8px;
  }

  body.admin-page .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  body.admin-page .logo {
    font-size: 0.98rem;
    width: auto;
    justify-content: flex-start;
    text-align: left;
    line-height: 1.2;
  }

  body.admin-page .logo-icon {
    font-size: 1.45rem;
  }

  body.admin-page .header-inner nav {
    flex-shrink: 0;
  }

  body.admin-page .user-info {
    font-size: 0.82rem;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.admin-page .container {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .admin-mobile-nav {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    gap: 4px;
  }

  .admin-mobile-nav-item {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6px 4px;
    font: inherit;
    cursor: pointer;
  }

  .admin-mobile-nav-item.is-active {
    color: var(--primary);
    background: var(--bg-soft);
    font-weight: 700;
  }

  .admin-mobile-nav-label {
    font-size: 0.78rem;
    line-height: 1.2;
    text-align: center;
  }

  .admin-mobile-nav-item .admin-nav-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 28px);
    margin-left: 0;
    min-width: 18px;
    height: 18px;
    font-size: 0.68rem;
  }

  .admin-mobile-more-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1300;
  }

  .admin-mobile-more-sheet[hidden] {
    display: none !important;
  }

  .admin-mobile-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
  }

  .admin-mobile-more-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 16px 16px max(16px, env(safe-area-inset-bottom));
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.15);
  }

  .admin-mobile-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .admin-mobile-more-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: var(--bg-soft);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
  }

  .admin-mobile-more-link {
    display: block;
    width: 100%;
    padding: 14px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  .admin-mobile-more-link.is-active,
  .admin-mobile-more-link:hover {
    background: var(--bg-soft);
    color: var(--primary);
  }

  .admin-order-toast-container {
    top: auto;
    bottom: calc(76px + env(safe-area-inset-bottom));
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: min(42vh, calc(100dvh - 120px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-order-toast {
    transform: translateY(12px);
  }

  .admin-order-toast.is-visible {
    transform: translateY(0);
  }

  .admin-order-toast-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-order-toast-actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .admin-sound-prompt {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    bottom: calc(76px + env(safe-area-inset-bottom));
    transform: translateY(16px);
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .admin-sound-prompt.is-visible {
    transform: translateY(0);
  }

  .admin-sound-prompt .btn {
    width: 100%;
  }

  .admin-sound-prompt-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-sound-hint {
    left: 12px;
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    transform: translateY(8px);
    max-width: none;
  }

  .admin-sound-hint.is-visible {
    transform: translateY(0);
  }

  .admin-desktop-only,
  .cart-desktop-only,
  .order-meta-desktop {
    display: none !important;
  }

  .admin-mobile-only,
  .cart-mobile-only {
    display: block !important;
  }

  .admin-mobile-only.admin-cards {
    display: flex !important;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .admin-stats-grid .admin-stat-card:last-child {
    grid-column: 1 / -1;
  }

  .admin-stat-card {
    padding: 16px;
  }

  .admin-stat-value {
    font-size: 1.6rem;
  }

  .admin-products-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-products-toolbar .search-input-wrap,
  .admin-products-category-filter,
  .admin-users-toolbar .search-input-wrap {
    width: 100%;
    flex: none;
    min-width: 0;
  }

  .admin-sort-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-sort-toolbar-actions,
  .admin-sort-toolbar .btn {
    width: 100%;
  }

  .admin-reorder-bar .admin-sort-toolbar {
    align-items: stretch;
  }

  .admin-collapsible-summary {
    font-size: 1rem;
    padding: 12px 0;
  }

  .admin-card-actions.admin-card-actions-row {
    flex-direction: column;
  }

  .admin-card-actions.admin-card-actions-row .btn {
    width: 100%;
    flex: none;
    min-height: 44px;
  }

  .cart-desktop-only.cart-layout {
    display: none !important;
  }

  .order-meta-block {
    display: block;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-content {
    padding: 16px;
  }

  .admin-content h1 {
    font-size: 1.35rem;
    margin-bottom: 16px;
  }

  .admin-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-stat-value {
    font-size: 1.5rem;
  }

  .admin-inline-form {
    flex-direction: column;
  }

  .admin-inline-form .btn {
    width: 100%;
  }

  .admin-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-card-compact {
    padding: 8px 10px;
  }

  .admin-card-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 6px;
  }

  .admin-card-badges {
    justify-content: flex-start;
  }

  .admin-card-name {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .admin-card-category {
    font-size: 0.68rem;
  }

  .admin-card-price {
    font-size: 0.76rem;
  }

  .admin-card-meta {
    font-size: 0.78rem;
  }

  .admin-cards-compact {
    gap: 6px;
  }

  .admin-card-actions {
    flex-direction: column;
  }

  .admin-card-actions .btn {
    width: 100%;
  }

  .admin-card-actions.admin-card-actions-row {
    flex-direction: row;
  }

  .admin-card-actions.admin-card-actions-row .btn {
    width: auto;
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .admin-table-wrap {
    margin: 0;
  }

  body.admin-page .admin-content .btn-primary,
  body.admin-page .admin-content form > .btn-primary {
    width: 100%;
  }

  #order-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  #order-filters::-webkit-scrollbar {
    display: none;
  }

  .admin-product-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
  }

  .admin-product-tab {
    font-size: 0.8rem;
    padding: 10px 6px;
  }

  body.admin-page .order-items {
    margin-left: 16px;
    padding-right: 4px;
  }

  body.admin-page .order-card {
    padding: 14px;
  }

  body.admin-page .order-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body.admin-page .order-actions .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    min-height: 44px;
    justify-content: center;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-height: 92vh;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 20px 16px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .site-footer {
    margin-top: 24px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 440px) {
  .logo {
    font-size: 1.18rem;
  }

  .logo-icon {
    font-size: 1.75rem;
  }

  .header-phone-link {
    font-size: 0.76rem;
  }

  .header-address {
    font-size: 0.72rem;
    max-width: none;
  }

  .header-phone-col {
    gap: 8px 10px;
  }

  .header-nav {
    gap: 6px 10px;
  }

  .header-nav > a,
  .header-nav .user-info-link,
  .header-nav .user-info-login {
    font-size: 0.82rem;
    min-height: 32px;
  }

  nav .user-info-logout {
    padding: 2px 8px;
    font-size: 0.78rem;
    min-height: 30px;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 1.05rem;
  }

  .logo-icon {
    font-size: 1.6rem;
  }

  .header-phone-link {
    font-size: 0.7rem;
  }

  .header-address {
    font-size: 0.66rem;
  }

  .header-nav > a,
  .header-nav .user-info-link,
  .header-nav .user-info-login {
    font-size: 0.78rem;
  }
}
