@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:wght@400;700&display=swap");

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Roboto', sans-serif;
  background: hsl(0,0%,96%);
  color: hsl(0,0%,9%);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }
input, textarea, select, button { font: inherit; }

/* === Variables === */
:root {
  --bg: hsl(0,0%,96%);
  --fg: hsl(0,0%,9%);
  --card: hsl(0,0%,98%);
  --card-fg: hsl(0,0%,9%);
  --primary: hsl(20,90%,48%);
  --primary-fg: hsl(33,100%,96%);
  --secondary: hsl(0,0%,32%);
  --secondary-fg: hsl(0,0%,98%);
  --muted: hsl(0,0%,63%);
  --muted-fg: hsl(0,0%,45%);
  --accent: hsl(47,100%,96%);
  --accent-fg: hsl(37,92%,50%);
  --destructive: hsl(0,72%,50%);
  --destructive-fg: hsl(0,85%,97%);
  --border: hsl(0,0%,83%);
  --radius: 0.75rem;
  --shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow-lg: 0 4px 6px -1px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.06);
}

/* === SVG Icons === */
svg.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: -0.125em;
  flex-shrink: 0;
}
svg.icon-sm { width: 1rem; height: 1rem; }
svg.icon-lg { width: 1.5rem; height: 1.5rem; }
svg.icon-cat { width: 2.5rem; height: 2.5rem; }

/* Icon containers */
.advantage-icon, .contact-icon, .feature-icon { display: flex; align-items: center; justify-content: center; }
.search-input-wrap .search-icon { display: flex; align-items: center; justify-content: center; }
.filter-btn svg.icon { margin-right: 0.5rem; }
.mobile-toggle svg.icon { width: 1.5rem; height: 1.5rem; }

/* === Container === */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* === Typography === */
.font-serif { font-family: 'Libre Caslon Text', serif; }
.text-muted { color: var(--muted-fg); }
.text-primary { color: var(--primary); }
.line-through { text-decoration: line-through; }

/* === Top Bar === */
.top-bar {
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.875rem;
  padding: 0.375rem 0;
}
.top-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top-bar a { font-weight: 500; transition: opacity 0.2s; }
.top-bar a:hover { opacity: 0.8; }
.top-bar-left { display: flex; align-items: center; gap: 1rem; }
.top-bar-left span { display: flex; align-items: center; gap: 0.25rem; }
.top-bar-left .text-hide-mobile { display: none; }
@media (min-width: 640px) { .top-bar-left .text-hide-mobile { display: inline; } }

/* === Header === */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-text { font-family: 'Libre Caslon Text', serif; font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.logo-sub { font-size: 0.75rem; color: var(--muted-fg); display: none; }
@media (min-width: 640px) { .logo-sub { display: block; } }

.nav-desktop { display: none; align-items: center; gap: 0.25rem; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.nav-desktop a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.nav-desktop a:hover { background: var(--accent); color: var(--accent-fg); }
.nav-desktop a.active { background: var(--primary); color: var(--primary-fg); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.btn-call-header { display: none; }
@media (min-width: 640px) { .btn-call-header { display: flex; } }

.mobile-toggle {
  display: block;
  padding: 0.5rem;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.5rem;
}
@media (min-width: 768px) { .mobile-toggle { display: none; } }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.nav-mobile.open { display: block; }
@media (min-width: 768px) { .nav-mobile { display: none !important; } }
.nav-mobile a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.nav-mobile a:hover { background: hsl(47,100%,96%,0.5); }
.nav-mobile a.active { background: var(--accent); color: var(--accent-fg); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--fg); }
.btn-outline:hover { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--accent); }
.btn-destructive { background: var(--destructive); color: var(--destructive-fg); }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-icon { padding: 0.5rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* === Badge === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-default { background: var(--primary); color: var(--primary-fg); }
.badge-destructive { background: var(--destructive); color: var(--destructive-fg); }
.badge-secondary { background: var(--secondary); color: var(--secondary-fg); }

/* === Cards === */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.card:hover { box-shadow: var(--shadow-lg); }

/* === Product Card === */
.product-card { display: block; }
.product-card .card-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: hsl(0,0%,90%);
}
.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .card-img img { transform: scale(1.05); }
.product-card .badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.product-card .card-body { padding: 0.75rem; }
.product-card .card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--card-fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}
.product-card:hover .card-title { color: var(--primary); }
.product-card .card-brand { font-size: 0.75rem; color: var(--muted-fg); margin-bottom: 0.5rem; }
.product-card .card-price { display: flex; align-items: baseline; gap: 0.5rem; }
.product-card .price-current { font-size: 1.125rem; font-weight: 700; color: var(--fg); }
.product-card .price-old { font-size: 0.875rem; color: var(--muted-fg); text-decoration: line-through; }
.product-card .price-unit { font-size: 0.75rem; color: var(--muted-fg); }

