:root {
  --orange: #f77f2b;
  --gold: #ffbd3f;
  --yellow: #ffd54a;
  --purple: #701778;
  --purple-dark: #43104c;
  --ink: #24232d;
  --muted: #69636d;
  --line: #e7e0dd;
  --paper: #f3f0f3;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(31, 15, 10, .16);
}

/* Matrix Metro: bloques sólidos, contraste alto y jerarquía tipo Windows 8. */
.site-header {
  min-height: 82px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 4px solid var(--purple);
}

.main-nav a { position: relative; }
.main-nav a:hover::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--orange);
}

.hero {
  min-height: 600px;
  background: #29122f;
}

.hero-media::after {
  background:
    linear-gradient(90deg, rgba(35, 10, 45, .93) 0%, rgba(79, 22, 91, .76) 46%, rgba(22, 19, 31, .25) 100%),
    linear-gradient(135deg, rgba(247, 127, 43, .28), transparent 58%);
}

.hero-copy {
  max-width: 760px;
  padding-bottom: 74px;
}

.hero h1 { letter-spacing: -.04em; }
.hero h1::after {
  content: "";
  display: block;
  width: 88px;
  height: 9px;
  margin-top: 18px;
  background: var(--orange);
}

.primary-btn,
.ghost-btn,
.login-link,
.theme-toggle,
.install-button,
.cart-button,
.category-card,
.product-card,
.search-box input { border-radius: 0; }

