/* Base layout */
body {
  background: #f8f9fa;
}

.footer {
  background: #111;
  color: #bbb;
  padding: 40px 0;
}

/* Navigation */
.navbar-brand {
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 auto;
  min-width: 0;
}

.navbar-brand-logo-wrap {
  width: 64px;          /* tamaño ideal para navbar e-commerce */
  height: 56px;         /* un poco más bajo para mantener proporción */
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.3rem;      /* espacio más medido */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.45rem 1.4rem rgba(0, 0, 0, 0.06);
  border: 1px solid #eceff1;
  flex-shrink: 0;
}

.navbar-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.navbar-brand-text {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111;
  display: block;
  line-height: 1.1;
}

.navbar-actions {
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-filter-toggle {
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .btn-filter-toggle {
    padding: 0.3rem 0.65rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .navbar-actions {
    width: 100%;
    margin-top: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .navbar-brand {
    gap: 0.5rem;
  }

  .navbar-brand-logo-wrap {
    width: 56px;
    height: 50px;
    padding: 0.25rem;
  }

  .navbar-brand-text {
    font-size: 1.05rem;
    letter-spacing: 0.05em;
  }
}

.nav-link {
  font-weight: 500;
}

.dropdown-mega {
  position: static;
}

.dropdown-menu-mega {
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  border-radius: 0;
  border-top: none;
}

/* Checkout */
.summary-item {
  border: 1px solid #e7eaef;
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #fff;
}

.summary-item img {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

/* Catalog page */
.catalog-page a {
  text-decoration: none;
}

.catalog-page section {
  scroll-margin-top: 120px;
}

.catalog-page .hero {
  background: #fff;
  padding: 80px 0;
}

.catalog-main {
  padding-top: 4.5rem;
}

@media (max-width: 767.98px) {
  .catalog-main {
    padding-top: 6.25rem;
  }
}

.catalog-page .hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
}

.catalog-page .hero-banner {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 16 / 6.5; /* equilibrio entre altura real y look ecommerce */
  width: 100%;
  max-height: 360px;
  box-shadow: 0 1rem 2.5rem rgba(13, 110, 253, 0.08);
}
.catalog-page .hero-banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: left center; /* enfoca el texto Egarian, no el zapato */
}

@media (max-width: 768px) {
  .catalog-page .hero-banner {
    aspect-ratio: 16 / 8;
    max-height: 340px;
  }
}

@media (max-width: 480px) {
  .catalog-page .hero-banner {
    aspect-ratio: 16 / 9.5;
    max-height: 320px;
  }
}


.catalog-page .product-card {
  border-radius: 0.75rem;
  overflow: hidden;
}

.catalog-page .product-card img {
  width: 100%;
  height: 300px;            /* ✔ card más baja y compacta */
  object-fit: contain;      /* ✔ nunca recorta */
  background: #fff;       /* ✔ estética estilo ML */
  padding: 0.25rem;         /* ✔ margen pequeño, no gigante */
}

.catalog-page .product-card .price {
  font-weight: 700;
  text-align: right;
}

.catalog-page .variant-groups .btn {
  margin: 0.05rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.8rem;
  line-height: 1.1;
  min-width: 2.1rem;
}

.catalog-page .variant-groups .btn.active {
  background-color: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

.catalog-page .variant-color-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.catalog-page .variant-color-swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 0.2rem;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background-color: var(--variant-color, transparent);
  flex-shrink: 0;
}

.catalog-page .category-card img {
  height: 210px;
  object-fit: cover;
}

/* Product detail */
.detail-gallery {
  display: flex;
  gap: 1rem;
}

.detail-thumbs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
}

.detail-thumb-btn {
  border: 2px solid transparent;
  border-radius: 0.5rem;
  padding: 0;
  background: transparent;
  flex: 0 0 auto;
}

.detail-thumb-btn.active {
  border-color: #0d6efd;
}

.detail-thumb-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.detail-variant-groups .btn {
  margin: 0.05rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  line-height: 1.1;
  min-width: 2.2rem;
}

.detail-variant-groups .btn.active {
  background-color: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

@media (max-width: 767.98px) {
  .detail-gallery {
    flex-direction: column;
  }

  .detail-thumbs {
    flex-direction: row;
    max-height: none;
    overflow-y: visible;
    overflow-x: auto;
    width: 100%;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .detail-thumb-img {
    width: 60px;
    height: 60px;
  }
}

.badge-spec {
  background: #f1f3f5;
  color: #111;
}

/* Shared cart widgets */
.cart-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1080;
  max-width: 320px;
  width: calc(100% - 40px);
  padding: 0;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 360px;
  max-width: 90%;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  z-index: 1200;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  right: 0;
}

#cartDrawerOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1190;
  display: none;
}

#cartDrawerOverlay.show {
  display: block;
}

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
}

