@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

:root {
  --bg: #071018;
  --card: #101b29;
  --card-soft: #132235;
  --muted: #90a6bf;
  --text: #ebf3fb;
  --brand: #2da9ff;
  --brand-soft: rgba(45, 169, 255, 0.18);
  --ok: #33d17a;
  --danger: #ff5c77;
  --warning: #ffce00;
  --line: #203247;
  --line-soft: rgba(255, 255, 255, 0.06);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.22);

  --bg-grad-start: #0b1622;
  --bg-grad-mid: #071018;
  --bg-grad-end: #051018;

  --topbar-bg: rgba(6, 11, 18, 0.88);
  --btn-bg: #0f1824;
  --input-bg: #0f1824;
  --cart-sidebar-bg: #09131d;
  --cart-line-bg: #0d1723;
  --accordion-bg: rgba(5, 15, 24, 0.44);

  --card-bg-solid: rgba(16, 27, 41, 0.9);
  --surface-soft-bg: rgba(19, 34, 53, 0.75);
  --kpi-bg: rgba(255, 255, 255, 0.03);
  --catalog-image-bg: rgba(255, 255, 255, 0.03);
  --empty-bg: rgba(255, 255, 255, 0.03);
  --cart-company-bg: rgba(255, 255, 255, 0.03);
  --company-order-bg: rgba(255, 255, 255, 0.03);
  --variants-box-bg: rgba(255, 255, 255, 0.03);
  --qty-input-bg: rgba(255, 255, 255, 0.04);

  --cart-overlay-bg: rgba(0, 0, 0, 0.5);
  --checkout-line-border: rgba(255, 255, 255, 0.06);
  --variant-row-border: rgba(255, 255, 255, 0.06);
  --cart-footer-border: rgba(255, 255, 255, 0.08);
  --cart-line-border: rgba(255, 255, 255, 0.04);
  --qty-input-border: rgba(255, 255, 255, 0.12);

  --cart-count-bg: var(--text);
  --cart-count-text: #071018;
}

body.light {
  --bg: #f5f7fb;
  --card: #ffffff;
  --card-soft: #eef3f8;
  --muted: #66788a;
  --text: #102033;
  --brand: #2382c2;
  --brand-soft: rgba(35, 130, 194, 0.12);
  --ok: #1fa463;
  --danger: #df4b68;
  --warning: #d9a600;
  --line: #d9e3ee;
  --line-soft: rgba(16, 32, 51, 0.08);
  --shadow: 0 14px 34px rgba(16, 32, 51, 0.08);

  --bg-grad-start: #f9fbfe;
  --bg-grad-mid: #f5f7fb;
  --bg-grad-end: #eef3f8;

  --topbar-bg: rgba(255, 255, 255, 0.88);
  --btn-bg: #ffffff;
  --input-bg: #ffffff;
  --cart-sidebar-bg: #ffffff;
  --cart-line-bg: #f8fafc;
  --accordion-bg: #f8fbff;

  --card-bg-solid: rgba(255, 255, 255, 0.96);
  --surface-soft-bg: rgba(238, 243, 248, 0.95);
  --kpi-bg: #f8fafc;
  --catalog-image-bg: #f8fafc;
  --empty-bg: #f8fafc;
  --cart-company-bg: #f8fafc;
  --company-order-bg: #f8fafc;
  --variants-box-bg: #f8fafc;
  --qty-input-bg: #ffffff;

  --cart-overlay-bg: rgba(10, 20, 30, 0.22);
  --checkout-line-border: rgba(16, 32, 51, 0.08);
  --variant-row-border: rgba(16, 32, 51, 0.08);
  --cart-footer-border: rgba(16, 32, 51, 0.1);
  --cart-line-border: rgba(16, 32, 51, 0.08);
  --qty-input-border: rgba(16, 32, 51, 0.14);

  --cart-count-bg: var(--brand);
  --cart-count-text: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background: radial-gradient(
    circle at top,
    var(--bg-grad-start) 0,
    var(--bg-grad-mid) 50%,
    var(--bg-grad-end) 100%
  );
  overflow-x: hidden;
}

