/* =============================================================
   CATALOG.CSS — Futunet E-commerce Layout
   ============================================================= */

#servicios { background: var(--bg-secondary); }

/* ── E-Commerce Container ── */
.ecom-container {
  display: flex; flex-direction: column; gap: 24px;
}
.catalog-main-shell {
  padding-top: 28px;
  background: #fff;
}

/* ── Sidebar (Filtros) ── */
.ecom-sidebar {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  height: fit-content;
}
.sidebar-header {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.sidebar-header h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; margin: 0; }
.sidebar-header i { width: 20px; height: 20px; color: var(--brand); }

.categories-nav-vertical {
  display: flex; flex-direction: column; gap: 8px;
}

.cat-btn {
  display: block; width: 100%; text-align: left;
  padding: 11px 14px;
  background: transparent; border: none;
  font-family: 'Outfit', sans-serif;
  font-size: .92rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-radius: 12px; transition: var(--transition);
}
.cat-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.cat-btn.active {
  background: rgba(11,126,181,0.1);
  color: var(--brand); font-weight: 700;
  border-left: 3px solid var(--brand);
}

/* ── Main Area ── */
.ecom-main { flex: 1; }
.catalog-heading-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 280px;
  min-width: 0;
}
.catalog-section-header--top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.catalog-mobile-filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 12px 30px rgba(11, 126, 181, 0.08);
}
.catalog-mobile-filter-trigger:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-pale);
}

.catalog-section-header {
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding: 20px 22px 18px;
  border-radius: 20px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 14px 34px rgba(11, 126, 181, 0.06);
}
.cat-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.28rem; font-weight: 700;
  color: var(--text-primary);
}
.cat-desc { font-size: .9rem; color: var(--text-muted); margin-top: 4px; line-height: 1.65; }
.catalog-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding: 12px 14px 10px;
  border-radius: 16px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: var(--bg-secondary);
}
.catalog-context-bar__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.catalog-context-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(11,126,181,0.1);
  color: var(--brand);
  font-size: .79rem;
  font-weight: 700;
}
.catalog-context-pill--muted {
  background: #fff;
  color: var(--text-secondary);
  box-shadow: inset 0 0 0 1px rgba(156,163,175,0.15);
  color: var(--text-muted);
  font-weight: 600;
}
.catalog-reset-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.catalog-reset-trigger:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-pale);
}

/* ── Grid de productos (Mobile: 2 col) ── */
.products-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px;
}

/* ── Product Card E-commerce ── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: var(--spring);
  box-shadow: var(--shadow-sm);
  position: relative;
  touch-action: manipulation;
}
.product-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.175,.885,.32,1.275);
  z-index: 2;
}
.product-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-pale);
}
.product-card:hover::before { transform: scaleX(1); }
.product-card--service {
  border-color: rgba(11, 126, 181, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.product-card--service::before {
  background: linear-gradient(90deg, var(--brand), #00bfa6);
  transform: scaleX(1);
  opacity: .78;
}

.product-img-wrapper {
  position: relative; width: 100%; height: 150px;
  background: var(--bg-secondary); overflow: hidden;
}
.product-img-wrapper img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.product-card:hover .product-img-wrapper img { transform: scale(1.06); }

.product-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(255,255,255,0.92);
  color: var(--text-primary);
  font-size: .6rem; font-weight: 800;
  padding: 3px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  backdrop-filter: blur(4px);
  z-index: 5;
}

/* Availability Badge */
.product-available {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0, 214, 143, 0.9);
  color: #fff;
  font-size: .55rem; font-weight: 700;
  padding: 3px 8px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.8px;
  z-index: 5;
  display: flex; align-items: center; gap: 4px;
}
.product-available::before {
  content: '';
  width: 5px; height: 5px;
  background: #fff; border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(0.7); }
}

.product-info {
  padding: 14px;
  display: flex; flex-direction: column; flex: 1;
}
.product-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px; line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.product-price {
  font-weight: 700; color: var(--brand);
  font-size: 1.08rem; margin-bottom: 8px;
}
.product-desc {
  font-size: .82rem; color: var(--text-muted);
  line-height: 1.6; flex: 1; margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.product-view-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  font-family: 'Outfit', sans-serif;
  font-size: .88rem; font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  touch-action: manipulation;
}
.product-view-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-pale);
  transform: translateY(-1px);
}
.product-view-btn:active {
  transform: scale(0.97);
}
.product-view-btn svg { width: 14px; height: 14px; }
.product-add-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid rgba(10, 112, 162, 0.2);
  background: linear-gradient(135deg, rgba(10, 112, 162, 0.1), rgba(29, 161, 219, 0.05));
  color: var(--brand);
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 16px;
  font-family: 'Outfit', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(10, 112, 162, 0.06), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform .25s cubic-bezier(.175,.885,.32,1.275), box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.product-add-btn:hover {
  background: linear-gradient(135deg, rgba(10, 112, 162, 0.15), rgba(29, 161, 219, 0.1));
  border-color: rgba(10, 112, 162, 0.3);
  box-shadow: 0 14px 28px rgba(10, 112, 162, 0.12), inset 0 1px 0 rgba(255,255,255,0.9);
  transform: translateY(-2px);
}
.product-add-btn:active {
  transform: scale(0.96);
  box-shadow: 0 4px 10px rgba(10, 112, 162, 0.05);
}
.product-add-btn svg { width: 14px; height: 14px; }
.product-add-btn__icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: inset 0 0 0 1px rgba(11,126,181,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.product-add-btn__text {
  line-height: 1.05;
}

.product-add-container {
  width: 100%;
}
.inline-cart-control {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  border: 1px solid rgba(11,126,181,0.24);
  background: linear-gradient(135deg, rgba(11,126,181,0.12), rgba(27,163,224,0.05));
  min-height: 46px;
  border-radius: 16px;
  padding: 0 2px;
  box-shadow: 0 12px 24px rgba(11,126,181,0.08), inset 0 1px 0 rgba(255,255,255,0.74);
  width: 100%;
}
.inline-qty-btn {
  background: rgba(255,255,255,0.78); color: var(--brand); border: none;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  justify-self: center;
  border-radius: 12px;
  cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.inline-qty-btn:hover {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 8px 18px rgba(11,126,181,0.12);
  transform: translateY(-1px);
}
.inline-qty-btn svg { width: 16px; height: 16px; }
.inline-qty-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 6px;
}
.inline-qty-count {
  font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 800; color: var(--brand);
  line-height: 1;
}
.inline-qty-label {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #607086;
  white-space: nowrap;
}
.inline-add-btn {
  width: 100%;
}

/* ── 4. SUBCATEGORÍAS & GAVETAS (FOLDERS) ── */
.catalog-back-container {
  grid-column: 1 / -1; margin-bottom: 24px;
}
.catalog-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(229,231,235,0.95);
  padding: 10px 18px;
  border-radius: 14px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  color: var(--text-primary); cursor: pointer; transition: 0.2s ease, transform 0.2s ease;
  font-size: 0.95rem;
}
.catalog-back-btn:hover {
  transform: translateX(-2px);
}
.catalog-back-btn--spaced { margin-bottom: 12px; }

