:root {
  --navy: #010d35;
  --blue: #0075ff;
  --orange: #fe951c;
  --soft-bg: #f1f5fb;
}

body {
  background: #eef3f9;
  padding-top: 90px;
}

/* NAVBAR */
.custom-navbar {
  background: white;
  padding: 20px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.nav-link {
  font-weight: 500;
  color: #1e1e1e !important;
}

.active-link {
  color: var(--blue) !important;
  font-weight: 600;
}

.nav-icon {
  font-size: 20px;
  color: #1e1e1e;
}

.mobile-page-title {
  font-weight: 600;
  font-size: 18px;
}

/* HERO */
.store-hero {
  height: 50vh;
  background:
    linear-gradient(rgba(1, 13, 53, 0.7), rgba(0, 117, 255, 0.6)),
    url("https://images.unsplash.com/photo-1517836357463-d25dfeac3438");
  background-size: cover;
  background-position: center;
}

/* CATEGORÍAS */
.category-section {
  padding: 40px 0;
}

.category-btn {
  border: none;
  background: white;
  padding: 10px 20px;
  border-radius: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
  background: var(--blue);
  color: white;
}

/* PRODUCTOS */
.products-section {
  position: relative;
  overflow: hidden;
  padding: 18px 0 60px;
}

.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  transition: 0.4s ease;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.product-img {
  height: 220px;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.1);
}

.product-info {
  padding: 20px;
  text-align: center;
}

.price {
  font-weight: 700;
  color: var(--blue);
  margin: 10px 0;
  font-size: 18px;
}

.add-btn {
  background: var(--orange);
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  color: white;
  transition: 0.3s;
}

.add-btn:hover {
  background: #e67f00;
}

/* ================= FOOTER ================= */
.footer-section {
  background: var(--navy);
  color: white;
  padding: 80px 0 30px;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 15px;
}

.footer-subtitle {
  font-weight: 600;
  margin-bottom: 15px;
  position: relative;
}

.footer-subtitle::after {
  content: "";
  width: 40px;
  height: 3px;
  background: var(--blue);
  position: absolute;
  left: 0;
  bottom: -5px;
}

.footer-text {
  color: #ccc;
  font-size: 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: 0.3s;
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

/* Redes sociales */
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  margin-right: 8px;
  transition: 0.3s;
}

.footer-social a:hover {
  background: var(--blue);
  transform: translateY(-3px);
}

/* Parte inferior */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 14px;
  color: #aaa;
}

/* ANIMACIÃ“N */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .store-hero {
    height: 40vh;
  }

  .product-img {
    height: 180px;
  }
}

.product-desc {
  font-size: 14px;
  color: #666;
  margin: 10px 0;
  min-height: 50px;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.details-btn,
.store-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--orange);
  padding: 10px 20px;
  border-radius: 25px;
  color: white;
  text-decoration: none;
  transition: 0.3s ease;
  font-weight: 500;
}

.details-btn:hover,
.store-cart-btn:hover {
  background: #e67f00;
  color: white;
}

.store-cart-btn {
  border: 0;
  background: linear-gradient(90deg, #1477ff 0%, #16c7d9 100%);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(20, 119, 255, 0.2);
}

.store-cart-btn:hover {
  background: linear-gradient(90deg, #0f6ff2 0%, #11bfd0 100%);
  box-shadow: 0 16px 30px rgba(20, 119, 255, 0.28);
  transform: translateY(-2px);
}

/* BUSCADOR */

.search-box {
  max-width: 440px;
  margin: 0 auto 16px;
  padding: 0 14px;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.search-box:focus-within {
  outline: 2px solid var(--bs-primary-text-emphasis);
  outline-offset: 2px;
}

.search-box i {
  color: var(--bs-primary-text-emphasis);
}

.search-input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  color: var(--bs-body-color);
  background: transparent;
}

.store-search-empty {
  margin: 0;
  text-align: center;
  color: var(--bs-body-color);
}

.product-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

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

.product-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  color: rgb(0, 0, 0);
  font-weight: 600;
  margin-bottom: 8px;
}

.product-desc {
  color: #373737;
  font-size: 14px;
  flex: 1;
}

.price {
  color: #0057f9;
  font-weight: bold;
  margin: 10px 0;
  font-size: 18px;
}

.details-btn,
.store-cart-btn {
  color: rgb(255, 255, 255);
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.cart-action-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 30px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.16));
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.product-card {
  width: 100%;
}

.apparel-card .product-img {
  display: block;
  flex: 0 0 auto;
  height: auto;
  aspect-ratio: 587 / 540;
  background: #1a1c20;
}