.cart-mini-item {
  border-bottom: 1px solid #f1f3f5;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.cart-mini-item:last-child {
  border-bottom: none;
}

.cart-mini-thumb {
  width: 60px;
  height: 60px;
  border-radius: 0.5rem;
  object-fit: cover;
}

.filter-active-count {
  font-size: 0.65rem;
  min-width: 1.25rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
}

.filter-drawer {
  position: fixed;
  top: 0;
  left: -420px;
  right: auto;
  width: 360px;
  max-width: 90%;
  height: 100%;
  background: #fff;
  border-right: 1px solid #e7eaef;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
  transition: left 0.3s ease;
  z-index: 1185;
  display: flex;
  flex-direction: column;
}

.filter-drawer.open {
  left: 0;
}

.filter-drawer-header {
  padding: 1.25rem 1.25rem 0.5rem;
  border-bottom: 1px solid #f1f3f5;
}

.filter-drawer-body {
  padding: 1.25rem;
  flex: 1;
  overflow-y: auto;
}

.filter-drawer-search {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 0.1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #fff 80%, rgba(255, 255, 255, 0));
  border-bottom: 1px solid #f1f3f5;
}

.filter-search-group {
  border: 1px solid #e7eaef;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 0.55rem 1.2rem rgba(0, 0, 0, 0.05);
}

.filter-search-group .form-control {
  border: none;
  box-shadow: none;
  padding-left: 0.75rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  font-size: 0.9rem;
}

.filter-search-group .form-control:focus {
  box-shadow: none;
}

.filter-search-button {
  border-radius: 0;
  padding-inline: 0.65rem;
  padding-block: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.filter-drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #f1f3f5;
  background: #fff;
}

.filter-action-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #e7eaef;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  background: #fff;
  box-shadow: 0 -0.2rem 0.85rem rgba(0, 0, 0, 0.08);
}

.filter-action-bar .btn {
  border-radius: 999px;
  padding: 0.45rem 0.55rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.filter-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1180;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.filter-drawer-overlay.show {
  opacity: 1;
  visibility: visible;
}

.filter-category-group {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f3f5;
}

.filter-category-group:last-child {
  border-bottom: none;
}

.filter-subcategory-list {
  margin: 0.25rem 0 0.25rem 1.5rem;
}

.filter-subcategory-list .form-check {
  margin-bottom: 0.25rem;
}

.filter-subcategory-list .form-check-label {
  font-size: 0.9rem;
  color: #495057;
}

body.filter-drawer-open {
  overflow: hidden;
}

@media (max-width: 576px) {
  .filter-drawer {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .filter-drawer-body {
    padding-bottom: 5.5rem;
  }

  .filter-drawer-footer {
    position: sticky;
    bottom: 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  }

  .filter-action-bar {
    padding: 0.55rem 0.75rem;
    border-radius: 1.25rem;
    gap: 0.4rem;
  }

  .filter-action-bar .btn {
    padding: 0.5rem 0.5rem;
    font-size: 0.88rem;
  }
}

/* Error page */
body.error-page {
  background: linear-gradient(135deg, #f8f9fa, #e3e7ef);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.error-page .error-wrap {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 420px;
  text-align: center;
}

.error-page .error-icon {
  font-size: 4rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

.error-page h1 {
  font-size: 1.8rem;
  color: #343a40;
  font-weight: 700;
}

.error-page p {
  font-size: 1rem;
  color: #555;
}

.error-page .btn-home {
  margin-top: 1.5rem;
  padding: 0.6rem 1.5rem;
}

.error-page .quote {
  font-size: 0.9rem;
  color: #777;
  margin-top: 1.2rem;
  font-style: italic;
}


/* --- PRODUCT DETAIL MAIN IMAGE FIX (Egarian) --- */
#detailMainImg {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background: #f5f5f5;
  padding: 0.5rem;
  border-radius: 0.75rem;
}