.folder-card {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px; text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; height: 180px; text-decoration: none;
}
.folder-card:hover {
  transform: translateY(-5px); box-shadow: var(--shadow-md);
  border-color: var(--brand);
}
.folder-icon {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0, 163, 224, 0.1); color: var(--brand);
  margin-bottom: 8px;
}
.folder-name {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary); margin: 0;
}
.folder-count {
  font-size: 0.85rem; color: var(--text-muted); font-weight: 500; margin: 0;
}

.subcategory-header {
  margin: 24px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center;
}
.subcategory-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.5px;
}
.subcategory-products-grid {
  display: contents; /* Inherits the parent grid Layout! */
}
.btn-wa-quote {
  background: linear-gradient(135deg, #25d366, #1fad53);
  color: #fff; width: 100%; justify-content: center;
  padding: 10px 16px; border-radius: 8px; border: none;
  font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; transition: var(--transition);
  font-family: 'Outfit', sans-serif; font-size: .9rem;
}
.btn-wa-quote:hover {
  background: #20bd5a; transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}
.btn-wa-quote i { width: 16px; height: 16px; }

/* ── Header página catálogo ── */
.catalog-page-header {
  padding-top: 90px; padding-bottom: 16px;
  background: linear-gradient(170deg, #f8fafe, #eef3fa);
  position: relative; overflow: hidden;
}
.catalog-page-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 55% 60% at 50% 30%, rgba(11,126,181,0.05), transparent 65%);
}
.catalog-page-header .container { position: relative; }
.catalog-page-header .section-title { font-size: 1.7rem; }
.catalog-page-header .section-sub { max-width: 620px; margin: 10px auto 0; font-size: .94rem; }

/* ── Active Filter Chip ── */
.active-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-pale); color: var(--brand);
  padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: .8rem; font-weight: 600;
  border: 1px solid rgba(11,126,181,0.15);
  margin-bottom: 16px;
}
.active-filter-chip svg { width: 14px; height: 14px; }

/* ── Brand Header (Level 2) ── */
.brand-header {
  grid-column: 1/-1;
  margin-top: 28px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}
.brand-header-tag {
  background: var(--bg-secondary);
  padding: 6px 16px; border-radius: 6px;
  font-weight: 700; color: var(--text-muted); font-size: .9rem;
}
.brand-header-tag span { color: var(--brand); }

/* ── Catalog Section Inner Header ── */
.catalog-inner-header {
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 18px 40px rgba(11,126,181,0.08);
}
.catalog-inner-header h2 {
  margin-bottom: 8px;
}
.catalog-inner-header-border {
  border-bottom: 2px solid rgba(229,231,235,0.95);
}
.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}
.empty-state-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── MOBILE (max 767px) Adjustments ── */
@media (max-width: 767px) {
  .catalog-main-shell {
    padding-top: 10px;
    background: var(--bg-secondary);
  }
  .catalog-page-header {
    padding: 76px 16px 18px;
    background: #fff;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 14px 40px rgba(11, 126, 181, 0.07);
  }
  .catalog-page-header .section-title {
    font-size: 1.55rem;
    line-height: 1.08;
  }
  .catalog-page-header .section-sub {
    font-size: .92rem;
    max-width: 100%;
    margin-top: 8px;
    color: var(--text-secondary);
  }
  .ecom-sidebar {
    display: none;
  }
  .catalog-section-header--top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    align-items: stretch;
  }
  .catalog-heading-block {
    gap: 6px;
  }
  .catalog-context-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .catalog-context-bar__meta {
    gap: 8px;
    width: 100%;
  }
  .catalog-context-pill {
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    font-size: .78rem;
  }
  .catalog-reset-trigger,
  .catalog-mobile-filter-trigger {
    width: 100%;
  }
  .catalog-reset-trigger {
    min-height: 44px;
  }
  .catalog-mobile-filter-trigger {
    min-height: 50px;
    border-radius: 18px;
    font-size: .92rem;
    letter-spacing: .01em;
    border-width: 1px;
    box-shadow: 0 14px 32px rgba(11, 126, 181, 0.07);
    background: #fff;
  }
  .smart-search-wrapper--compact {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .smart-search-wrapper--compact .smart-search-input {
    min-height: 50px;
    padding: 12px 54px 12px 44px;
    font-size: .92rem;
  }
  .smart-search-wrapper--compact .smart-search-btn {
    width: 40px;
    height: 40px;
  }
  .catalog-section-header {
    border-bottom: none;
  }
  .cat-btn {
    width: 100%;
    white-space: normal;
    flex-shrink: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-size: .92rem;
    text-align: left;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
  }
  .cat-btn:hover {
    transform: translateY(-1px);
  }
  .cat-btn.active {
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
  }
  .catalog-inner-header h2,
  .catalog-inner-header p,
  .brand-header,
  .brand-header-tag {
    font-size: .98rem;
  }
  .cubiculos-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cubiculo-card {
    height: 156px;
  }
  .cubiculo-title {
    font-size: 1rem;
  }
  .product-card {
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
  }
  .product-img-wrapper {
    height: 130px;
  }
  .product-info {
    padding: 14px;
    gap: 8px;
  }
  .product-title {
    font-size: .96rem;
  }
  .product-meta {
    font-size: .72rem;
    margin-bottom: 8px;
  }
  .product-price {
    font-size: 1.05rem;
  }
  .product-desc {
    font-size: .82rem;
    margin-bottom: 10px;
    -webkit-line-clamp: 3;
  }
  .product-actions {
    gap: 8px;
  }
  .product-view-btn {
    min-height: 44px;
    padding: 10px 12px;
    font-size: .86rem;
    border-radius: 14px;
  }
  .product-badge,
  .product-available {
    top: 10px;
  }
  .product-badge {
    max-width: calc(100% - 84px);
    font-size: .7rem;
    padding: 4px 10px;
  }
  .product-available {
    right: 10px;
    padding: 4px 10px;
  }
  .products-grid {
    gap: 12px;
  }
  .search-dropdown {
    max-height: 240px;
    overflow-y: auto;
  }
  .mobile-filter-sheet__panel {
    padding: 16px 14px calc(28px + var(--mobile-safe-bottom, 0px));
    max-height: 84vh;
  }
  .mobile-filter-sheet__header {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
  }
  .mobile-filter-sheet__actions {
    margin-bottom: 14px;
  }
  .mobile-filter-clear-btn {
    font-size: .92rem;
    min-height: 44px;
  }
  .mobile-filter-sheet__list {
    gap: 10px;
  }
}

