/* ==========================================================================
   MAISON TRIO · MULTI-STORE SHOWCASE
   Parapharmacie · Cosmétique · Maison & Bien-Être
   Aesthetic: Refined Apothecary & Modern Clean Luxury
   Typography: Plus Jakarta Sans (Primary UI), Playfair Display (Headings), JetBrains Mono (Specs)
   ========================================================================== */

:root {
  /* Common Surfaces & Neutrals */
  --bg-page: #F8F8F6;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F3F3EF;
  --bg-surface-elevated: #FFFFFF;
  --border-subtle: #E6E5DF;
  --border-medium: #D1D0C7;
  --border-dark: #1E293B;

  /* Typography */
  --text-ink: #18181B;
  --text-secondary: #52525B;
  --text-muted: #71717A;
  --text-light: #FAFAFA;

  /* Font Families */
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', Consolas, Menlo, monospace;

  /* Global Functional Accents */
  --accent-whatsapp: #25D366;
  --accent-whatsapp-hover: #1EBE5D;
  --accent-danger: #EF4444;
  --accent-danger-hover: #DC2626;

  /* Radii & Shadows */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-card: 0 1px 3px rgba(24, 24, 27, 0.05), 0 1px 2px rgba(24, 24, 27, 0.03);
  --shadow-hover: 0 10px 25px -5px rgba(24, 24, 27, 0.08), 0 8px 10px -6px rgba(24, 24, 27, 0.04);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-floating: 0 12px 30px rgba(0, 0, 0, 0.15);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* Default Store Dynamic Variables (Parapharmacie) */
  --store-accent: #0D9488;
  --store-accent-hover: #0F766E;
  --store-accent-light: #F0FDF4;
  --store-accent-border: #A7F3D0;
  --store-accent-text: #065F46;
}

/* Store 1: Parapharmacie & Soins Cliniques */
html[data-store="parapharmacie"] {
  --store-accent: #0D9488;
  --store-accent-hover: #0F766E;
  --store-accent-light: #F0FDF4;
  --store-accent-border: #A7F3D0;
  --store-accent-text: #065F46;
}

/* Store 2: Haute Cosmétique & Beauté */
html[data-store="cosmetique"] {
  --store-accent: #BE185D;
  --store-accent-hover: #9F1239;
  --store-accent-light: #FFF1F2;
  --store-accent-border: #FECDD3;
  --store-accent-text: #881337;
}

