:root {
  --brand: #111827;
  --brand-soft: #374151;
  --surface: #ffffff;
  --surface-muted: #f6f7f9;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --success: #166534;
  --danger: #991b1b;
  --warning: #92400e;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text);
  background: var(--surface-muted);
}

* { box-sizing: border-box; }

/* Hidden UI state must always win over component display rules */
[hidden] {
  display: none !important;
}

html { background: var(--surface-muted); }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #fff 0, var(--surface-muted) 360px); }
body.has-overlay { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { width: min(1180px, 100%); margin: 0 auto; padding: 18px clamp(16px, 3vw, 34px) 30px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 64px; }
.brand-group { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 15px; display: grid; place-items: center; background: var(--brand); color: white; font-weight: 800; box-shadow: var(--shadow); overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-copy { display: grid; gap: 3px; min-width: 0; }
.brand-copy strong { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy span { color: var(--muted); font-size: .78rem; }
.topbar-actions { display: flex; gap: 8px; }
.header-action { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 13px; padding: 0 13px; background: white; color: var(--text); cursor: pointer; transition: .18s ease; }
.header-action:hover { border-color: color-mix(in srgb, var(--brand) 28%, var(--line)); box-shadow: 0 8px 24px rgba(17,24,39,.06); }
.cart-action { position: relative; }
.cart-badge { min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--brand); color: white; font-size: .67rem; }

.hero { margin: 22px 0 18px; padding: clamp(24px, 5vw, 52px); display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(230px, .7fr); align-items: end; gap: clamp(20px, 4vw, 44px); border-radius: 30px; color: white; background: radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--brand-soft) 75%, white), transparent 42%), linear-gradient(135deg, var(--brand), var(--brand-soft)); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 7px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; opacity: .72; }
.hero h1 { margin: 0; max-width: 720px; font-size: clamp(1.8rem, 5vw, 3.5rem); line-height: 1.15; }
.hero-copy { max-width: 660px; margin: 16px 0 0; line-height: 1.9; opacity: .86; }
.hero-session { display: grid; gap: 9px; padding: 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 20px; background: rgba(255,255,255,.09); backdrop-filter: blur(12px); }
.hero-session strong { font-size: 1rem; }
.hero-session span { font-size: .78rem; line-height: 1.7; opacity: .82; }
.hero-session-button { min-height: 40px; border: 0; border-radius: 12px; padding: 0 14px; background: white; color: var(--brand); font-weight: 800; cursor: pointer; }

.search-panel { position: sticky; top: 8px; z-index: 5; padding: 14px; margin: 0 0 24px; border: 1px solid rgba(229, 231, 235, .8); border-radius: 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(16px); box-shadow: 0 8px 28px rgba(17,24,39,.06); }
.search-box { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.category-list { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; scrollbar-width: none; }
.category-list::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 999px; padding: 9px 14px; cursor: pointer; transition: .18s ease; }
.category-chip:hover, .category-chip.is-active { color: white; background: var(--brand); border-color: var(--brand); }

