/* =============================================================
   ImobiPro Store — Componentes v2
   ============================================================= */

/* ----- CONTAINER ----- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ----- HEADER ----- */
.site-header {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--transition-normal);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo-mark .logo-imob { color: var(--navy-800); }
.logo-mark .logo-pro  { color: var(--gold-500); }
.logo-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--graphite-400);
  font-weight: 500;
  display: block;
  margin-top: 2px;
}

/* Navegação principal */
.header-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--graphite-600);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}
.nav-link:hover { color: var(--navy-800); background: var(--sand-100); }
.nav-link.active { color: var(--navy-800); font-weight: 600; }

/* Search bar */
.header-search {
  flex: 0 1 360px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-4) 0 var(--space-10);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-full);
  background: var(--sand-50);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.header-search input:focus {
  border-color: var(--navy-400);
  box-shadow: 0 0 0 3px rgba(21,49,67,0.08);
  background: #fff;
}
.header-search input::placeholder { color: var(--graphite-300); }
.search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--graphite-300);
  pointer-events: none;
}

/* Ações do header */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.header-action-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--graphite-600);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.header-action-btn:hover { color: var(--navy-800); background: var(--sand-100); }
.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  background: var(--gold-500);
  color: var(--navy-900);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.cart-badge.visible { opacity: 1; transform: scale(1); }

.btn-login {
  height: 36px;
  padding: 0 var(--space-4);
  background: var(--navy-800);
  color: var(--sand-100);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background var(--transition-fast);
}
.btn-login:hover { background: var(--navy-700); }

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--graphite-600);
  border-radius: var(--radius-md);
}

/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-6);
  height: 48px;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--navy-800);
  color: var(--sand-100);
}
.btn-primary:hover {
  background: var(--navy-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); }

.btn-gold {
  background: var(--gold-500);
  color: var(--navy-900);
}
.btn-gold:hover {
  background: var(--gold-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  border-color: var(--navy-800);
  color: var(--navy-800);
}
.btn-outline:hover {
  background: var(--navy-800);
  color: var(--sand-100);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--sand-100); color: var(--text-primary); }

.btn-sm { height: 36px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.btn-lg { height: 56px; padding: 0 var(--space-8); font-size: var(--text-lg); }

.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ----- BADGES ----- */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}
.badge-bestseller { background: var(--gold-500); color: var(--navy-900); }
.badge-new       { background: var(--navy-800); color: var(--sand-100); }
.badge-featured  { background: var(--graphite-700); color: var(--sand-100); }
.badge-premium   { background: linear-gradient(135deg, #c6a269, #9b7744); color: var(--navy-900); }
.badge-promo     { background: var(--red-500); color: #fff; }

/* ----- PRODUCT CARD ----- */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-medium);
}

.card-cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--navy-900);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.product-card:hover .card-cover img {
  transform: scale(1.03);
}

.card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--navy-800), var(--navy-900));
  gap: var(--space-2);
}
.card-cover-placeholder .ph-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--sand-100);
  text-align: center;
  padding: 0 var(--space-4);
  line-height: var(--leading-snug);
}
.card-cover-placeholder .ph-brand {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  color: var(--gold-400);
  text-transform: uppercase;
}

.card-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.card-favorite {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--graphite-400);
  transition: all var(--transition-fast);
  opacity: 0;
}
.product-card:hover .card-favorite { opacity: 1; }
.card-favorite:hover { background: #fff; color: var(--red-500); }
.card-favorite.active { opacity: 1; color: var(--red-500); }

.card-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-2);
}
.card-category {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--graphite-400);
}
.card-title {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--navy-800);
  line-height: var(--leading-snug);
}
.card-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: auto;
}
.stars {
  display: flex;
  gap: 1px;
  color: var(--gold-500);
}
.stars svg { width: 12px; height: 12px; }
.rating-value {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
}
.rating-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.card-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-price {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy-800);
}
.card-price-old {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: line-through;
}
.card-add-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--navy-800);
  color: var(--sand-100);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.card-add-btn:hover { background: var(--gold-500); color: var(--navy-900); }