/* Store 3: Maison, Bien-Être & Tisanes */
html[data-store="maison"] {
  --store-accent: #D97706;
  --store-accent-hover: #B45309;
  --store-accent-light: #FFFBEB;
  --store-accent-border: #FDE68A;
  --store-accent-text: #78350F;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-page);
  color: var(--text-ink);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden !important;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hidden {
  display: none !important;
}

/* Announcement Bar */
.announcement-bar {
  background-color: #18181B;
  color: #E4E4E7;
  font-size: 0.78rem;
  padding: 0.4rem 0;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.announcement-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.announcement-divider {
  opacity: 0.35;
}

/* Header */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  gap: 1.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo-mark {
  display: flex;
  gap: 4px;
  align-items: center;
  background-color: var(--bg-surface-subtle);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.brand-trio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  transition: transform var(--transition-fast);
}

.dot-para { background-color: #0D9488; }
.dot-cosm { background-color: #BE185D; }
.dot-mais { background-color: #D97706; }

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-ink);
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-store-info {
  display: flex;
  flex-direction: column;
  text-align: right;
  padding-right: 0.5rem;
  border-right: 1px solid var(--border-subtle);
}

.store-city {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-ink);
}

.store-hours {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Header Buttons */
.btn-proforma-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-ink);
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-proforma-header:hover {
  background-color: #EAEAE4;
  border-color: var(--border-medium);
}

.proforma-badge-count {
  background-color: var(--store-accent);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  min-width: 1.25rem;
  text-align: center;
  transition: background-color var(--transition-fast);
}

.btn-whatsapp-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  background-color: var(--accent-whatsapp);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background-color var(--transition-fast);
}

.btn-whatsapp-header:hover {
  background-color: var(--accent-whatsapp-hover);
}

.icon-whatsapp {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Store Switcher Bar (3-in-1 Navigation) */
.store-switcher-bar {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem 0;
}

.store-switcher-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.store-switcher-caption {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.store-tabs-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}
.store-tabs-group::-webkit-scrollbar {
  display: none;
}

.store-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface-subtle);
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.store-tab:hover {
  background-color: #EAEAE4;
  color: var(--text-ink);
}

.store-tab.active {
  background-color: var(--store-accent-light);
  border-color: var(--store-accent-border);
  color: var(--store-accent-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.store-tab-icon {
  font-size: 1rem;
}

.store-tab-badge {
  background-color: rgba(0, 0, 0, 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.store-tab.active .store-tab-badge {
  background-color: var(--store-accent);
  color: #FFFFFF;
}

/* Store Hero / Catalog Intro */
.catalog-intro {
  background-color: var(--store-accent-light);
  border-bottom: 1px solid var(--store-accent-border);
  padding: 2.25rem 0 2rem;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.intro-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intro-pill {
  display: inline-block;
  align-self: flex-start;
  background-color: #FFFFFF;
  color: var(--store-accent-text);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--store-accent-border);
}

.catalog-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-ink);
  max-width: 900px;
}

.catalog-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 820px;
  line-height: 1.55;
}

.intro-features {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(255, 255, 255, 0.75);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-ink);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.chip-icon {
  color: var(--store-accent);
  font-weight: 800;
}

/* Controls Bar (Search + Categories) */
.catalog-controls {
  padding: 1.5rem 0 0.75rem;
}

.controls-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-box-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 0.85rem 2.85rem 0.85rem 2.85rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.92rem;
  color: var(--text-ink);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

#search-input:focus {
  outline: none;
  border-color: var(--store-accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

html[data-store="cosmetique"] #search-input:focus {
  box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.15);
}

html[data-store="maison"] #search-input:focus {
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.search-clear-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}

.search-clear-btn:hover {
  color: var(--text-ink);
}

/* Category Filter Pills */
.category-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.cat-pill {
  padding: 0.45rem 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.cat-pill:hover {
  border-color: var(--border-medium);
  color: var(--text-ink);
}

.cat-pill.active {
  background-color: var(--store-accent);
  border-color: var(--store-accent);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Main Catalog Area */
.catalog-container {
  padding-top: 1rem;
  padding-bottom: 4rem;
  flex: 1;
}

.catalog-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 40px;
}

.count-and-store-tag {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1 1 auto;
}

.store-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--store-accent-light);
  color: var(--store-accent-text);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--store-accent-border);
  white-space: nowrap;
  flex-shrink: 0;
}

.catalog-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-sort-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sort-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.sort-select {
  padding: 0.35rem 0.65rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 0.82rem;
  color: var(--text-ink);
  cursor: pointer;
  white-space: nowrap;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

/* Product Card */
.product-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-medium);
}

.card-media-wrap {
  position: relative;
  background-color: #F8FAFC;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.product-card:hover .card-img {
  transform: scale(1.03);
}

.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: rgba(24, 24, 27, 0.85);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.03em;
}

.card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}

.card-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}

.card-sku {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 600;
}

.card-category-tag {
  color: var(--store-accent-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-ink);
  cursor: pointer;
  transition: color var(--transition-fast);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.card-title:hover {
  color: var(--store-accent);
}

/* Specs pills on card */
.card-specs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.25rem 0;
}