/* === Category Card === */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-align: center;
}
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.category-card .cat-icon { transition: transform 0.2s; }
.category-card:hover .cat-icon { transform: scale(1.1); }
.category-card .cat-name { font-size: 0.875rem; font-weight: 500; color: var(--card-fg); }

/* === Grid === */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
.grid-cats { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-cats { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .grid-cats { grid-template-columns: repeat(8, 1fr); } }
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* === Hero === */
.hero {
  position: relative;
  overflow: hidden;
  background: hsl(0,0%,20%);
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: hsl(0 0% 9% / 0.6);
}
.hero-content {
  position: relative;
  padding: 5rem 0;
  max-width: 36rem;
}
@media (min-width: 768px) { .hero-content { padding: 8rem 0; } }
.hero h1 {
  font-family: 'Libre Caslon Text', serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--card);
  margin-bottom: 1rem;
}
@media (min-width: 768px) { .hero h1 { font-size: 3rem; } }
.hero p { font-size: 1.125rem; color: hsl(0,0%,98%,0.8); margin-bottom: 1.5rem; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-hero-outline {
  background: hsl(0,0%,98%,0.1);
  border: 1px solid hsl(0,0%,98%,0.3);
  color: hsl(0,0%,98%);
}
.btn-hero-outline:hover { background: hsl(0,0%,98%,0.2); }

/* === Section === */
.section { padding: 3rem 0; }
.section-card { background: var(--card); }
.section-accent { background: hsl(47,100%,96%,0.3); }
.section-title {
  font-family: 'Libre Caslon Text', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1.5rem;
}
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.section-header .section-title { margin-bottom: 0; }
.section-link { font-size: 0.875rem; color: var(--primary); display: flex; align-items: center; gap: 0.25rem; }
.section-link:hover { text-decoration: underline; }

/* === Advantages === */
.advantage { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; }
.advantage-icon {
  padding: 0.75rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-fg);
  flex-shrink: 0;
  font-size: 1.5rem;
}
.advantage h3 { font-weight: 500; color: var(--card-fg); }
.advantage p { font-size: 0.875rem; color: var(--muted-fg); margin-top: 0.25rem; }

/* === Form === */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: var(--fg); }
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--fg);
  font-size: 0.875rem;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsl(20 90% 48% / 0.2);
}
.form-textarea { resize: vertical; min-height: 4rem; }
.form-error { font-size: 0.8125rem; color: var(--destructive); margin-top: 0.25rem; }
.form-checkbox-row { display: flex; align-items: flex-start; gap: 0.5rem; }
.form-checkbox-row input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--primary);
  width: 1rem; height: 1rem;
}
.form-checkbox-row label { font-size: 0.75rem; color: var(--muted-fg); line-height: 1.4; }
.form-checkbox-row a { color: var(--primary); text-decoration: underline; }
.form-buttons { display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 640px) { .form-buttons { flex-direction: row; } }
.form-buttons .btn { flex: 1; }

/* === Footer === */
.footer {
  background: var(--secondary);
  color: var(--secondary-fg);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer h3 { font-family: 'Libre Caslon Text', serif; font-size: 1.125rem; font-weight: 700; margin-bottom: 0.75rem; }
.footer h4 { font-weight: 500; margin-bottom: 0.75rem; }
.footer p, .footer li, .footer a { font-size: 0.875rem; opacity: 0.8; }
.footer a:hover { opacity: 1; }
.footer ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer li { display: flex; align-items: center; gap: 0.5rem; }
.footer-bottom {
  border-top: 1px solid hsl(0,0%,98%,0.2);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.6;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.footer-bottom a:hover { opacity: 1; }

/* === Catalog sidebar === */
.catalog-layout { display: flex; gap: 1.5rem; }
.catalog-sidebar { display: none; width: 14rem; flex-shrink: 0; }
.catalog-sidebar.visible { display: block; width: 100%; }
@media (min-width: 640px) { .catalog-sidebar { display: block; } .catalog-sidebar.visible { width: 14rem; } }
.catalog-main { flex: 1; min-width: 0; }
.filter-section { margin-bottom: 1rem; }
.filter-title { font-weight: 500; font-size: 0.875rem; margin-bottom: 0.5rem; }
.filter-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  transition: background 0.2s;
}
.filter-btn:hover { background: var(--accent); }
.filter-btn.active { background: var(--primary); color: var(--primary-fg); }
.price-inputs { display: flex; gap: 0.5rem; }
.price-inputs input { flex: 1; min-width: 0; }

/* === Search bar === */
.search-bar { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .search-bar { flex-direction: row; } }
.search-input-wrap { position: relative; flex: 1; }
.search-input-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-fg);
  font-size: 1rem;
}
.search-input-wrap input { padding-left: 2.5rem; }
.search-controls { display: flex; gap: 0.5rem; }