.primary-btn {
  background: var(--orange);
  box-shadow: 8px 8px 0 rgba(42, 14, 49, .28);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn:hover { transform: translate(-2px, -2px); box-shadow: 12px 12px 0 rgba(42, 14, 49, .24); background: #e56418; }

.ghost-btn { border-width: 1px; background: rgba(255, 255, 255, .13); }

.quick-strip {
  max-width: 1180px;
  margin: -44px auto 0;
  position: relative;
  z-index: 3;
  border: 0;
  background: transparent;
  gap: 8px;
  padding: 0 18px;
}

.quick-strip article {
  min-height: 118px;
  border: 0;
  color: #fff;
  background: var(--purple);
}
.quick-strip article:nth-child(2) { background: #3c526f; }
.quick-strip article:nth-child(3) { background: var(--orange); }
.quick-strip strong,
.quick-strip span { color: #fff; }
.quick-strip strong { font-size: 1.55rem; }

.section { padding-top: 110px; }
.section-heading { max-width: 760px; }
.section-heading h2 { font-size: clamp(2.2rem, 4vw, 4rem); }

.category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.category-card {
  min-height: 156px;
  padding: 22px;
  border: 0;
  color: #fff;
  background: #63536a;
  transition: transform .2s ease, filter .2s ease;
}
.category-card:nth-child(3n + 2) { background: var(--purple); }
.category-card:nth-child(3n + 3) { background: #3e5b76; }
.category-card:nth-child(5n + 4) { background: var(--orange); }
.category-card span,
.category-card strong { color: #fff; }
.category-card span { font-size: 1.8rem; }
.category-card:hover,
.category-card.active { transform: translateY(-5px); filter: brightness(1.1); background: var(--purple-dark); }

.shop-section { background: #e9e5e9; }
.shop-toolbar { align-items: center; }
.search-box input { background: #fff; border: 3px solid #d5cbd6; }
.search-box input:focus { border-color: var(--purple); }

.product-grid { gap: 12px; }
.product-card { border: 0; box-shadow: 0 9px 20px rgba(44, 22, 48, .12); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 18px 32px rgba(44, 22, 48, .18); }
.product-art { min-height: 208px; background: linear-gradient(135deg, var(--purple) 0 49%, var(--orange) 49% 100%); }
.product-art span { border-radius: 0; background: rgba(34, 25, 39, .82); }
.price { color: var(--orange); }

.business-band { background: var(--purple-dark); color: #fff; }
.business-band .eyebrow { color: var(--gold); }
.business-band p:not(.eyebrow) { color: rgba(255, 255, 255, .82); }
.about-panel { border-radius: 0; background: #fff; box-shadow: 12px 12px 0 var(--orange); }

.contact-section { background: var(--orange); color: #fff; }
.contact-section .eyebrow,
.contact-section p:not(.eyebrow),
.contact-location { color: #fff; }
.contact-section .primary-btn { color: var(--ink); background: var(--yellow); box-shadow: none; }
.contact-section .ghost-btn.dark { color: #fff; border-color: #fff; }

@media (max-width: 680px) {
  .quick-strip { margin-top: 0; padding: 0; gap: 0; }
  .quick-strip article { min-height: 104px; }
  .section { padding-top: 72px; }
  .category-grid { gap: 7px; }
  .category-card { min-height: 124px; padding: 16px; }
}

:root[data-theme="dark"] {
  --ink: #f8f3f8;
  --muted: #c9bdc9;
  --line: #3d3042;
  --paper: #151217;
  --white: #211927;
  --shadow: 0 18px 45px rgba(0, 0, 0, .36);
}

:root[data-theme="dark"] .site-header {
  background: rgba(21, 18, 23, .94);
  border-bottom-color: rgba(255, 212, 59, .16);
}

:root[data-theme="dark"] .main-nav {
  color: #f8f3f8;
}

:root[data-theme="dark"] .main-nav a:hover,
:root[data-theme="dark"] .category-card span,
:root[data-theme="dark"] .quick-strip strong,
:root[data-theme="dark"] .price,
:root[data-theme="dark"] .catalog-table th {
  color: var(--yellow);
}

:root[data-theme="dark"] .cart-button strong {
  color: #151217;
}

:root[data-theme="dark"] .brand-logo {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, .18));
}

:root[data-theme="dark"] .hero h1,
:root[data-theme="dark"] .hero p:not(.eyebrow),
:root[data-theme="dark"] .hero .ghost-btn {
  color: #ffffff;
}

:root[data-theme="dark"] .hero .ghost-btn {
  border-color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 244, .93);
  border-bottom: 1px solid rgba(100, 32, 111, .16);
  backdrop-filter: blur(16px);
}

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

.brand-logo {
  display: block;
  width: clamp(132px, 15vw, 190px);
  height: 54px;
  object-fit: contain;
}

.brand strong,
h1,
h2,
h3 {
  font-family: Barlow, Arial, sans-serif;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 1.08rem;
  text-transform: uppercase;
}

.brand small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 30px);
  color: #302631;
  font-weight: 700;
}

.main-nav a {
  padding: 8px 2px;
}

.main-nav a:hover {
  color: var(--purple);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn,
.login-link,
.theme-toggle,
.install-button,
.cart-button,
.primary-btn,
.ghost-btn {
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 800;
}

.icon-btn {
  width: 42px;
  height: 42px;
  color: var(--purple);
  background: #f4eaf5;
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--purple);
  background: #f4eaf5;
}

.theme-toggle,
.install-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 13px;
  color: var(--purple);
  background: #f4eaf5;
}

:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .install-button,
:root[data-theme="dark"] .login-link,
:root[data-theme="dark"] .icon-btn {
  color: var(--yellow);
  background: #2b2030;
}

.cart-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 13px 0 16px;
  color: var(--white);
  background: var(--purple);
}

.cart-button strong {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 99px;
}

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 15, 24, .85), rgba(23, 15, 24, .28) 48%, rgba(23, 15, 24, .15));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  max-width: 690px;
  padding: 112px clamp(20px, 5vw, 70px) 58px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.6rem, 10vw, 8rem);
  line-height: .82;
  text-transform: uppercase;
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), #ff4f1f);
  box-shadow: 0 12px 30px rgba(244, 123, 32, .3);
}

.ghost-btn {
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, .74);
  background: rgba(255, 255, 255, .08);
}

.ghost-btn.dark {
  color: var(--purple);
  border-color: rgba(100, 32, 111, .24);
  background: transparent;
}