.card-add-btn.owned { background: var(--green-300); color: #fff; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--sand-200) 25%, var(--sand-100) 50%, var(--sand-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ----- SECTION TITLE ----- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
}
.section-title {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--navy-800);
  letter-spacing: var(--tracking-tight);
}
.section-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
  font-weight: 400;
}
.section-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold-600);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: color var(--transition-fast);
}
.section-link:hover { color: var(--gold-500); }

/* ----- PRODUCT GRID ----- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-5);
}
.product-grid.grid-5 { grid-template-columns: repeat(5, 1fr); }
.product-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
.product-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ----- HORIZONTAL SCROLL ----- */
.scroll-row {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-2);
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row .product-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

/* ----- CATEGORY CHIPS ----- */
.category-chips {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.chip {
  height: 34px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1.5px solid var(--border-medium);
  background: #fff;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.chip:hover { border-color: var(--navy-400); color: var(--navy-800); }
.chip.active { background: var(--navy-800); border-color: var(--navy-800); color: var(--sand-100); }

/* ----- STAR RATING LARGE ----- */
.star-rating-large {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.stars-lg { font-size: 1.1rem; color: var(--gold-500); letter-spacing: 2px; }
.rating-number { font-size: var(--text-3xl); font-weight: 700; color: var(--navy-800); }
.rating-info { font-size: var(--text-sm); color: var(--text-secondary); }

/* ----- FORM ELEMENTS ----- */
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }
.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.form-input, .form-select, .form-textarea {
  height: 44px;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--navy-400);
  box-shadow: 0 0 0 3px rgba(21,49,67,0.08);
}
.form-textarea { height: auto; padding: var(--space-3) var(--space-4); resize: vertical; }
.form-hint { font-size: var(--text-xs); color: var(--text-muted); }
.form-error { font-size: var(--text-xs); color: var(--red-500); }

/* ----- MODAL ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,15,24,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 600; color: var(--navy-800); }
.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--sand-100); color: var(--text-primary); }
.modal-body { padding: var(--space-6); }
.modal-footer { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border-light); }

/* ----- TOAST NOTIFICATIONS ----- */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: 2000;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--navy-900);
  color: var(--sand-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  min-width: 280px;
  max-width: 400px;
  transform: translateX(120%);
  transition: transform var(--transition-normal);
}
.toast.show { transform: translateX(0); }
.toast.toast-success .toast-icon { color: var(--green-300); }
.toast.toast-error .toast-icon { color: #fc8181; }
.toast.toast-info .toast-icon { color: var(--gold-300); }

/* ----- PROGRESS BAR ----- */
.progress-bar {
  height: 4px;
  background: var(--sand-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gold-500);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ----- DIVIDER ----- */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-6) 0;
}
.divider-gold {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent);
}

/* ----- FOOTER ----- */
.site-footer {
  background: var(--navy-900);
  color: var(--sand-100);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-16);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
.footer-brand .logo-mark .logo-imob { color: var(--sand-100); }
.footer-brand .logo-mark .logo-pro { color: var(--gold-500); }
.footer-brand p {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--navy-200);
  line-height: var(--leading-relaxed);
  max-width: 280px;
}
.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--space-4);
}
.footer-links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-links a {
  font-size: var(--text-sm);
  color: var(--navy-200);
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--sand-100); }
.footer-bottom {
  border-top: 1px solid var(--navy-700);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--navy-300);
}

/* ----- DROPDOWN MENU ----- */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 200;
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: background var(--transition-fast);
  cursor: pointer;
  width: 100%;
}
.dropdown-item:hover { background: var(--sand-100); }
.dropdown-divider { height: 1px; background: var(--border-light); margin: var(--space-1) 0; }

/* ----- MEGA NAV DROPDOWN ----- */
.nav-mega {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 99;
}
.nav-mega.open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-mega-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.nav-mega-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  transition: background var(--transition-fast);
  cursor: pointer;
}
.nav-mega-item:hover { background: var(--sand-50); }
.nav-mega-icon {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}
.nav-mega-title {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--navy-800);
}
.nav-mega-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
}

