/* ============================================================
   Sílica Shop — components.css
   Botões, badges, cards de produto, inputs, navbar, footer,
   toggles de plano, breadcrumb, tabs, price display
   ============================================================ */


/* ============================================================
   1. BOTÕES
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  height: 42px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn:active { transform: scale(0.97); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Ripple effect */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.btn:hover::after { opacity: 1; }

/* Primário (vermelho Sílica) */
.btn--primary {
  background: var(--silica-red);
  color: #fff;
  border-color: var(--silica-red);
  box-shadow: 0 1px 8px rgba(125,0,0,0.4);
}
.btn--primary:hover {
  background: var(--silica-red-light);
  border-color: var(--silica-red-light);
  box-shadow: 0 2px 16px rgba(125,0,0,0.55);
}

/* Secundário (outline) */
.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn--secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Superfície (para cards escuros) */
.btn--surface {
  background: var(--bg-overlay);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn--surface:hover {
  border-color: var(--silica-red);
  color: var(--silica-red-light);
}

/* Danger */
.btn--danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.btn--danger:hover {
  background: var(--color-danger);
  color: #fff;
}

/* Tamanhos */
.btn--xs {
  height: 30px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

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

.btn--lg {
  height: 52px;
  padding: 0 var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn--xl {
  height: 60px;
  padding: 0 var(--space-10);
  font-size: var(--text-md);
  border-radius: var(--radius-lg);
}

.btn--full { width: 100%; }

/* Botão com ícone apenas */
.btn--icon {
  padding: 0;
  width: 42px;
}
.btn--icon.btn--sm { width: 36px; }
.btn--icon.btn--lg { width: 52px; }

/* Estado loading */
.btn--loading {
  pointer-events: none;
  opacity: 0.8;
}
.btn--loading .btn__text { opacity: 0; }
.btn--loading::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Ícone dentro do botão */
.btn svg, .btn img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.btn--lg svg, .btn--lg img { width: 18px; height: 18px; }


/* ============================================================
   2. BADGES / TAGS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.badge--default {
  background: var(--bg-overlay);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.badge--red {
  background: rgba(125,0,0,0.18);
  color: #ff6b6b;
  border: 1px solid rgba(125,0,0,0.35);
}

.badge--success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(46,158,107,0.25);
}

.badge--warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid rgba(200,125,26,0.25);
}

.badge--info {
  background: var(--color-info-bg);
  color: var(--color-info);
  border: 1px solid rgba(41,128,185,0.25);
}

.badge--popular {
  background: linear-gradient(135deg, var(--silica-red), var(--silica-red-light));
  color: #fff;
  border: none;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 10px;
  padding: 3px var(--space-2);
}

/* Dot de status */
.badge::before {
  content: '';
  display: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge--dot::before { display: block; }


/* ============================================================
   3. INPUTS E FORMULÁRIOS
   ============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.form-label--required::after {
  content: ' *';
  color: var(--silica-red-light);
}

.form-input {
  height: 46px;
  padding: 0 var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  width: 100%;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:hover {
  border-color: var(--border-strong);
}

.form-input:focus {
  border-color: var(--silica-red);
  background: var(--bg-base);
  box-shadow: 0 0 0 3px var(--silica-red-faint);
}

.form-input--error {
  border-color: var(--color-danger);
}
.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(192,57,43,0.15);
}

.form-input--success {
  border-color: var(--color-success);
}

.form-textarea {
  height: auto;
  min-height: 100px;
  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(--color-danger);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Input com ícone prefixado */
.input-group {
  position: relative;
}

.input-group__prefix,
.input-group__suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.input-group__prefix { left: var(--space-3); }
.input-group__suffix { right: var(--space-3); }

.input-group .form-input { padding-left: var(--space-10); }
.input-group--suffix .form-input { padding-right: var(--space-10); }

/* NIF / NUS input especial */
.nus-input {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  height: 56px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-5);
  width: 100%;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.nus-input:focus {
  border-color: var(--silica-red);
  box-shadow: 0 0 0 4px var(--silica-red-faint);
}

.nus-input--found {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px var(--color-success-bg);
}

.nus-input--not-found {
  border-color: var(--color-warning);
  box-shadow: 0 0 0 3px var(--color-warning-bg);
}

/* Checkbox e Radio */
.checkbox-group,
.radio-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"],
.radio-group   input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--silica-red);
  cursor: pointer;
  flex-shrink: 0;
}

/* Toggle switch */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.toggle__track {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--transition-spring), background var(--transition-fast);
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle input:checked + .toggle__track {
  background: var(--silica-red);
  border-color: var(--silica-red);
}

.toggle input:checked + .toggle__track::after {
  transform: translateX(20px);
  background: #fff;
}

.toggle__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}


/* ============================================================
   4. TOGGLE DE PLANO (Mensal / Anual)
   ============================================================ */

.plan-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-2);
}

