/* ============================
   VELOCICLOS — E-COMMERCE CSS
   ============================ */

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #F97316;
  --primary-dark: #EA6C0A;
  --primary-light: #FFF7ED;
  --green: #22C55E;
  --dark: #111827;
  --card: #FFFFFF;
  --bg: #F5F5F5;
  --bg-alt: #ECEFF4;
  --border: #E5E7EB;
  --text: #1F2937;
  --muted: #6B7280;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,.12);
  --nav-h: 64px;
  --top-h: 36px;
  --transition: .22s ease;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--top-h) + 48px); }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: var(--primary);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 9999;
}

/* TOPBAR */
.topbar {
  background: var(--dark);
  color: #D1D5DB;
  font-size: .8rem;
  height: var(--top-h);
  display: flex;
  align-items: center;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.topbar__admin {
  color: var(--primary);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .03em;
  transition: opacity var(--transition);
}
.topbar__admin:hover { opacity: .75; }

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.navbar__logo {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -.02em;
  color: var(--dark);
  text-transform: uppercase;
}
.navbar__logo span { color: var(--primary); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.navbar__links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
}
.navbar__links a:hover { color: var(--dark); }
.navbar__cta {
  background: var(--primary);
  color: #fff !important;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.navbar__cta:hover { background: var(--primary-dark) !important; transform: translateY(-1px); }

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .4rem;
}
.navbar__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all .22s;
}

/* HERO CAROUSEL */
.hero {
  position: relative;
  background: var(--dark);
  overflow: hidden;
  height: 520px;
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.carousel__track {
  display: flex;
  height: 100%;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
}
.carousel__slide {
  flex: 0 0 100%;
  position: relative;
  overflow: hidden;
}
.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.carousel__slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.65) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
}
.carousel__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 3rem;
  z-index: 2;
  color: #fff;
}
.carousel__caption-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 999px;
  margin-bottom: .75rem;
}
.carousel__caption-name {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: .5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.carousel__caption-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  border: 1px solid rgba(255,255,255,.25);
}
.carousel__btn:hover { background: rgba(255,255,255,.3); transform: translateY(-50%) scale(1.05); }
.carousel__btn--prev { left: 1.25rem; }
.carousel__btn--next { right: 1.25rem; }

.carousel__dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 10;
}
.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  transition: all .25s;
  padding: 0;
}
.carousel__dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

/* CATEGORY STRIP */
.cat-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--nav-h);
  z-index: 80;
}
.cat-strip__inner {
  display: flex;
  gap: .5rem;
  padding: .85rem 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-strip__inner::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  transition: all var(--transition);
}
.cat-pill svg { stroke: var(--muted); transition: stroke var(--transition); }
.cat-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.cat-pill:hover svg { stroke: #fff; }

/* SECTIONS */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--bg-alt); }

.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.section__kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .4rem;
}
.section__title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.1;
}
.section__subtitle {
  color: var(--muted);
  font-size: 1.05rem;
}

/* FILTER BAR */
.filter-bar {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: .35rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
  transition: all var(--transition);
  cursor: pointer;
  font-family: inherit;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* PRODUCTS GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.products-grid--parts {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* PRODUCT CARD */
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.product-card__img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-alt);
}
.product-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-card__img-wrap img { transform: scale(1.05); }

.product-card__body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-card__tag {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .4rem;
}
.product-card__name {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: .5rem;
  flex: 1;
}
.product-card__desc {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.product-card__price {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
}
.product-card__btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .9rem;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), transform var(--transition);
}
.product-card__btn:hover { background: var(--primary-dark); transform: scale(1.03); }

.empty-msg {
  text-align: center;
  color: var(--muted);
  padding: 3rem;
  font-size: 1.05rem;
}

/* SERVICIOS */
.servicios__layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.service-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.service-card:hover { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(249,115,22,.08); }
.service-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.service-card__check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: .15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.service-card.selected .service-card__check {
  background: var(--primary);
  border-color: var(--primary);
}
.service-card.selected .service-card__check::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px,-1px);
}
.service-card__name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--dark);
  margin-bottom: .25rem;
}
.service-card__desc {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .5rem;
}
.service-card__price {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--nav-h) + var(--top-h) + 4rem);
}
.summary__title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}
.summary__list { display: flex; flex-direction: column; gap: .5rem; }
.summary__empty { font-size: .9rem; color: var(--muted); }
.summary__item {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
}
.summary__item-name { color: var(--text); }
.summary__item-price { font-weight: 700; color: var(--dark); }
.summary__divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}
.summary__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.summary__total span:first-child { font-weight: 600; color: var(--muted); font-size: .9rem; }
.summary__total span:last-child {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
}

