:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-50: #f7f7f8;
  --gray-100: #eeeeef;
  --gray-300: #d5d5d8;
  --gray-500: #8a8a90;
  --gray-700: #333338;
  --whatsapp: #25D366;
  --whatsapp-dark: #128C4A;
  --radius: 14px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { padding-left: 22px; }

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

/* ============ HERO CAROUSEL ============ */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  background: var(--black);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
  display: flex;
  align-items: center;
}

.hero-slide.active { opacity: 1; }

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0.15) 100%);
}

.hero-slide-overlay {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.hero-slide-overlay h2 {
  font-size: clamp(24px, 4.5vw, 40px);
  margin: 0 0 10px;
  font-weight: 800;
  max-width: 560px;
}

.hero-slide-overlay p {
  color: #e6e6e6;
  margin: 0 0 20px;
  max-width: 480px;
  font-size: 15px;
}

@media (max-width: 720px) {
  .hero-carousel { height: 300px; }
  .hero-slide::before { background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.85) 100%); }
}

/* ============ HEADER: utility bar + tabs ============ */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
}

.utility-bar {
  background: var(--black);
  border-bottom: 1px solid #1c1c1c;
}

.utility-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
}

.logo-link { flex-shrink: 0; display: flex; align-items: center; }
.logo-img { height: 26px; width: auto; }

.icon-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 6px;
  position: relative;
}

#hamburger-btn { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
#hamburger-btn span { width: 20px; height: 2px; background: var(--white); display: block; }

.search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: #1a1a1a;
  border-radius: 999px;
  padding: 6px 8px 6px 16px;
  max-width: 760px;
}

.search-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 14px;
  min-width: 0;
}

.search-wrap input::placeholder { color: #888; }
.search-wrap button { background: none; border: none; color: var(--white); cursor: pointer; font-size: 15px; }

.cart-btn { }
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--whatsapp);
  color: #06210f;
  font-size: 10px;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  display: none;
}

.comprar-btn { flex-shrink: 0; padding: 10px 20px; font-size: 14px; }

.tabs-bar {
  background: #111;
}

.tabs-inner {
  display: flex;
  gap: 28px;
  padding: 12px 20px;
}

.tabs-inner a {
  color: #bbb;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.tabs-inner a.active, .tabs-inner a:hover {
  color: var(--white);
  border-bottom-color: var(--whatsapp);
}

@media (max-width: 640px) {
  .utility-inner { flex-wrap: wrap; row-gap: 10px; }
  .search-wrap { order: 5; flex-basis: 100%; max-width: none; }
  .comprar-btn { padding: 8px 14px; font-size: 13px; }
  .tabs-inner { gap: 18px; justify-content: center; }
}

/* ============ DRAWERS (categorías + carrito) ============ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.drawer-overlay.visible { opacity: 1; pointer-events: auto; }

.side-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -320px;
  width: 300px;
  background: var(--black);
  color: var(--white);
  z-index: 95;
  transition: left .25s ease;
  display: flex;
  flex-direction: column;
}

.side-drawer.open { left: 0; }

.cart-drawer {
  left: auto;
  right: -360px;
  width: 340px;
  transition: right .25s ease;
}

.cart-drawer.open { left: auto; right: 0; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #222;
  font-weight: 800;
  font-size: 16px;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
}

.drawer-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.category-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-links a {
  padding: 12px 8px;
  color: #e6e6e6;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  letter-spacing: 0.2px;
}

.category-links a:hover { background: #1a1a1a; color: var(--white); }

/* Cart drawer contents */
.cart-empty { color: #999; text-align: center; padding: 40px 10px; font-size: 14px; }

.cart-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1f1f1f;
}