.apparel-card .product-img img {
  display: block;
  height: 100%;
  object-fit: contain;
}

.apparel-card .product-title {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.apparel-card .product-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr auto;
  align-items: center;
  gap: 4px 8px;
  padding: 10px 12px 6px;
  text-align: left;
}

.apparel-card .product-desc {
  grid-column: 1 / -1;
  align-self: start;
  min-height: 0;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.apparel-card .price {
  margin: 0;
  font-size: 1.0625rem;
}

.apparel-card .product-actions {
  margin: 0;
}

.products-section .apparel-card .details-btn {
  min-height: 40px;
  padding: 6px 9px;
  font-size: 0.8125rem;
}

.products-section .details-btn,
.products-section .store-cart-btn {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 12px;
  line-height: 1.25;
}

.products-section .details-btn {
  background: #12479f;
  box-shadow: 0 4px 12px rgba(5, 35, 92, 0.2);
  transition: background-color 160ms ease;
}

.products-section .details-btn:hover {
  background: #1955ba;
}

.products-section .details-btn:focus-visible,
.products-section .store-cart-btn:focus-visible {
  outline: 2px solid var(--bs-primary-text-emphasis);
  outline-offset: 3px;
}

.products-section .store-cart-btn {
  border-color: var(--bs-border-color);
  background: #075d71;
  box-shadow: none;
}

.products-section .store-cart-btn:enabled:hover {
  background: #087589;
}

.products-section .store-cart-btn:disabled {
  color: var(--bs-secondary-color) !important;
  background: transparent;
  box-shadow: none;
  cursor: default;
  transform: none;
}

.products-section .store-cart-btn:disabled i {
  color: inherit !important;
}

.apparel-card .price small {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .products-section.reveal,
  .products-section .product-card,
  .products-section .product-img img,
  .products-section .details-btn,
  .products-section .store-cart-btn {
    transition: none;
    transform: none;
  }

  .products-section .product-card:hover,
  .products-section .product-card:hover img {
    transform: none;
  }
}

.apparel-rating {
  grid-column: 1 / -1;
}

.apparel-rating-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0;
}

.apparel-rating [data-rating-average] {
  color: #9b5808;
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
}

.apparel-rating [role="group"] {
  display: flex;
  gap: 0;
}

.apparel-rating button {
  display: grid;
  width: clamp(25px, 2.2vw, 36px);
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.apparel-rating .bi-star-fill {
  color: #9b5808;
}

html[data-theme="dark"] .apparel-rating .bi-star-fill,
html[data-theme="dark"] .apparel-rating [data-rating-average] {
  color: #ffad48;
}

.apparel-rating button:hover,
.apparel-rating button:focus-visible {
  background: var(--bs-primary-bg-subtle);
}

.apparel-rating button:focus-visible {
  outline: 2px solid var(--bs-primary-text-emphasis);
  outline-offset: 1px;
}

.apparel-rating [role="status"] {
  margin: 0;
  font-size: 0.875rem;
}

.apparel-rating [role="status"]:empty {
  display: none;
}

@media (max-width: 575.98px) {
  .products-section {
    padding: 12px 0 32px;
  }

  .apparel-card .product-info {
    gap: 3px 4px;
    padding: 5px 6px 6px;
  }

  .apparel-card .product-title {
    font-size: 0.875rem;
  }

  .apparel-card .product-desc {
    font-size: 0.75rem;
  }

  .apparel-card .price {
    font-size: 0.875rem;
  }

  .products-section .apparel-card .details-btn {
    min-height: 32px;
    padding: 4px 6px;
    font-size: 0.75rem;
  }

  .apparel-rating [data-rating-average] {
    font-size: 0.6875rem;
  }

  .apparel-rating [role="group"] {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(120px, 75%);
  }

  .apparel-rating button {
    width: 100%;
    font-size: 0.875rem;
  }
}

.apparel-rating-dialog {
  width: min(384px, calc(100% - 32px));
  padding: clamp(20px, 6vw, 36px);
  border: 1px solid var(--bs-primary-border-subtle);
  border-radius: 24px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.apparel-rating-dialog::backdrop {
  background: rgba(4, 8, 15, 0.72);
  backdrop-filter: blur(5px);
}

.apparel-rating-lock {
  display: block;
  margin-bottom: 12px;
  font-size: 2.65rem;
}

.apparel-rating-dialog h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
  font-weight: 800;
}

.apparel-rating-dialog p {
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.apparel-rating-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.apparel-rating-dialog-actions .btn {
  min-width: 96px;
  min-height: 44px;
  padding: 9px 14px;
}

.apparel-rating-dialog-actions .btn-outline-secondary {
  color: var(--bs-body-color);
}
