/* =========================================================
   RaChi Accesorios — sistema de diseño
   Paleta: asfalto oscuro + azul de marca (del logo) + ámbar señal
   Tipografía: Oswald (titulares, condensada, mecánica) + Work Sans (texto)
   ========================================================= */

:root {
  --asphalt-900: #14171a;
  --asphalt-800: #1d2124;
  --asphalt-700: #2a2f34;
  --asphalt-600: #3a4045;
  --steel-300: #9aa7af;
  --steel-200: #c3ccd1;
  --paper-050: #f4f6f7;
  --brand-blue: #4bb3e6;
  --brand-blue-deep: #1f6e93;
  --signal-amber: #f2a93b;
  --danger-red: #d9482b;

  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  --radius-cut: 14px; /* usado solo en clip-path, no border-radius */
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--asphalt-900);
  color: var(--paper-050);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: min(92%, var(--container));
  margin-inline: auto;
}

/* Enlace saltar al contenido para accesibilidad de teclado */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--brand-blue);
  color: var(--asphalt-900);
  padding: 10px 16px;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 3px;
}

/* ---------- Encabezado de sección (uso general) ---------- */
.section {
  padding: 72px 0;
}
.section--tight {
  padding: 48px 0;
}
.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-kicker {
  color: var(--brand-blue);
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}
.section-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  margin: 0 0 12px;
  color: var(--paper-050);
}
.section-sub {
  color: var(--steel-300);
  margin: 0;
  max-width: 60ch;
}

.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--asphalt-600) 20%,
    var(--asphalt-600) 80%,
    transparent
  );
  border: none;
  margin: 0;
}

/* =========================================================
   Barra superior fija
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(20, 23, 26, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--asphalt-700);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 16px;
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.topbar__brand img {
  height: 40px;
  width: auto;
}
.topbar__nav {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.topbar__nav a {
  text-decoration: none;
  color: var(--steel-200);
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}
.topbar__cta {
  font-family: var(--font-head);
  background: var(--signal-amber);
  color: var(--asphalt-900);
  text-decoration: none;
  padding: 9px 18px;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
  white-space: nowrap;
}
.topbar__menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--asphalt-600);
  color: var(--paper-050);
  padding: 8px 10px;
  font-size: 1.1rem;
}

@media (max-width: 800px) {
  .topbar__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--asphalt-800);
    flex-direction: column;
    padding: 16px 6%;
    gap: 14px;
    border-bottom: 1px solid var(--asphalt-700);
    display: none;
  }
  .topbar__nav.is-open {
    display: flex;
  }
  .topbar__menu-btn {
    display: inline-block;
  }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--asphalt-900);
  padding: 96px 0 100px;
  text-align: center;
  border-bottom: 1px solid var(--asphalt-700);
}

/* Foto real de la tienda, difuminada, como ambiente de fondo */
.hero__bg {
  position: absolute;
  inset: -30px;
  background-image: url("../images/tienda-fondo.jpg");
  background-size: cover;
  background-position: center 40%;
  filter: blur(4px) saturate(1.05) brightness(0.95);
  transform: scale(1.06);
  z-index: 0;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 14, 16, 0.35) 0%,
    rgba(12, 14, 16, 0.48) 45%,
    rgba(12, 14, 16, 0.72) 100%
  );
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
}

/* Logo pequeño y elegante, esquina superior izquierda del hero */
.hero__logo-corner {
  position: absolute;
  z-index: 3;
  top: 26px;
  left: 5%;
  width: 104px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
}
@media (max-width: 700px) {
  .hero__logo-corner {
    top: 18px;
    left: 6%;
    width: 76px;
  }
}

.hero__tagline {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--steel-200);
  margin: 0 auto 8px;
  max-width: 46ch;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}
.hero__sub {
  color: var(--steel-300);
  max-width: 52ch;
  margin: 0 auto 34px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-head);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 13px 26px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn--primary {
  background: var(--brand-blue);
  color: var(--asphalt-900);
}
.btn--primary:hover {
  background: #66c1ef;
}
.btn--ghost {
  background: transparent;
  border-color: var(--asphalt-600);
  color: var(--paper-050);
}
.btn--ghost:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.btn--waze {
  background: #1f2a44;
  color: #9ad1ff;
  border-color: #33bcec55;
}
.btn--waze:hover {
  background: #24304f;
}
.btn--whatsapp {
  background: #25d366;
  color: #0b1f13;
}
.btn--whatsapp:hover {
  background: #3ee07c;
}
.btn--block {
  width: 100%;
  justify-content: center;
}