.catalog-section { padding-bottom: 22px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 2px 16px; }
.section-heading h2 { margin: 0; font-size: clamp(1.35rem, 4vw, 1.9rem); }
.section-heading-meta { display: flex; align-items: center; gap: 7px; }
.count-pill, .pricing-pill { padding: 8px 12px; border-radius: 999px; background: white; color: var(--muted); border: 1px solid var(--line); font-size: .78rem; }
.pricing-pill.is-private { background: color-mix(in srgb, var(--brand) 9%, white); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 24%, var(--line)); font-weight: 800; }
.state-card { min-height: 140px; display: grid; place-items: center; text-align: center; padding: 24px; background: white; border: 1px dashed #d1d5db; border-radius: var(--radius-lg); color: var(--muted); }
.compact-state { min-height: 100px; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: 0 6px 22px rgba(17,24,39,.04); transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-visual { position: relative; min-height: 150px; display: grid; place-items: center; background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 8%, white), #f8fafc); }
.product-initial { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; color: white; background: var(--brand); font-size: 1.65rem; font-weight: 900; }
.stock-badge { position: absolute; top: 12px; left: 12px; padding: 6px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; background: #dcfce7; color: var(--success); }
.stock-badge.is-out { background: #fee2e2; color: var(--danger); }
.product-content { padding: 15px; }
.product-category { color: var(--muted); font-size: .74rem; }
.product-name { margin: 5px 0 4px; font-size: 1rem; line-height: 1.45; min-height: 2.9em; }
.product-sku { margin: 0 0 13px; color: var(--muted); font-size: .72rem; direction: ltr; text-align: right; }
.price-row { display: flex; align-items: baseline; gap: 8px; min-height: 28px; }
.product-price { font-size: 1.12rem; }
.product-list-price { color: #9ca3af; font-size: .78rem; }
.promotion-copy { min-height: 20px; margin: 5px 0 10px; color: var(--success); font-size: .74rem; font-weight: 700; }
.promotion-copy.is-private-price { color: var(--brand); }
.product-meta { display: flex; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid #f0f1f3; color: var(--muted); font-size: .7rem; }
.product-actions { display: grid; grid-template-columns: 62px 1fr; gap: 8px; padding-top: 12px; }
.quantity-field { display: block; }
.product-quantity { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 11px; padding: 0 8px; text-align: center; background: var(--surface-muted); outline: 0; }
.add-cart-button { min-height: 40px; border: 0; border-radius: 11px; padding: 0 10px; background: var(--brand); color: white; font-weight: 800; cursor: pointer; }
.add-cart-button:disabled, .primary-button:disabled { opacity: .48; cursor: not-allowed; }

.primary-button, .secondary-button, .danger-button, .link-button { border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 800; }
.primary-button { border: 1px solid var(--brand); background: var(--brand); color: white; }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--text); }
.danger-button { border: 1px solid #fecaca; background: #fff1f2; color: var(--danger); }
.link-button { border: 0; background: transparent; color: var(--brand); padding-inline: 0; }
.full-button { width: 100%; min-height: 44px; }
.small-button { padding: 7px 10px; font-size: .75rem; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--text); font-size: 1.3rem; cursor: pointer; }

.modal-dialog { width: min(620px, calc(100% - 24px)); max-height: min(86vh, 760px); padding: 0; border: 0; border-radius: 26px; background: white; color: var(--text); box-shadow: 0 30px 90px rgba(17,24,39,.24); overflow: auto; }
.modal-dialog::backdrop { background: rgba(15,23,42,.48); backdrop-filter: blur(4px); }
.dialog-shell { padding: clamp(20px, 4vw, 30px); }
.dialog-heading, .drawer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-heading h2, .drawer-heading h2 { margin: 0; font-size: 1.45rem; }
.dialog-copy { margin: 10px 0 18px; color: var(--muted); line-height: 1.8; font-size: .9rem; }

.auth-step { display: grid; gap: 12px; }
.form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field-wide { grid-column: 1 / -1; }
.field-label { display: grid; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.field-label input, .field-label select, .address-form input, .address-form select, .address-select { width: 100%; min-height: 45px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: white; color: var(--text); outline: 0; }
.field-label input:focus, .field-label select:focus, .address-form input:focus, .address-form select:focus, .address-select:focus { border-color: color-mix(in srgb, var(--brand) 55%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); }
.preview-code { padding: 12px; border-radius: 12px; background: #fffbeb; color: var(--warning); border: 1px solid #fde68a; text-align: center; font-weight: 900; letter-spacing: .03em; }
.inline-alert { padding: 11px 13px; border-radius: 12px; line-height: 1.6; font-size: .82rem; }
.inline-alert.is-error { background: #fff1f2; color: var(--danger); border: 1px solid #fecaca; }

.drawer { position: fixed; inset: 0; z-index: 40; pointer-events: none; visibility: hidden; }
.drawer.is-open { pointer-events: auto; visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.45); opacity: 0; transition: opacity .2s ease; }
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(480px, 100%); display: flex; flex-direction: column; background: white; box-shadow: 20px 0 60px rgba(15,23,42,.18); transform: translateX(-102%); transition: transform .22s ease; }
.drawer-panel-wide { width: min(620px, 100%); }
.drawer.is-open .drawer-panel { transform: translateX(0); }
.drawer-heading { padding: 20px 20px 14px; border-bottom: 1px solid var(--line); }
.drawer-content { flex: 1; overflow-y: auto; padding: 16px 20px 28px; }
.empty-panel { min-height: 240px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; color: var(--muted); }
.empty-panel strong { color: var(--text); font-size: 1.05rem; }
.empty-panel p { margin: 0; max-width: 340px; line-height: 1.7; }
.empty-panel.compact { min-height: 130px; }

.cart-address-card { display: grid; gap: 7px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-muted); }
.cart-address-card small { color: var(--muted); }
.mini-label { color: var(--muted); font-size: .7rem; font-weight: 800; }
.cart-items { display: grid; gap: 9px; padding: 14px 0; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 15px; }
.cart-item-copy { display: grid; gap: 4px; min-width: 0; }
.cart-item-copy strong { font-size: .9rem; }
.cart-item-copy span { color: var(--muted); font-size: .72rem; }
.cart-item-copy b { font-size: .75rem; }
.quantity-controls { display: flex; align-items: center; gap: 5px; }
.quantity-controls.is-busy { opacity: .55; pointer-events: none; }
.qty-button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.qty-value { min-width: 25px; text-align: center; font-weight: 900; }
.remove-button { border: 0; background: transparent; color: var(--danger); font-size: .7rem; cursor: pointer; }
.validation-errors { display: grid; gap: 7px; margin-bottom: 12px; }
.cart-summary { position: sticky; bottom: -28px; display: grid; gap: 8px; margin-top: 8px; padding: 15px; border: 1px solid var(--line); border-radius: 18px 18px 0 0; background: rgba(255,255,255,.97); backdrop-filter: blur(14px); box-shadow: 0 -10px 28px rgba(17,24,39,.06); }
.summary-row { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .8rem; }
.summary-row b { color: var(--text); }
.summary-row.is-total { padding-top: 8px; border-top: 1px solid var(--line); color: var(--text); font-size: .95rem; }
.checkout-button { margin-top: 5px; }
.checkout-success { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; }
.checkout-success strong { font-size: 1.15rem; }
.checkout-success p { margin: 0; color: var(--muted); line-height: 1.7; }

.account-tabs { display: flex; gap: 7px; padding: 10px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.account-tab { flex: 1 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; background: white; color: var(--muted); cursor: pointer; }
.account-tab.is-active { background: var(--brand); color: white; border-color: var(--brand); }
.orders-list, .address-list { display: grid; gap: 10px; }
.order-card, .address-card, .profile-card, .order-detail-card, .order-items-detail, .tracking-card, .address-form { padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.order-card-heading, .address-card-heading, .order-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-card-heading > div { display: grid; gap: 3px; }
.order-card-heading span, .address-card > span, .address-card small { color: var(--muted); font-size: .72rem; }
.order-address { margin: 10px 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.order-card-footer { padding-top: 10px; border-top: 1px solid #f1f3f5; }
.order-card-footer span { color: var(--muted); font-size: .72rem; }
.order-status { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; padding: 6px 9px; background: #eef2ff; color: #3730a3; font-size: .69rem; font-weight: 900; }
.status-completed, .status-delivered { background: #dcfce7; color: var(--success); }
.status-rejected, .status-cancelled { background: #fee2e2; color: var(--danger); }
.status-out_for_delivery, .status-ready_for_delivery { background: #fef3c7; color: var(--warning); }
.primary-badge { padding: 4px 8px; border-radius: 999px; background: #dcfce7; color: var(--success) !important; font-size: .66rem !important; font-weight: 900; }
.address-card { display: grid; gap: 5px; }
.address-card p { margin: 4px 0; line-height: 1.65; }
.address-form { display: grid; gap: 9px; margin-top: 14px; background: var(--surface-muted); }
.address-form h3, .order-items-detail h3, .tracking-card h3 { margin: 0 0 5px; font-size: 1rem; }
.checkbox-field { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.checkbox-field input { width: 18px; height: 18px; }
.profile-card { display: grid; gap: 9px; }
.profile-card h3, .profile-card p { margin: 0; }
.profile-card p { color: var(--muted); }
.credit-card { display: grid; gap: 4px; margin: 4px 0 8px; padding: 12px; border-radius: 13px; background: color-mix(in srgb, var(--brand) 7%, white); }
.credit-card span, .credit-card small { color: var(--muted); font-size: .72rem; }
.back-button { margin-bottom: 10px; }
.order-detail-card { display: grid; gap: 8px; margin-bottom: 10px; }
.order-detail-card h3, .order-detail-card p { margin: 0; }
.order-detail-card p { color: var(--muted); line-height: 1.7; font-size: .8rem; }
.order-total { font-size: 1.2rem; }
.order-items-detail, .tracking-card { display: grid; gap: 9px; margin-top: 10px; }
.order-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f3f5; }
.order-line:last-child { border-bottom: 0; }
.order-line > div { display: grid; gap: 3px; }
.order-line span { color: var(--muted); font-size: .72rem; }
.timeline-row { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 10px; min-height: 58px; }
.timeline-row:not(:last-child)::after { content: ''; position: absolute; right: 6px; top: 15px; bottom: -5px; width: 2px; background: var(--line); }
.timeline-dot { width: 13px; height: 13px; margin-top: 3px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent); }
.timeline-row > div { display: grid; align-content: start; gap: 3px; }
.timeline-row span, .timeline-row small { color: var(--muted); font-size: .7rem; }

.toast-region { position: fixed; z-index: 90; right: 16px; bottom: 16px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: min(360px, calc(100vw - 32px)); transform: translateY(10px); opacity: 0; padding: 12px 15px; border-radius: 13px; background: #111827; color: white; box-shadow: 0 16px 46px rgba(15,23,42,.22); transition: .18s ease; font-size: .82rem; line-height: 1.6; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast.is-error { background: #7f1d1d; }

.footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px 2px 4px; color: var(--muted); font-size: .75rem; }

@media (max-width: 920px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-session { max-width: 420px; }
}

@media (max-width: 680px) {
  .app-shell { padding-inline: 12px; }
  .topbar { align-items: flex-start; }
  .topbar-actions { gap: 5px; }
  .header-action { width: 43px; padding: 0; }
  .header-action > span:not(:first-child) { display: none; }
  .cart-badge { position: absolute; top: -5px; left: -5px; }
  .hero { border-radius: 24px; padding: 24px 20px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .product-visual { min-height: 125px; }
  .product-content { padding: 12px; }
  .section-heading { align-items: flex-start; }
  .section-heading-meta { flex-direction: column; align-items: flex-end; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .drawer-panel, .drawer-panel-wide { width: 100%; }
  .drawer-heading, .drawer-content { padding-inline: 15px; }
  .cart-item { grid-template-columns: 1fr; }
  .quantity-controls { justify-content: flex-start; }
  .toast-region { right: 12px; bottom: 12px; }
  .footer { flex-direction: column; gap: 4px; }
}

@media (max-width: 430px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-visual { min-height: 145px; }
  .modal-dialog { width: calc(100% - 14px); border-radius: 20px; }
}

/* =========================================================
   DISTRIBUTOR MULTI-UNIT PRODUCTS
   ========================================================= */

.unit-picker-wrap {
  display: grid !important;
  gap: 6px;
  margin-top: 4px;
}

.unit-picker-wrap > span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
}

.product-unit-select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}

.product-unit-select:focus {
  border-color: var(--brand);
  box-shadow:
    0 0 0 3px
    color-mix(
      in srgb,
      var(--brand) 10%,
      transparent
    );
}

.product-unit-select option:disabled {
  color: #a7adb8;
}

.cart-item-copy span {
  line-height: 1.6;
}

/* =========================================================
   CUSTOMER SPECIAL QUOTES
   ========================================================= */

.account-tabs {
  flex-wrap: wrap;
}

.customer-quote-builder,
.customer-quotes-heading,
.customer-quotes-list,
.customer-quote-detail-items,
.customer-quote-history {
  display: grid;
  gap: 14px;
}

.customer-quote-intro h3,
.customer-quotes-heading h3,
.customer-quote-detail-items h3,
.customer-quote-history h3 {
  margin: 0;
}

.customer-quote-intro p,
.customer-quotes-heading p {
  margin: 6px 0 0;
  opacity: .72;
  line-height: 1.7;
}

.quote-info-note,
.quote-validity,
.customer-quote-final-reason {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(59, 130, 246, .07);
  line-height: 1.7;
}

.quote-validity.is-expired {
  background: rgba(239, 68, 68, .08);
}

.customer-quote-draft-lines {
  display: grid;
  gap: 10px;
}

.customer-quote-draft-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 2fr)
    minmax(130px, 1fr)
    minmax(100px, .65fr)
    auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(120, 120, 120, .16);
  border-radius: 14px;
}

.quote-field {
  display: grid;
  gap: 6px;
}

.quote-field > span {
  font-size: 12px;
  opacity: .7;
}

.quote-field select,
.quote-field input,
.quote-field textarea {
  width: 100%;
}

.quote-note-field textarea {
  resize: vertical;
}

.customer-quote-submit {
  min-height: 46px;
}

.customer-quote-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(120, 120, 120, .16);
  border-radius: 15px;
}

.customer-quote-card-head,
.customer-quote-card-meta,
.customer-quote-detail-head,
.customer-quote-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.customer-quote-card-head > div {
  display: grid;
  gap: 3px;
}

.customer-quote-card-head span,
.customer-quote-summary-note {
  font-size: 13px;
  opacity: .7;
}

.quote-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(120, 120, 120, .1);
}

.quote-status-requested {
  background: rgba(245, 158, 11, .12);
}

.quote-status-quoted {
  background: rgba(59, 130, 246, .12);
}

.quote-status-accepted {
  background: rgba(34, 197, 94, .12);
}

.quote-status-rejected,
.quote-status-cancelled,
.quote-status-expired {
  background: rgba(239, 68, 68, .1);
}

.quote-eyebrow {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  opacity: .65;
}

.customer-quote-detail-head h3 {
  margin: 3px 0;
}

.customer-quote-detail-head p {
  margin: 0;
  opacity: .65;
}

.customer-quote-note {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(120, 120, 120, .06);
}

.customer-quote-note.distributor-response {
  background: rgba(34, 197, 94, .06);
}

.customer-quote-note p {
  margin: 5px 0 0;
  line-height: 1.7;
}

.customer-quote-item {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(120, 120, 120, .16);
  border-radius: 14px;
}

.customer-quote-item.is-added {
  border-style: dashed;
  background: rgba(34, 197, 94, .025);
}

.customer-quote-item.is-removed {
  opacity: .62;
  background: rgba(239, 68, 68, .035);
}

.customer-quote-item-product > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
}

.customer-quote-item-product strong {
  width: 100%;
}

.customer-quote-item-product span {
  font-size: 12px;
  opacity: .7;
}

.quote-change-label {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 1 !important;
}

.quote-change-label.is-added {
  background: rgba(34, 197, 94, .1);
}

.quote-change-label.is-removed {
  background: rgba(239, 68, 68, .1);
}

.customer-quote-compare,
.customer-quote-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.customer-quote-compare > div,
.customer-quote-prices > div,
.customer-quote-line-total {
  padding: 11px;
  border-radius: 11px;
  background: rgba(120, 120, 120, .055);
}

.customer-quote-compare .has-change {
  background: rgba(245, 158, 11, .1);
}

.customer-quote-compare span,
.customer-quote-prices span,
.customer-quote-line-total span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  opacity: .68;
}

.customer-quote-prices .special-price {
  background: rgba(34, 197, 94, .08);
}

.customer-quote-prices .special-price strong {
  font-size: 18px;
}

.customer-quote-line-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.customer-quote-reasons {
  display: grid;
  gap: 7px;
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(245, 158, 11, .07);
}

.customer-quote-reason-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.customer-quote-reason-row span {
  font-size: 12px;
  font-weight: 700;
}

.customer-quote-reason-row p {
  margin: 0;
}

.customer-quote-total {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(34, 197, 94, .07);
}

.customer-quote-total strong {
  font-size: 23px;
}

.customer-quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.customer-quote-actions .quote-accept-button {
  flex: 1 1 220px;
}

.customer-quote-history {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(120, 120, 120, .15);
}

.customer-quote-history-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
}

.customer-quote-history-row > div {
  display: grid;
  gap: 2px;
}

.customer-quote-history-row span,
.customer-quote-history-row small {
  font-size: 12px;
  opacity: .65;
}

@media (max-width: 760px) {
  .customer-quote-draft-row {
    grid-template-columns: 1fr 1fr;
  }

  .quote-product-field {
    grid-column: 1 / -1;
  }

  .customer-quote-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .customer-quote-draft-row,
  .customer-quote-compare,
  .customer-quote-prices {
    grid-template-columns: 1fr;
  }

  .quote-product-field {
    grid-column: auto;
  }

  .customer-quote-reason-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ACCEPTED SPECIAL QUOTE IN CART
   ========================================================= */

.cart-item.is-special-quote {
  position: relative;
  border: 1px solid rgba(34, 197, 94, .28);
  background:
    linear-gradient(
      180deg,
      rgba(34, 197, 94, .055),
      rgba(34, 197, 94, .018)
    );
}

.special-quote-cart-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(34, 197, 94, .12);
  font-size: 12px;
  font-weight: 800;
}

.special-quote-cart-price {
  margin-top: 5px;
  font-size: 16px;
}

.special-quote-cart-lock-copy {
  display: block;
  max-width: 440px;
  margin-top: 7px;
  line-height: 1.65;
  opacity: .72;
}

.special-quote-locked-controls {
  min-width: 145px;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(34, 197, 94, .08);
}

.special-quote-lock-label {
  font-size: 11px;
  font-weight: 700;
  opacity: .7;
}

.special-quote-locked-controls .qty-value {
  white-space: nowrap;
  font-size: 14px;
}

@media (max-width: 600px) {
  .special-quote-locked-controls {
    width: 100%;
    justify-items: start;
  }
}

/* Financing applications */

.financing-page {
  display: grid;
  gap: 24px;
}

.financing-page-heading,
.financing-form-heading,
.financing-application-heading,
.financing-application-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.financing-page-heading h3,
.financing-form-heading h3,
.financing-applications-section h3,
.financing-documents-area h3 {
  margin: 0;
}

.financing-page-heading p,
.financing-form-heading p {
  margin: 6px 0 0;
  color: var(--muted, #6b7280);
}

.financing-form-host {
  scroll-margin-top: 24px;
}

.financing-application-form {
  display: grid;
  gap: 20px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
}

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

.financing-form-grid textarea {
  min-height: 100px;
  resize: vertical;
}

.financing-provider-info {
  display: grid;
  gap: 8px;
  padding: 0 2px;
  color: #4b5563;
}

.financing-provider-info:empty {
  display: none;
}

.financing-documents-area {
  display: grid;
  gap: 12px;
}

.financing-document-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(180px, 280px);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

.financing-document-row > div {
  display: grid;
  gap: 4px;
}

.financing-document-row span,
.financing-document-row small,
.muted-copy {
  color: #6b7280;
}

.financing-applications-section {
  display: grid;
  gap: 14px;
}

.financing-applications-list {
  display: grid;
  gap: 12px;
}

.financing-application-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
}

.financing-application-heading > div {
  display: grid;
  gap: 4px;
}

.financing-application-heading span,
.financing-application-meta {
  color: #6b7280;
}

.financing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.financing-status.status-submitted {
  background: #eff6ff;
  color: #1d4ed8;
}

.financing-status.status-under_review {
  background: #fff7ed;
  color: #c2410c;
}

.financing-status.status-needs_information {
  background: #fef3c7;
  color: #92400e;
}

.financing-status.status-approved {
  background: #ecfdf5;
  color: #047857;
}

.financing-status.status-rejected {
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 720px) {
  .financing-form-grid {
    grid-template-columns: 1fr;
  }

  .financing-document-row {
    grid-template-columns: 1fr;
  }

  .financing-page-heading {
    align-items: flex-start;
  }
}

.financing-information-request {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #f5d98b;
  border-radius: 12px;
  background: #fff8e6;
  color: #7a4b00;
  font-weight: 700;
  line-height: 1.7;
}

.financing-requested-documents-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.financing-requested-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.financing-requested-document-row input[type="file"] {
  width: 100%;
  min-width: 0;
}

/* Storefront merchandising */
.storefront-banners {
  margin: 0 0 26px;
}

.storefront-banner {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 14px 34px rgba(17,24,39,.12);
}

.storefront-banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.72),
    rgba(0,0,0,.30),
    rgba(0,0,0,.08)
  );
}

.storefront-banner-content {
  position: relative;
  z-index: 2;
  min-height: 260px;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 32px;
  color: #fff;
}

.storefront-banner-content h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.storefront-banner-content p {
  margin: 0 0 18px;
  line-height: 1.8;
  color: rgba(255,255,255,.9);
}

.storefront-banner-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-weight: 800;
  text-decoration: none;
}

.storefront-sections {
  margin: 0 0 26px;
}

.storefront-sections-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 0 2px 14px;
}

