/* ============================================================
   Solution4Hotel — Design System
   Cores: #7132a1 (primária), #9e68c5 (secundária)
   Fonte: Nunito (Google Fonts)
   ============================================================ */

:root {
  --purple:       #7132a1;
  --purple-light: #9e68c5;
  --purple-pale:  #f5f0fb;
  --purple-dark:  #4e2173;
  --navy:         #1a0d33;
  --white:        #ffffff;
  --gray-50:      #f9f9fb;
  --gray-100:     #f0edf6;
  --gray-200:     #e2d9f0;
  --gray-400:     #b0a0c8;
  --gray-600:     #6b5e80;
  --gray-800:     #333344;
  --text:         #2d2d3a;
  --text-muted:   #6b6b80;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 2px 12px rgba(113,50,161,0.10);
  --shadow-lg:    0 6px 28px rgba(113,50,161,0.15);
  --transition:   0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Nunito', sans-serif; color: var(--text); background: var(--gray-50); min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; display: block; }
a { text-decoration: none; }

/* ── Header ─────────────────────────────────────────────────── */
.header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo-link { display: flex; align-items: center; }
.logo-img { height: 44px; width: auto; filter: brightness(0) invert(1); }

.header-nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: rgba(255,255,255,0.8);
  font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.cart-btn { display: flex; align-items: center; gap: 6px; }
.cart-icon { font-size: 16px; }
.cart-badge {
  background: #fff; color: var(--purple);
  font-size: 11px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.cart-badge.hidden { display: none; }

/* ── Barra de condições comerciais ──────────────────────────── */
.comercial-bar {
  background: var(--purple-pale);
  border-top: 2px solid var(--gray-200);
  border-bottom: 2px solid var(--gray-200);
  padding: 14px 24px;
}
.comercial-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: flex-start;
  gap: 24px; flex-wrap: wrap;
}
.comercial-item {
  display: flex; align-items: flex-start; gap: 12px;
  flex: 1; min-width: 260px;
}
.comercial-icon { font-size: 22px; line-height: 1.3; flex-shrink: 0; }
.comercial-item > div { display: flex; flex-direction: column; gap: 3px; }
.comercial-item strong { font-size: 13px; font-weight: 800; color: var(--purple); }
.comercial-item span { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.comercial-divider {
  width: 1px; background: var(--gray-200); align-self: stretch;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .comercial-divider { display: none; }
}

/* ── Flash messages ─────────────────────────────────────────── */
.flash-container { max-width: 1200px; margin: 16px auto 0; padding: 0 24px; }
.flash {
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  margin-bottom: 8px;
}
.flash-error   { background: #fce8e8; color: #c0392b; border: 1px solid #f5c6c6; }
.flash-warning { background: #fff8e1; color: #8a6d00; border: 1px solid #ffe082; }
.flash-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* ── Main content ───────────────────────────────────────────── */
.main-content { flex: 1; max-width: 1200px; margin: 0 auto; width: 100%; padding: 32px 24px; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { background: var(--navy); padding: 20px 24px; margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; color: rgba(255,255,255,0.45); font-size: 13px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--purple-pale); color: var(--purple); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-outline { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn-outline:hover { background: var(--purple-pale); }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}
.card-title { font-size: 17px; font-weight: 800; color: var(--purple); margin-bottom: 6px; }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.required-mark { color: var(--purple); }
.optional-label { color: var(--gray-400); font-size: 12px; font-weight: 400; }
.text-muted { color: var(--text-muted); }

/* ============================================================
   PAGE: REGISTER
   ============================================================ */
.page-register { }

.register-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);
  border-radius: var(--radius); padding: 56px 48px;
  margin-bottom: 32px;
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.07;
  background-image: repeating-linear-gradient(
    45deg, #fff 0, #fff 2px, transparent 0, transparent 50%
  );
  background-size: 20px 20px;
}
.hero-text { position: relative; max-width: 560px; }
.hero-text h1 { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 12px; line-height: 1.2; }
.hero-text p  { font-size: 16px; color: rgba(255,255,255,0.8); line-height: 1.6; }

.register-form-wrap { max-width: 720px; }

.form-card { }
.form-row { margin-bottom: 20px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 700; color: var(--gray-800); }

input[type=text], input[type=email], input[type=tel],
select, textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif; font-size: 14px; color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(113,50,161,0.1);
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
textarea { resize: vertical; }

.form-actions { margin-top: 28px; }

/* ============================================================
   PAGE: CATALOG
   ============================================================ */
.page-catalog { }

.catalog-header { margin-bottom: 24px; }
.catalog-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.catalog-header h1 { font-size: 24px; font-weight: 800; color: var(--purple); }
.catalog-header p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.cart-summary-btn { position: relative; }
.cart-badge-lg {
  background: var(--purple); color: #fff;
  font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px;
  border-radius: 10px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-badge-lg.hidden { display: none; }

/* Filter bar */
.filter-bar {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 24px;
  margin-bottom: 28px;
}
.filter-group { margin-bottom: 16px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group > label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--purple); text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  background: var(--gray-100); color: var(--gray-600);
  border: 1.5px solid transparent;
  transition: all var(--transition);
}
.chip:hover { background: var(--purple-pale); color: var(--purple); border-color: var(--purple-light); }
.chip-active { background: var(--purple); color: #fff; border-color: var(--purple); }
.chip-active:hover { background: var(--purple-dark); color: #fff; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.product-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.product-img-wrap { position: relative; background: var(--purple-pale); padding: 24px; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.product-img-wrap img { max-height: 120px; object-fit: contain; }
.product-img-placeholder svg { width: 100px; height: auto; }

.product-type-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-frio              { background: #e3f0ff; color: #1565c0; }
.badge-quente-e-frio     { background: #fff3e0; color: #e65100; }

.product-info { padding: 16px 18px; flex: 1; }
.product-brand { font-size: 11px; font-weight: 700; color: var(--purple-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.product-model { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.product-btus { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.product-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.product-price { font-size: 20px; font-weight: 800; color: var(--purple); }

.product-actions {
  padding: 14px 18px; border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 12px;
}
.qty-control { display: flex; align-items: center; gap: 0; }
.qty-btn {
  width: 30px; height: 30px;
  background: var(--gray-100); border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--purple);
  transition: background var(--transition);
  border-radius: var(--radius-sm);
}
.qty-btn:hover { background: var(--purple-pale); }
.qty-input {
  width: 44px; height: 30px; text-align: center;
  border: 1.5px solid var(--gray-200); border-radius: 0;
  font-size: 14px; font-weight: 700;
  padding: 0;
}
.add-to-cart-btn { flex: 1; font-size: 13px; padding: 8px 12px; }

/* Empty state */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 24px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--purple); color: #fff;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.hidden { display: none; }

/* ============================================================
   PAGE: CART
   ============================================================ */
.page-cart { }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.cart-header h1 { font-size: 24px; font-weight: 800; color: var(--purple); }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }

.cart-table-wrap { overflow-x: auto; }
.cart-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cart-table th {
  background: var(--purple-pale); color: var(--purple);
  padding: 10px 14px; text-align: left;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gray-200);
}
.cart-table td { padding: 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }

.badge-tipo {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  background: var(--purple-pale); color: var(--purple);
}
.subtotal-cell { font-weight: 700; color: var(--purple); }
.remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 14px; font-weight: 700;
  width: 28px; height: 28px; border-radius: 50%;
  transition: all var(--transition); display: flex; align-items: center; justify-content: center;
}
.remove-btn:hover { background: #fce8e8; color: #c0392b; }

.qty-control-sm { display: flex; align-items: center; gap: 6px; }
.qty-btn-sm {
  width: 24px; height: 24px; border: 1.5px solid var(--gray-200);
  background: #fff; cursor: pointer; border-radius: 4px;
  font-size: 14px; font-weight: 700; color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.qty-btn-sm:hover { background: var(--purple-pale); border-color: var(--purple-light); }
.qty-display { font-weight: 700; min-width: 24px; text-align: center; font-size: 14px; }

/* Sidebar cards */
.cart-sidebar { display: flex; flex-direction: column; gap: 16px; }
.client-summary-card { }
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.summary-list dt { color: var(--text-muted); font-weight: 600; }
.summary-list dd { color: var(--text); font-weight: 700; }

.total-card { }
.total-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.total-row > span { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.total-value { font-size: 26px; font-weight: 800; color: var(--purple); }
.total-note { font-size: 11px; color: var(--gray-400); margin-bottom: 20px; line-height: 1.5; }

/* ============================================================
   PAGE: CONFIRMATION
   ============================================================ */
.page-confirmation {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh;
}
.confirmation-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 48px;
  max-width: 560px; width: 100%; text-align: center;
}
.confirmation-icon svg { width: 72px; height: 72px; margin: 0 auto 24px; }
.confirmation-card h1 { font-size: 28px; font-weight: 800; color: var(--purple); margin-bottom: 12px; }
.confirmation-subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.6; }

.confirmation-details { background: var(--purple-pale); border-radius: var(--radius-sm); padding: 20px 24px; margin-bottom: 24px; text-align: left; }
.detail-item { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
.detail-item:last-child { border-bottom: none; }
.detail-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-value { font-size: 14px; font-weight: 700; color: var(--text); }
.detail-highlight { font-size: 16px; font-weight: 800; color: var(--purple); }

.confirmation-message { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 32px; }
.confirmation-actions { }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main-content { padding: 20px 16px; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .register-hero { padding: 32px 24px; }
  .hero-text h1 { font-size: 24px; }
  .product-grid { grid-template-columns: 1fr; }
  .catalog-header-inner { flex-direction: column; align-items: flex-start; }
  .confirmation-card { padding: 32px 20px; }
  .cart-header { flex-direction: column; align-items: flex-start; }
}
