
:root {
  --market-navy: #102c4b;
  --market-navy-2: #173f68;
  --market-blue: #0d6efd;
  --market-light: #f4f7fb;
  --market-text: #193451;
  --market-muted: #6c8096;
  --market-border: #e4ebf3;
  --market-shadow: 0 8px 24px rgba(20, 52, 83, .07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  background: var(--market-light);
  color: var(--market-text);
}

/* BARRA SUPERIOR */

.topbar {
  background: #0b2036;
  color: #c8d7e8;
  padding: 8px 0;
  font-size: .82rem;
}

.topbar a {
  color: #fff;
  text-decoration: none;
}

.topbar a:hover {
  color: #9bc8ff;
}

/* HEADER Y MARCA */

.market-header {
  background: var(--market-navy);
  box-shadow: 0 5px 18px rgba(5, 20, 37, .18);
  z-index: 1030;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #fff !important;
  text-decoration: none;
  line-height: 1;
}

.brand-icon {
  color: #ffc928;
  font-size: 2.55rem;
}

.brand-lockup strong {
  display: block;
  font-size: 1.8rem;
  letter-spacing: -.06em;
}

.brand-lockup strong span {
  color: #64b0ff;
}

.brand-lockup small {
  display: block;
  color: #d4e1ee;
  font-size: .72rem;
  margin-top: .25rem;
}

/* BUSCADOR */

.search-form {
  max-width: 680px;
}

.search-form .form-control {
  min-height: 44px;
  border: 0;
  border-radius: .55rem 0 0 .55rem;
}

.search-form .btn {
  border-radius: 0 .55rem .55rem 0;
}

/* ACCIONES DEL HEADER */

.header-actions {
  color: #fff;
}

.header-actions .location-text {
  display: grid;
  text-align: left;
}

.header-actions .location-text small {
  font-size: .7rem;
  color: #c7d7e8;
}

.header-actions .location-text strong {
  font-size: .83rem;
  font-weight: 500;
}

.header-icon {
  position: relative;
  color: #fff;
  font-size: 1.45rem;
  text-decoration: none;
}

.header-icon:hover {
  color: #8fc7ff;
}

.cart-count {
  position: absolute;
  top: -.45rem;
  right: -.55rem;
  min-width: 1.1rem;
  padding: .05rem .3rem;
  border-radius: 2rem;
  background: #ff4057;
  color: white;
  font-size: .65rem;
  text-align: center;
}

/* NAVEGACIÓN */

.nav-strip {
  background: var(--market-navy-2);
  padding: .45rem 0;
}

.nav-pill {
  display: inline-block;
  padding: .55rem .85rem;
  border-radius: .4rem;
  color: #e7f1fc;
  text-decoration: none;
  font-size: .9rem;
  white-space: nowrap;
}

.nav-pill:hover,
.nav-pill.active {
  background: var(--market-blue);
  color: #fff;
}

/* PORTADA */

.hero-section {
  overflow: hidden;
  color: white;
  background:
    radial-gradient(
      circle at 80% 25%,
      rgba(27, 126, 223, .6),
      transparent 30%
    ),
    linear-gradient(
      115deg,
      #102b48 0%,
      #174e7c 62%,
      #0d6efd 130%
    );
}

.hero-content {
  min-height: 370px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 3.4rem;
  padding-bottom: 3.4rem;
}

.hero-copy {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  margin-bottom: .65rem;
  color: #58a8ff;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .13em;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -.045em;
  font-weight: 800;
}

.hero-copy h1 span {
  color: #64b0ff;
}

.hero-copy .lead {
  max-width: 590px;
  margin-top: 1.1rem;
  color: #dce9f7;
  font-size: 1.15rem;
}

.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.6rem;
}