/* =========================================================
   Franja de categorías (íconos, como en el logo)
   ========================================================= */
.categories {
  background: var(--asphalt-800);
  border-bottom: 1px solid var(--asphalt-700);
}
.categories__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--asphalt-700);
}
.category {
  background: var(--asphalt-800);
  padding: 26px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--steel-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}
.category svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  fill: none;
}
.category span {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.category:hover,
.category:focus-visible {
  background: var(--asphalt-700);
  color: var(--brand-blue);
}

@media (max-width: 700px) {
  .categories__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================================================
   Tabs Catálogo / Ofertas
   ========================================================= */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.tab {
  font-family: var(--font-head);
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
  color: var(--steel-300);
  padding: 10px 20px;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.tab[aria-selected="true"] {
  background: var(--brand-blue);
  color: var(--asphalt-900);
  border-color: var(--brand-blue);
}

.gallery-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.card {
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  cursor: pointer;
  padding: 0;
  text-align: left;
  color: inherit;
  font-family: inherit;
}
.card__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--asphalt-700), var(--asphalt-900));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__media .placeholder-icon {
  width: 40px;
  height: 40px;
  stroke: var(--asphalt-600);
  fill: none;
}
.card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--signal-amber);
  color: var(--asphalt-900);
  font-family: var(--font-head);
  font-size: 0.72rem;
  padding: 4px 9px;
  letter-spacing: 0.02em;
}
.card__stock {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--font-head);
  font-size: 0.7rem;
  padding: 4px 9px;
  letter-spacing: 0.02em;
}
.card__stock--in {
  background: #2fae66;
  color: #eafff2;
}
.card__stock--out {
  background: var(--danger-red);
  color: #ffece7;
}
.card__body {
  padding: 14px 16px 18px;
}
.card__title {
  font-family: var(--font-head);
  font-size: 1rem;
  margin: 0 0 4px;
}
.card__note {
  color: var(--steel-300);
  font-size: 0.88rem;
  margin: 0;
}
.card__price {
  font-family: var(--font-head);
  color: var(--brand-blue);
  font-size: 1.05rem;
  margin: 8px 0 0;
}

.empty-state {
  border: 1px dashed var(--asphalt-600);
  padding: 48px 24px;
  text-align: center;
  color: var(--steel-300);
}
.empty-state strong {
  display: block;
  color: var(--paper-050);
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin-bottom: 6px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 14, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 24px;
}
.lightbox.is-open {
  display: flex;
}
.lightbox__panel {
  max-width: 900px;
  width: 100%;
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
}
.lightbox__panel img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: var(--asphalt-900);
}
.lightbox__info {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.lightbox__close {
  background: none;
  border: 1px solid var(--asphalt-600);
  color: var(--paper-050);
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--font-head);
}
.lightbox__close:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* =========================================================
   Ubicación
   ========================================================= */
.location {
  background: var(--asphalt-800);
  border-top: 1px solid var(--asphalt-700);
  border-bottom: 1px solid var(--asphalt-700);
}
.location__list {
  list-style: none;
  margin: 24px 0 30px;
  padding: 0;
  display: grid;
  gap: 14px;
}
.location__list li {
  display: flex;
  gap: 12px;
  color: var(--steel-200);
}
.location__list svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: var(--brand-blue);
  fill: none;
  margin-top: 2px;
}
.location__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Tarjetas de sucursal (varias ubicaciones) */
.locations__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.locations__grid--three {
  grid-template-columns: repeat(3, 1fr);
}
.location-card {
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.location-card--global {
  border-color: var(--signal-amber);
}
.location-card__badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--asphalt-900);
  background: var(--brand-blue);
  padding: 4px 10px;
  margin: 0 0 10px;
  align-self: flex-start;
}
.location-card__badge--alt {
  background: var(--signal-amber);
}
.location-card__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 4px;
  color: var(--paper-050);
}
.location-card .map-frame {
  margin-bottom: 18px;
}
.location-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
}
.location__list--services {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.location__list--services li {
  position: relative;
  padding-left: 22px;
  color: var(--steel-200);
  font-size: 0.92rem;
}
.location__list--services li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  background: var(--signal-amber);
}