.plan-toggle__option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.plan-toggle__option:hover {
  color: var(--text-secondary);
}

.plan-toggle__option.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.plan-toggle__discount {
  font-size: 10px;
  font-weight: 700;
  background: var(--color-success);
  color: #fff;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* ============================================================
   5. CARDS DE PRODUTO
   ============================================================ */

.product-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 80% 60% at 50% -20%,
    rgba(125,0,0,0.06) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
}

.product-card:hover {
  border-color: rgba(125,0,0,0.35);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(125,0,0,0.15);
  transform: translateY(-3px);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.product-card__logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.product-card__logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.product-card__tagline {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: var(--space-1);
}

.product-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.product-card__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.product-card__feature {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.product-card__feature-icon {
  width: 14px;
  height: 14px;
  color: var(--color-success);
  flex-shrink: 0;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.product-card__price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-card__price-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.product-card__price-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.product-card__price-value span {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* Card em destaque (featured/popular) */
.product-card--featured {
  border-color: rgba(125,0,0,0.4);
  background: linear-gradient(
    160deg,
    rgba(125,0,0,0.06) 0%,
    var(--bg-surface) 60%
  );
}

.product-card--featured:hover {
  border-color: var(--silica-red);
  box-shadow: var(--shadow-red), var(--shadow-lg);
}

/* Badge no canto superior direito do card */
.product-card__corner-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}


/* ============================================================
   6. CARDS DE PLANO (Pricing)
   ============================================================ */

.plan-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
  overflow: hidden;
}

.plan-card--popular {
  border-color: var(--silica-red);
  box-shadow: 0 0 40px rgba(125,0,0,0.18);
}

.plan-card--popular::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--silica-red-dark), var(--silica-red), var(--silica-red-dark));
}

.plan-card__tier {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silica-red-light);
}

.plan-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.plan-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.plan-card__price-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-block: var(--space-2);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.plan-card__currency {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
  align-self: flex-start;
  margin-top: 8px;
}

.plan-card__amount {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.plan-card__period {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 400;
}

.plan-card__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}

.plan-card__annual-note {
  font-size: var(--text-xs);
  color: var(--color-success);
  font-weight: 500;
}

.plan-card__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.plan-card__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

.plan-card__feature-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.plan-card__feature-check--yes {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.plan-card__feature-check--no {
  background: var(--bg-overlay);
  color: var(--text-muted);
}

.plan-card__cta {
  margin-top: auto;
}

/* Preço original riscado (desconto anual) */
.price-original {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-saving {
  font-size: var(--text-xs);
  color: var(--color-success);
  font-weight: 600;
}


/* ============================================================
   7. NAVBAR
   ============================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 800;
  height: var(--navbar-height);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.navbar__logo {
  height: 28px;
  width: auto;
}

.navbar__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.navbar__name span {
  color: var(--silica-red-light);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Botão do carrinho com contador */
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.cart-btn:hover {
  border-color: var(--silica-red);
  color: var(--text-primary);
}

.cart-btn svg {
  width: 20px;
  height: 20px;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background: var(--silica-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid var(--bg-base);
  transition: transform var(--transition-spring);
}

.cart-count--bump {
  animation: bump 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bump {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.4); }
}

.cart-count.hidden { display: none; }


/* ============================================================
   8. BREADCRUMB
   ============================================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.breadcrumb__item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb__item a:hover {
  color: var(--text-primary);
}

.breadcrumb__item--active {
  color: var(--text-secondary);
}

.breadcrumb__sep {
  color: var(--text-muted);
  font-size: var(--text-xs);
}


/* ============================================================
   9. TABS
   ============================================================ */

.tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.tab {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--silica-red);
  font-weight: 600;
}


/* ============================================================
   10. CARRINHO — ITEM
   ============================================================ */

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast);
}