.hero-benefits > div {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.hero-benefits > div > i {
  color: #8fc7ff;
  font-size: 1.8rem;
}

.hero-benefits strong,
.hero-benefits small {
  display: block;
}

.hero-benefits strong {
  font-size: .9rem;
}

.hero-benefits small {
  color: #c6d9ed;
  font-size: .75rem;
}

/* ILUSTRACIÓN DE LA PORTADA */

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 330px;
  width: 330px;
  height: 275px;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.orbit-one {
  width: 280px;
  height: 200px;
}

.orbit-two {
  width: 220px;
  height: 270px;
  transform: rotate(35deg);
}

.hero-bag {
  display: grid;
  place-items: center;
  width: 155px;
  height: 155px;
  border-radius: 2.5rem;
  background: linear-gradient(135deg, #3f9aff, #0865d8);
  color: #fff;
  font-size: 5rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .25);
  transform: rotate(-8deg);
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: .8rem;
  background: white;
  color: var(--market-text);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .18);
}

.floating-card > i {
  color: var(--market-blue);
  font-size: 1.55rem;
}

.floating-card strong,
.floating-card small {
  display: block;
  white-space: nowrap;
}

.floating-card strong {
  font-size: .8rem;
}

.floating-card small {
  color: var(--market-muted);
  font-size: .7rem;
}

.floating-card-top {
  top: 12px;
  right: -5px;
}

.floating-card-bottom {
  bottom: 15px;
  left: -10px;
}

/* CARRUSEL DE PORTADA */

.hero-carousel .hero-content {
  min-height: 470px;
  padding-top: 3rem;
  padding-bottom: 4.4rem;
}

.hero-carousel .carousel-indicators {
  bottom: 1.1rem;
  margin-bottom: 0;
  z-index: 5;
}

.hero-carousel .carousel-indicators [data-bs-target] {
  width: 30px;
  height: 4px;
  margin: 0 .25rem;
  border: 0;
  border-radius: 2rem;
  background-color: rgba(255, 255, 255, .4);
  opacity: 1;
}

.hero-carousel .carousel-indicators .active {
  background-color: #fff;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 4.5%;
  opacity: .65;
  z-index: 4;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
  opacity: 1;
}

.hero-copy-compact {
  max-width: 430px;
}

.hero-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.04em;
  font-weight: 800;
}

.hero-copy h2 span {
  color: #64b0ff;
}

.hero-content-data {
  gap: 2.5rem;
}

.hero-showcase {
  position: relative;
  z-index: 1;
  flex: 1 1 460px;
  max-width: 560px;
}

.hero-product-grid,
.hero-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.hero-store-grid {
  grid-template-columns: 1fr;
  gap: .6rem;
}

.hero-product-card,
.hero-store-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: .9rem;
  background: rgba(255, 255, 255, .98);
  color: var(--market-text);
  text-decoration: none;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}

.hero-product-card:hover,
.hero-store-card:hover {
  transform: translateY(-3px);
  color: var(--market-text);
  box-shadow: 0 22px 46px rgba(0, 0, 0, .24);
}