body.body-lock {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  max-width: 100%;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.container-main {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.page-shell {
  padding-top: 34px;
  padding-bottom: 40px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar .container {
  max-width: 1320px;
  padding-left: 32px;
  padding-right: 32px;
}

.footer .container {
  max-width: 1320px;
  padding-left: 32px;
  padding-right: 32px;
}

.hero {
  margin-bottom: 28px;
}

.grid.grid-2 {
  gap: 20px;
}

.catalog-grid {
  gap: 20px;
}

.topbar {
  position: sticky;
  top: 0;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 30;
}

.topbar-inner {
  min-height: 72px;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.space {
  justify-content: space-between;
}

.brand {
  min-width: 0;
}

.brand a {
  font-weight: 900;
  letter-spacing: 0.2px;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge,
.pill,
.qty-pill {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.badge.ok,
.pill.ok {
  border-color: rgba(51, 209, 122, 0.35);
  color: rgba(51, 209, 122, 0.95);
}

.pill.warn {
  border-color: rgba(255, 206, 0, 0.35);
  color: rgba(255, 206, 0, 0.95);
}

.pill.new {
  border-color: rgba(45, 169, 255, 0.35);
  color: rgba(45, 169, 255, 0.95);
}

.card {
  background: var(--card-bg-solid);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.surface-soft {
  background: var(--surface-soft-bg);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
}

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

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

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

.h1 {
  font-size: clamp(28px, 4.2vw, 40px);
  margin: 0 0 10px;
  line-height: 1.08;
  word-break: break-word;
}

.h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 0;
  line-height: 1.15;
  word-break: break-word;
}

.muted {
  color: var(--muted);
}

.btn,
.cart-launcher,
.qty-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--btn-bg);
  color: var(--text);
  cursor: pointer;
  transition: 0.18s ease;
  text-align: center;
  font: inherit;
}

.btn:hover,
.cart-launcher:hover,
.qty-btn:hover,
.icon-btn:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.btn.primary {
  background: var(--brand-soft);
  border-color: rgba(45, 169, 255, 0.36);
}

.btn.danger {
  background: rgba(255, 92, 119, 0.12);
  border-color: rgba(255, 92, 119, 0.35);
}

.btn.ok {
  background: rgba(51, 209, 122, 0.12);
  border-color: rgba(51, 209, 122, 0.35);
}

.icon-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 999px;
}

.qty-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 12px;
}

.qty-pill {
  min-width: 42px;
  text-align: center;
  font-weight: 800;
  color: var(--text);
}

.cart-launcher {
  position: relative;
  background: rgba(45, 169, 255, 0.12);
  border-color: rgba(45, 169, 255, 0.25);
}

.cart-launcher-count {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  padding: 0 7px;
  background: var(--cart-count-bg);
  color: var(--cart-count-text);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--btn-bg);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  padding: 0;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  text-decoration: none;
}

.theme-toggle:active {
  transform: translateY(0);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.theme-toggle-icon {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.22s ease;
}

.theme-icon-sun {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.theme-icon-moon {
  opacity: 0;
  transform: translateY(8px) scale(0.85);
}

body.light .theme-icon-sun {
  opacity: 0;
  transform: translateY(-8px) scale(0.85);
}

body.light .theme-icon-moon {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding: 28px 0 18px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.hero-copy {
  max-width: 740px;
}

.hero-copy p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.company-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.company-card-cover {
  height: 140px;
  background: linear-gradient(
    135deg,
    rgba(45, 169, 255, 0.16),
    rgba(255, 255, 255, 0.02)
  );
  display: flex;
  align-items: flex-end;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.company-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.company-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--kpi-bg);
  border: 1px solid var(--line-soft);
  min-width: 110px;
}

.catalog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.logo-img {
  width: 150px;
  max-width: 100%;
  height: auto;
  display: block;
}

.filters-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(180px, 0.8fr);
  gap: 12px;
  width: 100%;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.catalog-card {
  padding: 0;
  overflow: hidden;
  min-width: 0;
}

.catalog-image {
  height: 250px;
  background: var(--catalog-image-bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.catalog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-body {
  padding: 16px;
}

.catalog-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.catalog-title {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 900;
  line-height: 1.08;
  margin: 0 0 8px;
  word-break: break-word;
}

.catalog-desc {
  min-height: 46px;
  line-height: 1.55;
}

.catalog-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.details-toggle {
  width: 100%;
  justify-content: space-between;
  margin-top: 14px;
}

.product-accordion {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: var(--accordion-bg);
  border: 1px solid var(--line);
  display: none;
}

.product-accordion.is-open {
  display: block;
}

.variant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--variant-row-border);
}

.variant-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.variant-main {
  min-width: 0;
  flex: 1;
}

.variant-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  word-break: break-word;
}

.variant-help {
  font-size: 13px;
  margin-top: 4px;
}

.variant-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.qty-inline-form {
  margin: 0;
}

.product-bottom-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: var(--cart-overlay-bg);
  opacity: 0;
  visibility: hidden;
  transition: 0.2s ease;
  z-index: 40;
}

.cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  max-width: 100%;
  height: 100vh;
  background: var(--cart-sidebar-bg);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: 0.24s ease;
  z-index: 41;
  display: flex;
  flex-direction: column;
}