/* SUCURSALES */
.sucursales__layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}
.sucursales__map {
  height: 440px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.sucursales__list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.sucursal-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sucursal-item:hover, .sucursal-item.active {
  border-left-color: var(--primary);
  box-shadow: var(--shadow);
}
.sucursal-item__name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--dark);
  margin-bottom: .2rem;
}
.sucursal-item__addr { font-size: .82rem; color: var(--muted); }
.sucursal-item__hours {
  font-size: .8rem;
  color: var(--green);
  font-weight: 600;
  margin-top: .3rem;
}

/* CONTACTO */
.contacto { background: var(--dark); color: #fff; }
.contacto .section__title { color: #fff; }
.contacto__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.contacto__text p { color: #9CA3AF; margin-top: .5rem; }
.contacto__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,115,22,.35); }
.btn--whatsapp { background: #25D366; color: #fff; }
.btn--whatsapp:hover { background: #1EBA59; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,.35); }
.btn--full { width: 100%; justify-content: center; }

/* FOOTER */
.footer { background: var(--dark); color: #9CA3AF; padding-top: 3rem; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  flex-wrap: wrap;
}
.footer__logo {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: #fff;
}
.footer__logo span { color: var(--primary); }
.footer__nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__nav a { font-size: .85rem; transition: color var(--transition); }
.footer__nav a:hover { color: #fff; }
.footer__contact { display: flex; gap: .75rem; }
.footer__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.footer__icon:hover { background: var(--primary); color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 1.1rem 0;
}
.footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: #4B5563;
  flex-wrap: wrap;
  gap: .5rem;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn .2s ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal {
  background: var(--card);
  border-radius: 16px;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  animation: slideUp .25s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  position: relative;
}
.modal__close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  z-index: 2;
  background: rgba(0,0,0,.4);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.modal__close:hover { background: rgba(0,0,0,.65); }
.modal__img-wrap {
  overflow: hidden;
  background: var(--bg-alt);
}
.modal__img { width: 100%; height: 100%; object-fit: cover; }
.modal__body {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal__tag {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .5rem;
  display: block;
}
.modal__name {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: .75rem;
}
.modal__desc {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.modal__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem .75rem;
  margin-bottom: 1.5rem;
  flex: 1;
}
.modal__spec-item { font-size: .82rem; }
.modal__spec-key {
  font-weight: 700;
  color: var(--dark);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
  margin-bottom: .1rem;
}
.modal__spec-val { color: var(--muted); }
.modal__footer {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.modal__price {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
}

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .servicios__layout { grid-template-columns: 1fr; }
  .sucursales__layout { grid-template-columns: 1fr; }
  .sucursales__map { height: 300px; }
  .modal { grid-template-columns: 1fr; max-height: 95vh; }
  .modal__img-wrap { aspect-ratio: 16/7; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .hero { height: 380px; }
  .carousel__caption { padding: 1.5rem; }
  .carousel__caption-name { font-size: 1.5rem; }

  .navbar__links {
    display: none;
    position: fixed;
    top: calc(var(--top-h) + var(--nav-h));
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: .25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    border-top: 1px solid var(--border);
  }
  .navbar__links.open { display: flex; }
  .navbar__links a { padding: .65rem 0; width: 100%; border-bottom: 1px solid var(--border); }
  .navbar__links a:last-child { border-bottom: none; }
  .navbar__toggle { display: flex; }
  .navbar__cta {
    border-radius: 0;
    padding: .65rem 0;
    background: none !important;
    color: var(--primary) !important;
    box-shadow: none !important;
  }

  .section { padding: 3rem 0; }
  .section__title { font-size: 1.6rem; }
  .section__header { flex-direction: column; align-items: flex-start; }

  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .contacto__inner { flex-direction: column; text-align: center; }
  .contacto__actions { justify-content: center; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__nav { justify-content: center; }
  .footer__contact { justify-content: center; }
  .topbar span { font-size: .72rem; }
}

@media (max-width: 480px) {
  .hero { height: 320px; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .products-grid--parts { grid-template-columns: 1fr 1fr; }
  .carousel__caption { padding: 1rem 1.25rem; }
  .carousel__caption-name { font-size: 1.25rem; }
}