.cart-item-img {
  width: 52px;
  height: 52px;
  background: #fff;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3; }
.cart-item-price { margin: 2px 0 4px; font-size: 12px; color: #aaa; }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-item-qty button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #444;
  background: none;
  color: var(--white);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.cart-item-qty span { font-size: 13px; font-weight: 700; }

.cart-item-remove {
  background: none;
  border: none;
  color: #777;
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
}

.cart-discount-note {
  margin-top: 14px;
  font-size: 12px;
  color: #aaa;
  background: #161616;
  border-radius: 10px;
  padding: 12px;
  line-height: 1.5;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 16px 0 12px;
  font-weight: 700;
  font-size: 15px;
}

.cart-total-amount { font-size: 19px; }
.cart-note-inline { display: block; font-size: 11px; color: #999; font-weight: 400; }

.cart-checkout { width: 100%; justify-content: center; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--white); color: var(--black); }
.btn-outline { border-color: var(--gray-300); color: var(--black); }
.btn-whatsapp { background: var(--whatsapp); color: #06210f; }
.btn-whatsapp:hover { background: var(--whatsapp-dark); color: var(--white); }
.btn-sm { padding: 9px 16px; font-size: 13px; width: 100%; justify-content: center; }

/* ============ Sections ============ */
section { padding: 56px 20px; }

.section-title { font-size: 27px; font-weight: 800; margin: 0 0 6px; text-align: center; }
.section-sub { text-align: center; color: var(--gray-500); margin: 0 0 32px; }

/* ============ Home: filas de destacados ============ */
.featured-row { max-width: var(--maxw); margin: 0 auto 44px; }
.featured-row h3 {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 16px;
  padding-left: 2px;
}

.featured-row .product-grid { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1080px) { .featured-row .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .featured-row .product-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============ Product grid / cards ============ */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: transparent;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.active { background: var(--black); color: var(--white); border-color: var(--black); }

.search-box { max-width: 420px; margin: 0 auto 30px; }

.search-box input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: var(--gray-50);
  color: var(--black);
  font-size: 15px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.product-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); }

.product-img {
  aspect-ratio: 1 / 1;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--gray-100);
}

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

.product-img.logo img { padding: 24%; }

.product-img.placeholder {
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h4 { margin: 0; font-size: 14.5px; font-weight: 700; }
.product-nota { font-size: 12px; color: var(--gray-500); margin: 0; }
.product-price { font-size: 18px; font-weight: 800; margin: 4px 0; }
.product-price.consultar { font-size: 14px; color: var(--gray-500); }

.product-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.btn-add-cart {
  flex: 1;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn-add-cart:hover { background: #222; }
.btn-add-cart.added { background: var(--whatsapp-dark); }

.no-results { text-align: center; color: var(--gray-500); padding: 40px 0; grid-column: 1/-1; }

/* ============ Sobre nosotros ============ */
.about-hero {
  text-align: center;
  padding: 60px 20px 20px;
}

.about-box {
  max-width: 720px;
  margin: 0 auto;
  color: var(--gray-700);
  font-size: 16.5px;
}

.about-box p { margin: 0 0 18px; }

.trust-grid {
  max-width: var(--maxw);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 0 auto;
}

.trust-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 22px;
}

.trust-card h4 { margin: 0 0 8px; }
.trust-card p { margin: 0; font-size: 14px; color: var(--gray-700); }

.disclaimer {
  text-align: center;
  color: var(--gray-500);
  font-size: 12px;
  max-width: 640px;
  margin: 30px auto 0;
}

/* ============ Footer ============ */
.site-footer {
  background: var(--black);
  color: #ddd;
  padding: 50px 0 20px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 15px;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-contact { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

.footer-contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  color: #bbb;
  font-size: 14.5px;
  letter-spacing: 0.2px;
}

a.footer-contact-row:hover { color: var(--white); }
a.footer-contact-row:hover .footer-icon-circle { border-color: #666; color: var(--white); }

.footer-icon-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  flex-shrink: 0;
}

.footer-icon-circle svg { width: 17px; height: 17px; }

.legal-accordion { display: flex; flex-direction: column; }

.legal-item { border-bottom: 1px solid #222; }

.legal-title {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #ddd;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 2px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legal-title:hover, .legal-title.open { color: var(--white); }
.legal-chevron { font-size: 15px; color: #888; }
.legal-title.open .legal-chevron { color: var(--whatsapp); }

.legal-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  font-size: 13px;
  color: #bbb;
  line-height: 1.6;
}

.legal-content.open { max-height: 2200px; padding-bottom: 18px; }
.legal-content h4 { color: #ddd; font-size: 13.5px; margin: 16px 0 6px; }
.legal-content p { margin: 0 0 10px; }
.legal-content ul, .legal-content ol { margin: 0 0 10px; padding-left: 20px; }
.legal-content li { margin-bottom: 4px; }
.legal-updated { color: #888; font-size: 12px; }
.legal-contact { color: #999; font-size: 12px; margin-top: 14px; }

.footer-bottom {
  text-align: center;
  color: #666;
  font-size: 12px;
  margin: 36px 0 0;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============ Tarjetas: imagen y nombre clicables ============ */
a.product-img { cursor: pointer; }
.product-body h4 a:hover { text-decoration: underline; }

/* ============ Página de producto ============ */
.pd-wrap { padding-top: 22px; padding-bottom: 40px; }

.crumbs { font-size: 13px; color: var(--gray-500); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a:hover { color: var(--black); text-decoration: underline; }
.crumbs strong { color: var(--black); font-weight: 600; }

.pd-main { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: start; }

.pd-gallery { display: flex; gap: 12px; align-items: flex-start; }

.pd-thumbs { display: flex; flex-direction: column; gap: 10px; width: 72px; flex-shrink: 0; max-height: 520px; overflow-y: auto; scrollbar-width: thin; }
.pd-thumb {
  width: 72px; height: 72px; padding: 4px; background: var(--white);
  border: 2px solid var(--gray-100); border-radius: 10px; cursor: pointer; flex-shrink: 0;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumb:hover { border-color: var(--gray-300); }
.pd-thumb.active { border-color: var(--black); }

.pd-stage {
  position: relative; flex: 1; min-width: 0; aspect-ratio: 1 / 1; background: var(--white);
  border: 1px solid var(--gray-100); border-radius: 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pd-stage img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.pd-stage.logo img { padding: 22%; }
.pd-noimg { color: var(--gray-500); font-size: 14px; }

.pd-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(10,10,10,0.72); color: var(--white); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.pd-arrow:hover { background: var(--black); }
.pd-arrow.prev { left: 10px; }
.pd-arrow.next { right: 10px; }
.pd-counter {
  position: absolute; right: 10px; bottom: 10px; font-size: 11px; font-weight: 700;
  background: rgba(10,10,10,0.72); color: var(--white); padding: 3px 9px; border-radius: 999px;
}

.pd-info h1 { font-size: 26px; line-height: 1.25; margin: 0 0 10px; }
.pd-price { font-size: 32px; font-weight: 800; margin: 0 0 18px; }
.pd-price .consultar { font-size: 18px; color: var(--gray-500); font-weight: 600; }
.pd-info h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.6px; margin: 0 0 8px; color: var(--gray-700); }
.pd-features { list-style: none; padding: 0; margin: 0 0 16px; }
.pd-features li { position: relative; padding: 5px 0 5px 22px; font-size: 14.5px; color: var(--gray-700); }
.pd-features li::before {
  content: ""; position: absolute; left: 2px; top: 12px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--black);
}
.pd-desc { font-size: 14.5px; color: var(--gray-700); margin: 0 0 22px; line-height: 1.6; }

.pd-qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; font-weight: 700; font-size: 14px; }
.pd-qty { display: inline-flex; align-items: center; border: 1px solid var(--gray-300); border-radius: 999px; overflow: hidden; }
.pd-qty button { width: 40px; height: 40px; border: none; background: var(--gray-50); font-size: 18px; cursor: pointer; }
.pd-qty button:hover { background: var(--gray-100); }
.pd-qty input { width: 52px; height: 40px; border: none; text-align: center; font-size: 15px; font-weight: 700; background: var(--white); -moz-appearance: textfield; }
.pd-qty input::-webkit-outer-spin-button, .pd-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd-subtotal { font-weight: 600; color: var(--gray-500); font-size: 13.5px; }

.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pd-actions .btn-add-cart, .pd-actions .btn { flex: 1 1 180px; padding: 14px 20px; font-size: 15px; justify-content: center; text-align: center; }
.pd-note { font-size: 12px; color: var(--gray-500); margin: 14px 0 0; }

@media (max-width: 860px) {
  .pd-main { grid-template-columns: 1fr; gap: 26px; }
  .pd-gallery { flex-direction: column-reverse; }
  .pd-thumbs { flex-direction: row; width: 100%; max-height: none; overflow-x: auto; overflow-y: hidden; }
  .pd-stage { width: 100%; flex: none; }
  .pd-info h1 { font-size: 22px; }
}

/* ============ Productos similares ============ */
.similar { background: var(--gray-50); padding: 46px 0 54px; border-top: 1px solid var(--gray-100); }
.similar h2 { font-size: 22px; margin: 0 0 20px; }

.sim-carousel { position: relative; padding: 0 46px; }
.sim-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding: 4px 2px 10px;
}
.sim-track::-webkit-scrollbar { display: none; }
.sim-track .product-card { flex: 0 0 calc((100% - 48px) / 4); scroll-snap-align: start; }

.sim-arrow {
  position: absolute; top: 42%; transform: translateY(-50%); width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--gray-300); background: var(--white); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12); font-size: 13px; z-index: 2;
}
.sim-arrow:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.sim-arrow.prev { left: 0; }
.sim-arrow.next { right: 0; }

.sim-more { margin-top: 22px; }
.sim-more:empty { display: none; }
.sim-more-wrap { text-align: center; margin-top: 26px; }
.btn-more {
  background: var(--white); color: var(--black); border: 2px solid var(--black); border-radius: 999px;
  padding: 12px 38px; font-size: 14px; font-weight: 800; letter-spacing: 0.4px; cursor: pointer;
}
.btn-more:hover { background: var(--black); color: var(--white); }

@media (max-width: 1000px) { .sim-track .product-card { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 700px) {
  .sim-carousel { padding: 0 6px; }
  .sim-track .product-card { flex-basis: calc((100% - 16px) / 2); }
  .sim-arrow { width: 32px; height: 32px; top: 36%; }
  .sim-arrow.prev { left: -2px; }
  .sim-arrow.next { right: -2px; }
}
/* ============ Sugerencias del buscador ============ */
.search-wrap { position: relative; }
.search-suggest {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 130;
  background: var(--white); color: var(--black); border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.28); max-height: 72vh; overflow-y: auto; padding: 6px;
}
.search-suggest.open { display: block; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.suggest-item:hover, .suggest-item.active { background: var(--gray-50); }
.suggest-img {
  width: 46px; height: 46px; flex-shrink: 0; background: var(--white); border: 1px solid var(--gray-100);
  border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.suggest-img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.suggest-img.logo img { padding: 9px; }
.suggest-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.suggest-price { font-size: 13px; font-weight: 800; white-space: nowrap; color: var(--gray-700); }
.suggest-all { display: block; text-align: center; padding: 11px; margin-top: 4px; font-size: 13px; font-weight: 800; border-top: 1px solid var(--gray-100); }
.suggest-all:hover { text-decoration: underline; }
.suggest-empty { padding: 14px; font-size: 13.5px; color: var(--gray-500); }

.search-info { text-align: center; font-size: 14px; font-weight: 700; color: var(--gray-700); margin: -14px 0 22px; min-height: 1em; }
#catalog-top { scroll-margin-top: 130px; }