/* ── SHOPPING CART MOVED TO MAIN.CSS ── */

@media (min-width: 520px) and (max-width: 767px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cubiculos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 519px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .cubiculos-grid {
    grid-template-columns: 1fr;
  }
}

/* ── TABLET (768px) ── */
@media (min-width: 768px) {
  .ecom-container { flex-direction: row; align-items: flex-start; gap: 24px; }
  .ecom-sidebar { flex: 0 0 240px; position: sticky; top: 88px; }
  .catalog-mobile-filter-trigger { display: none; }
  .mobile-filter-sheet { display: none; }
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .catalog-page-header { padding-top: 100px; }
  .catalog-page-header .section-title { font-size: 1.9rem; }
  .catalog-page-header .section-sub { max-width: 540px; }
  .product-img-wrapper { height: 134px; }
  .product-info { padding: 16px; }
  .product-title { font-size: 1rem; }
  .product-price { font-size: 1.02rem; }
}

/* ── DESKTOP (1024px) ── */
@media (min-width: 1024px) {
  .ecom-sidebar { flex: 0 0 240px; }
  .products-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .catalog-page-header { padding-top: 110px; }
  .catalog-page-header .section-title { font-size: clamp(1.9rem, 3vw, 2.5rem); }
  .catalog-page-header .section-sub { max-width: 560px; }
  .product-img-wrapper { height: 140px; }
}

@media (max-width: 767px) {
  .modal-content {
    width: 100%;
    max-width: none;
    max-height: 100svh;
    height: 100svh;
    border-radius: 22px 22px 0 0;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: auto;
  }
  .modal-close {
    top: 14px;
    right: 14px;
  }
  .modal-body {
    gap: 18px;
    padding: 68px 16px calc(122px + var(--mobile-safe-bottom));
  }
  .main-img-wrapper {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
  }
  #modal-title {
    font-size: 1.4rem;
  }
  .modal-price {
    font-size: 1.22rem;
    margin-bottom: 8px;
  }
  .modal-meta-summary {
    font-size: .82rem;
    margin-bottom: 14px;
  }
  #modal-desc {
    margin-bottom: 18px;
    font-size: .92rem;
  }
  .specs-title {
    font-size: 1rem;
  }
  .specs-list {
    gap: 10px;
    margin-bottom: 22px;
  }
  .specs-list li {
    font-size: .9rem;
  }
  .modal-actions {
    position: sticky;
    bottom: calc(-16px - var(--mobile-safe-bottom));
    background: linear-gradient(to top, rgba(255,255,255,1) 75%, rgba(255,255,255,0));
    padding-top: 10px;
    padding-bottom: calc(16px + var(--mobile-safe-bottom));
  }
}

/* ── 5. PRODUCT MODAL (MARKETPLACE) ── */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(5px);
  z-index: 10000; display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.show { opacity: 1; }

.modal-content {
  background: var(--bg-primary); border-radius: 16px;
  width: 90%; max-width: 900px; max-height: 90vh; overflow-y: auto;
  position: relative; transform: translateY(20px); transition: transform 0.3s ease;
  box-shadow: 0 28px 60px rgba(0,0,0,0.22);
}
.modal-overlay.show .modal-content { transform: translateY(0); }

.modal-close {
  position: absolute; top: 16px; right: 16px; background: rgba(0,0,0,0.05);
  border: none; border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.2s; z-index: 10;
}
.modal-close:hover { background: rgba(0,0,0,0.1); color: #ff3b3b; }

.modal-body {
  display: grid; grid-template-columns: 1fr; gap: 32px; padding: 42px 24px;
}
@media (min-width: 768px) {
  .modal-body { grid-template-columns: 1fr 1fr; padding: 40px; }
}

.modal-gallery { display: flex; flex-direction: column; gap: 16px; }
.main-img-wrapper {
  width: 100%; aspect-ratio: 4/3; background: var(--bg-secondary);
  border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.main-img-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }

.modal-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-thumbnails::-webkit-scrollbar {
  display: none;
}
.thumb-img {
  width: 64px; height: 64px; border-radius: 8px; border: 2px solid transparent;
  cursor: pointer; object-fit: cover; opacity: 0.6; transition: 0.2s; background: var(--bg-secondary);
}
.thumb-img:hover { opacity: 1; }
.thumb-img.active { border-color: var(--brand); opacity: 1; }

.modal-info { display: flex; flex-direction: column; }
.modal-brand-badge {
  position: relative;
  top: 0;
  left: 0;
  display: inline-block;
  margin-bottom: 10px;
}
#modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; margin-bottom: 8px; line-height: 1.2; }
.modal-price { font-size: 1.55rem; font-weight: 700; color: var(--brand); margin-bottom: 14px; }
.modal-meta-summary {
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
}
#modal-desc { color: var(--text-muted); line-height: 1.72; margin-bottom: 24px; }

.specs-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 16px; }
.specs-list { list-style: none; padding: 0; margin: 0 0 32px 0; display: grid; gap: 12px; }
.specs-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; color: var(--text-primary); }
.specs-list li i { color: var(--brand); flex-shrink: 0; }