/* ----- EMPTY STATE ----- */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-4);
}
.empty-state-icon { font-size: 3rem; margin-bottom: var(--space-4); opacity: 0.5; }
.empty-state h3 { font-family: var(--font-serif); font-size: var(--text-2xl); color: var(--navy-800); margin-bottom: var(--space-3); }
.empty-state p { color: var(--text-secondary); max-width: 400px; margin: 0 auto var(--space-6); line-height: var(--leading-relaxed); }

/* ----- TABLE ----- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--graphite-400);
  border-bottom: 1px solid var(--border-light);
}
.table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--sand-50); }

/* ----- TABS ----- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  gap: 0;
  margin-bottom: var(--space-6);
}
.tab {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.tab:hover { color: var(--navy-800); }
.tab.active { color: var(--navy-800); border-bottom-color: var(--gold-500); }

/* ----- MOBILE RESPONSIVE ----- */
@media (max-width: 1024px) {
  .product-grid.grid-5 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .nav-mega-inner { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .site-header { height: auto; padding: var(--space-2) 0; padding-bottom: var(--space-3); }
  .header-inner { flex-wrap: wrap; gap: var(--space-3); }
  .header-logo { flex: 1; }
  .header-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .header-actions { flex: 0 0 auto; }
  .header-search { flex: 0 0 100%; order: 3; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .product-grid.grid-5, .product-grid.grid-4, .product-grid.grid-3 { grid-template-columns: repeat(2, 1fr); }
  .section-header { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
  .btn-lg { height: 48px; font-size: var(--text-base); }
  .scroll-row .product-card { flex: 0 0 180px; }
}

@media (max-width: 480px) {
  :root { --container-pad: 1rem; }
  .product-grid { gap: var(--space-3); }
  .toast-container { left: var(--space-4); right: var(--space-4); }
  .toast { min-width: 0; }
}

/* =============================================================
   ImobiPro v10 — Mobile-first storefront refinements
   ============================================================= */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg { max-width: 100%; }
.product-card { min-width: 0; }
.card-body, .card-footer { min-width: 0; }
.card-title, .card-subtitle, .card-category { overflow-wrap: anywhere; }

/* Mobile is the primary storefront layout */
@media (max-width: 768px) {
  :root { --container-pad: 14px; }
  .site-header { padding: 8px 0 10px; }
  .header-inner { gap: 8px 6px; }
  .header-logo { min-width: 0; }
  .logo-mark { font-size: 19px; }
  .header-actions { gap: 1px; }
  .header-action-btn, .mobile-menu-btn { width: 36px; height: 36px; }
  #favBtn { display: none !important; }
  .btn-login { padding: 0 11px; height: 34px; }
  .header-search { width: 100%; }
  .header-search input { height: 40px; font-size: 14px; background:#fff; }

  .section-header { margin-bottom: 14px; gap: 5px; }
  .section-title { font-size: 1.38rem; line-height: 1.15; }
  .section-subtitle { font-size: .82rem; line-height: 1.4; }
  .section-link { font-size: .78rem; margin-top: 4px; }

  .product-grid,
  .product-grid.grid-5,
  .product-grid.grid-4,
  .product-grid.grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
  }
  .product-card { border-radius: 7px; }
  .card-body { padding: 11px 10px 9px; gap: 5px; }
  .card-category { font-size: 9px; line-height: 1.25; letter-spacing: .055em; }
  .card-title { font-size: .92rem; line-height: 1.24; }
  .card-subtitle { font-size: .76rem; line-height: 1.35; -webkit-line-clamp: 2; }
  .card-footer { padding: 9px 10px 10px; gap: 5px; }
  .card-price { font-size: 1rem; }
  .card-add-btn { width: 34px; height: 34px; flex: 0 0 34px; }
  .card-favorite { display:none; }
  .card-badges { top: 8px; left: 8px; }
  .badge { height: 19px; font-size: 8px; padding: 0 6px; }
  .scroll-row { margin-right: calc(-1 * var(--container-pad)); padding-right: var(--container-pad); }
  .scroll-row .product-card { flex-basis: 156px; }

  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .product-grid,
  .product-grid.grid-5,
  .product-grid.grid-4,
  .product-grid.grid-3 { grid-template-columns: 1fr; }
  .card-cover { aspect-ratio: 4 / 5; }
}

/* =============================================================
   ImobiPro v11 — Mobile-first hardening
   Prevents horizontal layout breakage across the storefront.
   ============================================================= */
:root { --mobile-gutter: 14px; }
html { width:100%; max-width:100%; overflow-x:hidden; }
body { width:100%; max-width:100%; overflow-x:hidden; }
#app, main, .container, .header-inner { min-width:0; max-width:100%; }
.container { width:100%; }
button, a, input, select, textarea { max-width:100%; }

@media (max-width: 768px) {
  :root {
    --container-pad: var(--mobile-gutter);
    --header-height: 108px;
  }

  /* Header: two stable rows, never wider than viewport */
  .site-header { width:100%; }
  .header-inner {
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"logo actions" "search search";
    column-gap:8px;
    row-gap:8px;
    padding-left:var(--mobile-gutter);
    padding-right:var(--mobile-gutter);
  }
  .header-logo { grid-area:logo; min-width:0; overflow:hidden; }
  .header-actions { grid-area:actions; min-width:0; justify-self:end; gap:0; }
  .header-search { grid-area:search; width:100%; min-width:0; flex:none; order:initial; }
  .header-search input { min-width:0; width:100%; }
  .header-nav { display:none!important; }
  .mobile-menu-btn { display:flex; }
  .logo-tag { display:none; }
  .btn-login { display:none; }
  .header-action-btn, .mobile-menu-btn { flex:0 0 36px; }

  /* All product collections become a real grid instead of clipping a card */
  .scroll-row {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    width:100%;
    overflow:visible;
    padding:0;
    margin:0;
    scroll-snap-type:none;
  }
  .scroll-row .product-card {
    width:100%;
    min-width:0;
    max-width:none;
    flex:none;
  }
  .product-grid,
  .product-grid.grid-5,
  .product-grid.grid-4,
  .product-grid.grid-3 {
    width:100%;
    min-width:0;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .product-card { width:100%; min-width:0; overflow:hidden; }
  .card-cover { width:100%; }
  .card-body,.card-footer { width:100%; min-width:0; }
  .card-footer { gap:8px; }
  .card-price { min-width:0; font-size:.98rem; white-space:normal; }
  .card-title,.card-subtitle,.card-category { max-width:100%; overflow-wrap:anywhere; word-break:normal; }

  /* Generic UI that tends to overflow on phones */
  .tabs { overflow-x:auto; max-width:100%; scrollbar-width:none; }
  .tabs::-webkit-scrollbar { display:none; }
  .tab { flex:0 0 auto; white-space:nowrap; }
  .category-chips { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
  .category-chips::-webkit-scrollbar { display:none; }
  .chip { flex:0 0 auto; }
  .filter-row { display:grid; grid-template-columns:1fr; width:100%; }
  .filter-group,.filter-group select,.filter-group input { width:100%; min-width:0; }

  /* Tables never force the entire page wider */
  .table { min-width:640px; }
  .admin-main, .account-main { min-width:0; overflow-x:auto; }

  /* Footer */
  .footer-grid { grid-template-columns:1fr!important; }
  .footer-bottom { align-items:flex-start; text-align:left; }
}

@media (max-width: 390px) {
  :root { --mobile-gutter:12px; }
  .scroll-row,
  .product-grid,
  .product-grid.grid-5,
  .product-grid.grid-4,
  .product-grid.grid-3 { gap:10px; }
  .card-body { padding:10px 9px 8px; }
  .card-footer { padding:9px; }
  .card-title { font-size:.87rem; }
  .card-subtitle { font-size:.72rem; }
  .card-price { font-size:.92rem; }
  .card-add-btn { width:32px; height:32px; flex-basis:32px; }
}

@media (max-width: 330px) {
  .scroll-row,
  .product-grid,
  .product-grid.grid-5,
  .product-grid.grid-4,
  .product-grid.grid-3 { grid-template-columns:1fr; }
}
