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

:root {
  --accent: #09b1ba;
  --red: #e53935;
  --bg: #f5f5f5;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #757575;
  --border: #e0e0e0;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* ── Header ── */
header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1400px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 16px; }
.logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; color: var(--text); text-decoration: none; flex-shrink: 0; }
.logo span { color: var(--accent); }

/* ── Chips in header ── */
.chips-header { flex: 1; min-width: 0; overflow: hidden; }
.chips { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }

/* ── Country switcher dropdown ── */
.country-switcher { position: relative; flex-shrink: 0; }
.country-current { background: none; border: none; font-size: 1.6rem; line-height: 1; padding: 4px 6px; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.country-current:hover { background: rgba(0,0,0,0.05); }
.country-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); min-width: 170px; z-index: 200; overflow: hidden; }
.country-dropdown.open { display: block; }
.country-option { display: flex; align-items: center; gap: 10px; padding: 11px 16px; text-decoration: none; color: var(--text); font-size: 0.88rem; transition: background 0.1s; }
.country-option:hover { background: var(--bg); }
.country-option.active { font-weight: 700; }

/* ── Burger button (mobile only) ── */
.burger-btn { display: none; background: none; border: 1.5px solid var(--accent); border-radius: 8px; padding: 8px 12px; cursor: pointer; color: var(--accent); font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.burger-btn:hover { background: rgba(9,177,186,0.08); }

/* ── Mobile chips dropdown ── */
.chips-mobile { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 12px 16px; z-index: 99; flex-wrap: wrap; gap: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); max-height: 140px; overflow: hidden; }
.chips-mobile.open { display: flex; }

/* ── Search hero ── */
.search-section { max-width: 1400px; margin: 20px auto 0; padding: 0 24px; }
.search-wrap { position: relative; }
.search-wrap input { width: 100%; padding: 14px 20px 14px 48px; border: 2px solid var(--border); border-radius: 999px; font-size: 1rem; outline: none; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit; }
.search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(9,177,186,0.1); }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 1.1rem; }

/* ── Status ── */
.status-bar { max-width: 1400px; margin: 20px auto 0; padding: 0 24px; }
.status-text { font-size: 0.83rem; color: var(--muted); }
.status-text strong { color: var(--text); }
@media (max-width: 600px) {
  .status-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ── Grid ── */
.grid-wrap { max-width: 1400px; margin: 16px auto 0; padding: 0 24px; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; } }

/* ── Card ── */
.card { background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.10); }
.card-img-wrap { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #f0f0f0; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card:hover .card-img { transform: scale(1.04); }
.like-badge { position: absolute; top: 9px; right: 9px; background: rgba(255,255,255,0.92); backdrop-filter: blur(4px); border-radius: 999px; padding: 3px 9px; font-size: 0.75rem; font-weight: 700; color: var(--red); box-shadow: 0 2px 8px rgba(0,0,0,0.10); }
.card-body { padding: 11px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.card-brand { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.card-title { font-size: 0.85rem; font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.card-meta { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 3px; }
.pill { background: var(--bg); border-radius: 999px; padding: 2px 7px; font-size: 0.7rem; color: var(--muted); border: 1px solid var(--border); }
.card-footer { padding: 0 11px 11px; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.price { font-size: 0.97rem; font-weight: 700; }
.total-price { font-size: 0.7rem; color: var(--muted); }

/* ── Skeleton / Empty ── */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200%; animation: shimmer 1.4s infinite; border-radius: 12px; aspect-ratio: 3/4; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty { text-align: center; padding: 80px 24px; color: var(--muted); grid-column: 1/-1; }
.empty h2 { font-size: 2rem; margin-bottom: 8px; }

/* ── Brand chips ── */
.chip { background: #fff; border: 1.5px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 0.8rem; font-weight: 500; cursor: pointer; color: var(--text); transition: border-color 0.15s, background 0.15s; white-space: nowrap; text-decoration: none; display: inline-block; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Page heading (brand pages) ── */
.page-heading { max-width: 1400px; margin: 24px auto 0; padding: 0 24px; }
.page-heading h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.3px; }
.page-heading p { font-size: 0.83rem; color: var(--muted); margin-top: 4px; }

/* ── Footer ── */
footer { max-width: 1400px; margin: 48px auto 0; padding: 24px; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

@media (max-width: 600px) {
  .chips-header { display: none; }
  .burger-btn { display: block; order: 2; margin-left: auto; }
  .country-switcher { order: 3; }
  .header-inner { gap: 8px; }
  .search-wrap input { font-size: 1rem; padding: 12px 16px 12px 42px; }
  .chips-mobile .chip { font-size: 0.8rem; padding: 6px 14px; }
}