.modal-actions { margin-top: auto; }

.mobile-filter-sheet {
  position: fixed;
  inset: 0;
  z-index: 10100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.mobile-filter-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-filter-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 25, 35, 0.48);
}
.mobile-filter-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 12px 16px calc(24px + var(--mobile-safe-bottom));
  box-shadow: 0 -12px 40px rgba(15,25,35,0.18);
  transform: translateY(100%);
  transition: transform .25s ease;
  max-height: min(78vh, 620px);
  overflow-y: auto;
}
.mobile-filter-sheet.is-open .mobile-filter-sheet__panel {
  transform: translateY(0);
}
.mobile-filter-sheet__handle {
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: #d8e2ef;
  margin: 0 auto 14px;
}
.mobile-filter-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.mobile-filter-sheet__header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0;
}
.mobile-filter-sheet__header p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.5;
}
.mobile-filter-sheet__close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-filter-sheet__close svg,
.mobile-filter-sheet__close i {
  width: 18px;
  height: 18px;
}
.mobile-filter-sheet__actions {
  margin-bottom: 12px;
}
.mobile-filter-clear-btn {
  width: 100%;
  min-height: 44px;
  border: 1px dashed rgba(11,126,181,0.26);
  border-radius: 14px;
  background: var(--brand-pale);
  color: var(--brand);
  font-family: 'Outfit', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}
.mobile-filter-clear-btn.active {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 14px 30px rgba(11,126,181,0.18);
}
.mobile-filter-sheet__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── 6. CUBÍCULOS & GAVETAS VISUALES ── */
.cubiculos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
  grid-column: 1/-1;
}
.cubiculo-card {
  position: relative; border-radius: 12px; overflow: hidden; height: 200px;
  background-color: var(--bg-secondary); cursor: pointer; text-decoration: none;
  background-size: cover; background-position: center; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  animation: fadeSlideUp 0.5s ease both;
}
.cubiculo-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
  z-index: 1; transition: opacity 0.3s;
}
.cubiculo-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.cubiculo-card:hover::after { background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(11,126,181,0.4) 100%); }
.cubiculo-info {
  position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 2;
}
.cubiculo-title {
  color: #ffffff; font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700;
  margin: 0 0 4px 0;
}
.cubiculo-count {
  color: rgba(255,255,255,0.7); font-size: 0.85rem; font-weight: 500;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* ── 7. SMART SEARCH (BUSCADOR INTELIGENTE) ── */
.smart-search-wrapper {
  position: relative; width: 100%; max-width: 600px; margin: 0 auto; z-index: 100;
}
.smart-search-input {
  width: 100%; padding: 18px 24px 18px 50px; border-radius: 30px;
  border: 1px solid var(--border); background: var(--bg-primary);
  font-family: 'Outfit', sans-serif; font-size: 1rem; color: var(--text-primary);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}
.smart-search-input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 15px 40px rgba(11,126,181,0.15);
}
.smart-search-icon {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--text-muted); pointer-events: none;
}
.smart-search-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: var(--brand); border: none; color: #fff; width: 40px; height: 40px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.2s;
}
.smart-search-btn:hover { background: var(--brand-dark); transform: translateY(-50%) scale(1.05); }

/* Catalog page search - smaller variant */
.smart-search-wrapper--compact { flex: 1; min-width: 280px; max-width: 400px; margin: 0; }
.smart-search-wrapper--compact .smart-search-input { padding: 12px 20px 12px 45px; }
.smart-search-wrapper--compact .smart-search-btn { width: 34px; height: 34px; }

.search-dropdown {
  position: absolute; top: 110%; left: 0; width: 100%; background: var(--bg-primary);
  border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 15px 50px rgba(0,0,0,0.1);
  overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: 0.2s; text-align: left;
}
.search-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.search-group-title {
  padding: 12px 16px; font-size: 0.75rem; text-transform: uppercase; font-weight: 700;
  color: var(--text-muted); background: var(--bg-secondary); letter-spacing: 1px;
}
.search-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer;
  transition: 0.2s; color: var(--text-primary); font-size: 0.95rem; border-bottom: 1px solid var(--border);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: rgba(11,126,181,0.05); color: var(--brand); }
.search-item i { width: 16px; height: 16px; color: var(--brand); }
.search-item--muted { color: var(--text-muted); }
.search-item:focus-visible {
  outline: 3px solid rgba(11,126,181,0.35);
  outline-offset: -3px;
}

