:root {
  --bg: #06163d;
  --bg2: #0a245d;
  --bg3: #0d2f77;
  --card: rgba(255,255,255,0.06);
  --card-2: rgba(255,255,255,0.04);
  --text: #ffffff;
  --muted: #d9e6ff;
  --accent: #f2b300;
  --accent-2: #ffd65c;
  --border: rgba(255,255,255,0.10);
  --shadow: 0 14px 34px rgba(0,0,0,0.25);
  --container: 1440px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(58,160,255,0.08), transparent 25%),
    linear-gradient(180deg, #04122f 0%, #071a46 38%, #081b49 100%);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(96%, var(--container));
  margin: 0 auto;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(4, 18, 47, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand img {
  width: 320px;
  max-width: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.96rem;
  color: #eef4ff;
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--accent-2);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 0;
  height: 2px;
  background: var(--accent-2);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.25s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffca28);
  color: #091f4d;
  box-shadow: 0 10px 28px rgba(242,179,0,0.25);
}

.btn-outline {
  background: rgba(255,255,255,0.03);
  color: white;
  border-color: rgba(255,255,255,0.18);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  background: rgba(4, 18, 47, 0.98);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu .container {
  padding-top: 12px;
  padding-bottom: 16px;
}

.mobile-menu ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.mobile-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  color: #eef4ff;
  font-weight: 700;
}

/* MAIN */
.catalog-main {
  padding: 24px 0 60px;
}

.catalog-section {
  padding: 8px 0 0;
}

.catalog-topbar {
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.catalog-topbar-left h1 {
  margin-top: 10px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.catalog-topbar-left p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 760px;
}

.catalog-topbar-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.4px;
}

/* FEATURED */
.featured-strip {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.featured-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    linear-gradient(135deg, #0b2c70, #0a1e4f);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.featured-main h2 {
  margin-top: 10px;
  font-size: 1.6rem;
  line-height: 1.08;
}

.featured-main p,
.featured-card p {
  margin-top: 8px;
  color: var(--muted);
}

.featured-badge,
.mini-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(242,179,0,0.16);
  color: var(--accent-2);
  border: 1px solid rgba(242,179,0,0.22);
  font-size: 0.78rem;
  font-weight: 800;
}

.featured-card strong {
  display: block;
  font-size: 1.08rem;
  margin-top: 10px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 110px;
}

.sidebar-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.sidebar h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--accent-2);
}

.search-box {
  margin-bottom: 12px;
}

.search-box input,
.sort-select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: white;
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: #b7caef;
}

.filter-group {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #eaf1ff;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #eef4ff;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent), #ffca28);
  color: #0a1f4f;
  border-color: transparent;
}

.products-content {
  min-width: 0;
}

.content-top {
  margin-bottom: 12px;
}

.content-top h2 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.content-top p {
  color: var(--muted);
}

/* PRODUCTOS */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
}

.product-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    linear-gradient(135deg, #0b2c70, #0a1e4f);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,214,92,0.30);
  box-shadow: 0 18px 34px rgba(0,0,0,0.32);
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.product-tag {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: rgba(255,255,255,0.14);
  color: white;
  border: 1px solid rgba(255,255,255,0.18);
}

.product-tag.destacado {
  background: rgba(242,179,0,0.18);
  color: var(--accent-2);
  border-color: rgba(242,179,0,0.28);
}

.product-tag.nuevo {
  background: rgba(58, 191, 113, 0.18);
  color: #8cffb7;
  border-color: rgba(58, 191, 113, 0.28);
}

.product-tag.oferta {
  background: rgba(216,75,75,0.18);
  color: #ffb7b7;
  border-color: rgba(216,75,75,0.28);
}

.product-image {
  height: 165px;
  padding: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.product-real-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 12px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #c8d7f7;
  font-size: 0.88rem;
  padding: 10px;
}

.product-body {
  padding: 14px;
}

.product-category {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.product-title {
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 8px;
  min-height: 2.5em;
}

.product-desc {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  min-height: 3.6em;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.price {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.stock {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.stock.ok {
  background: rgba(58, 191, 113, 0.18);
  color: #8cffb7;
}

.stock.low {
  background: rgba(242,179,0,0.18);
  color: #ffd86a;
}

.stock.out {
  background: rgba(216,75,75,0.18);
  color: #ffb7b7;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-add,
.btn-more {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s ease;
  font-size: 0.88rem;
}

.btn-add {
  background: linear-gradient(135deg, var(--accent), #ffca28);
  color: #0a1f4f;
}

.btn-more {
  background: rgba(255,255,255,0.04);
  color: white;
  border-color: rgba(255,255,255,0.12);
}

.btn-add:hover,
.btn-more:hover {
  transform: translateY(-2px);
}

/* EMPTY */
.empty-state {
  display: none;
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
}

/* CARRITO */
.mini-cart-btn {
  min-width: 120px;
}

.cart-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1400;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), #ffca28);
  color: #08204e;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff5b5b;
  color: white;
  font-size: 0.78rem;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 390px;
  max-width: 100%;
  height: 100vh;
  z-index: 1500;
  background: linear-gradient(180deg, #0a1d4b, #07173d);
  border-left: 1px solid rgba(255,255,255,0.10);
  box-shadow: -12px 0 30px rgba(0,0,0,0.30);
  transition: right 0.28s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.cart-panel.open {
  right: 0;
}

.cart-header {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cart-header h3 {
  font-size: 1.3rem;
}

.cart-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  padding: 16px;
  overflow-y: auto;
  display: grid;
  gap: 12px;
}

.cart-empty-text {
  color: var(--muted);
}

.cart-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.cart-item h4 {
  margin-bottom: 4px;
}

.cart-item p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-qty button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid;
  gap: 10px;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 800;
}

/* RESPONSIVE */
@media (max-width: 1180px) {
  .featured-strip {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 980px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .brand img {
    width: 230px;
  }

  .catalog-main {
    padding-top: 18px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-image {
    height: 180px;
  }

  .product-actions {
    grid-template-columns: 1fr;
  }

  .catalog-topbar-right {
    width: 100%;
  }

  .catalog-topbar-right .btn {
    width: 100%;
  }

  .cart-panel {
    width: 100%;
    right: -100%;
  }

  .cart-button {
    width: 58px;
    height: 58px;
    right: 14px;
    bottom: 14px;
  }
}