:root {
    --green: #00a651;
    --green-dark: #008a44;
    --orange: #ff6b00;
    --bg: #f5f7f5;
    --card: #fff;
    --text: #222;
    --muted: #666;
    --border: #e0e5e0;
    --radius: 12px;
    --shadow: 0 4px 16px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
.header {
    background: var(--green);
    color: #fff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.logo-mark {
    background: #fff; color: var(--green); width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem;
}
.nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav a { color: #fff; font-weight: 500; }
.nav a:hover { text-decoration: underline; opacity: 0.9; }
.btn-sm {
    background: #fff; color: var(--green) !important; padding: 6px 14px; border-radius: 20px;
    font-weight: 600; text-decoration: none !important;
}
.btn-sm:hover { background: #f0f0f0; }

/* Main */
.main { flex: 1; padding: 28px 0 40px; }

/* Cards & forms */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.discount-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--green);
    transition: transform 0.15s;
}
.discount-card:hover { transform: translateY(-3px); }
.discount-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.discount-card .category { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.prices { display: flex; align-items: baseline; gap: 10px; margin: 10px 0; }
.old-price { text-decoration: line-through; color: var(--muted); font-size: 0.95rem; }
.new-price { font-size: 1.4rem; font-weight: 700; color: var(--green); }
.badge {
    display: inline-block; background: var(--orange); color: #fff;
    font-size: 0.85rem; font-weight: 700; padding: 3px 8px; border-radius: 6px;
}
.valid { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

/* Forms */
label { display: block; margin-bottom: 14px; font-weight: 500; }
input[type="text"], input[type="tel"], input[type="date"], input[type="password"], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 1rem; margin-top: 4px;
}
input:focus { outline: 2px solid var(--green); border-color: transparent; }
.btn {
    display: inline-block; background: var(--green); color: #fff; border: none;
    padding: 12px 24px; border-radius: 8px; font-size: 1rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--green-dark); text-decoration: none; }
.btn-secondary { background: #eee; color: var(--text); }
.btn-secondary:hover { background: #ddd; }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 16px; }
.alert.success { background: #e6f7ed; color: #0a6b2d; border: 1px solid #b3e6c5; }
.alert.error { background: #fdeaea; color: #a11; border: 1px solid #f5c2c2; }
.alert.info { background: #e8f4fd; color: #0a4a7a; border: 1px solid #b3d9f5; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--green) 0%, #00c261 100%);
    color: #fff; border-radius: var(--radius); padding: 36px 28px; margin-bottom: 28px;
    text-align: center;
}
.hero h1 { font-size: 1.8rem; margin-bottom: 10px; }
.hero p { opacity: 0.95; max-width: 560px; margin: 0 auto 18px; }

/* Footer */
.footer {
    background: #1a1a1a; color: #aaa; padding: 24px 0; font-size: 0.9rem; text-align: center;
}
.footer a { color: #ccc; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; background: #1e2a1e; color: #fff; padding: 20px 0; flex-shrink: 0;
}
.admin-sidebar a {
    display: block; color: #ccc; padding: 10px 20px; text-decoration: none;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--green); color: #fff; }
.admin-content { flex: 1; padding: 24px; background: var(--bg); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
    text-align: center;
}
.stat-card .value { font-size: 1.8rem; font-weight: 700; color: var(--green); }
.stat-card .label { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.stat-card .change { font-size: 0.9rem; margin-top: 6px; }
.stat-card .change.up { color: #0a6b2d; }
.stat-card .change.down { color: #a11; }

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f0f4f0; font-weight: 600; font-size: 0.9rem; }
tr:last-child td { border-bottom: none; }

.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; margin-top: 12px; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.chart-bar {
    width: 100%; max-width: 40px; background: var(--green); border-radius: 4px 4px 0 0;
    min-height: 4px; transition: height 0.3s;
}
.chart-bar.prev { background: #a8d5b8; }
.chart-label { font-size: 0.7rem; color: var(--muted); margin-top: 4px; writing-mode: horizontal-tb; }

@media (max-width: 700px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; display: flex; overflow-x: auto; padding: 0; }
    .admin-sidebar a { white-space: nowrap; }
    .hero h1 { font-size: 1.4rem; }
}

/* Notifications & products */
.bell-link { position: relative; font-size: 1.2rem; }
.badge-count {
    position: absolute; top: -6px; right: -10px;
    background: #e53935; color: #fff; font-size: 0.7rem;
    min-width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.product-card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
    transition: transform 0.15s; cursor: pointer;
    display: block; color: inherit; text-decoration: none;
    border-left: 5px solid var(--green);
}
.product-card:hover { transform: translateY(-3px); text-decoration: none; }
.product-card.hot { border-left-color: var(--orange); box-shadow: 0 4px 20px rgba(255,107,0,0.25); }
.product-card img {
    width: 100%; height: 160px; object-fit: cover; background: #eee;
}
.product-card .body { padding: 14px 16px; }
.product-card .no-photo {
    height: 160px; background: #f0f0f0; display: flex;
    align-items: center; justify-content: center; color: #999; font-size: 0.9rem;
}
.stars { color: #f5a623; letter-spacing: 1px; }
.stars .empty { color: #ddd; }
.like-btns { display: flex; gap: 8px; margin-top: 10px; }
.like-btns button {
    border: 1px solid var(--border); background: #fff; padding: 6px 12px;
    border-radius: 20px; cursor: pointer; font-size: 0.9rem;
}
.like-btns button.active-like { background: #e8f5e9; border-color: var(--green); }
.like-btns button.active-dislike { background: #ffebee; border-color: #e53935; }
.ticket-status {
    display: inline-block; padding: 3px 10px; border-radius: 12px;
    font-size: 0.8rem; font-weight: 600;
}
.ticket-status.new { background: #e3f2fd; color: #1565c0; }
.ticket-status.in_progress { background: #fff3e0; color: #e65100; }
.ticket-status.waiting_user { background: #f3e5f5; color: #7b1fa2; }
.ticket-status.resolved { background: #e8f5e9; color: #2e7d32; }
.msg-list { max-height: 400px; overflow-y: auto; }
.msg {
    padding: 12px; margin-bottom: 10px; border-radius: 8px;
    background: #f5f5f5;
}
.msg.admin { background: #e8f5e9; }
.msg .meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.hot-badge {
    background: var(--orange); color: #fff; font-weight: 700;
    padding: 4px 10px; border-radius: 6px; font-size: 0.85rem;
}
.rating-form label.checkbox { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; font-weight: 400; }

.header-search {
    display: flex; flex: 1; max-width: 320px; margin: 0 12px;
    background: rgba(255,255,255,0.95); border-radius: 20px; overflow: hidden;
}
.header-search input {
    border: none; padding: 8px 14px; flex: 1; min-width: 0; font-size: 0.95rem;
    background: transparent; margin: 0;
}
.header-search input:focus { outline: none; }
.header-search button {
    border: none; background: transparent; padding: 0 12px; cursor: pointer; font-size: 1rem;
}
.product-barcode { max-width: 100%; height: auto; }
@media (max-width: 800px) {
    .header-inner { flex-direction: column; align-items: stretch; }
    .header-search { max-width: none; margin: 8px 0; }
}

/* Search UX */
.search-hero {
    background: linear-gradient(135deg, #00a651 0%, #00c261 100%);
    color: #fff; border-radius: var(--radius); padding: 28px 20px; margin-bottom: 24px; text-align: center;
}
.search-hero h1 { margin-bottom: 8px; font-size: 1.6rem; }
.search-hero p { opacity: 0.95; margin-bottom: 16px; font-size: 0.95rem; }
.search-form-lg {
    display: flex; gap: 8px; max-width: 520px; margin: 0 auto; flex-wrap: wrap; justify-content: center;
}
.search-form-lg input {
    flex: 1; min-width: 200px; padding: 12px 16px; border: none; border-radius: 10px; font-size: 1rem;
}
.search-form-lg .btn { border-radius: 10px; }
.search-meta { color: var(--muted); margin-bottom: 12px; font-size: 0.9rem; }
.search-section-title { margin: 20px 0 12px; font-size: 1.15rem; }
.search-hint { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }

.header-search {
    display: flex; flex: 1; max-width: 360px; margin: 0 12px;
    background: #fff; border-radius: 24px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.header-search input {
    border: none; padding: 10px 14px; flex: 1; min-width: 0; font-size: 0.95rem;
    background: transparent; margin: 0; color: #222;
}
.header-search input:focus { outline: none; }
.header-search button {
    border: none; background: var(--green-dark); color: #fff; padding: 0 16px;
    cursor: pointer; font-size: 0.9rem; font-weight: 600;
}
.nav-app {
    background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 16px !important;
}
.nav-app.pwa-ready { background: #fff; color: var(--green) !important; font-weight: 700; }

/* Product cards — photo focus */
.product-grid { align-items: stretch; }
.product-card {
    display: flex; flex-direction: column; overflow: hidden;
    border-left: none; border: 1px solid var(--border);
    position: relative;
}
.product-thumb {
    position: relative; height: 200px; background: linear-gradient(180deg, #f7faf7, #eef5ee);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-thumb img {
    width: 100%; height: 100%; object-fit: contain; padding: 12px;
    transition: transform 0.25s ease;
}
.product-card:hover .product-thumb img { transform: scale(1.06); }
.product-thumb .no-photo {
    height: 100%; width: 100%; display: flex; align-items: center; justify-content: center;
    color: #999; font-size: 0.9rem; background: #f0f0f0;
}
.disc-badge {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    font-size: 0.95rem; padding: 6px 10px; border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.product-card .body { flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 1rem; line-height: 1.35; margin-bottom: 6px; }
.plu-line { font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.price-na { font-size: 0.88rem; color: var(--muted); margin-top: auto; }
.linkish { color: var(--green); }

/* Discount tiers — stronger emphasis for bigger discounts */
.product-card.tier-mid {
    box-shadow: 0 4px 14px rgba(0,166,81,0.12);
    border: 1px solid rgba(0,166,81,0.25);
}
.product-card.tier-mid .disc-badge { background: var(--green); }
.product-card.tier-high {
    box-shadow: 0 6px 20px rgba(255,107,0,0.22);
    border: 2px solid rgba(255,107,0,0.45);
}
.product-card.tier-high .disc-badge { background: var(--orange); font-size: 1.05rem; }
.product-card.tier-high .product-thumb { background: linear-gradient(180deg, #fff8f0, #ffefdf); }
.product-card.tier-hot {
    box-shadow: 0 8px 28px rgba(229,57,53,0.28);
    border: 2px solid #e53935;
    transform: translateZ(0);
}
.product-card.tier-hot .disc-badge {
    background: linear-gradient(135deg, #e53935, #ff6b00);
    animation: pulse-badge 1.6s ease-in-out infinite;
    font-size: 1.1rem;
}
.product-card.tier-hot .product-thumb {
    background: linear-gradient(180deg, #fff5f5, #ffe8e0);
}
.product-card.tier-hot .new-price { color: #c62828; font-size: 1.5rem; }
.product-card.muted-card { opacity: 0.95; border-color: #ddd; }
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.img-search-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 12px;
}
.img-search-item {
    background: #f5f5f5; border-radius: 8px; overflow: hidden; border: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.img-search-item img { width: 100%; height: 120px; object-fit: contain; background: #fff; }
.img-search-item .btn-sm { margin: 8px; text-align: center; cursor: pointer; border: none; }

/* Mobile compact layout */
@media (max-width: 600px) {
  .container { padding: 0 12px; }
  .header { padding: 8px 0; }
  .header-inner { gap: 8px; }
  .logo { font-size: 1rem; }
  .logo-mark { width: 28px; height: 28px; font-size: 1rem; }
  .logo-text { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav { gap: 8px; font-size: 0.85rem; }
  .nav a { padding: 2px 0; }
  .btn-sm { padding: 4px 10px; font-size: 0.8rem; }
  .header-search { max-width: none; margin: 0; order: 3; width: 100%; }
  .header-search input { padding: 8px 12px; font-size: 0.9rem; }
  .header-search button { padding: 0 12px; font-size: 0.85rem; }
  .main { padding: 16px 0 28px; }
  .hero { padding: 20px 16px; }
  .hero h1 { font-size: 1.25rem; }
  .hero p { font-size: 0.9rem; margin-bottom: 12px; }
  .search-hero { padding: 18px 14px; }
  .search-hero h1 { font-size: 1.25rem; }
  .product-thumb { height: 140px; }
  .product-thumb img { padding: 8px; }
  .disc-badge { font-size: 0.8rem !important; padding: 4px 8px; top: 6px; right: 6px; }
  .product-card.tier-hot .disc-badge { font-size: 0.9rem !important; }
  .product-card .body { padding: 10px 12px; }
  .product-card h3 { font-size: 0.92rem; }
  .new-price { font-size: 1.15rem; }
  .product-card.tier-hot .new-price { font-size: 1.25rem; }
  .old-price { font-size: 0.85rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 14px; }
  .card h1, .main h1 { font-size: 1.25rem; }
  .prices { gap: 6px; margin: 6px 0; }
  .footer { padding: 16px 0; font-size: 0.8rem; }
  .footer-test { font-size: 0.85rem; line-height: 1.45; }
  .insight-list { font-size: 0.9rem; }
  /* product page single column */
  .card[style*="grid-template-columns"] { display: block !important; }
  .product-barcode { max-width: 100%; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .product-thumb { height: 120px; }
  .nav-app { display: none; } /* экономия места, есть в футере */
}
.footer-test {
  background: #2a2a2a; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
  text-align: left; color: #ddd;
}
.footer-test .btn { margin-top: 10px; font-size: 0.9rem; padding: 10px 16px; }
.insight-box {
  background: #f7faf7; border-radius: 10px; padding: 12px 14px; margin: 12px 0;
  border: 1px solid #e0e8e0;
}
.insight-box h3 { font-size: 0.95rem; margin-bottom: 8px; }
.insight-list { list-style: none; padding: 0; margin: 0; }
.insight-list li { padding: 6px 0; border-bottom: 1px solid #e8eee8; }
.insight-list li:last-child { border-bottom: none; }
.insight-pos { color: #1b5e20; }
.insight-neg { color: #b71c1c; }

/* Compact hero + dismiss */
.hero-compact {
  position: relative;
  padding: 18px 16px 16px;
  text-align: center;
}
.hero-compact h1 { font-size: 1.35rem; margin-bottom: 6px; }
.hero-compact p { font-size: 0.9rem; margin: 0 auto 12px; line-height: 1.4; max-width: 480px; }
.hero-close {
  position: absolute; top: 8px; right: 10px;
  background: rgba(0,0,0,0.15); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.hero-close:hover { background: rgba(0,0,0,0.3); }
.btn-hero-light { background: #fff; color: var(--green); padding: 8px 16px; font-size: 0.9rem; }
.btn-hero-ghost { background: rgba(255,255,255,0.2); color: #fff; padding: 8px 16px; font-size: 0.9rem; }
.section-title { font-size: 1.15rem; margin: 12px 0 12px; }
.home-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0 8px;
  font-size: 0.85rem; color: var(--muted);
}
.home-more { margin-top: 16px; }
.limited-note { color: #e65100; font-weight: 500; }
.import-note { color: var(--muted); }
.stock-line { font-size: 0.82rem; font-weight: 600; margin-top: 4px; }
.stock-out { color: #c62828; }
.stock-low { color: #e65100; }
.stock-mid { color: #f9a825; }
.stock-ok { color: #558b2f; }
.stock-many { color: #2e7d32; }

/* Product detail responsive */
.product-detail {
  display: grid;
  grid-template-columns: minmax(160px, 280px) 1fr;
  gap: 20px;
}
.product-detail > div:first-child img {
  width: 100%; max-height: 260px; object-fit: contain; border-radius: 8px; background: #f5f5f5;
}

@media (max-width: 600px) {
  .hero-compact { padding: 14px 12px 12px; margin-bottom: 12px; }
  .hero-compact h1 { font-size: 1.15rem; }
  .hero-compact p { font-size: 0.85rem; margin-bottom: 10px; }
  .section-title { font-size: 1.05rem; margin-bottom: 10px; }
  .product-detail {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    padding: 12px !important;
  }
  .product-detail > div:first-child img,
  .product-detail .no-photo {
    max-height: 160px !important;
    height: 160px;
  }
  .product-detail h1 { font-size: 1.15rem !important; margin: 6px 0 !important; }
  .product-detail .prices { margin: 8px 0 !important; }
  .product-detail .new-price { font-size: 1.25rem; }
  .product-detail .old-price { font-size: 0.9rem; }
  .product-barcode { max-width: 100%; height: 48px !important; }
  .insight-box { padding: 10px; margin: 10px 0; }
  .insight-box h3 { font-size: 0.9rem; }
  .card { padding: 12px; margin-bottom: 12px; }
  .like-btns button { padding: 6px 10px; font-size: 0.85rem; }
  .main { padding: 12px 0 24px; }
  .home-meta { font-size: 0.8rem; }
  .product-thumb { height: 120px; }
  .product-card h3 { font-size: 0.85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-card .body { padding: 8px 10px; }
  .category { display: none; }
}

/* Mobile hamburger + side menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
  border: none; border-radius: 10px;
  cursor: pointer; padding: 8px;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block; height: 2px; background: #fff; border-radius: 2px;
}
.side-nav {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(300px, 86vw);
  background: #fff;
  z-index: 1000;
  transform: translateX(-105%);
  transition: transform 0.25s ease;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  display: flex; flex-direction: column;
}
.side-nav.open { transform: translateX(0); }
.side-nav-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--green); color: #fff;
}
.side-nav-head .logo-mark {
  background: #fff; color: var(--green); width: 32px; height: 32px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.side-nav-close {
  margin-left: auto; background: rgba(255,255,255,0.25); border: none;
  color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1rem;
}
.side-nav-links { display: flex; flex-direction: column; padding: 8px 0; overflow-y: auto; }
.side-nav-links a {
  padding: 14px 18px; color: #222; text-decoration: none; font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
}
.side-nav-links a:hover { background: #f5faf5; color: var(--green); }
.nav-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 999;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.nav-overlay.show { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .nav-desktop { display: none !important; }
  .header-inner { flex-wrap: wrap; }
  .header-search { order: 3; flex: 1 1 100%; max-width: none; margin: 0; }
}

/* Hero close — soft, on-brand */
.hero-close {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px;
  border: 2px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.hero-close:hover {
  background: #fff;
  color: var(--green);
  transform: scale(1.05);
}

.stock-unknown { color: #6d4c41; font-weight: 500; }

/* News cards */
.news-home { margin: 8px 0 18px; }
.news-home-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.news-all-link { font-size: 0.9rem; font-weight: 600; color: var(--green); }
.news-feed { display: flex; flex-direction: column; gap: 12px; }
.news-feed-home { gap: 10px; }
.news-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--green);
}
.news-emoji {
  font-size: 1.75rem; line-height: 1;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: #e8f5e9;
  flex-shrink: 0;
}
.news-body { flex: 1; min-width: 0; }
.news-cat { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; color: var(--muted); }
.news-body p { margin: 0 0 6px; font-size: 0.95rem; line-height: 1.45; }
.news-body time { font-size: 0.78rem; color: var(--muted); }

.news-arrival { border-left-color: #00a651; }
.news-arrival .news-emoji { background: #e8f5e9; }
.news-novelty { border-left-color: #7b1fa2; }
.news-novelty .news-emoji { background: #f3e5f5; }
.news-sale { border-left-color: #e53935; }
.news-sale .news-emoji { background: #ffebee; }
.news-lost { border-left-color: #fb8c00; }
.news-lost .news-emoji { background: #fff3e0; }

@media (max-width: 600px) {
  .news-card { padding: 12px; gap: 10px; }
  .news-emoji { width: 40px; height: 40px; font-size: 1.4rem; }
  .news-body p { font-size: 0.9rem; }
}

/* === Fix: side menu never sits in document flow / above header === */
.side-nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: min(300px, 86vw) !important;
  max-width: 300px;
  background: #fff !important;
  z-index: 1000 !important;
  transform: translateX(-110%) !important;
  transition: transform 0.25s ease !important;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  display: flex !important;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
}
.side-nav.open {
  transform: translateX(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.nav-overlay {
  position: fixed !important;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999 !important;
  display: none;
}
.nav-overlay.show {
  display: block !important;
}
.header {
  position: relative;
  z-index: 50;
}
@media (min-width: 901px) {
  .menu-toggle { display: none !important; }
  .nav-desktop { display: flex !important; flex-wrap: wrap; align-items: center; gap: 12px; }
}
@media (max-width: 900px) {
  .menu-toggle { display: flex !important; }
  .nav-desktop { display: none !important; }
}


/* Mobile drawer — JS class is-open; do not force transform visibility */
#sideNav.side-nav, #sideNav {
  /* managed by inline critical CSS + .is-open */
}
.side-nav-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #00a651;
  color: #fff;
}
.side-nav-head .logo-mark {
  background: #fff;
  color: #00a651;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.side-nav-close {
  margin-left: auto;
  background: rgba(255,255,255,0.25);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}
.side-nav-links {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  overflow-y: auto;
}
.side-nav-links a {
  padding: 14px 18px;
  color: #222 !important;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
}
.side-nav-links a:hover {
  background: #f5faf5;
  color: #00a651 !important;
}