.search-item-meta {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.load-more-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px auto 0;
  padding: 18px 20px;
  max-width: 560px;
  width: 100%;
  background: rgba(247,250,255,0.92);
  border: 1px solid rgba(229,231,235,0.95);
  border-radius: 24px;
}
.load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  width: min(100%, 320px);
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.load-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(11,126,181,0.22);
}
.results-counter {
  color: var(--text-muted);
  font-size: .94rem;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 34px 20px;
  text-align: center;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(229,231,235,0.95);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(11,126,181,0.08);
}
.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(11,126,181,0.08);
  color: var(--brand);
}
.empty-state h3 {
  font-size: 1.45rem;
  color: var(--text-primary);
}
.empty-state p {
  max-width: 460px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.empty-state-reset-btn {
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  padding: 12px 20px;
}

/* Premium polish overrides */
.catalog-main-shell {
  padding-top: 28px;
  background:
    linear-gradient(180deg, #f7fbff 0px, #ffffff 220px);
}

.ecom-container {
  gap: 28px;
}

.catalog-page-header {
  padding-top: 118px;
  padding-bottom: 28px;
  background:
    radial-gradient(circle at top center, rgba(11,126,181,0.08), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.catalog-page-header::before {
  background:
    radial-gradient(ellipse 60% 65% at 50% 18%, rgba(11,126,181,0.08), transparent 65%),
    linear-gradient(rgba(11,126,181,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,126,181,0.04) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.85), transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.85), transparent 92%);
}

.catalog-page-header .section-title {
  max-width: none;
}

.catalog-mobile-explorer {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.catalog-mobile-explorer__header {
  display: grid;
  gap: 6px;
  padding: 2px 2px 0;
}

.catalog-mobile-explorer__header h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.02rem;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.catalog-mobile-explorer__header p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.cubiculos-grid--compact {
  grid-template-columns: 1fr;
  gap: 12px;
}

.cubiculo-card--compact {
  min-height: 146px;
  height: 146px;
  border-radius: 22px;
}

.cubiculo-card--compact .cubiculo-info {
  bottom: 16px;
  left: 16px;
  right: 16px;
}

.cubiculo-card--compact .cubiculo-title {
  font-size: 1rem;
  line-height: 1.14;
  margin-bottom: 4px;
}

.cubiculo-card--compact .cubiculo-count {
  font-size: .76rem;
  color: rgba(255,255,255,0.82);
}

.catalog-section-header {
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid rgba(11, 126, 181, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.96));
  box-shadow: 0 20px 42px rgba(15, 25, 35, 0.08);
}

.catalog-heading-block {
  gap: 10px;
}

.cat-title {
  font-size: 1.52rem;
  letter-spacing: -0.04em;
}

.cat-desc {
  max-width: 58ch;
  color: #607086;
}

.catalog-context-bar {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(11, 126, 181, 0.08);
}

.catalog-context-pill {
  border: 1px solid rgba(11, 126, 181, 0.08);
  background: rgba(11,126,181,0.08);
}

.catalog-context-pill--muted {
  background: rgba(15, 25, 35, 0.04);
  border-color: rgba(15, 25, 35, 0.04);
}

.catalog-reset-trigger,
.catalog-mobile-filter-trigger {
  border-color: rgba(11, 126, 181, 0.1);
  box-shadow: 0 10px 22px rgba(15, 25, 35, 0.05);
}

.catalog-mobile-filter-trigger {
  background: rgba(255,255,255,0.88);
}

.ecom-sidebar {
  padding: 22px;
  border-radius: 24px;
  border-color: rgba(11, 126, 181, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 22px 44px rgba(15, 25, 35, 0.08);
}

.sidebar-header {
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.cat-btn {
  min-height: 46px;
  padding: 12px 15px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #506175;
}

.cat-btn:hover {
  background: #fff;
  border-color: rgba(11, 126, 181, 0.08);
  transform: translateX(4px);
}

.cat-btn.active {
  border-left: none;
  border-color: rgba(11, 126, 181, 0.14);
  background: linear-gradient(135deg, rgba(11,126,181,0.12), rgba(27,163,224,0.06));
  box-shadow: 0 12px 24px rgba(11, 126, 181, 0.08);
}

.products-grid {
  gap: 18px;
}

.product-card {
  border-radius: 24px;
  border-color: rgba(11, 126, 181, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 16px 38px rgba(15, 25, 35, 0.07);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 52px rgba(15, 25, 35, 0.12);
}

.product-img-wrapper {
  height: 184px;
  background:
    radial-gradient(circle at top, rgba(11,126,181,0.08), transparent 46%),
    #eef4fb;
}

.product-badge {
  top: 12px;
  left: 12px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(11, 126, 181, 0.06);
  font-size: .62rem;
}

.product-available {
  top: 12px;
  right: 12px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(0, 214, 143, 0.2);
}

.product-info {
  padding: 18px 18px 20px;
}

.product-title {
  font-size: 1.04rem;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.product-meta {
  font-size: .7rem;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.product-price {
  font-size: 1.18rem;
  margin-bottom: 10px;
}

.product-desc {
  color: #617186;
  -webkit-line-clamp: 3;
}

.product-view-btn {
  min-height: 46px;
  border-radius: 14px;
  background: rgba(255,255,255,0.88);
  box-shadow: inset 0 0 0 1px rgba(11, 126, 181, 0.04);
}

.product-card--service {
  background: linear-gradient(180deg, #fbfdff 0%, #f4f9ff 100%);
}

.folder-card {
  border-radius: 22px;
  border-color: rgba(11, 126, 181, 0.08);
  box-shadow: 0 16px 38px rgba(15, 25, 35, 0.07);
}

.cubiculo-card {
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 25, 35, 0.08);
}

.smart-search-wrapper {
  max-width: 660px;
}

.smart-search-input {
  min-height: 60px;
  padding: 18px 24px 18px 54px;
  border-radius: 999px;
  border: 1px solid rgba(11, 126, 181, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(15, 25, 35, 0.08);
}

.smart-search-input:focus {
  box-shadow: 0 20px 46px rgba(11,126,181,0.16);
}

.smart-search-icon {
  left: 22px;
}

.smart-search-btn {
  right: 10px;
  width: 42px;
  height: 42px;
  box-shadow: 0 12px 24px rgba(11, 126, 181, 0.24);
}

.smart-search-wrapper--compact {
  max-width: 430px;
}

.smart-search-wrapper--compact .smart-search-input {
  min-height: 54px;
}

.search-dropdown {
  border-radius: 20px;
  border-color: rgba(11, 126, 181, 0.08);
  box-shadow: 0 22px 52px rgba(15, 25, 35, 0.12);
}

.search-item {
  padding: 14px 16px;
}

.modal-overlay {
  background: rgba(8, 14, 22, 0.68);
  backdrop-filter: blur(12px);
}

.modal-content {
  border-radius: 28px;
  border: 1px solid rgba(11, 126, 181, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 34px 84px rgba(15, 25, 35, 0.28);
}

.modal-body {
  gap: 36px;
  padding: 46px 30px;
}

.main-img-wrapper {
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(11,126,181,0.08), transparent 46%),
    #eef4fb;
  box-shadow: 0 18px 36px rgba(15, 25, 35, 0.08);
}

.modal-thumbnails {
  gap: 12px;
}

.thumb-img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(15, 25, 35, 0.06);
}

.modal-brand-badge {
  margin-bottom: 14px;
}

#modal-title {
  letter-spacing: -0.04em;
}

.modal-price {
  font-size: 1.7rem;
}

#modal-desc {
  color: #5d6d82;
}

.specs-title {
  padding-bottom: 10px;
}

.specs-list li {
  padding: 12px 14px;
  border: 1px solid rgba(11, 126, 181, 0.06);
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.88);
}

.mobile-filter-sheet__panel {
  border-radius: 28px 28px 0 0;
  padding: 14px 16px calc(26px + var(--mobile-safe-bottom));
}

.mobile-filter-sheet__close {
  border-color: rgba(11, 126, 181, 0.08);
}

@media (max-width: 767px) {
  .catalog-page-header {
    padding-top: 72px;
    padding-bottom: 4px;
  }

  .catalog-page-header .section-label,
  .catalog-page-header .section-title,
  .catalog-page-header .section-sub {
    display: none;
  }

  .catalog-main-shell {
    padding-top: 4px;
  }

  .catalog-section-header--top {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 12px;
  }

  .catalog-section-header {
    padding: 14px;
    border-radius: 20px;
    margin-bottom: 14px;
  }

  .catalog-heading-block {
    grid-column: 1 / -1;
    gap: 4px;
  }

  .cat-title {
    font-size: 1.16rem;
    line-height: 1.08;
  }

  .cat-desc {
    display: none;
  }

  .catalog-context-bar {
    padding: 8px;
    gap: 6px;
    border-radius: 14px;
  }

  .catalog-context-bar__meta {
    gap: 6px;
  }

  .catalog-context-pill {
    min-height: 32px;
    padding: 0 10px;
    font-size: .72rem;
    justify-content: center;
  }

  .catalog-reset-trigger {
    min-height: 40px;
    font-size: .76rem;
  }

  .catalog-mobile-filter-trigger {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 16px;
    justify-self: end;
  }

  .catalog-mobile-filter-trigger span {
    display: none;
  }

  .smart-search-wrapper--compact {
    min-width: 0;
    max-width: none;
  }

  .smart-search-wrapper--compact .smart-search-input {
    min-height: 46px;
    padding: 11px 50px 11px 40px;
    font-size: .88rem;
  }

  .smart-search-wrapper--compact .smart-search-btn {
    width: 36px;
    height: 36px;
    right: 6px;
  }

  .catalog-mobile-explorer {
    gap: 12px;
  }

  .catalog-mobile-explorer__header {
    padding-top: 2px;
  }

  .product-card {
    border-radius: 20px;
  }

  .product-card,
  .product-card:hover {
    transform: none;
    box-shadow: 0 12px 24px rgba(15, 25, 35, 0.08);
  }

  .product-card::before,
  .product-card:hover::before {
    transform: none;
    opacity: .72;
  }

  .product-img-wrapper {
    height: 170px;
  }

  .product-img-wrapper img,
  .product-card:hover .product-img-wrapper img {
    transform: none;
    transition: none;
  }

  .product-available::before {
    animation: none;
  }

  .modal-content {
    border-radius: 28px 28px 0 0;
  }

  .modal-body {
    padding: 70px 16px calc(122px + var(--mobile-safe-bottom));
  }
}

/* Final responsive polish for compact tablets and small laptops */
.products-grid {
  align-items: start;
}

.catalog-inner-header,
.load-more-container,
.empty-state,
.subcategory-header {
  grid-column: 1 / -1;
  width: 100%;
}

.catalog-inner-header,
.load-more-container,
.empty-state,
.brand-header,
.product-card,
.folder-card,
.cubiculo-card {
  align-self: start;
}

.product-card {
  min-width: 0;
  height: auto;
}

.product-info {
  min-height: 100%;
}

.product-actions {
  align-items: stretch;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .catalog-main-shell {
    padding-top: 18px;
  }

  .ecom-container {
    flex-direction: column;
    gap: 20px;
  }

  .ecom-sidebar {
    display: none;
  }

  .ecom-main {
    width: 100%;
    min-width: 0;
  }

  .catalog-section-header--top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
  }

  .catalog-heading-block {
    grid-column: 1 / -1;
  }

  .smart-search-wrapper--compact {
    grid-column: 1 / 2;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .catalog-mobile-filter-trigger {
    display: inline-flex;
    grid-column: 2 / 3;
    justify-self: end;
  }

  .mobile-filter-sheet {
    display: block;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .product-img-wrapper {
    height: clamp(172px, 25vw, 208px);
  }

  .catalog-inner-header {
    padding: 22px 24px;
  }

  .catalog-inner-header h2 {
    font-size: clamp(1.4rem, 2.7vw, 1.75rem);
  }

  .catalog-inner-header p {
    max-width: 60ch;
  }

  .load-more-container,
  .empty-state {
    max-width: none;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .ecom-sidebar {
    flex: 0 0 220px;
  }

  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .product-img-wrapper {
    height: 176px;
  }

  .smart-search-wrapper--compact {
    max-width: 390px;
  }
}

@media (min-width: 1280px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.modal-availability-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 214, 143, 0.14);
  color: #0e9f6e;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.modal-availability-pill--service {
  background: rgba(11, 126, 181, 0.1);
  color: var(--brand);
}

@media (max-width: 767px) {
  .modal-content {
    border-radius: 26px 26px 0 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .modal-content::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: #d8e2ef;
    z-index: 11;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 12px 24px rgba(15, 25, 35, 0.12);
  }

  .modal-body {
    gap: 14px;
    padding: 56px 14px calc(132px + var(--mobile-safe-bottom));
  }

  .modal-gallery {
    gap: 10px;
  }

  .main-img-wrapper {
    aspect-ratio: 4 / 3;
    max-height: min(29vh, 240px);
    padding: 10px;
    border-radius: 18px;
  }

  .modal-thumbnails[hidden] {
    display: none !important;
  }

  .modal-thumbnails {
    gap: 8px;
    padding-bottom: 2px;
  }

  .thumb-img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .modal-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 8px;
    align-content: start;
  }

  .modal-brand-badge {
    grid-column: 1 / 2;
    margin-bottom: 0;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
  }

  .modal-availability-pill {
    grid-column: 2 / 3;
    justify-self: end;
    align-self: center;
  }

  #modal-title,
  .modal-price,
  .modal-meta-summary,
  .modal-actions,
  #modal-desc,
  .specs-title,
  .specs-list {
    grid-column: 1 / -1;
  }

  #modal-title {
    order: 3;
    font-size: 1.16rem;
    line-height: 1.16;
    margin: 0;
  }

  .modal-price {
    order: 4;
    font-size: 1.46rem;
    margin: 0;
  }

  .modal-meta-summary {
    order: 5;
    margin: 0;
    font-size: .8rem;
    line-height: 1.5;
  }

  .modal-actions {
    order: 6;
    position: sticky;
    bottom: calc(-14px - var(--mobile-safe-bottom));
    z-index: 7;
    display: grid;
    gap: 10px;
    margin: -2px 0 0;
    padding: 12px 0 calc(14px + var(--mobile-safe-bottom));
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.96) 24%, #fff 46%);
  }

  .modal-actions .btn {
    min-height: 48px;
    border-radius: 16px;
    font-size: .86rem;
  }

  #modal-add-cart-btn {
    order: -1;
    box-shadow: 0 16px 30px rgba(11,126,181,0.18);
  }

  #modal-desc {
    order: 7;
    margin: 0;
    font-size: .88rem;
    line-height: 1.6;
  }

  .specs-title {
    order: 8;
    margin: 0;
    padding-bottom: 8px;
    font-size: .95rem;
  }

  .specs-list {
    order: 9;
    gap: 8px;
    margin: 0;
  }

  .specs-list li {
    padding: 10px 12px;
    font-size: .84rem;
    border-radius: 14px;
  }
}

