:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #0ea5e9;
  --accent-soft: #e0f2fe;
  --success: #059669;
  --danger: #dc2626;
  --text: #0f172a;
  --muted: #64748b;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e2e8f0;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --page-bg-image: none;
  --hero-bg-image: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(248, 250, 252, 0.94), rgba(248, 250, 252, 0.96)),
    var(--page-bg-image) center / cover fixed,
    var(--surface-soft);
  min-height: 100vh;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(226,232,240,.85);
  backdrop-filter: blur(18px);
}
.header-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.03em; font-size: 1.22rem; }
.brand__mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 10px 24px rgba(37, 99, 235, .25); }
.header-nav { display: flex; align-items: center; gap: 18px; }
.header-link { color: var(--muted); font-weight: 700; }
.header-link:hover { color: var(--primary); }
.icon-button { position: relative; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 14px; background: #fff; display: grid; place-items: center; }
.icon-button:hover { border-color: #bfdbfe; background: #eff6ff; }
.cart-badge { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; border-radius: 999px; padding: 0 6px; display: grid; place-items: center; color: white; background: var(--primary); font-size: .72rem; font-weight: 800; border: 2px solid white; }
.user-chip { border: 0; background: transparent; display: flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 700; }
.user-chip span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); }

.hero { padding: 64px 0 30px; }
.hero__panel {
  min-height: 430px;
  padding: clamp(34px, 7vw, 78px);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  display: grid;
  align-items: center;
  background:
    linear-gradient(105deg, rgba(15,23,42,.93) 0%, rgba(30,64,175,.82) 55%, rgba(14,165,233,.45) 100%),
    var(--hero-bg-image) center / cover,
    #0f172a;
  color: white;
  box-shadow: var(--shadow);
}
.hero__content { max-width: 690px; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 10px; color: var(--primary); text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 900; }
.hero .eyebrow { color: #bae6fd; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 5rem); line-height: .98; letter-spacing: -.06em; margin: 0 0 22px; max-width: 760px; }
.hero p { color: #dbeafe; line-height: 1.7; font-size: 1.08rem; max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; font-size: .9rem; color: #e0f2fe; }

.button { min-height: 46px; border: 0; border-radius: 14px; padding: 0 20px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 12px 24px rgba(37,99,235,.2); }
.button--primary:hover { box-shadow: 0 16px 30px rgba(37,99,235,.28); }
.button--secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.button--ghost { background: rgba(255,255,255,.1); color: white; border: 1px solid rgba(255,255,255,.24); }
.button--small { min-height: 40px; padding: 0 16px; }
.button--wide { width: 100%; }
.button:disabled { opacity: .65; cursor: wait; transform: none; }

.section { padding: 54px 0 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -.045em; margin: 0; }
.section-heading p { color: var(--muted); max-width: 580px; margin: 8px 0 0; line-height: 1.6; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card { background: rgba(255,255,255,.94); border: 1px solid rgba(226,232,240,.9); border-radius: var(--radius-xl); overflow: hidden; box-shadow: 0 10px 28px rgba(15,23,42,.06); transition: transform .22s ease, box-shadow .22s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-card__visual { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #eff6ff, #f0fdfa); padding: 26px; display: grid; place-items: center; }
.product-card__visual img { width: 88%; height: 88%; object-fit: contain; }
.product-card__badge { position: absolute; top: 16px; left: 16px; background: #fff; color: var(--primary-dark); padding: 7px 10px; border-radius: 999px; font-size: .73rem; font-weight: 900; box-shadow: 0 6px 18px rgba(15,23,42,.08); }
.product-card__body { padding: 22px; }
.product-card h3 { font-size: 1.25rem; margin: 0; letter-spacing: -.025em; }
.product-card__description { color: var(--muted); line-height: 1.58; min-height: 50px; }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.product-card__footer strong { font-size: 1.22rem; }

.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 70px; }
.feature { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; background: rgba(255,255,255,.75); }
.feature span { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); margin-bottom: 16px; }
.feature h3 { margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.55; }

.cart-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.46); opacity: 0; pointer-events: none; transition: .22s; }
.cart-overlay.is-open { opacity: 1; pointer-events: auto; }
.cart-drawer { position: fixed; top: 0; right: 0; z-index: 60; width: min(430px, 100%); height: 100vh; background: white; transform: translateX(100%); transition: .26s ease; display: grid; grid-template-rows: auto 1fr auto; box-shadow: -28px 0 70px rgba(15,23,42,.22); }
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__header, .cart-drawer__footer { padding: 22px; border-bottom: 1px solid var(--border); }
.cart-drawer__footer { border-top: 1px solid var(--border); border-bottom: 0; background: #f8fafc; }
.cart-drawer__header { display: flex; align-items: center; justify-content: space-between; }
.cart-drawer__header h2 { margin: 0; }
.cart-items { overflow: auto; padding: 14px 22px; }
.cart-line { display: grid; grid-template-columns: 78px 1fr; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.cart-line img { width: 78px; height: 78px; object-fit: contain; border-radius: 16px; background: #f8fafc; padding: 8px; }
.cart-line strong { display: block; margin-bottom: 4px; }
.cart-line small { color: var(--muted); }
.quantity-control { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.quantity-control button:not(.link-danger) { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 9px; background: white; }
.link-danger { border: 0; background: transparent; color: var(--danger); margin-left: auto; font-size: .82rem; font-weight: 800; }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-total-row strong { font-size: 1.35rem; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state__icon { font-size: 2.4rem; margin-bottom: 12px; }
.empty-state h3 { margin: 0 0 8px; }
.empty-state p { color: var(--muted); line-height: 1.55; }

.auth-shell, .checkout-shell, .status-shell { min-height: calc(100vh - 76px); padding: 54px 0 80px; display: grid; align-items: start; }
.auth-layout { display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border-radius: 32px; background: rgba(255,255,255,.94); border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth-aside { padding: clamp(34px, 6vw, 68px); color: white; background: linear-gradient(145deg, #0f172a, #1d4ed8 62%, #0ea5e9); }
.auth-aside h1 { font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.055em; line-height: 1.02; margin: 28px 0 18px; }
.auth-aside p { color: #dbeafe; line-height: 1.7; }
.auth-points { display: grid; gap: 14px; margin-top: 30px; color: #e0f2fe; }
.auth-card { padding: clamp(30px, 5vw, 56px); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #f1f5f9; padding: 5px; border-radius: 14px; margin-bottom: 28px; }
.auth-tabs button { border: 0; border-radius: 10px; min-height: 42px; background: transparent; font-weight: 800; color: var(--muted); }
.auth-tabs button.is-active { background: white; color: var(--text); box-shadow: 0 5px 14px rgba(15,23,42,.07); }
.form { display: grid; gap: 18px; }
.form h2 { margin: 0; letter-spacing: -.03em; }
.form-subtitle { color: var(--muted); margin: -8px 0 4px; line-height: 1.55; }
.form-field { display: grid; gap: 7px; }
.form-field label { font-weight: 800; font-size: .9rem; }
.form-field input { width: 100%; height: 48px; border: 1px solid var(--border); border-radius: 13px; padding: 0 14px; outline: none; background: white; }
.form-field input:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px #dbeafe; }
.check-row { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: .9rem; }
.form-message { min-height: 22px; font-size: .88rem; font-weight: 700; }
.form-message--error { color: var(--danger); }
.form-message--success { color: var(--success); }
.demo-note { margin-top: 20px; padding: 14px; border-radius: 13px; background: #f8fafc; color: var(--muted); font-size: .82rem; line-height: 1.5; border: 1px solid var(--border); }

.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.05em; }
.page-heading p { margin: 0; color: var(--muted); line-height: 1.6; }
.checkout-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; align-items: start; }
.panel { background: rgba(255,255,255,.95); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 26px; box-shadow: 0 10px 26px rgba(15,23,42,.05); }
.panel h2 { margin-top: 0; letter-spacing: -.03em; }
.checkout-line { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.checkout-line img { width: 72px; height: 72px; object-fit: contain; padding: 7px; background: #f8fafc; border-radius: 14px; }
.checkout-line span { display: block; color: var(--muted); margin-top: 5px; font-size: .9rem; }
.summary-row { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; color: var(--muted); }
.summary-row--total { color: var(--text); border-top: 1px solid var(--border); margin-top: 8px; padding-top: 18px; font-size: 1.2rem; font-weight: 900; }
.checkout-user { padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #f8fafc; margin-bottom: 18px; }
.checkout-user strong, .checkout-user span { display: block; }
.checkout-user span { color: var(--muted); margin-top: 4px; font-size: .9rem; }
.payment-placeholder { margin: 18px 0; padding: 16px; border-radius: 14px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; font-size: .9rem; line-height: 1.55; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: white; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.status-card { max-width: 900px; margin: 0 auto; background: rgba(255,255,255,.97); border: 1px solid var(--border); border-radius: 32px; overflow: hidden; box-shadow: var(--shadow); }
.status-hero { padding: 34px; text-align: center; background: linear-gradient(180deg, #ecfdf5, white); }
.status-icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #d1fae5; color: var(--success); font-size: 2rem; font-weight: 900; }
.status-hero h1 { margin: 0 0 8px; letter-spacing: -.04em; }
.status-hero p { margin: 0; color: var(--muted); }
.receipt { margin: 0 28px 28px; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.receipt__header { display: flex; justify-content: space-between; gap: 22px; padding: 22px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.receipt__header h2 { margin: 0 0 6px; }
.receipt__meta { text-align: right; color: var(--muted); font-size: .9rem; }
.receipt__body { padding: 22px; }
.receipt__info { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.info-block span { display: block; color: var(--muted); font-size: .82rem; margin-bottom: 4px; }
.receipt-table { width: 100%; border-collapse: collapse; }
.receipt-table th, .receipt-table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--border); }
.receipt-table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.receipt-total { display: flex; justify-content: flex-end; gap: 22px; padding-top: 20px; font-size: 1.25rem; }
.status-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 0 28px 32px; }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 90; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #0f172a; color: white; padding: 12px 17px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 700; transition: .22s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.site-footer { border-top: 1px solid var(--border); padding: 30px 0; color: var(--muted); background: rgba(255,255,255,.75); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .9rem; }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-strip, .checkout-grid, .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { min-height: 360px; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 24px, 1180px); }
  .header-inner { height: 68px; }
  .header-nav { gap: 8px; }
  .header-link, .user-chip small { display: none; }
  .hero { padding-top: 28px; }
  .hero__panel { border-radius: 26px; padding: 34px 24px; min-height: 440px; }
  .product-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .feature-strip { grid-template-columns: 1fr; }
  .auth-shell, .checkout-shell, .status-shell { padding-top: 28px; }
  .auth-layout, .status-card { border-radius: 24px; }
  .checkout-line { grid-template-columns: 60px 1fr; }
  .checkout-line > strong { grid-column: 2; }
  .receipt { margin: 0 14px 20px; }
  .receipt__header { flex-direction: column; }
  .receipt__meta { text-align: left; }
  .receipt__info { grid-template-columns: 1fr; }
  .receipt-table { font-size: .82rem; }
  .receipt-table th, .receipt-table td { padding: 9px 5px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media print {
  body { background: white; }
  .site-header, .status-hero, .status-actions, .site-footer, #status-missing { display: none !important; }
  .status-shell { padding: 0; min-height: auto; }
  .status-card { box-shadow: none; border: 0; }
  .receipt { border: 0; margin: 0; }
}

/* Cybersource Unified Checkout */
.checkout-summary { position: sticky; top: 100px; }
.uc-payment-block {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.uc-payment-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.uc-payment-heading strong { display: block; margin-top: 2px; font-size: 1rem; }
.uc-payment-kicker { display: block; color: var(--primary); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.uc-secure-badge { padding: 6px 9px; border-radius: 999px; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; font-size: .72rem; font-weight: 900; }
.uc-payment-copy { margin: 13px 0 15px; color: var(--muted); line-height: 1.5; font-size: .88rem; }
.uc-loading { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 12px 13px; border-radius: 12px; background: #eff6ff; color: #1e40af; font-size: .86rem; font-weight: 700; }
.uc-payment-buttons { min-height: 8px; width: 100%; }
.uc-payment-message { margin: 12px 0 0; padding: 11px 12px; border-radius: 11px; font-size: .84rem; line-height: 1.45; }
.uc-payment-message--info { color: #1e40af; background: #eff6ff; border: 1px solid #bfdbfe; }
.uc-payment-message--error { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.uc-payment-message--success { color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; }
.payment-security-note { margin: 14px 2px 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.spinner--blue { border-color: rgba(37,99,235,.22); border-top-color: var(--primary); flex: 0 0 auto; }

@media (max-width: 900px) {
  .checkout-summary { position: static; }
}

/* =========================================================
   Navegacion por zonas / cabecera comun
   ========================================================= */
.header-main { background: rgba(255,255,255,.94); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-context { margin-left: auto; text-align: right; display: grid; gap: 2px; }
.header-context span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.header-context strong { font-size: .92rem; }
.header-account-link { display: flex; align-items: center; gap: 9px; color: var(--text); }
.header-account-link__icon { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 12px; display: grid; place-items: center; background: #fff; }
.header-account-link small, .header-account-link strong { display: block; line-height: 1.15; }
.header-account-link small { color: var(--muted); font-size: .7rem; }
.header-account-link strong { font-size: .86rem; margin-top: 3px; }
.site-nav { border-top: 1px solid rgba(226,232,240,.8); background: rgba(248,250,252,.92); }
.site-nav__inner { min-height: 46px; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.site-nav__inner::-webkit-scrollbar { display: none; }
.site-nav__link { white-space: nowrap; padding: 9px 14px; border-radius: 10px; color: var(--muted); font-size: .86rem; font-weight: 800; transition: .18s ease; }
.site-nav__link:hover { color: var(--primary); background: #eff6ff; }
.site-nav__link.is-active { color: var(--primary-dark); background: #dbeafe; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; color: var(--muted); font-size: .84rem; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb strong { color: var(--text); }
.page-heading--split { display: flex; align-items: end; justify-content: space-between; gap: 24px; }

/* =========================================================
   Categorias y catalogo detallado
   ========================================================= */
.section--compact { padding-top: 36px; padding-bottom: 34px; }
.category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.category-card { min-height: 150px; padding: 20px 16px; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.92); display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; box-shadow: 0 8px 22px rgba(15,23,42,.045); transition: .2s ease; }
.category-card:hover { transform: translateY(-3px); border-color: #bfdbfe; box-shadow: 0 16px 34px rgba(15,23,42,.08); }
.category-card > span { font-size: 1.9rem; margin-bottom: auto; }
.category-card strong { font-size: .98rem; }
.category-card small { color: var(--muted); line-height: 1.35; }
.catalog-filter { max-width: 560px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.filter-chip { border: 1px solid var(--border); min-height: 34px; padding: 0 12px; border-radius: 999px; background: white; color: var(--muted); font-size: .78rem; font-weight: 800; }
.filter-chip:hover, .filter-chip.is-active { color: var(--primary-dark); background: #eff6ff; border-color: #bfdbfe; }
.product-card { cursor: pointer; }
.product-card:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.product-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.product-card__meta span { padding: 5px 8px; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-size: .68rem; font-weight: 800; }
.product-card__description { min-height: 66px; }
.product-card__specs { display: grid; gap: 5px; min-height: 70px; margin: 14px 0; color: #475569; font-size: .79rem; }
.product-card__availability { display: flex; align-items: center; color: var(--muted); font-size: .76rem; margin-top: 12px; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-right: 7px; box-shadow: 0 0 0 4px #d1fae5; }
.product-card__footer { align-items: flex-end; }
.product-card__footer > div:first-child small, .product-card__footer > div:first-child strong { display: block; }
.product-card__footer > div:first-child small { color: var(--muted); font-size: .7rem; margin-bottom: 3px; }
.product-card__actions { display: flex; gap: 8px; }

/* =========================================================
   Ficha emergente de producto
   ========================================================= */
.product-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; opacity: 0; visibility: hidden; transition: .2s ease; }
.product-modal.is-open { opacity: 1; visibility: visible; }
.product-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.62); backdrop-filter: blur(6px); }
.product-modal__dialog { position: relative; z-index: 1; width: min(1040px, 100%); max-height: min(820px, calc(100vh - 48px)); overflow: auto; border-radius: 30px; background: #fff; box-shadow: 0 36px 90px rgba(15,23,42,.32); transform: translateY(14px) scale(.985); transition: .2s ease; }
.product-modal.is-open .product-modal__dialog { transform: translateY(0) scale(1); }
.product-modal__close { position: sticky; top: 18px; margin: 18px 18px -62px auto; z-index: 4; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.94); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(15,23,42,.10); }
.product-detail { display: grid; grid-template-columns: .92fr 1.08fr; min-height: 620px; }
.product-detail__visual { position: relative; display: grid; place-items: center; padding: 56px 40px; background: linear-gradient(145deg, #eff6ff, #f0fdfa); }
.product-detail__visual img { width: min(88%, 420px); max-height: 440px; object-fit: contain; }
.product-detail__content { padding: 48px 46px 42px; }
.product-detail__content h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; line-height: 1.04; }
.product-detail__identity { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 18px; }
.product-detail__identity span { padding: 6px 9px; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-size: .72rem; font-weight: 800; }
.product-detail__description { color: var(--muted); font-size: .96rem; line-height: 1.65; }
.product-detail__price { margin: 18px 0; font-size: 2rem; font-weight: 900; letter-spacing: -.04em; color: var(--primary-dark); }
.product-detail__service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 20px 0 24px; }
.product-detail__service-grid > div { padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: #f8fafc; }
.product-detail__service-grid small, .product-detail__service-grid strong { display: block; }
.product-detail__service-grid small { color: var(--muted); font-size: .68rem; margin-bottom: 4px; }
.product-detail__service-grid strong { font-size: .78rem; line-height: 1.35; }
.product-detail__section { margin-top: 22px; }
.product-detail__section h3 { margin: 0 0 12px; font-size: .95rem; }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; padding: 0; margin: 0; list-style: none; color: #475569; font-size: .84rem; }
.feature-list li::before { content: "✓"; color: var(--success); font-weight: 900; margin-right: 7px; }
.spec-table { margin: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.spec-table > div { display: grid; grid-template-columns: 135px 1fr; gap: 15px; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: .8rem; }
.spec-table > div:last-child { border-bottom: 0; }
.spec-table dt { color: var(--muted); font-weight: 700; }
.spec-table dd { margin: 0; font-weight: 800; }
.product-detail__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }

/* =========================================================
   Checkout detallado
   ========================================================= */
.checkout-products-column { display: grid; gap: 16px; }
.panel-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 24px; }
.panel-heading-row h2, .summary-heading h2 { margin: 0; }
.panel-heading-row .eyebrow, .summary-heading .eyebrow { margin-bottom: 6px; }
.item-count { padding: 7px 11px; border-radius: 999px; background: #eff6ff; color: var(--primary-dark); font-size: .76rem; font-weight: 900; }
.checkout-products { display: grid; gap: 16px; }
.checkout-product { display: grid; grid-template-columns: 150px minmax(0, 1fr) 145px; gap: 20px; padding: 20px; border: 1px solid var(--border); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 10px 26px rgba(15,23,42,.045); }
.checkout-product__image { position: relative; min-height: 160px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(145deg, #eff6ff, #f8fafc); padding: 18px; }
.checkout-product__image img { width: 100%; height: 125px; object-fit: contain; }
.checkout-product__badge { position: absolute; top: 10px; left: 10px; padding: 5px 7px; border-radius: 999px; background: white; color: var(--primary-dark); font-size: .64rem; font-weight: 900; box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.checkout-product__identity { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.checkout-product__identity span { padding: 4px 7px; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-size: .65rem; font-weight: 800; }
.checkout-product h3 { margin: 0; font-size: 1.18rem; letter-spacing: -.025em; }
.checkout-product__content > p { margin: 7px 0 10px; color: var(--muted); font-size: .82rem; line-height: 1.48; }
.checkout-product__features { display: flex; flex-wrap: wrap; gap: 5px 12px; color: #475569; font-size: .72rem; }
.checkout-product__service { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; }
.checkout-product__service > span { padding: 8px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--border); }
.checkout-product__service small, .checkout-product__service strong { display: block; }
.checkout-product__service small { color: var(--muted); font-size: .61rem; margin-bottom: 3px; }
.checkout-product__service strong { font-size: .68rem; line-height: 1.3; }
.checkout-product__pricing { border-left: 1px solid var(--border); padding-left: 18px; display: grid; align-content: center; gap: 13px; }
.checkout-product__pricing > div { display: flex; justify-content: space-between; gap: 10px; }
.checkout-product__pricing small { color: var(--muted); font-size: .68rem; }
.checkout-product__pricing strong { font-size: .8rem; text-align: right; }
.checkout-product__line-total { padding-top: 11px; border-top: 1px solid var(--border); }
.checkout-product__line-total strong { color: var(--primary-dark); font-size: 1rem; }
.purchase-info-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.purchase-info-strip > div { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 15px; border: 1px solid var(--border); background: rgba(255,255,255,.8); }
.purchase-info-strip > div > span { font-size: 1.2rem; }
.purchase-info-strip strong, .purchase-info-strip small { display: block; }
.purchase-info-strip strong { font-size: .78rem; }
.purchase-info-strip small { color: var(--muted); font-size: .68rem; line-height: 1.4; margin-top: 3px; }
.summary-heading { margin-bottom: 16px; }

/* =========================================================
   Footer dividido en zonas
   ========================================================= */
.site-footer { padding: 0; background: rgba(255,255,255,.92); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 42px; padding-top: 42px; padding-bottom: 34px; }
.footer-brand p { max-width: 340px; color: var(--muted); font-size: .84rem; line-height: 1.55; margin: 15px 0 0; }
.footer-column { display: grid; align-content: start; gap: 10px; }
.footer-column strong { color: var(--text); font-size: .82rem; margin-bottom: 4px; }
.footer-column a, .footer-column span { color: var(--muted); font-size: .8rem; }
.footer-column a:hover { color: var(--primary); }
.footer-bottom { min-height: 58px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .76rem; }
.receipt-table-wrap { overflow-x: auto; }
.brand--light { color: white; }
.auth-kicker { margin-top: 36px !important; margin-bottom: -10px !important; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 900; color: #bae6fd !important; }
.form-heading { display: grid; gap: 3px; }
.form-heading .form-subtitle { margin: 2px 0 0; }

@media (max-width: 1080px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .checkout-product { grid-template-columns: 125px minmax(0, 1fr); }
  .checkout-product__pricing { grid-column: 2; border-left: 0; border-top: 1px solid var(--border); padding: 12px 0 0; grid-template-columns: repeat(3, 1fr); }
  .checkout-product__pricing > div { display: grid; }
  .checkout-product__pricing strong { text-align: left; }
  .checkout-product__line-total { padding-top: 0; border-top: 0; }
}

@media (max-width: 900px) {
  .header-context { display: none; }
  .page-heading--split { align-items: flex-start; flex-direction: column; }
  .catalog-filter { max-width: none; justify-content: flex-start; }
  .product-detail { grid-template-columns: 1fr; }
  .product-detail__visual { min-height: 320px; padding: 38px; }
  .product-detail__visual img { max-height: 280px; }
  .product-detail__content { padding: 34px 30px; }
  .product-detail__service-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-column:last-child { grid-column: 2 / -1; }
  .purchase-info-strip { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card__actions { flex-direction: column; }
  .product-card__actions .button { width: 100%; }
  .product-modal { padding: 10px; }
  .product-modal__dialog { max-height: calc(100vh - 20px); border-radius: 22px; }
  .product-detail__content { padding: 28px 20px; }
  .feature-list { grid-template-columns: 1fr; }
  .spec-table > div { grid-template-columns: 1fr; gap: 3px; }
  .product-detail__actions { flex-direction: column-reverse; }
  .product-detail__actions .button { width: 100%; }
  .checkout-product { grid-template-columns: 92px 1fr; padding: 14px; gap: 13px; }
  .checkout-product__image { min-height: 110px; padding: 10px; }
  .checkout-product__image img { height: 88px; }
  .checkout-product__service { grid-template-columns: 1fr; }
  .checkout-product__pricing { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-column:last-child { grid-column: auto; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding: 14px 0; }
}

@media (max-width: 480px) {
  .header-account-link > span:last-child { display: none; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .category-card { min-height: 125px; padding: 15px 13px; }
  .product-card__footer { align-items: stretch; flex-direction: column; }
  .product-card__actions { flex-direction: row; }
  .product-detail__visual { min-height: 250px; }
  .checkout-product { grid-template-columns: 1fr; }
  .checkout-product__image { min-height: 170px; }
  .checkout-product__image img { height: 135px; }
  .checkout-product__pricing { grid-column: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand, .footer-column:last-child { grid-column: 1; }
}

@media print {
  .site-nav { display: none !important; }
}

/* =========================================================
   Producto visual y descripciones ampliadas
   ========================================================= */
.product-card__visual {
  min-height: 245px;
  padding: 18px;
  background: linear-gradient(145deg, #f7fbff, #edf6ff 55%, #eefcf8);
}
.product-card__visual img {
  width: 100%;
  height: 100%;
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(15,23,42,.10));
  transition: transform .24s ease;
}
.product-card:hover .product-card__visual img { transform: scale(1.025); }
.product-card__description { min-height: auto; margin-bottom: 10px; }
.product-card__use {
  margin: 0 0 13px;
  padding: 10px 11px;
  border-left: 3px solid #5dcfc4;
  border-radius: 0 10px 10px 0;
  background: #f0fdfa;
  color: #475569;
  font-size: .75rem;
  line-height: 1.45;
}
.product-card__use strong { color: #0f766e; }

.product-detail__visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 48px 34px 34px;
  background: linear-gradient(145deg, #f7fbff, #edf6ff 55%, #eefcf8);
}
.product-detail__main-image {
  width: 100%;
  min-height: 390px;
  display: grid;
  place-items: center;
}
.product-detail__main-image img {
  width: min(100%, 520px);
  max-height: 420px;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(15,23,42,.12));
}
.product-detail__gallery {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.product-detail__thumb {
  width: 88px;
  height: 68px;
  padding: 5px;
  border: 1px solid #dbe4ee;
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  cursor: pointer;
  transition: .18s ease;
}
.product-detail__thumb:hover,
.product-detail__thumb.is-active {
  border-color: #5aa7d9;
  box-shadow: 0 0 0 3px rgba(90,167,217,.13);
  transform: translateY(-2px);
}
.product-detail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-detail__summary {
  margin: 18px 0 9px;
  color: #1e3a5f;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.55;
}
.product-detail__description { margin-top: 0; }
.product-detail__ideal {
  margin: 16px 0 4px;
  padding: 13px 14px;
  border: 1px solid #ccfbf1;
  border-radius: 14px;
  background: #f0fdfa;
}
.product-detail__ideal small,
.product-detail__ideal strong { display: block; }
.product-detail__ideal small {
  margin-bottom: 4px;
  color: #0f766e;
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.product-detail__ideal strong {
  color: #334155;
  font-size: .82rem;
  line-height: 1.45;
}
.included-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.included-list li {
  position: relative;
  padding: 9px 10px 9px 30px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #f8fafc;
  color: #475569;
  font-size: .78rem;
}
.included-list li::before {
  content: "+";
  position: absolute;
  left: 11px;
  top: 8px;
  color: var(--primary);
  font-weight: 900;
}

.checkout-product__summary {
  margin: 8px 0 6px !important;
  color: #1e3a5f !important;
  font-weight: 800;
}
.checkout-product__description {
  margin: 0 0 9px !important;
  color: var(--muted) !important;
}
.checkout-product__ideal {
  margin: 0 0 11px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f0fdfa;
  color: #475569;
  font-size: .72rem;
  line-height: 1.4;
}
.checkout-product__ideal strong { color: #0f766e; }
.checkout-product__image img {
  filter: drop-shadow(0 10px 12px rgba(15,23,42,.10));
}

@media (max-width: 900px) {
  .product-detail__main-image { min-height: 285px; }
  .product-detail__main-image img { max-height: 300px; }
}

@media (max-width: 700px) {
  .product-card__visual { min-height: 220px; }
  .included-list { grid-template-columns: 1fr; }
  .product-detail__main-image { min-height: 235px; }
  .product-detail__main-image img { max-height: 250px; }
  .product-detail__thumb { width: 74px; height: 58px; }
}