:root[data-theme="dark"] .ghost-btn.dark {
  color: var(--yellow);
  border-color: rgba(255, 212, 59, .32);
  background: rgba(255, 255, 255, .04);
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.quick-strip article {
  min-height: 92px;
  padding: 22px clamp(18px, 4vw, 50px);
  border-right: 1px solid var(--line);
}

.quick-strip strong {
  display: block;
  color: var(--purple);
  font-family: Barlow, Arial, sans-serif;
  font-size: 1.35rem;
}

.quick-strip span {
  color: var(--muted);
}

.section,
.shop-section,
.business-band,
.contact-section {
  padding: 76px clamp(18px, 5vw, 70px);
}

.section-heading,
.shop-toolbar,
.contact-section {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: .98;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.category-card {
  min-height: 108px;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.category-card span {
  color: var(--purple);
  font-family: Barlow, Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
}

.category-card strong {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

.category-card.active,
.category-card:hover {
  color: var(--white);
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border-color: transparent;
}

.category-card.active span,
.category-card:hover span,
.category-card.active strong,
.category-card:hover strong {
  color: var(--white);
}

:root[data-theme="dark"] .category-card.active span,
:root[data-theme="dark"] .category-card:hover span,
:root[data-theme="dark"] .category-card.active strong,
:root[data-theme="dark"] .category-card:hover strong {
  color: #ffffff;
}

.shop-section {
  background: var(--white);
}

.shop-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.search-box {
  display: grid;
  gap: 8px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  background: #fffaf4;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline-color: var(--orange);
}

:root[data-theme="dark"] .search-box input,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  color: #f8f3f8;
  background: #151217;
  border-color: #4b3b52;
}

:root[data-theme="dark"] .search-box input::placeholder,
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #a99cad;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-art {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--white);
  background: radial-gradient(circle at 25% 20%, var(--gold), var(--orange) 38%, var(--purple) 100%);
  cursor: pointer;
}

.product-art span {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  font-family: Barlow, Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  background: rgba(20, 15, 21, .72);
  border: 6px solid rgba(255, 255, 255, .68);
  border-radius: 999px;
}

.product-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
  max-height: 230px;
  object-fit: contain;
  padding: 12px;
  background: #fff;
}

.catalog-cta { white-space: nowrap; }

/* Captura breve de datos al usar el carrito del catálogo. */
#catalogCustomerModal .modal-card {
  width: min(440px, 100%);
  padding: 28px;
  color: var(--ink);
  border: 1px solid rgba(100, 32, 111, .22);
  border-top: 6px solid var(--purple);
  border-radius: 14px;
}

#catalogCustomerModal h2 {
  margin: 6px 0 8px;
  color: var(--ink);
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1.08;
}

#catalogCustomerModal .tiny-note { margin: 0 0 18px; color: var(--muted); }

#catalogCustomerModal .customer-form { display: grid; gap: 14px; }

#catalogCustomerModal .customer-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 800;
}

#catalogCustomerModal .customer-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

#catalogCustomerModal .customer-form input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(100, 32, 111, .14);
}

#catalogCustomerModal .customer-form .primary-btn { width: 100%; margin-top: 4px; }

/* Carrito del catálogo: controles compactos y balanceados. */
#catalogCartPanel .cart-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
#catalogCartPanel .cart-item small { display: block; margin-top: 4px; color: var(--muted); }
#catalogCartPanel .cart-item-actions { display: inline-flex; align-items: center; gap: 7px; padding: 4px; background: #f4eef5; border: 1px solid rgba(100, 32, 111, .16); border-radius: 8px; }
#catalogCartPanel .cart-item-actions button { width: 26px !important; height: 26px !important; min-height: 26px !important; padding: 0 !important; color: var(--purple); background: #fff; border: 1px solid rgba(100, 32, 111, .16); border-radius: 6px; font-size: .78rem !important; font-weight: 800; line-height: 1 !important; cursor: pointer; }
#catalogCartPanel .cart-item-actions span { min-width: 24px; color: var(--ink); font-size: .88rem; font-weight: 800; line-height: 1; text-align: center; }
#catalogCartPanel .cart-footer .primary-btn { width: 100%; margin-top: 14px; }