.modal-copy-title {
  margin: 0 0 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.modal-actions {
  order: 99;
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.modal-actions .btn {
  width: 100%;
  justify-content: center;
}

#modal-desc {
  margin: 0 0 6px;
  padding: 14px 16px;
  border: 1px solid rgba(11, 126, 181, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.96), #ffffff);
  box-shadow: 0 14px 28px rgba(15, 25, 35, 0.05);
}

.specs-list li {
  padding: 12px 14px;
  border: 1px solid rgba(11, 126, 181, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.95), #ffffff);
}

@media (max-width: 767px) {
  .modal-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }

  .modal-content {
    width: 100%;
    max-width: 520px;
    max-height: 100svh;
    height: 100svh;
    scroll-padding-bottom: calc(144px + var(--mobile-safe-bottom));
    overscroll-behavior: contain;
  }

  .modal-body {
    gap: 12px;
    padding: 54px 14px calc(128px + var(--mobile-safe-bottom));
  }

  .main-img-wrapper {
    max-height: min(26vh, 220px);
  }

  .thumb-img {
    width: 52px;
    height: 52px;
  }

  .modal-copy-title,
  #modal-title,
  .modal-price,
  .modal-meta-summary,
  .modal-actions,
  #modal-desc,
  .specs-title,
  .specs-list {
    grid-column: 1 / -1;
  }

  .modal-copy-title {
    order: 7;
    margin: 2px 0 0;
    font-size: .9rem;
  }

  #modal-desc {
    order: 8;
    margin: 0;
    padding: 12px 14px;
    font-size: .86rem;
    line-height: 1.58;
  }

  .specs-title {
    order: 9;
    margin-top: 4px;
  }

  .specs-list {
    order: 10;
  }

  .specs-list li {
    padding: 10px 12px;
    font-size: .82rem;
  }

  .modal-actions {
    order: 6;
    gap: 10px;
    margin: 2px 0 0;
    padding: 12px 0 calc(14px + var(--mobile-safe-bottom));
    box-shadow: 0 -18px 30px rgba(255, 255, 255, 0.92);
  }

  .modal-actions .btn {
    min-height: 50px;
    font-size: .88rem;
  }
}

