/* ========================
   CATEGORIAS PAGE
======================== */
.page-wrapper {
  margin-top: 72px;
  min-height: calc(100vh - 72px);
  background: var(--primary);
}

/* BREADCRUMB */
.breadcrumb {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  margin-top: 0; /* ← quitamos el margin-top que tenía */
}
.breadcrumb-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-muted);
}
.breadcrumb-inner a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb-inner a:hover { color: var(--accent); }
.breadcrumb-inner i { font-size: 0.65rem; }
.breadcrumb-inner span { color: var(--accent); font-weight: 500; }

/* PAGE HERO */
.page-hero {
  background: linear-gradient(135deg, var(--surface) 0%, #2a0a0a 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(192,39,45,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner {
  max-width: 1200px; margin: 0 auto;
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.page-hero h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2.2rem; font-weight: 700;
  color: var(--text);
}
.page-hero h1 span { color: var(--accent); }
.page-hero p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.page-hero-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.ph-stat {
  text-align: center;
  background: rgba(192,39,45,0.08);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 1.25rem;
}
.ph-stat strong {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--accent); display: block;
}
.ph-stat span { font-size: 0.7rem; color: var(--text-muted); }

/* CONTROLS */
.cat-controls {
  max-width: 1200px; margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
}
.cat-search { flex: 1; min-width: 200px; position: relative; }
.cat-search input {
  width: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.55rem 1rem 0.55rem 2.5rem;
  color: #1a1a1a;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cat-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(192,39,45,0.1); }
.cat-search i {
  position: absolute; left: 0.75rem; top: 50%;
  transform: translateY(-50%);
  color: #999; font-size: 0.875rem;
}
.sort-select {
  background: white; border: 1px solid #ddd;
  border-radius: 8px; padding: 0.55rem 1rem;
  color: #1a1a1a; font-size: 0.85rem;
  outline: none; cursor: pointer; transition: border-color 0.2s;
}
.sort-select:focus { border-color: var(--accent); }
.view-btns { display: flex; gap: 0.35rem; }
.view-btn {
  width: 36px; height: 36px;
  border: 1px solid #ddd; background: white;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #999; font-size: 0.875rem; transition: all 0.2s;
}
.view-btn.active, .view-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(192,39,45,0.05);
}