#catalogPaymentModal .modal-card { width: min(390px, 100%); padding: 22px; border-top: 4px solid var(--purple); border-radius: 14px; }
#catalogPaymentModal h2 { margin: 4px 0 4px; color: var(--ink); font-size: 1.08rem; font-weight: 700; line-height: 1.2; }
.payment-options { display: grid; gap: 8px; margin: 16px 0; }
.payment-options label { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.payment-options label:has(input:checked) { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(100, 32, 111, .12); }
.payment-option-copy { display: grid; gap: 2px; }
.payment-option-copy strong { color: var(--ink); font-size: .92rem; }
.payment-option-copy small { color: var(--muted); font-size: .78rem; }
.payment-fee { margin-left: auto; color: var(--orange); font-size: .82rem; font-weight: 800; }
.payment-total { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; color: var(--muted); border-top: 1px solid var(--line); font-size: .9rem; }
.payment-total strong { color: var(--ink); font-size: 1.2rem; }
#confirmCatalogPayment { width: 100%; min-height: 46px; margin-top: 8px; }

#catalogReceiptModal .modal-card { width: min(430px, 100%); padding: 28px; color: var(--ink); border-top: 5px solid var(--purple); border-radius: 14px; }
#catalogReceiptModal h2 { margin: 5px 0 8px; font-size: 1.45rem; }
.receipt-code { margin: 18px 0; padding: 14px; color: var(--purple); background: #f5edf6; border: 1px dashed var(--purple); border-radius: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; font-weight: 900; text-align: center; }
.receipt-summary { color: var(--ink); font-size: .92rem; }
.receipt-summary p { margin: 8px 0; }
.receipt-summary ul { margin: 12px 0; padding-left: 20px; }
.receipt-summary li { margin: 6px 0; }
#printCatalogReceipt { width: 100%; margin-top: 12px; }

@media print {
  body.catalog-receipt-open > :not(#catalogReceiptModal) { display: none !important; }
  body.catalog-receipt-open #catalogReceiptModal { position: static; display: block !important; padding: 0; background: #fff; }
  body.catalog-receipt-open #catalogReceiptModal .online-receipt { width: 100%; max-width: none; padding: 20px; border: 0; box-shadow: none; }
  body.catalog-receipt-open .no-print { display: none !important; }
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.product-body h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.product-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.product-meta {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}

.price {
  color: var(--purple);
  font-family: Barlow, Arial, sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
}

.availability,
.stock-warning {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.15;
}

.availability {
  color: #1c5f3a;
  background: #e7f7ee;
}

.stock-warning {
  color: #8a4f00;
  background: #fff3d8;
}

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

.add-btn,
.detail-btn,
.consult-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 900;
}

.add-btn {
  color: var(--white);
  background: var(--ink);
}

.detail-btn {
  color: var(--purple);
  background: #f4eaf5;
}

:root[data-theme="dark"] .detail-btn {
  color: var(--yellow);
  background: #2b2030;
}

.consult-btn {
  color: var(--white);
  background: var(--orange);
}

.business-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 34px;
  align-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
}

.business-band .eyebrow {
  color: var(--yellow);
}

.business-band p:not(.eyebrow) {
  max-width: 700px;
  color: rgba(255, 255, 255, .82);
  line-height: 1.6;
}

.about-panel {
  display: grid;
  gap: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
}

.about-panel strong {
  color: var(--yellow);
  font-family: Barlow, Arial, sans-serif;
  font-size: 1.35rem;
}

.about-panel span {
  color: rgba(255, 255, 255, .82);
  line-height: 1.5;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contact-section {
  align-items: center;
  background: var(--paper);
}

.contact-section p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.6;
}

.contact-location {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

/* Regla de contraste: ninguna superficie clara puede heredar texto blanco. */
:root:not([data-theme="dark"]) .section,
:root:not([data-theme="dark"]) .shop-section,
:root:not([data-theme="dark"]) .contact-section,
:root:not([data-theme="dark"]) .about-panel,
:root:not([data-theme="dark"]) .category-card,
:root:not([data-theme="dark"]) .product-card,
:root:not([data-theme="dark"]) .modal-card,
:root:not([data-theme="dark"]) .cart-panel {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .contact-section {
  background: var(--paper);
  color: var(--ink);
}

:root:not([data-theme="dark"]) .contact-section h2,
:root:not([data-theme="dark"]) .contact-section .eyebrow,
:root:not([data-theme="dark"]) .contact-section .contact-location {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .contact-section .eyebrow { color: var(--purple); }

:root:not([data-theme="dark"]) .contact-section .ghost-btn.dark {
  color: var(--purple);
  border-color: rgba(100, 32, 111, .45);
  background: #fff;
}

/* Tarjetas Metro: fondo sólido siempre implica texto claro y legible. */
:root:not([data-theme="dark"]) .category-card {
  background: #63536a !important;
  color: #fff !important;
}

:root:not([data-theme="dark"]) .category-card:nth-child(3n + 2) { background: var(--purple) !important; }
:root:not([data-theme="dark"]) .category-card:nth-child(3n + 3) { background: #3e5b76 !important; }
:root:not([data-theme="dark"]) .category-card:nth-child(5n + 4) { background: var(--orange) !important; }
:root:not([data-theme="dark"]) .category-card.active { background: var(--purple-dark) !important; }
:root:not([data-theme="dark"]) .category-card span,
:root:not([data-theme="dark"]) .category-card strong { color: #fff !important; }

:root:not([data-theme="dark"]) .quick-strip article {
  color: #fff !important;
}

:root:not([data-theme="dark"]) .quick-strip article strong,
:root:not([data-theme="dark"]) .quick-strip article span {
  color: #fff !important;
}

.cookie-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
  padding: 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.cookie-banner[hidden],
.install-button[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

:root[data-theme="dark"] .cart-panel,
:root[data-theme="dark"] .product-card,
:root[data-theme="dark"] .category-card,
:root[data-theme="dark"] .quick-strip,
:root[data-theme="dark"] .shop-section,
:root[data-theme="dark"] .contact-section {
  background: var(--white);
}

.cart-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 40;
  width: min(420px, 100vw);
  display: flex;
  flex-direction: column;
  transform: translateX(104%);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform .24s ease;
}

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

.cart-head,
.cart-footer {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-head h2 {
  font-size: 2rem;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 12px 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

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

.cart-line-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--purple);
  background: #f4eaf5;
  cursor: pointer;
  font-weight: 900;
}

.checkout-box {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.checkout-box h3 {
  margin: 0;
}

.checkout-box label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(15, 10, 18, .72);
}

.modal.open {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

#customerModal .modal-card {
  text-align: center;
}

#customerModal h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

#customerModal .customer-form label {
  text-align: left;
}

.detail-card {
  width: min(1120px, 96vw);
  padding: 28px;
}

.detail-breadcrumb {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(340px, 1fr);
  gap: 30px;
  align-items: start;
}

.detail-copy {
  display: grid;
  gap: 14px;
  font-size: .95rem;
}

.detail-copy h2,
.detail-card h2 {
  margin-bottom: 22px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 500;
  line-height: 1.08;
  text-align: center;
}

.detail-price {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 2.1rem;
  font-weight: 500;
}

.detail-qty {
  display: grid;
  grid-template-columns: 48px 72px 48px;
  gap: 0;
  width: max-content;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-qty button,
.detail-qty input {
  min-height: 48px;
  border: 0;
  text-align: center;
  font-weight: 900;
}

.detail-qty button {
  color: #fff;
  background: var(--orange);
  cursor: pointer;
}

.detail-media {
  min-height: 370px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff, #f7f2ee);
  border-radius: 8px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  cursor: zoom-in;
}

.detail-media.has-image {
  background-color: #fff;
}

.detail-product-art {
  display: grid;
  place-items: center;
  width: min(360px, 80%);
  aspect-ratio: 1.25;
  color: #fff;
  background: radial-gradient(circle at 25% 20%, var(--gold), var(--orange) 38%, var(--purple) 100%);
  border-radius: 8px;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
}

:root[data-detail-density="compact"] .detail-copy {
  gap: 10px;
}

:root[data-detail-density="compact"] .detail-copy p {
  margin: 0;
  line-height: 1.45;
}

:root[data-detail-style="elegant"] .detail-card {
  border: 0;
}

:root[data-detail-style="elegant"] .detail-product-art {
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.18), 0 18px 44px rgba(31,15,10,.16);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.mode-tab {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: var(--purple);
  background: #f4eaf5;
  cursor: pointer;
  font-weight: 900;
}

.mode-tab.active {
  color: #fff;
  background: var(--purple);
}

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

.customer-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.customer-form input {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sale-note {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: clamp(18px, 5vw, 42px);
  overflow: auto;
  background: var(--white);
  color: var(--ink);
}

body.note-open {
  overflow: hidden;
}

.sale-note-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.sale-note-x {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--purple);
  color: var(--white);
}

.sale-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-right: 46px;
}

.note-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

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

@media print {
  body > *:not(.sale-note) {
    display: none !important;
  }

  .sale-note {
    position: static !important;
    inset: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    color: #000 !important;
    background: #fff !important;
  }

  .sale-note-actions {
    display: none !important;
  }

  .sale-note-x {
    display: none !important;
  }

  .sale-note-head {
    position: static !important;
    background: #fff !important;
  }
}

.cart-item span {
  color: var(--muted);
}

.cart-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.full {
  width: 100%;
  margin-top: 14px;
}

.tiny-note {
  color: var(--muted);
  font-size: .86rem;
}

@media (max-width: 1020px) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .brand {
    flex: 0 0 auto;
  }

  .main-nav {
    order: 3;
    flex: 1 0 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 8px;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  .main-nav a {
    flex: 0 0 auto;
    border: 1px solid rgba(100, 32, 111, .14);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .48);
  }

  :root[data-theme="dark"] .main-nav a {
    border-color: rgba(255, 212, 59, .16);
    background: rgba(255, 255, 255, .06);
  }

  .header-actions {
    flex: 1 1 280px;
    justify-content: flex-end;
    overflow-x: auto;
    padding-bottom: 3px;
    white-space: nowrap;
    scrollbar-width: thin;
  }

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

  .business-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    min-height: 70px;
    padding: 10px 12px 6px;
  }

  .brand {
    order: 1;
    justify-content: center;
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .brand-logo {
    width: 132px;
    height: 46px;
  }

  .header-actions {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex: none;
    gap: 7px;
    margin: 0 -12px;
    padding: 0 12px 8px;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .theme-toggle {
    flex: 0 0 auto;
    padding: 0 10px;
    font-size: .82rem;
  }

  .login-link,
  .install-button,
  .cart-button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 10px;
    font-size: .82rem;
  }

  .cart-button {
    gap: 7px;
  }

  .cart-button strong {
    min-width: 22px;
    height: 22px;
  }

  .main-nav {
    order: 2;
    width: 100%;
    flex: none;
    margin: 0 -12px;
    padding: 0 12px 8px;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav a {
    padding: 7px 11px;
    font-size: .84rem;
  }

  .hero {
    min-height: 560px;
  }

  .hero-copy {
    padding-top: 110px;
  }

  .quick-strip,
  .category-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .shop-toolbar,
  .contact-section {
    display: grid;
    align-items: start;
  }

  .cookie-banner {
    display: grid;
  }

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