.storefront-sections-heading h2 {
  margin: 0;
}

.storefront-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.storefront-section-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17,24,39,.05);
}

.storefront-section-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background: var(--surface-muted);
}

.storefront-section-copy {
  padding: 14px;
}

.storefront-section-copy strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.storefront-section-copy span {
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 640px) {
  .storefront-banner,
  .storefront-banner-content {
    min-height: 220px;
  }

  .storefront-banner-content {
    padding: 22px;
  }

  .storefront-sections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== compact storefront sections ===== */
.storefront-sections {
  margin: 0 0 18px;
}

.storefront-sections-heading {
  margin: 0 0 10px;
}

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

.storefront-section-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(17,24,39,.05);
  overflow: hidden;
  min-width: 0;
}

.storefront-section-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--surface-muted);
}

.storefront-section-copy {
  padding: 8px 6px 10px;
  text-align: center;
}

.storefront-section-copy strong {
  display: block;
  margin: 0 0 4px;
  font-size: .78rem;
  line-height: 1.35;
  min-height: 2.2em;
  overflow: hidden;
}

.storefront-section-copy span {
  font-size: .68rem;
  color: var(--muted);
}

/* ===== moving clickable banners ===== */
.storefront-banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.storefront-banner-track {
  position: relative;
  min-height: 250px;
}