.card-spec-tag {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

.card-footer-row {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.card-price-wrap {
  display: flex;
  flex-direction: column;
}

.card-price-caption {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-price {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-ink);
}

.card-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-card-details {
  padding: 0.45rem 0.65rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-card-details:hover {
  background-color: #EAEAE4;
  color: var(--text-ink);
}

.btn-card-quote {
  padding: 0.45rem 0.85rem;
  background-color: var(--store-accent);
  border: 1px solid var(--store-accent);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.btn-card-quote:hover {
  background-color: var(--store-accent-hover);
}

/* Empty & Error States */
.empty-state, .error-state {
  text-align: center;
  padding: 4rem 1rem;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.empty-title, .error-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-ink);
  margin-bottom: 0.5rem;
}

.empty-description, .error-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-medium);
  color: var(--text-ink);
}

.btn-secondary:hover {
  background-color: #E5E5DF;
}

/* Footer */
.site-footer {
  background-color: #18181B;
  color: #D4D4D8;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid #27272A;
  margin-top: auto;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
}

.footer-desc {
  font-size: 0.88rem;
  color: #A1A1AA;
  max-width: 780px;
  line-height: 1.6;
}

.footer-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #27272A;
}

.meta-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717A;
  margin-bottom: 0.25rem;
}

.meta-val {
  display: block;
  font-size: 0.88rem;
  color: #E4E4E7;
  font-weight: 500;
}

.footer-map-link, .footer-phone-link {
  display: inline-block;
  margin-top: 0.25rem;
  color: #38BDF8;
  font-size: 0.82rem;
  text-decoration: none;
}

.footer-map-link:hover, .footer-phone-link:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid #27272A;
  font-size: 0.78rem;
  color: #71717A;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom-stores {
  display: flex;
  gap: 0.5rem;
}

.footer-sub-link {
  color: #A1A1AA;
  text-decoration: none;
}

.footer-sub-link:hover {
  color: #FFFFFF;
}

/* ==========================================================================
   MODALS & DIALOGS
   ========================================================================== */

dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  margin: auto;
}

dialog::backdrop {
  background-color: rgba(26, 24, 22, 0.35);
  backdrop-filter: blur(4px);
}

/* Exit. A native <dialog> leaves the top layer the instant close() runs, so
   closeDialog() holds it open for one transition first. Dialog and backdrop
   animate as one surface; the modal recedes the way it arrived. */
dialog {
  transition:
    opacity 200ms var(--ease-out),
    transform 200ms var(--ease-out);
}

dialog::backdrop {
  transition: opacity 180ms var(--ease-out);
}

dialog.is-closing {
  opacity: 0;
  transform: scale(0.96) translateY(8px);
}

dialog.is-closing::backdrop,
dialog.is-closing-backdrop::backdrop {
  opacity: 0;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  background-color: #E4E4DF;
  color: var(--text-ink);
}

/* Product Datasheet Dialog */
.datasheet-dialog {
  width: 95%;
  max-width: 900px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.datasheet-card {
  position: relative;
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.datasheet-layout {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  overflow-y: auto;
}

.datasheet-media {
  background-color: #F8FAFC;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-subtle);
}

.datasheet-media img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.datasheet-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.datasheet-meta-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
}

.datasheet-sku {
  font-family: var(--font-mono);
  background-color: #18181B;
  color: #FFFFFF;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.datasheet-store-badge {
  background-color: var(--store-accent-light);
  color: var(--store-accent-text);
  border: 1px solid var(--store-accent-border);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.datasheet-category {
  color: var(--text-muted);
}

.datasheet-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-ink);
  line-height: 1.25;
}

.datasheet-stock {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 600;
  color: #047857;
  background-color: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

.datasheet-section-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-ink);
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.datasheet-specs-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  background-color: var(--bg-surface-subtle);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.spec-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  gap: 1rem;
}

.spec-key {
  color: var(--text-muted);
}

.spec-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-ink);
  text-align: right;
}

.datasheet-desc-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.datasheet-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.datasheet-price-block {
  display: flex;
  flex-direction: column;
}

.price-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.datasheet-price {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-ink);
}

.datasheet-actions {
  display: flex;
  gap: 0.65rem;
}