#cartSidebarContent {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cart-sidebar.is-open {
  transform: translateX(0);
}

.cart-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: var(--empty-bg);
  border: 1px solid var(--line-soft);
}

.empty-state-icon {
  font-size: 28px;
}

.cart-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-company {
  padding: 14px;
  border-radius: 18px;
  background: var(--cart-company-bg);
  border: 1px solid var(--line-soft);
}

.cart-company-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.cart-company-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--cart-line-bg);
  border: 1px solid var(--cart-line-border);
}

.cart-line-title {
  font-weight: 800;
  word-break: break-word;
}

.cart-line-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cart-sidebar-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--cart-footer-border);
}

.cart-sidebar-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.summary-card {
  position: sticky;
  top: 98px;
  height: fit-content;
}

.company-order-group {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--company-order-bg);
  margin-bottom: 14px;
}

.checkout-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--checkout-line-border);
}

.checkout-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.variants-box {
  padding: 14px;
  border-radius: 16px;
  background: var(--variants-box-bg);
  border: 1px solid var(--line-soft);
}

.qty-input {
  width: 72px;
  max-width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--qty-input-border);
  background: var(--qty-input-bg);
  color: var(--text);
  text-align: center;
  outline: none;
  font-weight: 700;
  padding: 0 8px;
  font: inherit;
}