.storefront-banner-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: scale(.985);
  transition: opacity .45s ease, transform .45s ease;
  text-decoration: none;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.storefront-banner-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.storefront-banner {
  margin: 0;
}

.storefront-banner-dots {
  position: absolute;
  inset-inline: 0;
  bottom: 14px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.storefront-banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.45);
  cursor: pointer;
}

.storefront-banner-dot.is-active {
  background: #fff;
}

/* ===== responsive ===== */
@media (max-width: 1400px) {
  .storefront-sections-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .storefront-sections-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .storefront-sections-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .storefront-sections-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .storefront-banner-track {
    min-height: 220px;
  }
}

@media (max-width: 576px) {
  .storefront-sections-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .storefront-section-copy strong {
    font-size: .72rem;
  }

  .storefront-banner-track {
    min-height: 200px;
  }
}


.order-progress-card {
  padding:15px;
  border:1px solid var(--line);
  border-radius:17px;
  background:white;
  display:grid;
  gap:10px;
  margin-top:10px;
}

.order-progress-steps {
  display:grid;
  gap:10px;
}

.order-progress-step {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
}

.order-progress-step.done {
  color:var(--text);
}

.progress-dot {
  width:22px;
  height:22px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
}

.order-progress-step.done .progress-dot {
  background:var(--brand);
  color:white;
}