@media (max-width: 980px) {
  .locations__grid--three {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .locations__grid,
  .locations__grid--three {
    grid-template-columns: 1fr;
  }
}

.map-frame {
  border: 1px solid var(--asphalt-700);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.map-frame iframe {
  width: 100%;
  height: 280px;
  border: 0;
  filter: grayscale(0.3) contrast(1.05);
}

/* =========================================================
   Redes sociales / contacto
   ========================================================= */
.social {
  text-align: center;
}
.social__grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.social__link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper-050);
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
  padding: 14px 22px;
  font-family: var(--font-head);
  letter-spacing: 0.01em;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.social__link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}
.social__link:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  transform: translateY(-2px);
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  padding: 34px 0;
  text-align: center;
  color: var(--steel-300);
  font-size: 0.88rem;
}
.footer a {
  color: var(--steel-300);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer a:hover {
  color: var(--brand-blue);
}

/* =========================================================
   Botón flotante de WhatsApp (elegir sucursal)
   ========================================================= */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.wa-float__btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #0b1f13;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease;
}
.wa-float__btn:hover {
  transform: scale(1.06);
}
.wa-float__menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
  padding: 14px;
  min-width: 240px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}
.wa-float.is-open .wa-float__menu {
  display: flex;
}
.wa-float__title {
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--steel-300);
  margin: 0 0 8px;
}
.wa-float__menu a {
  text-decoration: none;
  color: var(--paper-050);
  font-size: 0.92rem;
  padding: 10px 10px;
  border-top: 1px solid var(--asphalt-700);
  transition: color 0.15s ease;
}
.wa-float__menu a:first-of-type {
  border-top: none;
}
.wa-float__menu a:hover {
  color: #25d366;
}

@media (max-width: 600px) {
  .wa-float {
    right: 14px;
    bottom: 14px;
  }
  .wa-float__btn {
    width: 54px;
    height: 54px;
  }
}

/* =========================================================
   Utilidades de administración compartidas (admin.html)
   ========================================================= */
.admin-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-card {
  width: min(420px, 100%);
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
  padding: 34px 30px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.admin-card h1 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  margin: 0 0 6px;
}
.admin-card p {
  color: var(--steel-300);
  font-size: 0.9rem;
  margin: 0 0 22px;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}
.field label {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--steel-200);
}
.field input,
.field select,
.field textarea {
  background: var(--asphalt-900);
  border: 1px solid var(--asphalt-600);
  color: var(--paper-050);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field textarea {
  resize: vertical;
  min-height: 90px;
  font-family: "Consolas", monospace;
  font-size: 0.82rem;
}
.form-error {
  color: var(--danger-red);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: -8px 0 14px;
}

.admin-page {
  display: none;
}
.admin-page.is-visible {
  display: block;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--asphalt-700);
  margin-bottom: 32px;
}
.admin-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-header__brand img {
  height: 34px;
}
.admin-header__brand span {
  font-family: var(--font-head);
  letter-spacing: 0.01em;
}
.link-btn {
  background: none;
  border: none;
  color: var(--steel-300);
  font-family: var(--font-head);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.9rem;
  padding: 0;
}
.link-btn:hover {
  color: var(--brand-blue);
}

.panel {
  background: var(--asphalt-800);
  border: 1px solid var(--asphalt-700);
  padding: 26px;
  margin-bottom: 28px;
}
.panel h2 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin: 0 0 6px;
}
.panel > p.hint {
  color: var(--steel-300);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  color: var(--steel-200);
  font-size: 0.92rem;
}
.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 1px solid var(--brand-blue);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.85rem;
}

.entry-list {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}
.entry-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--asphalt-900);
  border: 1px solid var(--asphalt-700);
  padding: 10px 12px;
}
.entry-row__thumb {
  width: 60px;
  height: 45px;
  object-fit: cover;
  background: var(--asphalt-700);
}
.entry-row__meta strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 500;
}
.entry-row__meta span {
  color: var(--steel-300);
  font-size: 0.8rem;
}
.entry-row__remove {
  background: none;
  border: 1px solid var(--asphalt-600);
  color: var(--steel-300);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-body);
}
.entry-row__remove:hover {
  border-color: var(--danger-red);
  color: var(--danger-red);
}

.output-box {
  position: relative;
}
.output-box .link-btn {
  position: absolute;
  top: 12px;
  right: 12px;
}

.note-box {
  border-left: 3px solid var(--signal-amber);
  background: rgba(242, 169, 59, 0.08);
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--steel-200);
  margin-bottom: 20px;
}