.cart-item:hover {
  border-color: var(--border-default);
}

.cart-item__logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item__logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.cart-item__info {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-1);
}

.cart-item__tier,
.cart-item__period {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.cart-item__price {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
  text-align: right;
}

.cart-item__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  background: none;
  border: none;
}

.cart-item__remove:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}


/* ============================================================
   11. RESUMO DO PEDIDO (Order Summary)
   ============================================================ */

.order-summary {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: sticky;
  top: calc(var(--navbar-height) + var(--space-4));
}

.order-summary__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
}

.order-summary__lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.order-summary__line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.order-summary__line--total {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-default);
}

.order-summary__currency {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}


/* ============================================================
   12. CARD DE CONTA / UTILIZADOR (confirmação de NUS/NIF)
   ============================================================ */

.account-confirm-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-success-bg);
  border: 1px solid rgba(46,158,107,0.3);
  border-radius: var(--radius-lg);
  animation: scaleIn 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.account-confirm-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.account-confirm-card__info {
  flex: 1;
}

.account-confirm-card__name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
}

.account-confirm-card__id {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Estado "não encontrado" */
.account-not-found-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-warning-bg);
  border: 1px solid rgba(200,125,26,0.3);
  border-radius: var(--radius-lg);
  animation: scaleIn 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}


/* ============================================================
   13. FOOTER
   ============================================================ */

.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-8);
  margin-top: var(--space-20);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.footer__brand-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.footer__brand-name span {
  color: var(--silica-red-light);
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.footer__link {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--text-secondary);
}


/* ============================================================
   14. ESTADOS DE CARREGAMENTO DE PÁGINA
   ============================================================ */

.page-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--border-default);
  border-top-color: var(--silica-red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner--sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.spinner--lg {
  width: 48px;
  height: 48px;
  border-width: 3px;
}


/* ============================================================
   15. STEP INDICATOR (checkout)
   ============================================================ */

.steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
}

.step__circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.step__label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.step__connector {
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
  margin-inline: var(--space-2);
  transition: background var(--transition-base);
}

/* Step activo */
.step--active .step__circle {
  background: var(--silica-red);
  border-color: var(--silica-red);
  color: #fff;
  box-shadow: 0 0 12px rgba(125,0,0,0.4);
}
.step--active .step__label {
  color: var(--text-primary);
}

/* Step concluído */
.step--done .step__circle {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}
.step--done .step__label {
  color: var(--text-secondary);
}
.step--done + .step .step__connector {
  background: var(--color-success);
}


/* ============================================================
   16. CONFIRMAÇÃO DE SUCESSO
   ============================================================ */

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-success-bg);
  border: 2px solid var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
  margin: 0 auto;
  animation: scaleIn 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.success-icon svg {
  width: 36px;
  height: 36px;
}

.order-ref {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  letter-spacing: 0.08em;
  text-align: center;
}


/* ============================================================
   17. IFRAME / POPUP de criação de conta
   ============================================================ */

.account-iframe-wrapper {
  width: 100%;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
}

.account-iframe-wrapper iframe {
  width: 100%;
  min-height: 540px;
  border: none;
  display: block;
}


/* ============================================================
   18. RESPONSIVE — ajustes de componentes
   ============================================================ */

@media (max-width: 768px) {
  .navbar__inner { padding-inline: var(--space-4); }

  .plan-toggle { flex-wrap: wrap; }

  .steps { gap: var(--space-1); }
  .step__label { display: none; }
  .step--active .step__label { display: block; }

  .order-summary { position: static; }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .footer__links { flex-wrap: wrap; gap: var(--space-3); }

  .cart-item { flex-wrap: wrap; }
  .cart-item__price { order: 3; width: 100%; margin-top: var(--space-1); }
}

@media (max-width: 480px) {
  .btn--xl {
    height: 52px;
    font-size: var(--text-base);
    padding: 0 var(--space-6);
  }

  .plan-card__amount { font-size: var(--text-3xl); }
}