/* === Product detail === */
.product-detail { display: grid; gap: 2rem; }
@media (min-width: 768px) { .product-detail { grid-template-columns: 1fr 1fr; } }
.product-img { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: hsl(0,0%,90%); position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img .badges { position: absolute; top: 1rem; left: 1rem; display: flex; gap: 0.5rem; }
.product-info h1 { font-family: 'Libre Caslon Text', serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
@media (min-width: 768px) { .product-info h1 { font-size: 1.875rem; } }
.product-info .brand { color: var(--muted-fg); margin-bottom: 1rem; }
.product-info .price-block { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1.5rem; }
.product-info .price-main { font-size: 1.875rem; font-weight: 700; }
.product-info .price-old { font-size: 1.125rem; color: var(--muted-fg); text-decoration: line-through; }
.product-info .price-unit { color: var(--muted-fg); }
.product-info .description { color: hsl(0,0%,9%,0.8); line-height: 1.7; margin-bottom: 1.5rem; }
.product-actions { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .product-actions { flex-direction: row; } }

/* === Breadcrumbs === */
.breadcrumbs { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .current { color: var(--fg); }

/* === Promo card === */
.promo-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
@media (min-width: 640px) { .promo-card { flex-direction: row; } }
.promo-card .promo-info { flex: 1; }
.promo-card h2 { font-size: 1.25rem; font-weight: 700; color: var(--card-fg); margin-bottom: 0.5rem; }
.promo-card p { color: var(--muted-fg); margin-bottom: 0.75rem; }
.promo-card .promo-date { font-size: 0.75rem; color: var(--muted-fg); }
.promo-card .promo-product { width: 100%; flex-shrink: 0; }
@media (min-width: 640px) { .promo-card .promo-product { width: 12rem; } }

/* === Contact info === */
.contact-grid { display: grid; gap: 2rem; margin-bottom: 2.5rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-icon {
  padding: 0.75rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-fg);
  flex-shrink: 0;
  font-size: 1.25rem;
}
.contact-item h3 { font-weight: 500; margin-bottom: 0.25rem; }
.contact-item a { color: var(--primary); }
.contact-item a:hover { text-decoration: underline; }

/* === About features === */
.features-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature-icon {
  padding: 0.75rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-fg);
  flex-shrink: 0;
  font-size: 1.25rem;
}
.feature-card h3 { font-weight: 500; color: var(--card-fg); margin-bottom: 0.25rem; }
.feature-card p { font-size: 0.875rem; color: var(--muted-fg); }

/* === Privacy === */
.prose h2 { font-size: 1.25rem; font-weight: 700; color: var(--fg); margin-top: 1.5rem; margin-bottom: 0.5rem; }
.prose p { color: hsl(0,0%,9%,0.8); margin-bottom: 0.75rem; }
.prose ul { padding-left: 1.5rem; list-style: disc; margin-bottom: 0.75rem; }
.prose li { margin-bottom: 0.25rem; color: hsl(0,0%,9%,0.8); }

/* === Map placeholder === */
.map-placeholder {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: hsl(0,0%,90%);
  height: 16rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-fg);
  font-size: 0.875rem;
}

/* === Modal / Dialog === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: hsl(0 0% 0% / 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal h2 { font-family: 'Libre Caslon Text', serif; font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted-fg);
  cursor: pointer;
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transform: translateY(1rem);
  opacity: 0;
  transition: all 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* === 404 === */
.page-404 {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}
.page-404 h1 { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; }
.page-404 p { font-size: 1.25rem; color: var(--muted-fg); margin-bottom: 1rem; }

/* === Empty state === */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state p { color: var(--muted-fg); margin-bottom: 1rem; }

/* === Utility === */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.max-w-lg { max-width: 32rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }
.hidden { display: none; }
.flex-1 { flex: 1; }
