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

:root {
  --red: #E10600;
  --black: #0A0A0A;
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --gray-mid: #D9D9D9;
  --gray-text: #666666;
  --green: #2E8B57;
  --font: 'DM Sans', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  font-size: 14px;
}

a { text-decoration: none; color: inherit; }

header {
  background: var(--black);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  gap: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon { width: 200px; height: 140px; position: relative; }
.logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.logo-text {
  color: var(--white);
  font-size: 11px; font-weight: 500;
  line-height: 1.3; text-transform: uppercase; letter-spacing: 0.5px;
}

.search-bar { flex: 1; max-width: 480px; display: flex; align-items: center; gap: 0; }
.search-input-wrap {
  flex: 1;
  display: flex; align-items: center;
  background: #1C1C1C;
  border: 1px solid #2e2e2e;
  border-right: none;
  border-radius: 4px 0 0 4px;
  padding: 0 12px; height: 40px; gap: 8px;
}
.search-input-wrap svg { flex-shrink: 0; }
.search-input-wrap input {
  border: none; outline: none;
  font-family: var(--font); font-size: 13px;
  color: #e0e0e0;
  width: 100%; background: transparent;
}
.search-input-wrap input::placeholder { color: #666; }

.btn-buscar {
  background: var(--red); color: var(--white);
  border: none; padding: 0 20px; height: 40px;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  letter-spacing: 1px; cursor: pointer;
  border-radius: 0 4px 4px 0;
  text-transform: uppercase; transition: background 0.15s;
}
.btn-buscar:hover { background: #c50500; }

.cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--red); color: var(--white);
  border: none; padding: 0 16px; height: 40px;
  border-radius: 4px; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  transition: background 0.15s;
}
.cart-btn:hover { background: #c50500; }
.cart-btn .cart-count {
  background: var(--white); color: var(--red);
  border-radius: 50%; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

nav {
  background: var(--black);
  border-top: 1px solid #222;
  padding: 0 40px;
  display: flex; align-items: center;
  height: 40px; gap: 32px;
}
nav a { color: var(--white); font-size: 13px; font-weight: 500; padding: 4px 0; transition: color 0.15s; }
nav a:hover { color: var(--red); }
nav a.active { color: var(--red); border-bottom: 2px solid var(--red); }

.page-header {
  padding: 28px 40px 16px;
  display: flex; align-items: flex-start; justify-content: space-between;
}

.page-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 35px;
  font-weight: 700; color: var(--black); margin-bottom: 6px;
  letter-spacing: -2px;
}
.page-title::before {
  content: ''; display: block;
  width: 5px; height: 36px;
  background: var(--red); border-radius: 2px;
}
.page-subtitle { color: var(--gray-text); font-size: 15px; margin-left: 17px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-text); margin-top: 8px; }
.breadcrumb span { color: var(--black); font-weight: 500; }
.breadcrumb-sep { color: #bbb; }

.categories-home { padding: 16px 40px 40px; display: flex; flex-direction: column; gap: 40px; }
.categories-home-loading { text-align: center; padding: 80px 0; color: #999; font-size: 15px; }

.category-row-title-wrap {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; margin-bottom: 8px; cursor: pointer; width: fit-content;
}
.category-row-bar { width: 26px; height: 3px; background: var(--red); border-radius: 2px; flex-shrink: 0; }
.category-row-title {
  font-size: 25px; font-weight: 700; color: var(--black);
  text-transform: uppercase; letter-spacing: 0.3px; transition: color 0.15s;
}
.category-row-title-wrap:hover .category-row-title { color: var(--red); }

.category-row-body { display: flex; align-items: stretch; gap: 20px; }
.category-row-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.category-row-arrow {
  flex-shrink: 0; align-self: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(10, 10, 10, 0.12); color: var(--black);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.category-row-arrow:hover { background: rgba(10, 10, 10, 0.22); }

.products-section { padding: 16px 40px 40px; }
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.product-card {
  background: var(--white); border: 1px solid var(--gray-mid);
  border-radius: 6px; overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow 0.2s;
}
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); }

.product-img-wrap { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #111; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.badge-oferta {
  position: absolute; top: 8px; left: 8px;
  background: var(--red); color: var(--white);
  font-size: 12px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; padding: 3px 7px; border-radius: 3px;
}
.badge-type {
  position: absolute; top: 8px; right: 8px;
  background: var(--black); color: var(--white);
  font-size: 12px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; padding: 3px 7px; border-radius: 3px;
}

.product-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.product-name { font-size: 25px; font-weight: 600; color: var(--black); line-height: 1.3; font-weight: bold;}

.product-price { font-size: 16px; font-weight: 700; color: var(--black); }

.product-discount {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--gray-text); flex-wrap: wrap;
  background: #EFEFEF;
  border-radius: 4px;
  padding: 5px 8px;
}
.discount-price { color: var(--green); font-weight: 600; font-size: 12px; }
.discount-icon { display: inline-flex; align-items: center; gap: 3px; }
.discount-icon::before {
  content: ''; display: inline-block; width: 14px; height: 14px;
  background: var(--green); border-radius: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8l4 4 8-8' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain; flex-shrink: 0;
}

.btn-carrito {
  margin-top: auto; background: var(--red); color: var(--white);
  border: none; width: 100%; height: 36px; border-radius: 4px;
  font-family: var(--font); font-size: 16px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 6px; letter-spacing: 0.2px; transition: background 0.15s;
}
.btn-carrito:hover { background: #c50500; }

.pagination-wrap { padding: 32px 40px 40px; display: flex; align-items: center; justify-content: space-between; }
.showing-text { font-size: 12px; color: var(--gray-text); }
.pagination { display: flex; align-items: center; gap: 4px; }
.pagination button {
  width: 32px; height: 32px; border: 1px solid var(--gray-mid);
  background: var(--white); border-radius: 4px; cursor: pointer;
  font-family: var(--font); font-size: 13px; color: var(--black);
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.pagination button:hover { border-color: var(--red); color: var(--red); }
.pagination button.active { background: var(--red); border-color: var(--red); color: var(--white); font-weight: 700; }
.pagination button.arrow { font-size: 16px; }
.per-page { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray-text); }
.per-page select {
  border: 1px solid var(--gray-mid); border-radius: 4px;
  padding: 4px 8px; font-family: var(--font); font-size: 12px;
  color: var(--black); cursor: pointer; outline: none;
}

footer { background: var(--black); color: var(--white); padding: 48px 40px 24px; }
.footer-top {
  display: grid; grid-template-columns: 400px 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 40px; border-bottom: 1px solid #222;
}

.footer-logo-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
}

.footer-social-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 12px;
  margin-top: 16px;
}
.footer-social a {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #ccc; margin-bottom: 7px;
}
.footer-social a:hover { color: var(--red); }
.social-icon {
  width: 20px; height: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.social-icon svg { width: 16px; height: 16px; fill: currentColor; }

.footer-col h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--white); margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--red); display: inline-block;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { color: #ccc; font-size: 12px; display: flex; align-items: center; gap: 6px; transition: color 0.15s; }
.footer-col ul li a:hover { color: var(--red); }
.footer-col ul li a::before { content: '›'; color: var(--red); font-size: 14px; }

.contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.contact-icon {
  width: 32px; height: 32px; background: var(--black);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.contact-icon svg { width: 15px; height: 15px; fill: white; }
.contact-text {}
.contact-text strong { font-size: 13px; font-weight: 700; color: var(--white); display: block; margin-bottom: 2px; }
.contact-text span { font-size: 12px; color: #aaa; }

.payment-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-tag {
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 12px; color: #ccc;
  background: transparent; transition: border-color 0.15s, color 0.15s;
  cursor: default;
}
.payment-tag:hover { border-color: #888; color: var(--white); }

.footer-bottom { padding-top: 20px; font-size: 11px; color: #555; text-align: left; }

.subcategory-bar {
  background: #f7f7f7;
  border-bottom: 1px solid #e4e4e4;
  padding: 10px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.subcat-pill {
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  padding: 5px 15px;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  background: var(--white);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  line-height: 1;
}
.subcat-pill:hover { border-color: var(--red); color: var(--red); }
.subcat-pill.active { background: var(--red); color: var(--white); border-color: var(--red); }

.sort-bar {
  background: var(--white);
  border-bottom: 1px solid #e4e4e4;
  padding: 10px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sort-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-text);
  margin-right: 2px;
}

.sort-pill {
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  padding: 5px 15px;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  background: var(--white);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  line-height: 1;
}
.sort-pill:hover { border-color: var(--red); color: var(--red); }
.sort-pill.active { background: var(--red); color: var(--white); border-color: var(--red); }

#oferta-banner {
  background: linear-gradient(135deg, #1a0000 0%, #2d0000 40%, #1a0000 100%);
  border-bottom: 2px solid var(--red);
  padding: 14px 40px;
  animation: ofertaBannerIn 0.3s ease;
}
@keyframes ofertaBannerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0);    }
}
.oferta-banner-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.oferta-banner-title {
  display: flex; align-items: center; gap: 10px;
}
.oferta-banner-icon { font-size: 20px; line-height: 1; }
.oferta-banner-nombre {
  color: var(--white); font-size: 18px; font-weight: 700;
  letter-spacing: -0.3px;
}
.oferta-banner-badge {
  background: var(--red); color: var(--white);
  font-size: 12px; font-weight: 700; padding: 3px 9px;
  border-radius: 20px; letter-spacing: 0.5px; text-transform: uppercase;
}
.oferta-banner-countdown {
  display: flex; align-items: center; gap: 10px;
  color: #ccc; font-size: 13px;
}
.oferta-countdown-label { font-weight: 500; color: #aaa; }
.oferta-countdown-time {
  font-size: 16px; font-weight: 700; color: var(--white);
  font-variant-numeric: tabular-nums; letter-spacing: 1px;
  background: rgba(225,6,0,0.25); border: 1px solid rgba(225,6,0,0.4);
  padding: 4px 12px; border-radius: 4px;
}

.product-card { cursor: pointer; }

.btn-carrito.in-cart {
  background: var(--green);
}
.btn-carrito.in-cart:hover {
  background: #236b43;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .page-header { padding: 24px 24px 16px; }
  .products-section { padding: 16px 24px 32px; }
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .pagination-wrap { padding: 24px 24px 32px; flex-wrap: wrap; gap: 12px; }
  .subcategory-bar, .sort-bar, #oferta-banner { padding-left: 24px; padding-right: 24px; }

  .categories-home { padding: 16px 24px 32px; gap: 32px; }
  .category-row-body { gap: 12px; }
  .category-row-grid { gap: 14px; }
  .category-row-arrow { display: none; }
}

@media (max-width: 767px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 16px 12px;
  }
  .page-title { font-size: 24px; letter-spacing: -1px; }
  .page-title::before { height: 26px; }
  .page-subtitle { font-size: 13px; margin-left: 13px; }
  .breadcrumb { flex-wrap: wrap; }

  .products-section { padding: 12px 16px 32px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-name { font-size: 15px; }
  .btn-carrito { height: 44px; font-size: 13px; }

  .categories-home { padding: 12px 16px 32px; gap: 28px; }
  .category-row-title { font-size: 15px; }
  .category-row-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .category-row-arrow { display: none; }

  .pagination-wrap { flex-direction: column; align-items: stretch; gap: 14px; padding: 24px 16px 32px; }
  .pagination { justify-content: center; flex-wrap: wrap; }
  .pagination button { width: 44px; height: 44px; }
  .per-page { justify-content: center; }
  .per-page select { min-height: 44px; }

  .subcategory-bar, .sort-bar { padding: 10px 16px; }
  .subcat-pill, .sort-pill { min-height: 44px; display: inline-flex; align-items: center; }
  #oferta-banner { padding: 12px 16px; }
  .oferta-banner-nombre { font-size: 15px; }
}
