/* ===== Variables & Reset ===== */
:root {
  --color-primary: #0066CC;
  --color-primary-dark: #0052a3;
  --color-secondary: #1a1a2e;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1da851;
  --color-bg: #f5f5f5;
  --color-white: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e0e0e0;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --max-width: 1280px;
  --header-height: 64px;
}

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

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; }

/* ===== Utilities ===== */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-secondary);
  height: var(--header-height);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 20px;
}

.header__logo {
  color: var(--color-white);
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.header__logo span {
  color: var(--color-primary);
}

.header__search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.header__search input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
  outline: none;
  transition: background 0.2s;
}

.header__search input::placeholder {
  color: rgba(255,255,255,0.5);
}

.header__search input:focus {
  background: rgba(255,255,255,0.2);
}

.header__search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header__nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header__nav a:hover {
  color: var(--color-white);
}

.header__whatsapp {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-whatsapp);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
}

.header__whatsapp:hover {
  background: var(--color-whatsapp-dark);
}

.header__menu-btn {
  display: none;
  background: none;
  color: var(--color-white);
  font-size: 1.5rem;
  padding: 4px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #16213e 50%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.85;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
}

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

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

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

.btn--whatsapp:hover {
  background: var(--color-whatsapp-dark);
  transform: translateY(-1px);
}

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

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ===== Categories ===== */
.section {
  padding: 60px 0;
}

.section__title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 32px;
  text-align: center;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.category-card__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.category-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* ===== Brands ===== */
.brands-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.brand-badge {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-secondary);
  transition: all 0.2s;
  cursor: pointer;
}

.brand-badge:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===== Product Grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.product-card__image {
  position: relative;
  width: 100%;
  height: 200px;
  background: #f0f0f0;
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.product-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-card__gallery-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.product-card__gallery-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
}

.product-card__gallery-dots span.active {
  background: var(--color-primary);
}

.product-card__info {
  padding: 16px;
}

.product-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-card__model {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.product-card__notes {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 12px;
}

.product-card__whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: var(--color-whatsapp);
  color: var(--color-white);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}

.product-card__whatsapp:hover {
  background: var(--color-whatsapp-dark);
}

/* ===== Catalog Page Layout ===== */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  padding: 30px 0;
}

.sidebar {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  align-self: start;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.sidebar h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 16px;
}

.sidebar__group {
  margin-bottom: 24px;
}

.sidebar__group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
}

.sidebar__group label:hover {
  color: var(--color-primary);
}

.sidebar__group label span {
  color: var(--color-text-light);
  font-size: 0.8rem;
}

.sidebar__group input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.catalog-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.catalog-header h1 span {
  font-weight: 400;
  font-size: 1rem;
  color: var(--color-text-light);
}

.catalog-sort select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--color-white);
  color: var(--color-text);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.breadcrumb a {
  color: var(--color-primary);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.pagination button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination button.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== Floating WhatsApp ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  width: 56px;
  height: 56px;
  background: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: var(--color-white);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-secondary);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer h4 {
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul li a {
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer ul li a:hover {
  color: var(--color-white);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
}

/* ===== No Results ===== */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-light);
}

.no-results h3 {
  font-size: 1.3rem;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

/* ===== Mobile Menu Overlay ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--color-secondary);
  padding: 24px;
  overflow-y: auto;
}

.mobile-menu__close {
  background: none;
  color: var(--color-white);
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.mobile-menu__panel a {
  display: block;
  color: rgba(255,255,255,0.8);
  padding: 12px 0;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu__panel a:hover {
  color: var(--color-white);
}

/* ===== Image Modal ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 300;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal__content {
  max-width: 90vw;
  max-height: 90vh;
}

.modal__content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  color: var(--color-white);
  font-size: 2rem;
  padding: 8px;
}

.modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
  font-size: 1.5rem;
  padding: 16px 12px;
  border-radius: 4px;
}

.modal__nav:hover { background: rgba(255,255,255,0.3); }
.modal__nav--prev { left: 20px; }
.modal__nav--next { right: 20px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .header__nav { display: none; }
  .header__menu-btn { display: block; }
  .header__search { max-width: none; }

  .hero { padding: 48px 0; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }

  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar--mobile-hidden { display: none; }
  .sidebar--mobile-visible { display: block; }

  .brands-row { gap: 16px; }
  .brand-badge { padding: 10px 20px; font-size: 0.9rem; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero__buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