.btn-proforma-action {
  padding: 0.65rem 1rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-ink);
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-proforma-action:hover {
  background-color: #E4E4DF;
}

.btn-whatsapp-direct {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  background-color: var(--accent-whatsapp);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background-color var(--transition-fast);
}

.btn-whatsapp-direct:hover {
  background-color: var(--accent-whatsapp-hover);
}

/* ==========================================================================
   PROFORMA QUOTE DIALOG (LIGHT THEME, IN TUNE WITH SITE)
   ========================================================================== */

.proforma-dialog {
  width: 95%;
  max-width: 980px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: hidden;
}

.proforma-card {
  position: relative;
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  overflow-x: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  color: var(--text-ink);
  border: 1px solid var(--border-subtle);
}

.sheet-grabber {
  display: none;
}

.proforma-header-bar {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.75rem 0.85rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.proforma-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.proforma-header-main .ascii-bracket-title {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-ink);
  letter-spacing: 0.04em;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.proforma-header-bar .modal-close-btn {
  position: static;
  top: auto;
  right: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.proforma-header-bar .modal-close-btn:hover {
  background-color: #E4E4DF;
  color: var(--text-ink);
  transform: none;
}

.ascii-blueprint-box {
  padding: 0.75rem 1.75rem 1.75rem;
  overflow-y: auto;
  font-family: var(--font-mono);
  color: var(--text-ink);
  flex: 1;
}

.ascii-frame-top, .ascii-frame-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--border-medium);
  font-size: 0.8rem;
  overflow: hidden;
  white-space: nowrap;
  gap: 0.5rem;
  user-select: none;
  flex-shrink: 0;
  width: 100%;
}

.ascii-corner {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  line-height: 1;
}

.ascii-bracket-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-ink);
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin: 0;
  padding: 0 0.5rem;
  flex-shrink: 0;
}

.ascii-title-bracket {
  color: var(--store-accent);
  font-weight: 700;
}

.ascii-dash-line,
.ascii-dash-line-bottom,
.ascii-divider-line {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0;
  color: var(--border-medium);
  font-size: 0;
  height: 1px;
  border-top: 1px dashed currentColor;
  text-align: center;
}

.proforma-body { padding: 0.5rem 0 1rem; }

.ascii-divider {
  display: flex;
  align-items: center;
  color: var(--border-medium);
  font-size: 0.78rem;
  margin: 0.85rem 0;
  overflow: hidden;
  white-space: nowrap;
  gap: 0.5rem;
}

.ascii-bracket {
  color: var(--border-medium);
  flex-shrink: 0;
}

.proforma-table-area {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: 0.5rem 0;
}

.proforma-mobile-submeta {
  display: none;
}

.proforma-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin: 0.5rem 0;
}

.proforma-table th {
  text-align: left;
  padding: 0.7rem 0.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.proforma-table td {
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-ink);
}

.row-store-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.store-badge-parapharmacie {
  background-color: var(--store-accent-light);
  color: var(--store-accent-text);
  border: 1px solid var(--store-accent-border);
}

.store-badge-cosmetique {
  background-color: var(--store-accent-light);
  color: var(--store-accent-text);
  border: 1px solid var(--store-accent-border);
}

.store-badge-maison {
  background-color: var(--store-accent-light);
  color: var(--store-accent-text);
  border: 1px solid var(--store-accent-border);
}

.proforma-sku { color: var(--store-accent); font-weight: 600; font-size: 0.78rem; }
.proforma-item-name { color: var(--text-ink); font-weight: 500; }

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 2px;
}

