:root {
  --bg-main: #ffffff;
  --bg-soft: #f4f8fb;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
  --accent: #0ea5e9;   /* celeste */
  --accent-dark: #0369a1; /* azul más oscuro */
  --black: #020617;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

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

button {
  font-family: inherit;
}

/* Layout base */

.container {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}

/* Topbar */

.topbar {
  background: linear-gradient(90deg, #0f172a, #0b1120);
  color: #e5f2ff;
  text-align: center;
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Header */

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1.5rem;
}

/* Logo */

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.logo__icon {
  font-size: 1.4rem;
}

.logo__text {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* Nav desktop */

.main-nav {
  display: flex;
  gap: 1.6rem;
}

.main-nav__link {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9rem;
  position: relative;
}

.main-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.2s ease;
}

.main-nav__link:hover::after {
  width: 100%;
}

/* Iconos header */

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.icon-btn {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Carrito */

.cart-toggle {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--accent-dark);
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 0 0.35rem;
}

/* Hamburguesa */

.hamburger {
  display: none; /* solo mobile */
  flex-direction: column;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background-color: #111827;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Nav categorías */

.header-cats {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.header-cats__inner {
  display: flex;
  gap: 1.6rem;
  padding: 0.7rem 0;
  overflow-x: auto;
}

.header-cats__inner::-webkit-scrollbar {
  display: none;
}

.cat-link {
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #6b7280;
  white-space: nowrap;
}

.cat-link--active {
  color: var(--text-main);
  font-weight: 600;
}

/* HERO */

.hero {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.1)),
    url("../img/fondo.jpg") center/cover no-repeat;
  color: #f9fafb;
}

.hero__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 2fr 1.4fr;
  grid-template-rows: repeat(2, minmax(160px, 1fr));
  grid-template-areas:
    "main alt1"
    "main alt2";
}

.hero-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  color: #ffffff;
  display: flex;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Main hero */

.hero-card--main {
  grid-area: main;
  color: var(--black);
  position: relative;
  overflow: hidden;
}

/* Fondo con imagen + capa oscura (no afecta tamaño) */
.hero-card--main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to bottom, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.25)),
    url("../img/1.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Asegura que el contenido quede encima */
.hero-card--main .hero-card__content {
  position: relative;
  z-index: 1;
}


.hero-card--main .hero-card__content {
  color: #e5f3ff;
}

/* Fondo de texto con overlay sutil */
.hero-card--main .hero-card__content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.15), transparent);
  z-index: -1;
}

.hero-card__content {
  position: relative;
  z-index: 1;
  padding: 2.1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.hero-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  align-self: flex-start;
}

.hero-tag--light {
  background-color: rgba(15, 23, 42, 0.8);
  border: none;
  color: #e5f3ff;
}

.hero-card--main .hero-tag {
  border-color: rgba(226, 232, 240, 0.8);
  background-color: rgba(15, 23, 42, 0.3);
}

.hero h1 {
  font-size: clamp(2.1rem, 3vw, 2.6rem);
  line-height: 1.1;
  max-width: 18ch;
}

.hero-text {
  font-size: 0.95rem;
  max-width: 34ch;
  color: #dbeafe;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

/* Hero alternos */
.hero-card--alt.hero-card--0::before {
  background-image: url("../img/1.jpg");
  filter: brightness(0.7);
}

.hero-card--alt.hero-card--1::before {
  background-image: url("../img/5.jpg");
  filter: brightness(0.7);
}
.hero-card--alt.hero-card--2::before {
  background-image: url("../img/3.jpg");
  filter: brightness(0.7);
}
.hero-card--alt.hero-card--3::before {
  background-image: url("../img/2.jpg");
  filter: brightness(0.7);
}

.hero-card--alt .hero-card__content {
  justify-content: flex-end;
  padding: 1.3rem 1.4rem;
}

.hero-card--alt h2,
.hero-card--alt h3 {
  max-width: 18ch;
}

/* Botones */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.7rem 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
}

.btn--primary {
  background: linear-gradient(to right, var(--accent), var(--accent-dark));
  color: #ffffff;
}

.btn--ghost {
  border: 1px solid #e5f3ff;
  background: transparent;
  color: #e5f3ff;
}

.btn--secondary {
  background-color: #0f172a;
  color: #e5f3ff;
}

.btn--small {
  padding: 0.45rem 1.1rem;
  font-size: 0.76rem;
}

.btn--full {
  width: 100%;
}

/* Secciones */

.section {
  padding: 3rem 0;
}

.section--soft {
  background-color: var(--bg-soft);
}

.section__header {
  margin-bottom: 1.5rem;
}

.section__header h2 {
  font-size: 1.6rem;
}

.section__header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.section__header--row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