.qty-input:focus {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input[type="number"] {
  -moz-appearance: textfield;
}

.qty-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* =========================
   FOOTER NUEVO
   ========================= */
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-left {
  max-width: 560px;
}

.footer-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-text {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.footer-text strong {
  color: var(--text);
}

.footer-text a {
  color: var(--brand);
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.footer-logo {
  max-height: 78px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
}

.footer-bottom {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* =========================
   LARGE TABLET / SMALL DESKTOP
   ========================= */
@media (max-width: 1200px) {
  .container-main,
  .topbar .container,
  .footer .container {
    padding-left: 24px;
    padding-right: 24px;
  }

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

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

/* =========================
   TABLET
   ========================= */
@media (max-width: 980px) {
  .container-main,
  .topbar .container,
  .footer .container {
    padding-left: 22px;
    padding-right: 22px;
  }

  .page-shell {
    padding-top: 26px;
    padding-bottom: 30px;
  }

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

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

  .summary-card {
    position: static;
  }

  .filters-bar {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-inner {
    min-height: auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .topbar .row.space {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 768px) {
  .container,
  .container-main,
  .topbar .container,
  .footer .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-shell {
    padding-top: 22px;
    padding-bottom: 26px;
  }

  .grid,
  .grid.grid-2,
  .grid.grid-4,
  .catalog-grid,
  .filters-bar,
  .form-row,
  .checkout-grid,
  .cart-sidebar-cta {
    grid-template-columns: 1fr;
  }

  .hero,
  .catalog-head,
  .product-bottom-note,
  .cart-sidebar-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .brand a {
    font-size: 18px;
    gap: 10px;
  }

  .logo-img {
    width: 120px;
  }

  .topbar-inner {
    min-height: auto;
  }

  .nav {
    gap: 10px;
    justify-content: flex-start;
  }

  .btn,
  .cart-launcher {
    width: 100%;
  }

  .admin-links {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-links .btn,
  .admin-links a {
    width: 100%;
  }

  .catalog-image {
    height: 220px;
  }

  .catalog-body {
    padding: 14px;
  }

  .catalog-topline,
  .catalog-price-row,
  .cart-company-head,
  .checkout-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .variant-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .variant-controls {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .cart-sidebar {
    width: 100%;
    border-left: 0;
  }

  #cartSidebarContent {
    padding: 16px;
  }

  .cart-line {
    grid-template-columns: 1fr;
  }

  .cart-line-actions {
    justify-content: flex-start;
  }

  .company-card-cover {
    height: 120px;
    padding: 16px;
  }

  .company-card-body {
    padding: 16px;
  }

  .card {
    border-radius: 18px;
    padding: 16px;
  }

  .surface-soft,
  .variants-box,
  .product-accordion,
  .company-order-group,
  .cart-company {
    border-radius: 16px;
  }

  .table {
    min-width: 560px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-left {
    max-width: 100%;
  }

  .footer-right {
    width: 100%;
    justify-content: center;
  }

  .footer-bottom {
    text-align: center;
  }
}

/* =========================
   SMALL MOBILE
   ========================= */
@media (max-width: 560px) {
  .container,
  .container-main,
  .topbar .container,
  .footer .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-shell {
    padding-top: 18px;
    padding-bottom: 22px;
  }

  .h1 {
    font-size: 28px;
  }

  .h2 {
    font-size: 22px;
  }

  .hero-copy p,
  .catalog-desc {
    font-size: 14px;
  }

  .brand a {
    font-size: 16px;
  }

  .logo-img {
    width: 105px;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .btn,
  .cart-launcher,
  .input,
  select,
  textarea {
    min-height: 44px;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .catalog-image {
    height: 200px;
  }

  .catalog-title {
    font-size: 20px;
  }

  .variant-title {
    font-size: 16px;
  }

  .qty-input {
    width: 64px;
  }

  .kpi {
    min-width: 100%;
  }

  .empty-state {
    flex-direction: column;
    align-items: flex-start;
  }

  .table {
    min-width: 520px;
  }

  .footer-title {
    font-size: 18px;
  }

  .footer-text {
    font-size: 13px;
  }

  .footer-logo {
    max-height: 64px;
  }
}

/* =========================
   EXTRA SMALL MOBILE
   ========================= */
@media (max-width: 420px) {
  .container,
  .container-main,
  .topbar .container,
  .footer .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-shell {
    padding-top: 16px;
    padding-bottom: 18px;
  }

  .brand-logo {
    gap: 8px;
  }

  .brand a {
    font-size: 15px;
  }

  .logo-img {
    width: 92px;
  }

  .h1 {
    font-size: 24px;
    line-height: 1.12;
  }

  .h2 {
    font-size: 20px;
  }

  .card,
  .company-card-body,
  .product-accordion,
  .variants-box,
  .company-order-group,
  .cart-company,
  #cartSidebarContent {
    padding: 12px;
  }

  .catalog-body {
    padding: 12px;
  }

  .catalog-image {
    height: 180px;
  }

  .btn,
  .cart-launcher {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .qty-btn {
    min-width: 36px;
    width: 36px;
    height: 36px;
  }

  .qty-input {
    width: 58px;
    height: 36px;
    font-size: 14px;
  }

  .badge,
  .pill,
  .qty-pill {
    font-size: 11px;
    padding: 5px 8px;
  }

  .cart-launcher-count {
    min-width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .table {
    min-width: 480px;
  }

  .footer-logo {
    max-height: 56px;
  }
}