.btn-qty {
  width: 24px;
  height: 24px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-qty:hover { background-color: var(--store-accent); color: #FFFFFF; border-color: var(--store-accent); }

.qty-val {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--text-ink);
  font-size: 0.85rem;
}

.btn-remove-row {
  background: none;
  border: none;
  color: var(--accent-danger);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-remove-row:hover { color: var(--accent-danger-hover); background-color: rgba(225, 29, 72, 0.08); }

.proforma-empty-cart {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Summary Grid */
.proforma-summary-section { padding: 1rem 0; }

/* ==========================================================================
   PROFORMA FIXED FOOTER (ESTIMATION & CTA BAR)
   ========================================================================== */

.proforma-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.proforma-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Wraps so the submission status can take its own full-width line under
     the summary and the actions, instead of becoming a third column. */
  flex-wrap: wrap;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
  padding: 1rem 1.75rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.proforma-footer-summary {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-summary-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.meta-dot {
  color: var(--border-medium);
}

.footer-summary-total {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.footer-summary-total .summary-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.footer-summary-total .summary-val-highlight {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--store-accent);
  white-space: nowrap;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.proforma-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  line-height: 1.5;
}

/* Proforma Actions Bar */
.proforma-actions-bar {
  display: flex;
  /* Stretch, not center: both buttons take the row's height, so the outline
     button and the filled CTA cannot end up a few px apart. */
  align-items: stretch;
  gap: 0.75rem;
}

/* Submission feedback lives under the actions, not in an alert. */
.proforma-quote-status {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.proforma-quote-status:empty {
  display: none;
}

.proforma-quote-status[data-tone="success"] {
  color: var(--store-accent-text);
}

.proforma-quote-status[data-tone="error"] {
  color: var(--accent-danger);
}

.btn-email-order.is-sent {
  opacity: 0.6;
  pointer-events: none;
}

.proforma-secondary-actions {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.btn-outline-danger {
  background: none;
  border: 1px solid var(--accent-danger);
  color: var(--accent-danger);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-outline-danger:hover { background-color: rgba(225, 29, 72, 0.08); }

/* Email Action Buttons & Icons */
.icon-email {
  /* Phosphor glyph, same 1rem box as the rest of the icon set. */
  font-size: 1rem;
  flex-shrink: 0;
}

.btn-email-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  background-color: #18181B;
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-email-header:hover {
  background-color: #27272A;
  color: #FFFFFF;
}

.btn-email-direct {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  background-color: var(--store-accent);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-email-direct:hover {
  background-color: var(--store-accent-hover);
  color: #FFFFFF;
}

.btn-email-order {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* Same 1px box as the outlined buttons, so heights match when stacked. */
  border: 1px solid transparent;
  padding: 0.7rem 1.35rem;
  background-color: var(--store-accent);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-email-order:hover {
  background-color: var(--store-accent-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Optional Client Contact Details */
.proforma-client-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
  padding: 1rem;
  background-color: var(--bg-surface-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.client-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.client-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.client-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-family: var(--font-primary);
  font-size: 0.82rem;
  color: var(--text-ink);
  transition: border-color var(--transition-fast);
}

.client-input:focus {
  outline: none;
  border-color: var(--store-accent);
}

@media (max-width: 640px) {
  .proforma-client-fields {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   STICKY FLOATING BAR
   ========================================================================== */

.proforma-floating-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 650px;
  z-index: 90;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.floating-inner {
  background-color: #18181B;
  color: #FFFFFF;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-floating);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #27272A;
}

.floating-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
}

.btn-floating-action {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1rem;
  background-color: var(--store-accent);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.btn-floating-action:hover {
  background-color: var(--store-accent-hover);
}

.floating-total-pill {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */

@media (max-width: 768px) {
  .announcement-bar {
    display: none;
  }

  .header-store-info {
    display: none;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .header-contact {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
  }

  .brand-link {
    width: 100%;
  }

  .catalog-title {
    font-size: 1.45rem;
  }

  .datasheet-layout {
    grid-template-columns: 1fr;
  }

  .datasheet-media {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
  }

  .datasheet-body {
    padding: 1.25rem;
  }

  .datasheet-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .datasheet-actions {
    justify-content: stretch;
  }

  .datasheet-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .datasheet-dialog {
    margin: auto;
    width: 96%;
    max-width: 96%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: hidden;
  }

  .datasheet-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Bottom sheet for Proforma / Devis modal on mobile */
  .proforma-dialog {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    width: 100%;
    max-width: 100vw;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    max-height: 88dvh;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.22);
    overscroll-behavior-y: contain;
  }

  .proforma-dialog[open] {
    animation: sheetSlideUp 280ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* The sheet leaves the way it came in: down, not a fade. */
  .proforma-dialog.is-closing {
    opacity: 1;
    transform: translateY(100%);
  }

  .proforma-card {
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    max-height: 88dvh;
    padding-bottom: 0;
  }

  .proforma-header-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 10px 1rem 12px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    min-height: auto;
    flex-shrink: 0;
  }

  .sheet-grabber {
    display: block;
    width: 44px;
    height: 5px;
    background-color: var(--border-medium);
    border-radius: 9999px;
    margin: 0 auto 10px auto;
    flex-shrink: 0;
    cursor: grab;
  }

  .proforma-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
  }

  .proforma-header-main .ascii-bracket-title {
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
  }

  .proforma-header-bar .modal-close-btn,
  .proforma-header-main .modal-close-btn {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .ascii-blueprint-box {
    padding: 0.5rem 0.85rem 1.25rem;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
  }

  .catalog-header-row {
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
  }

  .count-and-store-tag {
    gap: 0.4rem;
  }

  .store-badge-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  .catalog-count {
    font-size: 0.76rem;
  }

  .sort-label {
    display: none;
  }

  .sort-select {
    font-size: 0.76rem;
    padding: 0.3rem 0.5rem;
    max-width: 140px;
  }

  /* Mobile Product Card Layout for Devis Bottom Sheet - Zero Horizontal Scroll */
  .proforma-table-area {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    margin: 0.35rem 0;
  }

  .proforma-table {
    display: block;
    width: 100%;
    margin: 0.25rem 0;
    border-collapse: separate;
  }

  .proforma-table thead {
    display: none; /* Hide multi-column desktop header on mobile */
  }

  .proforma-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
  }

  .proforma-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    padding: 0.75rem 0.85rem;
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    width: 100%;
    box-sizing: border-box;
  }

  .proforma-table td {
    padding: 0;
    border: none;
    vertical-align: top;
  }

  /* Store Rayon Badge: Top-Left */
  .proforma-table td.col-store {
    display: block;
    width: calc(100% - 36px);
    margin-bottom: 0.35rem;
  }

  .proforma-table .row-store-badge {
    font-size: 0.65rem;
    padding: 2px 7px;
    letter-spacing: 0.04em;
    font-weight: 700;
  }

  /* Remove Button: Top-Right */
  .proforma-table td.col-remove {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .proforma-table .btn-remove-row {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: all var(--transition-fast);
  }

  .proforma-table .btn-remove-row:active {
    background-color: #FEE2E2;
    color: #DC2626;
    border-color: #FCA5A5;
  }

  /* Product Name & Submeta: Full Width Middle Row */
  .proforma-table td.col-name {
    display: block;
    width: 100%;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-subtle);
  }

  .proforma-title-text {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-ink);
    word-break: break-word;
  }

  .proforma-mobile-submeta {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 3px;
  }

  /* Redundant on mobile card */
  .proforma-table td.col-sku,
  .proforma-table td.col-price {
    display: none;
  }

  /* Quantity Control: Bottom Left */
  .proforma-table td.col-qty {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    width: auto;
  }

  .qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    padding: 2px 4px;
  }

  .btn-qty {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-ink);
    cursor: pointer;
    border-radius: 3px;
  }

  .btn-qty:active {
    background-color: var(--border-subtle);
  }

  .qty-val {
    min-width: 1.35rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-ink);
  }

  /* Subtotal: Bottom Right */
  .proforma-table td.col-subtotal {
    display: block;
    flex: 0 0 auto;
    width: auto;
    text-align: right;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--store-accent);
    white-space: nowrap;
    font-family: var(--font-mono);
  }

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

  .store-tab-label {
    font-size: 0.8rem;
  }

  /* Mobile Fixed Footer & Actions */
  .proforma-scroll-area {
    padding: 0.5rem 0.85rem 1rem;
  }

  .proforma-footer-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 1rem max(env(safe-area-inset-bottom, 0px), 0.85rem);
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
  }

  /* Stacked footer: the status is a normal block, not a wrapped flex row. */
  .proforma-quote-status {
    flex-basis: auto;
  }

  .proforma-footer-summary {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
  }

  .footer-summary-meta {
    font-size: 0.76rem;
  }

  .footer-summary-total {
    gap: 0.4rem;
  }

  .footer-summary-total .summary-label {
    font-size: 0.82rem;
  }

  .footer-summary-total .summary-val-highlight {
    font-size: 1.08rem;
  }

  .proforma-actions-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .proforma-actions-bar .btn-email-order {
    width: 100%;
    order: 1;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
  }

  .proforma-secondary-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    order: 2;
  }

  /* Stacked under the email CTA, so it takes the same width and height. */
  .proforma-secondary-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
  }
}

/* ==========================================================================
   POLISH ADDITIONS
   ========================================================================== */

/* Scroll-entry reveal for product cards */
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card {
  animation: cardReveal 0.5s var(--ease-spring) both;
}

/* Phosphor icon vertical alignment inside chips */
/* Icon wrappers. A plain span is one 1.5-line-height box and the glyph sits on
   its baseline, which reads as the icon floating above the label. Occupy one
   text line (1lh) and centre the glyph in it instead. */
.proforma-hdr-icon,
.floating-icon,
.proforma-btn-icon,
.store-tab-icon,
.chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  block-size: 1.5em; /* fallback: engines without lh (Chrome <109, Safari <16.4) */
  block-size: 1lh;
}

.chip-icon .ph { font-size: 0.95rem; }
.store-tab-icon .ph { font-size: 1.05rem; }
.empty-icon .ph { font-size: 2.25rem; }
.announcement-item .ph { font-size: 0.95rem; opacity: 0.85; }
.proforma-hdr-icon .ph, .floating-icon .ph, .proforma-btn-icon .ph { font-size: 1rem; }

/* Focus-visible for accessibility */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--store-accent);
  outline-offset: 2px;
}

/* Smooth card image on hover already; add subtle border glow */
.product-card:hover {
  border-color: var(--store-accent-border);
}

/* Reduced motion already handled */

/* ==========================================================================
   ANIMATION ADDITIONS (Emil Kowalski philosophy)
   ========================================================================== */

/* Button press feedback (near-imperceptible, high-frequency safe) */
.btn:active,
.btn-card-details:active,
.btn-card-quote:active,
.btn-proforma-header:active,
.btn-qty:active,
.store-tab:active,
.cat-pill:active,
.search-clear-btn:active {
  transform: scale(0.97);
}

.btn,
.btn-card-details,
.btn-card-quote,
.btn-proforma-header,
.btn-qty,
.store-tab,
.cat-pill,
.search-clear-btn {
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms cubic-bezier(0.23, 1, 0.32, 1), border-color 160ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 160ms cubic-bezier(0.23, 1, 0.32, 1), color 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Modal entrance animations */
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); opacity: 0.7; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

dialog[open] {
  animation: modalIn 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

dialog[open]::backdrop {
  animation: backdropIn 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  dialog[open],
  dialog[open]::backdrop,
  .proforma-dialog[open] {
    animation: none;
  }
  /* Keep the fade (it explains the dismissal), drop the movement. */
  dialog {
    transition: opacity 160ms linear;
  }
  dialog.is-closing,
  .proforma-dialog.is-closing {
    transform: none;
  }
  .btn:active,
  .btn-card-details:active,
  .btn-card-quote:active,
  .store-tab:active,
  .cat-pill:active {
    transform: none;
  }
}