.hero-product-thumb {
  position: relative;
  display: grid;
  flex: 0 0 64px;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: .65rem;
  background: linear-gradient(135deg, #f6f9fd, #eaf2fa);
}

.hero-product-thumb img {
  width: 100%;
  height: 100%;
  padding: .3rem;
  object-fit: contain;
}

.hero-rank {
  position: absolute;
  top: .15rem;
  left: .15rem;
  display: grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 .3rem;
  border-radius: 2rem;
  background: #102c4b;
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
}

.hero-product-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-product-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: #1b3c5d;
  font-size: .82rem;
  line-height: 1.25;
  font-weight: 700;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hero-product-info small {
  overflow: hidden;
  color: var(--market-muted);
  font-size: .7rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-product-price {
  margin-top: .1rem;
  color: #e63343;
  font-size: .92rem;
  font-weight: 800;
}

.hero-product-sales {
  color: #1caa73;
  font-size: .66rem;
  font-weight: 700;
}

.hero-store-card {
  padding: .55rem .7rem;
}

.hero-store-card .store-avatar {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  font-size: 1.2rem;
}

.hero-store-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-store-info strong {
  overflow: hidden;
  color: #1b3c5d;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-store-info small {
  overflow: hidden;
  color: var(--market-muted);
  font-size: .72rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-store-arrow {
  margin-left: auto;
  color: var(--market-blue);
  font-size: 1.05rem;
}

/* SECCIONES */

.section-space {
  padding: 3.2rem 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-heading .section-kicker {
  margin-bottom: .25rem;
}

.section-heading h2,
.how-panel h2 {
  margin: 0;
  color: #183e68;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -.03em;
}

.text-link {
  color: #0d6efd;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
}

/* CATEGORÍAS */

.category-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: .7rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 115px;
  padding: .8rem .35rem;
  border: 1px solid var(--market-border);
  border-radius: .8rem;
  background: #fff;
  color: var(--market-text);
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(20, 52, 83, .025);
  transition: transform .18s, box-shadow .18s;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: #b9d7fa;
  color: #0d6efd;
  box-shadow: var(--market-shadow);
}

.category-card strong {
  font-size: .82rem;
  text-align: center;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: #f2f7ff;
  font-size: 1.55rem;
}

.icon-red    { color: #ef476f; background: #fff0f3; }
.icon-blue   { color: #1686ef; background: #edf6ff; }
.icon-green  { color: #1caa73; background: #e9fbf3; }
.icon-purple { color: #8660d5; background: #f2edff; }
.icon-yellow { color: #e6a600; background: #fff8df; }
.icon-pink   { color: #ed679a; background: #fff0f6; }
.icon-slate  { color: #758aa2; background: #eff3f7; }
.icon-cyan   { color: #119ec4; background: #e8faff; }
.icon-orange { color: #ed7d26; background: #fff2e8; }
.icon-muted  { color: #8a9bad; background: #f0f3f6; }

/* PRODUCTOS */

.product-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--market-border);
  border-radius: .8rem;
  background: #fff;
  transition: transform .18s, box-shadow .18s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--market-shadow);
}

.product-image {
  position: relative;
  display: grid;
  place-items: center;
  height: 165px;
  overflow: hidden;
  background: linear-gradient(135deg, #f6f9fd, #eaf2fa);
}

.product-image img {
  width: 100%;
  height: 100%;
  padding: 1rem;
  object-fit: contain;
}

.discount-badge {
  position: absolute;
  top: .7rem;
  left: .7rem;
  padding: .3rem .5rem;
  border-radius: .35rem;
  background: #f04452;
  color: white;
  font-size: .72rem;
  font-weight: 800;
}

.sales-badge {
  position: absolute;
  top: .7rem;
  right: .7rem;
  padding: .28rem .5rem;
  border-radius: .35rem;
  background: #102c4b;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.product-sales {
  color: #1caa73;
  font-weight: 600;
}

.product-body {
  padding: .9rem;
}

.product-title {
  min-height: 2.4em;
  margin: 0 0 .3rem;
  color: #1b3c5d;
  font-size: .9rem;
  line-height: 1.35;
  font-weight: 700;
}

.product-store {
  display: block;
  margin-bottom: .7rem;
  color: var(--market-muted);
  font-size: .75rem;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
}

.product-price {
  color: #e63343;
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
}

.old-price {
  display: block;
  color: #8291a2;
  font-size: .72rem;
  font-weight: 400;
  text-decoration: line-through;
}

.add-cart {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
}

/* PROMOCIÓN PARA COMERCIOS */

.seller-promo {
  padding: 1.5rem;
  border: 1px solid #d7e9ff;
  border-radius: .9rem;
  background: linear-gradient(145deg, #e7f3ff, #f7fbff);
}

.seller-promo-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: #0d6efd;
  color: white;
  font-size: 1.7rem;
}

.seller-promo h3 {
  color: #173f68;
  font-size: 1.2rem;
  font-weight: 800;
}

.seller-promo p {
  color: #536c84;
  font-size: .9rem;
}

.seller-promo ul {
  margin: 1.1rem 0 1.3rem;
  padding: 0;
  list-style: none;
}

.seller-promo li {
  display: flex;
  gap: .55rem;
  margin-bottom: .7rem;
  color: #34536f;
  font-size: .82rem;
}

.seller-promo li i {
  color: #0d6efd;
}

/* PLANES COMERCIALES */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

@media (max-width: 767.98px) {
  #planes .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
  }
}

.plan-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--market-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--market-shadow);
}

.plan-card-head h3 {
  margin: 0 0 .35rem;
  color: #173f68;
  font-size: 1.15rem;
  font-weight: 800;
}

.plan-card-description {
  margin: 0;
  color: #5b748c;
  font-size: .85rem;
  line-height: 1.5;
}

.plan-card-price {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  flex-wrap: wrap;
  margin: 1.1rem 0 .2rem;
  color: #0d6efd;
}

.plan-card-price strong {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}

.plan-card-price span {
  color: #6c8096;
  font-size: .8rem;
}

.plan-card-features,
.plan-card-benefits {
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
}

.plan-card-features li,
.plan-card-benefits li {
  display: flex;
  gap: .55rem;
  padding: .28rem 0;
  color: #34536f;
  font-size: .85rem;
}

.plan-card-features i {
  color: #0d6efd;
}

.plan-card-benefits {
  margin-top: .9rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--market-border);
}

.plan-card-benefits i {
  color: #1f9d55;
}

.plan-card .btn {
  margin-top: 1.35rem;
}

@media (max-width: 575.98px) {
  .plan-card {
    padding: 1.25rem;
  }

  .plan-card-price strong {
    font-size: 1.65rem;
  }
}

/* MÁS VENDIDOS */

.best-sellers-section {
  background: #fff;
}

/* TIENDAS */

.stores-section {
  background: #eaf1f8;
}

.store-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  height: 100%;
  padding: 1rem;
  border: 1px solid #e1e9f1;
  border-radius: .8rem;
  background: #fff;
  color: var(--market-text);
  text-decoration: none;
  transition: box-shadow .18s, transform .18s;
}

.store-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--market-shadow);
}

.store-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.7rem;
}

.store-card h3 {
  margin: 0 0 .35rem;
  font-size: .95rem;
  font-weight: 800;
}

.store-meta {
  margin: .15rem 0;
  color: var(--market-muted);
  font-size: .75rem;
}

.store-card .btn {
  margin-top: .55rem;
}

/* CÓMO FUNCIONA */

.how-panel {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 1.2rem;
  background: linear-gradient(120deg, #102c4b, #174d7c);
  color: white;
}

.how-panel h2 {
  max-width: 500px;
  color: white;
}

.how-panel p {
  max-width: 540px;
  margin-top: 1rem;
  color: #d0dfef;
}

.how-panel .section-kicker {
  color: #80bdff;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 1rem;
}

.how-steps > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
}

.how-steps span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0d6efd;
  font-weight: 800;
}

.how-steps strong {
  font-size: 1rem;
}

.how-steps small {
  color: #c6d8ea;
  font-size: .8rem;
}

/* FOOTER */

.market-footer {
  background: #0b2036;
  color: #d5e2ef;
}

.market-footer h3 {
  margin-bottom: 1rem;
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
}

.market-footer a:not(.navbar-brand) {
  display: block;
  margin: .55rem 0;
  color: #c4d4e5;
  font-size: .85rem;
  text-decoration: none;
}

.market-footer a:hover {
  color: #fff;
}

.footer-description {
  max-width: 300px;
  color: #a9bfd5;
  font-size: .9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #a9bfd5;
  font-size: .78rem;
  gap: 1.25rem;
}

/* Crédito del desarrollo: logo de SixtoRed sobre el fondo oscuro */

.market-footer a.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  margin: 0;
  text-decoration: none;
}

.footer-credit-label {
  color: #8ba6c1;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.2;
}

.footer-credit img {
  width: auto;
  height: 72px;
  transition: transform .18s ease;
}

.market-footer a.footer-credit:hover img {
  transform: translateY(-1px) scale(1.03);
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

@media (min-width: 768px) {
  .footer-legal {
    align-items: flex-end;
    text-align: right;
  }
}

@media (max-width: 575.98px) {
  .footer-credit img {
    height: 60px;
  }

  .footer-credit-label {
    font-size: .62rem;
  }
}

/* SIN RESULTADOS */

.empty-state {
  padding: 3rem 1rem;
  color: var(--market-muted);
  text-align: center;
}

.empty-state > i {
  font-size: 2.5rem;
}

.empty-state h3 {
  margin-top: .8rem;
  color: var(--market-text);
  font-size: 1.2rem;
}

/* TABLETS Y PANTALLAS MEDIANAS */

@media (max-width: 1199.98px) {
  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .header-actions {
    flex-wrap: wrap;
    padding-bottom: .5rem;
  }

  .hero-art {
    flex-basis: 270px;
    width: 270px;
    transform: scale(.9);
  }
}

@media (max-width: 991.98px) {
  .hero-carousel .hero-content,
  .hero-content-data {
    min-height: 0;
  }

  .hero-content-data {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
  }

  .hero-showcase {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }

  .hero-store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* CELULARES */

@media (max-width: 767.98px) {
  .topbar .container {
    font-size: .72rem;
  }

  .topbar a {
    display: none;
  }

  .brand-lockup strong {
    font-size: 1.55rem;
  }

  .brand-icon {
    font-size: 2.15rem;
  }

  .nav-strip .container {
    gap: .2rem !important;
  }

  .nav-pill {
    padding: .45rem .55rem;
    font-size: .78rem;
  }

  .hero-carousel .hero-content {
    min-height: 0;
    padding-top: 2.2rem;
    padding-bottom: 3.6rem;
  }

  .hero-copy-compact {
    max-width: none;
  }

  .hero-product-grid,
  .hero-store-grid {
    grid-template-columns: 1fr;
  }

  .hero-product-card {
    padding: .55rem .65rem;
  }

  .hero-product-thumb {
    flex-basis: 58px;
    width: 58px;
    height: 58px;
  }

  .hero-art {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(2.3rem, 10vw, 3.2rem);
  }

  .hero-benefits {
    gap: 1rem;
  }

  .hero-benefits > div {
    min-width: 42%;
  }

  .section-space {
    padding: 2.2rem 0;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card {
    min-height: 90px;
    flex-direction: row;
    justify-content: flex-start;
    padding: .7rem;
  }

  .category-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }

  .product-image {
    height: 135px;
  }

  .product-body {
    padding: .7rem;
  }

  .product-price {
    font-size: .95rem;
  }

  .how-panel {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .how-steps {
    gap: .7rem;
  }

  .how-steps small {
    font-size: .72rem;
  }
}

/* CELULARES PEQUEÑOS */

@media (max-width: 420px) {
  .hero-benefits > div {
    min-width: 100%;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 1.35rem;
  }

  .product-image {
    height: 115px;
  }

  .product-title {
    font-size: .82rem;
  }

  .product-bottom {
    align-items: flex-end;
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

  .how-steps > div {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
  }

  .how-steps small {
    grid-column: 2;
  }
}

/* =========================================================
   COMPONENTES COMPARTIDOS
   ========================================================= */

.form-control,
.form-select {
  background-color: #fff;
  color: var(--market-text);
  border-color: var(--market-border);
}

.form-control::placeholder {
  color: #93a5b8;
}

.form-control:focus,
.form-select:focus {
  background-color: #fff;
  color: var(--market-text);
  border-color: #8ab6ea;
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12);
}

.form-text {
  color: var(--market-muted);
}

.app-panel {
  background: #fff;
  border: 1px solid var(--market-border);
  border-radius: 16px;
  padding: 1.35rem;
  box-shadow: var(--market-shadow);
}

.empty-state .btn {
  margin-top: .5rem;
}

/* =========================================================
   SITIO PÚBLICO: CATÁLOGO Y DETALLE
   ========================================================= */

.page-hero {
  background: linear-gradient(120deg, #e8f1fb 0%, #f7fbff 55%, #eef6ff 100%);
  border-bottom: 1px solid var(--market-border);
  padding: 2.6rem 0 2.2rem;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: .35rem 0 .5rem;
}

.filter-panel {
  background: #fff;
  border: 1px solid var(--market-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--market-shadow);
  position: sticky;
  top: 150px;
}

.product-title a {
  color: inherit;
  text-decoration: none;
}

.product-title a:hover {
  color: var(--market-blue);
}

.product-detail-gallery,
.product-detail-info {
  background: #fff;
  border: 1px solid var(--market-border);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: var(--market-shadow);
}

.product-detail-main {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f8fc;
  border-radius: 14px;
  min-height: 320px;
  overflow: hidden;
}

.product-detail-main img {
  max-height: 460px;
  width: 100%;
  object-fit: contain;
}

.product-thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--market-border);
  border-radius: 10px;
}

.product-thumb.active,
.product-thumb:hover {
  border-color: var(--market-blue);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info h1 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin: .6rem 0 .5rem;
}

.product-detail-price {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--market-navy);
  margin: 1rem 0 .35rem;
}

.product-detail-price .old-price {
  font-size: 1rem;
  margin-left: .6rem;
}

.product-detail-description {
  color: var(--market-muted);
  font-size: .95rem;
  line-height: 1.65;
}

.store-contact-card {
  background: #f6f9fd;
  border: 1px solid var(--market-border);
  border-radius: 12px;
  padding: 1rem;
}

.store-banner {
  position: relative;
  background: linear-gradient(120deg, #102c4b, #173f68);
  color: #fff;
  padding: 2.6rem 0 2rem;
  overflow: hidden;
}

.store-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .3;
}

.store-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.store-banner-content h1 {
  color: #fff;
}

.store-banner-content .text-secondary,
.store-banner-content p {
  color: #c8d7e8 !important;
}

.store-avatar-lg {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  font-size: 1.8rem;
}

.store-avatar-sm {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: .9rem;
}

.store-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* =========================================================
   AUTENTICACIÓN
   ========================================================= */

.auth-body {
  min-height: 100vh;
  background: radial-gradient(circle at 15% 15%, #1b4b7a 0%, #102c4b 45%, #081a2c 100%);
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 30px 70px rgba(2, 15, 30, .45);
}

.auth-card .brand-lockup {
  color: var(--market-navy) !important;
}

.auth-card .brand-lockup strong {
  color: var(--market-navy);
}

.auth-card .brand-lockup small {
  color: var(--market-muted);
}

.auth-brand {
  margin-bottom: 1.25rem;
}

.auth-back {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--market-muted);
  font-size: .85rem;
  text-decoration: none;
}

.auth-back:hover {
  color: var(--market-blue);
}

/* =========================================================
   PANELES PRIVADOS (ADMIN / PORTAL)
   ========================================================= */

.admin-body {
  background: #eef3f9;
  color: var(--market-text);
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 264px;
  height: 100vh;
  flex: 0 0 264px;
  background: linear-gradient(180deg, #0d2742 0%, #102c4b 100%);
  padding: 1.25rem 1rem;
  overflow-y: auto;
  z-index: 1040;
}

.admin-brand {
  margin: 0 .25rem 1.25rem;
}

.admin-brand strong {
  font-size: 1.55rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: .18rem;
}

.admin-nav-label {
  margin: 1rem .65rem .35rem;
  color: #7f9cba;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .58rem .7rem;
  border-radius: 9px;
  color: #cbd9e7;
  font-size: .88rem;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.admin-nav a i {
  width: 18px;
  text-align: center;
  color: #8eb6dc;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.admin-nav a.active {
  background: #0d6efd;
  color: #fff;
  box-shadow: 0 6px 18px rgba(13, 110, 253, .35);
}

.admin-nav a.active i {
  color: #fff;
}

.portal-commerce {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 .25rem 1rem;
  padding: .7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  color: #fff;
}

.portal-commerce small {
  color: #9eb6cd !important;
}

.portal-commerce .store-avatar {
  background: #0d6efd;
  color: #fff;
}

.admin-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: .7rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--market-border);
}

.admin-content {
  padding: 1.5rem;
  flex: 1 1 auto;
}

.admin-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.admin-page-head h1 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: .2rem 0 0;
}

.admin-content .section-kicker {
  color: var(--market-blue);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  height: 100%;
  background: #fff;
  border: 1px solid var(--market-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: var(--market-shadow);
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 12px;
  font-size: 1.25rem;
}

.stat-value {
  display: block;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--market-navy);
}

.stat-label {
  display: block;
  color: var(--market-muted);
  font-size: .78rem;
}

.stat-card-sm {
  align-items: center;
  font-size: .85rem;
  color: var(--market-muted);
}

.stat-card-sm i {
  font-size: 1.2rem;
}

.stat-card-sm strong {
  color: var(--market-navy);
}

.admin-content .table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.admin-content .table > :not(caption) > * > * {
  padding: .7rem .8rem;
}

.admin-content .app-panel.p-0 {
  overflow: hidden;
}

.admin-content .app-panel.p-0 .table-responsive {
  border-radius: 16px;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, .35);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-content {
    padding: 1rem;
  }
}