/* Categorías pills */

.categories-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.category-pill {
  background-color: #ffffff;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-soft);
  font-size: 0.85rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* BANNERS MEDIOS */

.mid-banners {
  background-color: #ffffff;
}

.mid-banners__grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Card */

.mid-banner {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 190px;
  color: #ffffff;
}

/* Fondo con imagen + degradado oscuro */

.mid-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.9);
}

.mid-banner--1::before {
  background-image:
    linear-gradient(to right, rgba(15,23,42,0.9), rgba(15,23,42,0.4)),
    url("../img/ropa.jpg");
}

.mid-banner--2::before {
  background-image:
    linear-gradient(to right, rgba(15,23,42,0.9), rgba(15,23,42,0.4)),
    url("../img/2be20bc8a2ca026dd1a2f36e14db4488.jpg");
}

.mid-banner--3::before {
  background-image:
    linear-gradient(to right, rgba(15,23,42,0.9), rgba(15,23,42,0.4)),
    url("../img/9074527ae7c6a12dbc8c9d93615d99c4.jpg");
}

/* Contenido texto */

.mid-banner__content {
  position: relative;
  z-index: 1;
  padding: 1.4rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.mid-banner__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.25rem;
  opacity: 0.9;
}

.mid-banner__title {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Link más */

.link-more {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--accent-dark);
}

/* Productos */

.product-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.product-card {
  border-radius: 1rem;
  border: 1px solid var(--border-soft);
  background-color: #ffffff;
  padding: 1rem 1rem 1.2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-card__image {
  border-radius: 0.8rem;
  overflow: hidden;
}

.product-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.product-card__badge--blue {
  background-color: #0f172a;
}

.product-card__badge--dark {
  background-color: #1e293b;
}

.product-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-card__bottom {
  margin-top: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-card__price {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Colección fullwidth */

.collection {
  position: relative;
  background-image: url("../img/ultima.jpg");
  background-size: cover;
  background-position: center;
  min-height: 260px;
  display: flex;
  align-items: center;
  color: #ffffff;
}

.collection__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.3));
}

.collection__content {
  position: relative;
  z-index: 1;
  padding: 2.4rem 0;
  max-width: 420px;
}

.collection__tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.4rem;
}

.collection__content h2 {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

/* Footer */

.footer {
  background-color: #020617;
  color: #9ca3af;
  padding: 1.8rem 0;
  font-size: 0.8rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.4rem;
}

/* Carrito lateral */

.cart-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(360px, 100%);
  background-color: #ffffff;
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 18px rgba(15, 23, 42, 0.25);
}

.cart-panel--open {
  transform: translateX(0);
}

.cart-panel__header {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-panel__header h2 {
  font-size: 1.1rem;
}

.cart-panel__close {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
}

.cart-panel__body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.2rem 0.5rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 0.7rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cart-item__name {
  font-weight: 500;
}

.cart-item__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item__remove {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  color: #ef4444;
  cursor: pointer;
}

.cart-summary {
  padding: 0.9rem 1.2rem 1.2rem;
  border-top: 1px solid #e5e7eb;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  font-weight: 500;
}

/* Backdrop carrito */

.cart-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.5);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cart-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}

/* NAV MOBILE */

.mobile-nav {
  position: fixed;
  top: 56px; /* se ajusta en JS si querés, pero así va bien */
  right: 0;
  left: 0;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 25;
}

.mobile-nav__link {
  display: block;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  font-size: 0.95rem;
  color: #111827;
  border-top: 1px solid #f3f4f6;
}

.mobile-nav--open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ------------------ RESPONSIVE ------------------ */

/* Tablet y abajo */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1.4fr 1.4fr;
    grid-template-rows: repeat(3, minmax(160px, auto));
    grid-template-areas:
      "main main"
      "alt1 alt2"
      "alt3 alt3";
  }

  .hero-card--alt.hero-card--3 {
    grid-area: alt3;
  }

  .section {
    padding: 2.6rem 0;
  }

  .mid-banners__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Mobile */
@media (max-width: 768px) {
  .container {
    width: 100%;
    padding-inline: 1.1rem;
  }

  .main-nav {
    display: none; /* se usa mobile-nav */
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding-top: 1.8rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "main"
      "alt1"
      "alt2"
      "alt3";
  }

  .hero-card__content {
    padding: 1.7rem 1.6rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .section__header--row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__inner {
    flex-direction: column;
  }

  .mid-banners__grid {
    grid-template-columns: 1fr; /* uno abajo de otro en mobile / tablet chica */
  }
}

/* Mobile chico */
@media (max-width: 480px) {
  .hero-card__content {
    padding: 1.5rem 1.3rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    font-size: 0.7rem;
  }
}
