/* Appily Twentyfour — Crazyshop-inspired design system */
:root {
  --ink: #1a1a1a;
  --black: #111111;
  --white: #ffffff;
  --cream: #f7f7f7;
  --muted: #888888;
  --line: #e8e8e8;
  --accent: #f05a40;
  --accent-dark: #d94a32;
  --accent-hover: #e04e36;
  --yellow: #ffd54f;
  --mint: #b8e6d0;
  --pink: #f8d7da;
  --radius: 4px;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow: 0 4px 20px rgba(0,0,0,.06);
  --policy-accent: #f05a40;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.at24-store, body.cs-theme {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1320px, calc(100% - 32px)); margin: 0 auto; }
.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.page-main { flex: 1 0 auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Buttons */
.cs-btn, .at24-btn, .btn, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; background: var(--accent); color: var(--white);
  border: none; border-radius: var(--radius); font-family: var(--font-body);
  font-weight: 700; font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer; transition: background .15s;
}
.cs-btn:hover, .btn-primary:hover { background: var(--accent-dark); }
.cs-btn-light, .at24-btn-light { background: var(--white); color: var(--ink); }
.cs-btn-sm { padding: 10px 20px; font-size: .72rem; }
.btn-outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: .75rem; }
.btn-soft { background: var(--cream); color: var(--ink); }

/* Shared product elements */
.cs-stars { color: var(--accent); font-size: .72rem; letter-spacing: 1px; margin: 4px 0; }
.cs-price, .price { font-weight: 800; color: var(--accent); font-size: .95rem; }
.cs-price s, .price s { color: var(--muted); font-weight: 500; font-size: .82rem; margin-left: 6px; }
.cs-badge, .at24-sale-badge, .product-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--accent); color: var(--white);
  font-size: .68rem; font-weight: 700; padding: 4px 8px; border-radius: 2px;
}
.cs-product-brand, .product-cat {
  display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; margin-top: 10px;
}
.cs-options {
  display: block; width: 100%; margin-top: 12px; padding: 10px;
  background: var(--cream); border: 1px solid var(--line);
  text-align: center; font-weight: 600; font-size: .78rem;
  text-transform: uppercase; transition: background .15s;
}
.cs-options:hover { background: var(--line); }

/* Section heads */
.cs-section { padding: 40px 0; }
.cs-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.cs-section-head h2 { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.cs-section-head p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.cs-highlight { background: var(--accent); color: var(--white); padding: 2px 8px; }

/* Product cards */
.cs-product-card, .at24-product-card, .product-card {
  position: relative; background: var(--white); border: 1px solid var(--line);
  padding: 14px; min-width: 200px; flex: 0 0 200px;
}
.cs-product-card h3, .at24-product-card h3, .product-body h3 {
  font-size: .88rem; font-weight: 600; margin: 6px 0 0; line-height: 1.35;
}
.cs-product-img, .at24-product-img, .product-img {
  display: block; aspect-ratio: 1; background: var(--cream); overflow: hidden;
}
.cs-product-img img, .at24-product-img img, .product-img img {
  width: 100%; height: 100%; object-fit: cover;
}

.cs-product-carousel, .at24-product-row {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
.cs-product-carousel > *, .at24-product-row > * { scroll-snap-align: start; }

.cs-carousel-nav button, .at24-arrow {
  width: 34px; height: 34px; border: 1px solid var(--line); background: var(--white);
  cursor: pointer; font-size: 1.1rem;
}

/* Shop / catalog */
.page-hero { background: var(--black); color: var(--white); padding: 28px 0; }
.page-hero h1 { margin: 0; font-size: 1.6rem; font-weight: 800; }
.page-hero .eyebrow { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.page-hero .hero-lede { margin: 6px 0 0; opacity: .8; }

.catalog-page { padding: 32px 0 48px; background: var(--cream); }
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.filter-panel {
  background: var(--white); border: 1px solid var(--line); padding: 20px;
  position: sticky; top: 160px;
}
.filter-panel h2 { font-size: .9rem; text-transform: uppercase; margin: 0 0 14px; }
.filter-nav { display: flex; flex-direction: column; gap: 2px; }
.filter-nav a {
  padding: 8px 12px; font-size: .85rem; color: var(--muted);
}
.filter-nav a:hover, .filter-nav a.active { color: var(--accent); font-weight: 600; }
.filter-group { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.filter-group h3 { font-size: .78rem; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.filter-check { display: flex; align-items: center; gap: 8px; font-size: .84rem; padding: 3px 0; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); }

.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sort-select {
  padding: 8px 14px; background: var(--accent); color: var(--white);
  border: none; font-weight: 600; font-size: .85rem; cursor: pointer;
}
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
}
.product-body { padding-bottom: 4px; }
.product-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 14px 14px; }
.result-meta { color: var(--muted); font-size: .85rem; }
.empty-state { text-align: center; padding: 48px; background: var(--white); border: 1px solid var(--line); }
.at24-breadcrumbs, .cs-breadcrumbs {
  padding: 10px 0; font-size: .82rem; color: var(--muted);
  border-bottom: 1px solid var(--line); background: var(--white);
}
.at24-breadcrumbs a { color: var(--accent); }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.pagination a, .pagination span {
  padding: 8px 14px; border: 1px solid var(--line); font-size: .85rem; font-weight: 600;
}
.pagination a:hover, .pagination .current { background: var(--accent); color: var(--white); border-color: var(--accent); }

.policy-page { padding: 32px 0 48px; }

@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
}
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