/* =========================================================
   ADMINLTE SHELL (SOLO PANEL DE ADMINISTRACIÓN)
   ========================================================= */

.app-wrapper .admin-content {
  padding: 0 .5rem 1rem;
}

.admin-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  background: rgba(13, 110, 253, .22);
  color: #9cc9ff;
  border-radius: .5rem;
  font-size: .95rem;
}

.app-sidebar .brand-text {
  font-size: 1.15rem;
  letter-spacing: .01em;
}

.app-sidebar .brand-text strong {
  color: #8ec2ff;
}

.admin-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--market-navy);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  vertical-align: middle;
}

.admin-user-avatar-lg {
  width: 4.25rem;
  height: 4.25rem;
  margin-bottom: .65rem;
  font-size: 1.35rem;
  background: rgba(255, 255, 255, .18);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

.app-footer {
  font-size: .82rem;
}

/* =========================================================
   CARRITO PÚBLICO
   ========================================================= */

.add-cart-form {
  flex: 0 0 auto;
  margin: 0;
}

.cart-table th {
  color: var(--market-muted);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cart-thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  padding: .35rem;
  border: 1px solid var(--market-border);
  border-radius: .6rem;
  background: #fff;
  object-fit: contain;
}

.cart-qty-cell {
  width: 110px;
}

.cart-qty {
  max-width: 90px;
}

.cart-summary hr {
  opacity: .15;
}

@media (max-width: 575.98px) {
  .cart-thumb {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .cart-table {
    font-size: .82rem;
  }
}

@media (max-width: 991.98px) {
  .app-wrapper .admin-content {
    padding: 0 .25rem 1rem;
  }
}

/* =========================================================
   PÁGINAS LEGALES
   ========================================================= */

.legal-nav {
  position: sticky;
  top: 150px;
}

.legal-nav-list {
  padding-left: 1.15rem;
  font-size: .9rem;
  line-height: 1.65;
}

.legal-nav-list a {
  color: var(--market-muted);
  text-decoration: none;
}

.legal-nav-list a:hover,
.legal-nav-list a:focus {
  color: var(--market-blue);
  text-decoration: underline;
}

.legal-fecha {
  margin-bottom: 1rem;
  color: var(--market-muted);
  font-size: .85rem;
}

.legal-doc h2 {
  margin: 1.9rem 0 .65rem;
  font-size: 1.15rem;
  scroll-margin-top: 10rem;
}

.legal-doc > p,
.legal-doc > ul,
.legal-doc > ol {
  color: var(--market-muted);
}

.legal-doc ul,
.legal-doc ol {
  padding-left: 1.15rem;
}

.legal-doc li + li {
  margin-top: .35rem;
}

.legal-doc a {
  color: var(--market-blue);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--market-border);
}

@media (max-width: 991.98px) {
  .legal-nav {
    position: static;
  }

  .legal-nav-list {
    columns: 2;
  }
}

@media (max-width: 575.98px) {
  .legal-nav-list {
    columns: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel.carousel-fade .carousel-item,
  .hero-product-card,
  .hero-store-card {
    transition: none;
  }
}