@media (max-width: 767px) {
  .catalog-section-header {
    padding: 12px;
    margin-bottom: 12px;
  }

  .catalog-heading-block {
    gap: 4px;
  }

  .cat-title {
    font-size: 1rem;
  }

  .catalog-context-bar {
    padding: 6px;
    gap: 6px;
  }

  .catalog-context-pill {
    min-height: 30px;
    font-size: .68rem;
    padding: 0 9px;
  }

  .catalog-reset-trigger {
    min-height: 36px;
    font-size: .72rem;
  }

  .catalog-mobile-stack-browser {
    display: grid;
    gap: 10px;
    margin-top: 2px;
  }

  .catalog-mobile-stack-browser__header {
    display: grid;
    gap: 4px;
    padding: 0 2px;
  }

  .catalog-mobile-stack-browser__header h3 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
  }

  .catalog-mobile-stack-browser__header p {
    margin: 0;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--text-muted);
  }

  .catalog-stack-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .catalog-stack-card {
    appearance: none;
    width: 100%;
    min-height: 94px;
    padding: 11px;
    border: 1px solid rgba(11, 126, 181, 0.1);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,255,0.96));
    box-shadow: 0 14px 28px rgba(15, 25, 35, 0.08);
    display: grid;
    align-content: start;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  }

  .catalog-stack-card:active {
    transform: scale(.98);
  }

  .catalog-stack-card:focus-visible {
    outline: 2px solid rgba(11, 126, 181, 0.28);
    outline-offset: 2px;
  }

  .catalog-stack-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(11,126,181,0.16), rgba(0,214,143,0.12));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(11,126,181,0.08);
  }

  .catalog-stack-card__icon svg,
  .catalog-stack-card__icon i {
    width: 16px;
    height: 16px;
  }

  .catalog-stack-card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.16;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .catalog-stack-card__meta {
    font-size: .68rem;
    line-height: 1.35;
    color: var(--text-muted);
  }

  .catalog-mobile-product-section {
    display: grid;
    gap: 9px;
    margin-top: 14px;
  }

  .catalog-mobile-product-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px;
  }

  .catalog-mobile-product-section__heading {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .catalog-mobile-product-section__eyebrow {
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand);
  }

  .catalog-mobile-product-section__heading h3 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: .98rem;
    line-height: 1.12;
    color: var(--text-primary);
  }

  .catalog-mobile-product-section__action,
  .catalog-mobile-product-section__more {
    appearance: none;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(11, 126, 181, 0.12);
    background: rgba(255,255,255,0.96);
    color: var(--brand);
    font-family: 'Outfit', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(15, 25, 35, 0.05);
  }

  .catalog-mobile-product-section__footer {
    display: flex;
    justify-content: flex-end;
    padding: 2px 2px 0;
  }

  .products-grid,
  .products-grid--compact-mobile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-card--compact-mobile {
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(15, 25, 35, 0.08);
  }

  .product-card--preview-mobile {
    border-radius: 17px;
    box-shadow: 0 10px 20px rgba(15, 25, 35, 0.07);
  }

  .product-img-wrapper--compact-mobile {
    height: 108px;
  }

  .product-img-wrapper--preview-mobile {
    height: 92px;
  }

  .product-card--compact-mobile .product-badge,
  .product-card--compact-mobile .product-available {
    top: 8px;
    min-height: 22px;
    padding: 0 7px;
    font-size: .52rem;
    letter-spacing: .06em;
  }

  .product-card--compact-mobile .product-badge {
    left: 8px;
    max-width: calc(100% - 74px);
  }

  .product-card--compact-mobile .product-available {
    right: 8px;
  }

  .product-card--compact-mobile .product-available::before {
    width: 4px;
    height: 4px;
  }

  .product-info--compact-mobile {
    padding: 10px 10px 12px;
    gap: 6px;
  }

  .product-info--preview-mobile {
    padding: 9px 10px 10px;
    gap: 4px;
  }

  .product-meta--compact-mobile {
    margin: 0;
    font-size: .58rem;
    letter-spacing: .07em;
    line-height: 1.35;
  }

  .product-meta--preview-mobile {
    margin: 0;
    font-size: .54rem;
    letter-spacing: .06em;
    line-height: 1.3;
  }

  .product-title--compact-mobile {
    margin: 0;
    font-size: .78rem;
    line-height: 1.28;
    min-height: 2.05em;
  }

  .product-title--preview-mobile {
    margin: 0;
    font-size: .75rem;
    line-height: 1.24;
    min-height: 1.9em;
  }

  .product-price--compact-mobile {
    margin: 0;
    font-size: .92rem;
  }

  .product-price--preview-mobile {
    margin: 0;
    font-size: .82rem;
  }

  .product-actions--compact-mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 2px;
  }

  .product-view-btn--compact-mobile {
    min-height: 34px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: .68rem;
    gap: 5px;
  }

  .product-view-btn--compact-mobile svg {
    width: 12px;
    height: 12px;
  }

  .product-add-btn--compact {
    min-height: 34px;
    padding: 0 8px;
    gap: 6px;
    border-radius: 12px;
    font-size: .68rem;
    box-shadow: 0 8px 16px rgba(11,126,181,0.08);
  }

  .product-add-btn__icon-wrap--compact {
    width: 20px;
    height: 20px;
  }

  .product-add-btn__icon-wrap--compact svg,
  .product-add-btn__icon-wrap--compact i {
    width: 12px;
    height: 12px;
  }

  .product-add-btn__text--compact {
    line-height: 1;
  }

  .inline-cart-control--compact {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    min-height: 34px;
    padding: 0 1px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(11,126,181,0.08);
  }

  .inline-qty-btn--compact {
    width: 24px;
    height: 24px;
    border-radius: 8px;
  }

  .inline-qty-btn--compact svg,
  .inline-qty-btn--compact i {
    width: 12px;
    height: 12px;
  }

  .inline-qty-readout--compact {
    padding: 0;
  }

  .inline-qty-readout--compact .inline-qty-count {
    font-size: .84rem;
  }

  .brand-header {
    margin-top: 16px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .brand-header-tag {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: .7rem;
    letter-spacing: .06em;
  }
}

/* Autocompletado con miniaturas */
.search-item--product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}
.search-item-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}
.search-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.search-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-brand {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.search-item-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Slider de precios */
.price-filter-widget {
  padding: 10px 4px;
}
.price-slider-container {
  position: relative;
  height: 24px;
  margin-bottom: 12px;
}
.price-slider-container input[type="range"] {
  position: absolute;
  width: 100%;
  height: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.price-slider-container input[type="range"]::-webkit-slider-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: var(--brand);
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(10, 112, 162, 0.3);
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.1s;
}
.price-slider-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.price-slider-container input[type="range"]::-moz-range-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: var(--brand);
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(10, 112, 162, 0.3);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.1s;
}
.price-slider-container input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
}
.price-slider-track {
  position: absolute;
  height: 4px;
  background: var(--border);
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 4px;
  z-index: -1;
}
.price-range-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}