/* LAYOUT */
.cat-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem 4rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* SIDEBAR */
.filter-sidebar {
  background: white; border: 1px solid #e0e0e0;
  border-radius: 14px; overflow: hidden;
  position: sticky; top: 80px;
}
.filter-sidebar-header {
  background: var(--surface); padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.filter-sidebar-header h3 {
  font-size: 0.875rem; font-weight: 600;
  color: var(--text); display: flex; align-items: center; gap: 0.5rem;
}
.filter-sidebar-header h3 i { color: var(--accent); }
.clear-filters {
  font-size: 0.72rem; color: var(--accent);
  background: none; border: none; cursor: pointer; font-weight: 500; transition: opacity 0.2s;
}
.clear-filters:hover { opacity: 0.7; }
.filter-group { padding: 1rem 1.25rem; border-bottom: 1px solid #f0f0f0; }
.filter-group:last-child { border-bottom: none; }
.filter-group-title {
  font-size: 0.78rem; font-weight: 700;
  color: #1a1a1a; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 0.75rem;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
}
.filter-group-title i { font-size: 0.65rem; color: #999; transition: transform 0.2s; }
.filter-option { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; cursor: pointer; }
.filter-option input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.filter-option label {
  font-size: 0.82rem; color: #444; cursor: pointer; flex: 1;
  display: flex; align-items: center; justify-content: space-between;
}
.filter-option label span {
  font-size: 0.72rem; color: #999;
  background: #f4f4f4; padding: 0.1rem 0.45rem; border-radius: 10px;
}
.filter-option:hover label { color: var(--accent); }
.price-range { margin-top: 0.5rem; }
.price-range input[type="range"] { width: 100%; accent-color: var(--accent); }
.price-range-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: #666; margin-top: 0.25rem; }

/* PRODUCTS AREA */
.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.5rem;
}
.results-count { font-size: 0.85rem; color: #555; }
.results-count strong { color: #1a1a1a; }
.active-filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(192,39,45,0.08); border: 1px solid rgba(192,39,45,0.2);
  color: var(--accent); font-size: 0.72rem; font-weight: 500;
  padding: 0.2rem 0.6rem; border-radius: 20px; cursor: pointer;
}
.filter-tag:hover { background: rgba(192,39,45,0.15); }

/* PRODUCTS GRID */
.products-grid-light {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.1rem;
}
.product-card-light {
  background: white; border: 1px solid #e8e8e8;
  border-radius: 14px; overflow: hidden;
  transition: all 0.3s; cursor: pointer;
}
.product-card-light:hover {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(192,39,45,0.12);
}
.product-img-light {
  width: 100%; height: 220px;
  background: #f8f8f8;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.product-img-light i { font-size: 3rem; color: var(--accent); opacity: 0.7; }
.product-badges-light { position: absolute; top: 0.6rem; left: 0.6rem; display: flex; gap: 0.3rem; z-index: 1; }
.product-wish-light {
  position: absolute; top: 0.6rem; right: 0.6rem;
  width: 26px; height: 26px; background: white; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 0.75rem; transition: color 0.2s; cursor: pointer; border: 1px solid #eee;
}
.product-wish-light:hover { color: #ff6b8a; }
.product-body-light { padding: 0.875rem; }
.product-cat-light { font-size: 0.68rem; color: var(--accent); font-weight: 600; margin-bottom: 0.2rem; text-transform: uppercase; }
.product-name-light { font-size: 0.84rem; font-weight: 600; color: #1a1a1a; line-height: 1.35; margin-bottom: 0.4rem; }
.product-rating-light { display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.6rem; }
.stars-light { color: var(--warning); font-size: 0.62rem; }
.rating-count-light { font-size: 0.68rem; color: #999; }
.product-price-light { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.65rem; flex-wrap: wrap; }
.price-current-light { font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.price-old-light { font-size: 0.78rem; color: #bbb; text-decoration: line-through; }
.price-discount-light { font-size: 0.68rem; background: rgba(192,39,45,0.1); color: var(--accent); padding: 0.12rem 0.4rem; border-radius: 4px; font-weight: 600; }
.btn-add-light {
  width: 100%; background: linear-gradient(135deg, var(--accent2), var(--accent));
  border: none; border-radius: 8px; color: white; font-size: 0.78rem; font-weight: 700;
  padding: 0.55rem; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.btn-add-light:hover { box-shadow: 0 4px 15px rgba(192,39,45,0.35); transform: translateY(-1px); }
.btn-add-light.added { background: linear-gradient(135deg, #00aa55, #00cc66); }

/* LIST VIEW */
.products-grid-light.list-view { grid-template-columns: 1fr; }
.products-grid-light.list-view .product-card-light { display: flex; flex-direction: row; min-height: 160px; max-height: 200px; }
.products-grid-light.list-view .product-img-light { width: 200px; height: auto; flex-shrink: 0; }
.products-grid-light.list-view .product-body-light { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 1.25rem 1.5rem; }
.products-grid-light.list-view .product-name-light { font-size: .95rem; }
.products-grid-light.list-view .price-current-light { font-size: 1.4rem; }
.products-grid-light.list-view .btn-add-light { max-width: 220px; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 4rem 2rem; color: #999; }
.empty-state i { font-size: 3rem; color: var(--accent); opacity: 0.3; display: block; margin-bottom: 1rem; }
.empty-state h3 { color: #555; margin-bottom: 0.5rem; font-size: 1rem; }
.empty-state p { font-size: 0.85rem; }

/* PAGINATION */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-top: 2rem; }
.page-btn {
  width: 36px; height: 36px; border: 1px solid #ddd;
  background: white; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.82rem; color: #555; transition: all 0.2s;
}
.page-btn:hover, .page-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(192,39,45,0.05); }
.page-btn.active { font-weight: 700; }

/* ========================
   BRANDS & BENEFITS
======================== */
.brands-section { padding: 3.5rem 1.5rem 4rem; max-width: 1300px; margin: 0 auto; }
.brands-header { text-align: center; margin-bottom: 2.5rem; }
.brands-header h2 { font-family: 'Rajdhani', sans-serif; font-size: 1.9rem; font-weight: 700; color: #1e293b; }
.brands-header h2 span { color: var(--accent); }
.brands-header p { color: #64748b; font-size: 0.9rem; margin-top: 0.3rem; }
.brands-divider { width: 50px; height: 3px; background: var(--accent); border-radius: 2px; margin: 0.9rem auto 0; opacity: 0.7; }
.brands-track-wrapper {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  margin-bottom: 3rem;
}
.brands-track { display: flex; gap: 1rem; width: max-content; animation: brandsScroll 28s linear infinite; }
.brands-track:hover { animation-play-state: paused; }
@keyframes brandsScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.brand-logo-card {
  flex-shrink: 0; width: 180px; height: 100px; background: #fff;
  border: 1.5px solid #e2e8f0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; padding: 0 1.5rem;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.brand-logo-card:hover { border-color: var(--accent); box-shadow: 0 4px 18px rgba(192,39,45,.12); transform: translateY(-3px); }
.brand-logo-card img { max-width: 100%; max-height: 58px; object-fit: contain; opacity: 1; transition: transform .3s; }
.brand-logo-card:hover img { transform: scale(1.05); }

.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.benefit-card {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 16px;
  padding: 2rem 1.4rem; text-align: center;
  transition: border-color .3s, box-shadow .3s, transform .3s;
  opacity: 0; transform: translateY(24px);
}
.benefit-card.visible { opacity: 1; transform: translateY(0); transition: opacity .55s ease, transform .55s ease, border-color .3s, box-shadow .3s; }
.benefit-card:hover { border-color: var(--accent); box-shadow: 0 8px 28px rgba(192,39,45,.12); transform: translateY(-4px); }
.benefit-icon {
  width: 52px; height: 52px; background: rgba(192,39,45,.08); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; font-size: 1.3rem; color: var(--accent) !important; transition: background .3s, transform .3s;
}
.benefit-card:hover .benefit-icon { background: var(--accent); color: #fff !important; transform: scale(1.1) rotate(-4deg); }
.benefit-card h4 { font-family: 'Rajdhani', sans-serif; font-size: 1.05rem; font-weight: 700; color: #1e293b !important; margin-bottom: 0.4rem; }
.benefit-card p { font-size: 0.82rem; color: #475569 !important; line-height: 1.5; }

/* ========================
   FOOTER OVERRIDE
======================== */
.footer { background: #1a1a1a !important; }
.footer-grid { display: grid !important; grid-template-columns: 2fr 1fr 1fr 1fr !important; }
.footer * { color: #f0f0f0 !important; }
.footer .footer-links a { color: #cccccc !important; }
.footer .footer-links a:hover { color: var(--accent) !important; }
.footer .pay-icon { color: #9a9a9a !important; }
.footer .social-btn { color: inherit !important; }
.footer-brand, .footer-col { opacity: 0; transform: translateY(20px); }

/* MOBILE NAV */
.nav-mobile-avatar {
  display: none; width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 50%; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; color: #fff; cursor: pointer; flex-shrink: 0;
}
.nav-user-desktop { display: flex; align-items: center; gap: .5rem; }

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 1024px) {
  .cat-layout { grid-template-columns: 220px 1fr; }
  .products-grid-light { grid-template-columns: repeat(3, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .cat-layout { grid-template-columns: 1fr; padding: 0 1.25rem 3rem; }
  .filter-sidebar { position: static; }
  .page-hero-stats { display: none; }
  .products-grid-light { grid-template-columns: repeat(2, 1fr); }
  .nav-mobile-avatar { display: flex !important; }
  .nav-user-desktop { display: none !important; }
  #btn-ingresar { display: none !important; }
  .page-wrapper { margin-top: 72px; }
  .breadcrumb { margin-top: 0; }
}

@media (max-width: 768px) {
  .page-hero { padding: 1.75rem 1.25rem; }
  .page-hero h1 { font-size: 1.7rem; }
  .cat-controls { padding: 1rem 1.25rem; gap: .6rem; }
  .sort-select { font-size: .78rem; padding: .5rem .75rem; }
  .benefit-card { opacity: 1 !important; transform: translateY(0) !important; }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .brands-section { padding: 2rem 1rem 3rem; }
  .brand-logo-card { width: 140px; height: 80px; }
  /* List view en móvil — imagen más pequeña */
  .products-grid-light.list-view .product-img-light { width: 120px; }
  .products-grid-light.list-view .product-card-light { max-height: none; }
}

@media (max-width: 640px) {
  .cat-controls { padding: 1rem; flex-wrap: wrap; }
  .cat-search { min-width: 100%; order: -1; }
  .sort-select { flex: 1; }
  .cat-layout { padding: 0 1rem 3rem; }
  .products-grid-light { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .product-img-light { height: 160px; }
  .product-body-light { padding: .65rem; }
  .product-name-light { font-size: .78rem; }
  .price-current-light { font-size: 1rem; }
  .btn-add-light { font-size: .72rem; padding: .5rem; }
  .breadcrumb { padding: .65rem 1rem; }
}

@media (max-width: 480px) {
  .page-hero { padding: 1.25rem 1rem; }
  .page-hero h1 { font-size: 1.5rem; }
  .benefits-grid { grid-template-columns: 1fr; }
  .products-grid-light.list-view .product-card-light { flex-direction: column; max-height: none; }
  .products-grid-light.list-view .product-img-light { width: 100%; height: 180px; }
  .products-grid-light.list-view .btn-add-light { max-width: 100%; }
}

@media (max-width: 360px) {
  .products-grid-light { grid-template-columns: 1fr; }
  .product-img-light { height: 200px; }
  .page-hero h1 { font-size: 1.3rem; }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
    padding: 2rem 1.25rem !important;
  }
  .footer-brand {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
  .footer-brand {
    grid-column: 1 !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: .75rem !important;
    padding: 1rem !important;
  }
  .footer-bottom p {
    font-size: .7rem !important;
    line-height: 1.5 !important;
  }
  .payment-icons {
    justify-content: center !important;
  }
}