.delivery-confirm-card {
  padding:15px;
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:17px;
  background:white;
}



/* =========================================================
   CUSTOMER NOTIFICATION CENTER
   ========================================================= */

.account-notifications-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.account-notification-badge {
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: .63rem;
  font-weight: 900;
  line-height: 1;
}

.account-tab.is-active .account-notification-badge {
  background: #fff;
  color: var(--brand);
}

.customer-notifications {
  display: grid;
  gap: 12px;
}

.customer-notifications-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-muted);
}

.customer-notifications-heading > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.customer-notifications-heading h3,
.customer-notifications-heading p {
  margin: 0;
}

.customer-notifications-heading p {
  color: var(--muted);
  font-size: .74rem;
}

.customer-notification-list {
  display: grid;
  gap: 9px;
}

.customer-notification-item {
  width: 100%;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  text-align: start;
  cursor: pointer;
  font: inherit;
}

.customer-notification-item:hover {
  border-color:
    color-mix(
      in srgb,
      var(--brand) 24%,
      var(--line)
    );
}

.customer-notification-item.is-unread {
  background:
    color-mix(
      in srgb,
      var(--brand) 5%,
      #fff
    );
}

.customer-notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: transparent;
}

.customer-notification-item.is-unread
.customer-notification-dot {
  background: var(--brand);
  box-shadow:
    0 0 0 4px
    color-mix(
      in srgb,
      var(--brand) 12%,
      transparent
    );
}

.customer-notification-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.customer-notification-copy strong {
  font-size: .86rem;
}

.customer-notification-copy > span {
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.65;
}

.customer-notification-copy small {
  color: var(--muted);
  font-size: .66rem;
}

@media (max-width: 560px) {
  .customer-notifications-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-notifications-heading .secondary-button {
    width: 100%;
  }
}


/* =========================================================
   STOREFRONT CONNECTIVITY HARDENING
   ========================================================= */

.connectivity-banner {
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  display: grid;
  gap: 3px;
  padding:
    calc(10px + env(safe-area-inset-top))
    16px
    10px;
  border-bottom: 1px solid #f3d8a8;
  background: #fff7e8;
  color: #7b4b00;
  text-align: center;
  box-shadow:
    0 6px 20px rgba(17, 24, 39, .05);
}

.connectivity-banner strong {
  font-size: .78rem;
}

.connectivity-banner span {
  font-size: .7rem;
  line-height: 1.55;
}

.toast.is-warning {
  border-color: #f0d39b;
  background: #fff8e8;
  color: #855100;
}
