/* ============ TOKENS ============ */
:root {
  --plum-950: #221331;
  --plum-900: #2C1840;
  --plum-800: #3B2255;
  --plum-700: #4C2C70;
  --plum-600: #623A8C;
  --lav-500: #8267AE;
  --lav-400: #9F84C4;
  --lav-300: #BBA5D9;
  --lav-200: #D6C7EB;
  --lav-100: #E9DFF6;
  --lav-050: #F6F1FC;
  --paper: #FFFDFB;
  --gold-700: #8F6A1C;
  --gold-600: #B4872A;
  --gold-500: #CB9F3E;
  --gold-300: #E4C77E;
  --gold-100: #F6E9C4;
  --ink: #221331;
  --ink-soft: #4A3A5E;

  --display: 'Fraunces', serif;
  --body: 'Plus Jakarta Sans', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(.22, .9, .28, 1);
  --container: 1440px;

  /* Cubist Design Tokens */
  --cubist-border: 2px solid var(--plum-950);
  --cubist-border-thick: 3px solid var(--plum-950);
  --cubist-shadow-dark: 6px 6px 0px var(--plum-950);
  --cubist-shadow-gold: 6px 6px 0px var(--gold-500);
  --cubist-shadow-lav: 6px 6px 0px var(--lav-400);
  --cubist-radius: 0px;
  /* Cubist is sharp! */
}

/* ============ CUSTOM SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: var(--paper);
  border-left: 2px solid var(--plum-950);
}

::-webkit-scrollbar-thumb {
  background: var(--plum-800);
  border: 2px solid var(--plum-950);
  border-radius: var(--cubist-radius);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-600);
}

/* Firefox */
* {
  scrollbar-width: auto;
  scrollbar-color: var(--plum-800) var(--paper);
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0;
  line-height: 1.05;
}

p {
  margin: 0;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.stagger>* {
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ============ PUBLIC SITE HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--paper);
  border-bottom: 2px solid var(--plum-950);
  box-shadow: 0 4px 12px rgba(34, 19, 49, .08);
  padding: 14px 0;
  transition: background .45s var(--ease), padding .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}

.site-header.scrolled {
  background: var(--paper);
  padding: 12px 0;
  border-bottom: 2px solid var(--plum-950);
  box-shadow: 0 6px 0px rgba(34, 19, 49, .06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand img {
  width: 44px;
  height: 44px;
  border-radius: var(--cubist-radius);
  border: 2px solid var(--plum-950);
  box-shadow: 3px 3px 0 var(--gold-500);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.brand:hover img {
  transform: rotate(-8deg) translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--gold-500);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .01em;
  color: var(--plum-900);
}

.brand-text span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--lav-500);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color .3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--gold-500);
  transition: width .35s var(--ease);
}

.nav-links a:hover {
  color: var(--plum-900);
}

.nav-links a:hover::after {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 2px;
  border: 2px solid var(--plum-950);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s;
  white-space: nowrap;
}

.btn-gold {
  background: var(--gold-500);
  color: var(--plum-950);
  box-shadow: 4px 4px 0px var(--plum-950);
}

.btn-gold:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--plum-950);
}

.btn-ghost {
  background: transparent;
  border-color: var(--plum-950);
  color: var(--plum-800);
  box-shadow: 4px 4px 0px var(--lav-200);
}

.btn-ghost:hover {
  border-color: var(--plum-950);
  background: var(--lav-050);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--lav-300);
}

.btn-light {
  background: var(--paper);
  color: var(--plum-900);
  box-shadow: 4px 4px 0px var(--plum-950);
}

.btn-light:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--plum-950);
}

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

.burger {
  display: none;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 168px 0 90px;
  background:
    radial-gradient(800px 800px at 50% -10%, var(--lav-100) 0%, transparent 70%),
    linear-gradient(180deg, var(--lav-050) 0%, var(--paper) 100%);
  overflow: hidden;
}

/* Abstract cubist background elements */
.hero::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 5%;
  width: 140px;
  height: 140px;
  background: var(--lav-200);
  border: 2px solid var(--plum-950);
  transform: rotate(15deg);
  opacity: 0.12;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: 8%;
  width: 180px;
  height: 180px;
  background: var(--gold-100);
  border: 2px solid var(--gold-500);
  transform: rotate(-10deg);
  opacity: 0.2;
  pointer-events: none;
}

.hero-centered-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  align-items: center;
  gap: 48px;
  max-width: var(--container);
  margin: 0 auto;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--plum-950);
  background: var(--gold-300);
  border: 2px solid var(--plum-950);
  padding: 8px 16px 8px 12px;
  border-radius: var(--cubist-radius);
  margin-bottom: 26px;
  box-shadow: 3px 3px 0 var(--plum-950);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--plum-950);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .35;
    transform: scale(1.4);
  }
}

.hero h1 {
  font-size: clamp(34px, 3.8vw, 54px);
  font-weight: 700;
  color: var(--plum-950);
  letter-spacing: -.02em;
  line-height: 1.1;
  max-width: 100%;
  text-align: left;
}

.hero h1 em {
  font-style: normal;
  font-weight: 700;
  color: var(--plum-950);
  background: var(--gold-300);
  border: 2px solid var(--plum-950);
  padding: 2px 10px;
  display: inline-block;
  transform: rotate(-1.5deg);
  box-shadow: 4px 4px 0 var(--plum-950);
}

.hero-sub {
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 100%;
  text-align: left;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  font-size: 15px;
  color: var(--ink-soft);
}

.hero-trust .avatars {
  display: flex;
}

.hero-trust .avatars span {
  width: 32px;
  height: 32px;
  border-radius: var(--cubist-radius);
  border: 2px solid var(--plum-950);
  margin-left: -4px;
  background: var(--lav-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--plum-950);
  font-weight: 700;
}

.hero-trust .avatars span:first-child {
  margin-left: 0;
}

/* search bar mock */
.hero-search {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 2px solid var(--plum-950);
  border-radius: var(--cubist-radius);
  padding: 6px 6px 6px 16px;
  width: 100%;
  max-width: 540px;
  box-shadow: 6px 6px 0 var(--plum-950);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.hero-search:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--plum-950);
}

.hero-search svg {
  flex: none;
  color: var(--plum-950);
  width: 20px;
  height: 20px;
}

.hero-search input {
  border: none;
  outline: none;
  font-family: var(--body);
  font-size: 16px;
  flex: 1;
  background: transparent;
  color: var(--ink);
  padding: 12px 0;
}

.hero-search input::placeholder {
  color: var(--lav-500);
}

.hero-search button {
  flex: none;
  background: var(--plum-950);
  color: #fff;
  border: none;
  border-radius: var(--cubist-radius);
  padding: 14px 24px;
  font-size: 14.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background .2s;
}

.hero-search button:hover {
  background: var(--plum-700);
}

/* ---- hero visual / signature tree ---- */
.hero-visual {
  margin-top: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  position: relative;
}

@media (max-width: 992px) {
  .hero-centered-layout {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .hero-copy {
    align-items: center;
    text-align: center;
  }
  .hero h1, .hero-sub {
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    justify-content: center;
    margin-top: 20px;
  }
}

.tree-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 480/560;
  max-width: 460px;
  background: var(--lav-050);
  border: 2px solid var(--plum-950);
  box-shadow: 8px 8px 0px var(--plum-900);
  padding: 24px;
}

.tree-stage svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trunk-path {
  fill: none;
  stroke: var(--plum-900);
  stroke-width: 8;
  stroke-linejoin: miter;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: draw 1.4s var(--ease) .2s forwards;
}

.branch-path {
  fill: none;
  stroke: var(--plum-700);
  stroke-width: 4;
  stroke-linejoin: miter;
  opacity: .85;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: draw 1.1s var(--ease) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.leaf {
  fill: var(--plum-600);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(.2) rotate(45deg);
  /* Diamond shape */
  animation: bloomCubist .6s var(--ease) forwards;
  animation-delay: calc(var(--d) + 1.2s);
}

.leaf:nth-child(3n) {
  fill: var(--gold-500);
}

.leaf:nth-child(5n) {
  fill: var(--lav-500);
}

@keyframes bloomCubist {
  0% {
    opacity: 0;
    transform: scale(.15) rotate(45deg);
  }

  65% {
    opacity: 1;
    transform: scale(1.12) rotate(45deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(45deg);
  }
}

.book-shape {
  fill: var(--plum-950);
}

.book-page {
  fill: var(--paper);
  stroke: var(--plum-950);
  stroke-width: 2;
}

.plaque-bg {
  fill: var(--gold-300);
  stroke: var(--plum-950);
  stroke-width: 2;
}

.plaque-text {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  fill: var(--plum-950);
}

.plaque-group {
  opacity: 0;
  animation: plaqueIn .6s var(--ease) forwards;
  animation-delay: 1s;
}

@keyframes plaqueIn {
  to {
    opacity: 1;
  }
}

.tree-tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 2px solid var(--plum-950);
  padding: 10px 16px;
  border-radius: var(--cubist-radius);
  font-size: 14px;
  font-weight: 700;
  color: var(--plum-950);
  box-shadow: 4px 4px 0 var(--plum-950);
  opacity: 0;
  transform: translateY(10px);
  animation: tagIn .6s var(--ease) forwards;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.tree-tag:hover {
  transform: translateY(-2px) !important;
  box-shadow: 6px 6px 0 var(--gold-500);
}

.tree-tag i {
  width: 10px;
  height: 10px;
  border-radius: 0;
  flex: none;
}

@keyframes tagIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tag-preescolar {
  left: -5%;
  bottom: 26%;
  animation-delay: 1.7s;
}

.tag-preescolar i {
  background: var(--gold-500);
  border: 1px solid var(--plum-950);
}

.tag-primaria {
  right: -5%;
  bottom: 44%;
  animation-delay: 1.95s;
}

.tag-primaria i {
  background: var(--lav-500);
  border: 1px solid var(--plum-950);
}

/* ============ STATS STRIP ============ */
.stats {
  background: var(--plum-950);
  color: var(--lav-100);
  padding: 46px 0;
  border-top: 3px solid var(--plum-950);
  border-bottom: 3px solid var(--plum-950);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.stat b {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  color: var(--gold-300);
  letter-spacing: -.01em;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  color: var(--lav-200);
  max-width: 32ch;
  line-height: 1.5;
}

.stat {
  border-left: 2px dashed rgba(233, 223, 246, .3);
  padding-left: 24px;
}

.stat:first-child {
  border-left: none;
  padding-left: 0;
}

/* ============ SECTION HEADS ============ */
.section {
  padding: 104px 0;
}

.section-tight {
  padding-top: 0;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.sec-eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lav-500);
  margin-bottom: 14px;
  display: block;
}

.sec-head h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 700;
  color: var(--plum-950);
  letter-spacing: -.01em;
  max-width: 16ch;
}

.sec-desc {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 38ch;
}

/* ============ NIVELES ============ */
.niveles {
  background: var(--lav-050);
  border-top: 3px solid var(--plum-950);
  border-bottom: 3px solid var(--plum-950);
}

.niv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 980px;
  margin: 0 auto;
}

.niv-card {
  background: var(--paper);
  border: 2px solid var(--plum-950);
  border-radius: var(--cubist-radius);
  padding: 30px 26px 26px;
  position: relative;
  overflow: hidden;
  box-shadow: 5px 5px 0px var(--plum-800);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.niv-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, var(--gold-100), transparent 50%);
  opacity: 0;
  transition: opacity .3s;
}

.niv-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 9px 9px 0px var(--plum-950);
}

.niv-card:hover::before {
  opacity: 1;
}

.niv-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--cubist-radius);
  border: 2px solid var(--plum-950);
  background: var(--plum-900);
  color: var(--gold-300);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
  transition: transform .3s var(--ease), background .3s, color .3s;
}

.niv-card:hover .niv-icon {
  transform: rotate(-6deg) scale(1.05);
  background: var(--gold-500);
  color: var(--plum-950);
}

.niv-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--plum-950);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.niv-card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  position: relative;
  z-index: 1;
}

.niv-link {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--plum-950);
  position: relative;
  z-index: 1;
}

.niv-link svg {
  transition: transform .25s var(--ease);
}

.niv-card:hover .niv-link svg {
  transform: translateX(4px);
}

/* ============ FEATURES ============ */
.features-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
}

.feat-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feat-card {
  border-radius: var(--cubist-radius);
  padding: 32px;
  border: 2px solid var(--plum-950);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.feat-card:not(.feat-big) {
  background: var(--paper);
  box-shadow: 5px 5px 0px var(--plum-800);
}

.feat-card:not(.feat-big):hover {
  transform: translate(-4px, -4px);
  box-shadow: 9px 9px 0px var(--plum-950);
}

.feat-big {
  background: linear-gradient(155deg, var(--plum-900), var(--plum-700));
  color: var(--lav-100);
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
  box-shadow: 6px 6px 0px var(--gold-500);
}

.feat-big:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0px var(--plum-950);
}

.feat-big h3 {
  font-size: 29px;
  color: #fff;
  font-weight: 700;
  max-width: 14ch;
}

.feat-big p {
  margin-top: 16px;
  color: var(--lav-200);
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 32ch;
}

.feat-num {
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--gold-300);
  letter-spacing: .1em;
  font-weight: 700;
}

.feat-visual {
  margin-top: 26px;
  border-radius: var(--cubist-radius);
  background: rgba(255, 255, 255, .06);
  border: 2px solid rgba(233, 223, 246, .25);
  padding: 18px;
}

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-family: var(--mono);
  color: var(--lav-200);
  padding: 9px 0;
  border-bottom: 1px dashed rgba(233, 223, 246, .2);
}

.mini-row:last-child {
  border-bottom: none;
}

.mini-row .ok {
  color: var(--gold-300);
  font-weight: 700;
}

.feat-card:not(.feat-big) h3 {
  font-size: 21px;
  color: var(--plum-950);
  font-weight: 700;
  margin-bottom: 8px;
}

.feat-card:not(.feat-big) p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.feat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--cubist-radius);
  border: 2px solid var(--plum-950);
  background: var(--gold-100);
  color: var(--plum-950);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-weight: bold;
}

/* ============ PROCESO ============ */
.proceso {
  background: var(--plum-950);
  color: var(--lav-100);
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--plum-950);
  border-bottom: 3px solid var(--plum-950);
}

.proceso::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 400px at 12% 15%, rgba(203, 159, 62, .15), transparent 60%);
}

.proceso .sec-eyebrow {
  color: var(--gold-300);
}

.proceso .sec-head h2 {
  color: #fff;
}

.proceso .sec-desc {
  color: var(--lav-300);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  z-index: 1;
}

.step {
  padding: 0 24px 0 0;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 22px;
  right: -2px;
  width: calc(100% - 44px);
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(233, 223, 246, .3) 0 6px, transparent 6px 12px);
}

.step-index {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--plum-950);
  background: var(--paper);
  width: 46px;
  height: 46px;
  border-radius: var(--cubist-radius);
  border: 2px solid var(--plum-950);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--gold-500);
  transition: background .3s, color .3s, transform .3s, box-shadow .3s;
}

.step:hover .step-index {
  background: var(--gold-500);
  color: var(--plum-950);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--paper);
}

.step h3 {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.step p {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--lav-200);
  max-width: 26ch;
}

/* ============ TESTIMONIO ============ */
.testi {
  padding: 100px 0;
  background: var(--paper);
}

.testi-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  border: 3px solid var(--plum-950);
  padding: 48px 36px;
  background: var(--lav-050);
  box-shadow: 8px 8px 0 var(--plum-950);
  position: relative;
}

.testi blockquote {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.5;
  color: var(--plum-950);
  margin: 0;
}

.testi blockquote::before {
  content: '“';
  color: var(--gold-500);
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.3em;
}

.testi blockquote::after {
  content: '”';
  color: var(--gold-500);
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.3em;
}

.testi-attr {
  margin-top: 28px;
  font-size: 15.5px;
  color: var(--ink-soft);
  font-family: var(--mono);
}

.testi-attr b {
  color: var(--plum-900);
  font-weight: 700;
}

.testi-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 24px;
  border-radius: var(--cubist-radius);
  border: 2px solid var(--plum-950);
  background: var(--gold-300);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plum-950);
  box-shadow: 3px 3px 0 var(--plum-950);
}

/* ============ CTA BANNER ============ */
.cta-banner {
  background: linear-gradient(135deg, var(--plum-900) 0%, var(--plum-800) 100%);
  border-radius: var(--cubist-radius);
  border: 3px solid var(--plum-950);
  color: #fff;
  padding: 64px clamp(24px, 6vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  margin: 0 clamp(20px, 5vw, 56px) 0;
  box-shadow: 10px 10px 0 var(--gold-500);
}

.cta-banner::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 240px;
  height: 240px;
  background: var(--plum-700);
  border: 2px solid var(--plum-950);
  transform: rotate(25deg);
  opacity: 0.3;
}

.cta-banner h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  max-width: 16ch;
  color: #fff;
  position: relative;
  z-index: 1;
}

.cta-banner p {
  margin-top: 14px;
  color: var(--lav-200);
  font-size: 17.5px;
  max-width: 40ch;
  position: relative;
  z-index: 1;
}

.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ============ FOOTER ============ */
footer {
  padding: 80px 0 30px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 2px solid var(--plum-950);
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.foot-brand img {
  width: 46px;
  height: 46px;
  border-radius: var(--cubist-radius);
  border: 2px solid var(--plum-950);
  box-shadow: 3px 3px 0 var(--gold-500);
}

.foot-brand b {
  font-family: var(--display);
  font-size: 20px;
  color: var(--plum-950);
  font-weight: 700;
}

.foot-desc {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 32ch;
}

.foot-col h4 {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lav-500);
  margin-bottom: 18px;
  font-weight: 700;
}

.foot-col li {
  margin-bottom: 12px;
}

.foot-col a {
  font-size: 15.5px;
  color: var(--ink-soft);
  transition: color .3s;
}

.foot-col a:hover {
  color: var(--plum-900);
}

.foot-social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.foot-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--cubist-radius);
  border: 2px solid var(--plum-950);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plum-800);
  box-shadow: 3px 3px 0 var(--plum-950);
  transition: background .3s, color .3s, transform .3s, box-shadow .3s;
}

.foot-social a:hover {
  background: var(--gold-500);
  color: var(--plum-950);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--plum-950);
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 14px;
  color: #9c8ab5;
}

/* ============ MOBILE ============ */
@media (max-width:980px) {
  .hero-centered-layout {
    max-width: 100%;
  }

  .hero-visual {
    max-width: 340px;
    margin: 32px auto 0;
  }

  .nav-links {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .stat {
    border-left: none;
    padding-left: 0;
    border-top: 2px dashed rgba(233, 223, 246, .3);
    padding-top: 20px;
  }

  .stat:first-child {
    border-top: none;
    padding-top: 0;
  }

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

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

  .feat-big {
    grid-row: auto;
    min-height: auto;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .step:not(:last-child)::after {
    display: none;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
    margin: 0 20px;
  }

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

@media (max-width:560px) {
  .niv-grid {
    grid-template-columns: 1fr;
  }

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

  .eyebrow {
    font-size: 10px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }
}

/* ============ CATALOG PAGE SPECIFIC STYLES ============ */
.catalog-page {
  background: var(--paper);
}

.cat-hero {
  padding: 130px 0 35px;
  background: linear-gradient(180deg, var(--lav-050) 0%, var(--paper) 100%);
  border-bottom: 2px dashed rgba(34, 19, 49, 0.15);
  margin-bottom: 30px;
}

.cat-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: var(--plum-950);
  margin-top: 12px;
}

.cat-subtitle {
  font-size: 16.5px;
  color: var(--ink-soft);
  margin-top: 8px;
  max-width: 60ch;
}

.breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--lav-500);
}

.breadcrumb a {
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--plum-950);
}

.breadcrumb span {
  margin: 0 6px;
  color: var(--lav-200);
}

.breadcrumb .active {
  color: var(--plum-900);
  font-weight: 600;
}

/* Layout Grid */
.catalog-section {
  padding-bottom: 80px;
}

.catalog-section .wrap {
  max-width: 1640px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr 270px;
  gap: 28px;
  align-items: start;
}

/* Sidebar Filters */
.filters-sidebar {
  background: var(--paper);
  border: 2px solid var(--plum-950);
  padding: 24px;
  box-shadow: 5px 5px 0px var(--plum-950);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.filter-header h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--plum-950);
}

.clear-filters-btn {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--lav-500);
  padding: 4px 8px;
  cursor: pointer;
  transition: color 0.2s;
}

.clear-filters-btn:hover {
  color: var(--gold-600);
}

.filter-search {
  position: relative;
  margin-bottom: 24px;
}

.filter-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lav-500);
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  border: 2px solid var(--plum-950);
  padding: 10px 10px 10px 34px;
  font-family: var(--body);
  font-size: 14px;
  outline: none;
  transition: box-shadow 0.2s;
}

.filter-search input:focus {
  box-shadow: 3px 3px 0 var(--plum-950);
}

.filter-group {
  border-top: 1px dashed rgba(34, 19, 49, 0.15);
  padding: 18px 0;
}

.filter-group h4 {
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--plum-950);
  margin-bottom: 12px;
}

/* Custom checkboxes and radios in Cubist design style */
.cubist-checkbox,
.cubist-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  user-select: none;
}

.cubist-checkbox input,
.cubist-radio input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.cubist-checkbox .box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--plum-950);
  background: var(--paper);
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s, transform 0.15s;
}

.cubist-checkbox:hover .box {
  transform: scale(1.05);
}

.cubist-checkbox input:checked~.box {
  background: var(--gold-500);
}

.cubist-checkbox input:checked~.box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--plum-950);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.cubist-radio .circle {
  width: 18px;
  height: 18px;
  border: 2px solid var(--plum-950);
  border-radius: 50%;
  background: var(--paper);
  flex-shrink: 0;
  position: relative;
  transition: transform 0.15s;
}

.cubist-radio:hover .circle {
  transform: scale(1.05);
}

.cubist-radio input:checked~.circle {
  background: var(--paper);
}

.cubist-radio input:checked~.circle::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--plum-950);
}

.cubist-checkbox input:checked~.label-text,
.cubist-radio input:checked~.label-text {
  color: var(--plum-950);
  font-weight: 600;
}

/* Products Grid Section Toolbar */
.products-section-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--plum-950);
  padding: 12px 18px;
  background: var(--paper);
  box-shadow: 4px 4px 0px rgba(34, 19, 49, 0.08);
}

.results-count {
  font-size: 14.5px;
  color: var(--ink-soft);
}

.results-count b {
  color: var(--plum-950);
}

.sort-select-wrapper select {
  border: 2px solid var(--plum-950);
  padding: 6px 28px 6px 12px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  background: var(--paper);
  cursor: pointer;
  border-radius: 0;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23221331' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

/* Products Grid - Diseño Administrativo de Alta Densidad */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 16px;
}

/* Product Card styling */
.prod-card {
  background: var(--paper);
  border: 2px solid var(--plum-950);
  box-shadow: 4px 4px 0px var(--plum-950);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.prod-card:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0px var(--gold-500);
}

.prod-cover-wrap {
  position: relative;
  border-bottom: 2px solid var(--plum-950);
  height: 200px;
  min-height: 200px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}

.prod-cover-wrap img {
  max-width: 100%;
  max-height: 184px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(2px 3px 5px rgba(0,0,0,0.15));
  transition: transform 0.3s var(--ease);
}

.prod-card:hover .prod-cover-wrap img {
  transform: scale(1.05);
}

.prod-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  text-align: center;
  color: #fff;
  border-radius: 0;
}

.book-subject {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.book-grade {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  margin-top: 6px;
  background: rgba(34, 19, 49, 0.35);
  padding: 3px 8px;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.prod-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border: 1.5px solid var(--plum-950);
  background: var(--paper);
  color: var(--plum-950);
  box-shadow: 2px 2px 0 var(--plum-950);
  z-index: 2;
}

.badge-preescolar {
  background: var(--gold-300);
}

.badge-primaria {
  background: var(--lav-200);
}

.prod-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prod-editorial {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--lav-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.prod-title {
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--plum-950);
  margin: 4px 0 10px;
  line-height: 1.25;
  min-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.prod-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  border-top: 1px dashed rgba(34, 19, 49, 0.15);
  padding-top: 8px;
}

.prod-price {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--plum-950);
}

.prod-stock {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border: 1px solid var(--plum-950);
}

.stock-ok {
  background: #dcfce7;
  color: #166534;
}

.stock-warn {
  background: #fef2f2;
  color: #991b1b;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Pagination container */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.page-num {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--plum-950);
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--plum-950);
  background: var(--paper);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--plum-950);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.page-num:hover:not(.active) {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--plum-950);
  background: var(--lav-050);
}

.page-num.active {
  background: var(--gold-500);
  box-shadow: none;
  transform: none;
}

/* Quote Summary Sidebar Dock */
.quote-summary {
  position: sticky;
  top: 90px;
  background: var(--plum-950);
  color: #fff;
  border: 2px solid var(--plum-950);
  box-shadow: 6px 6px 0px var(--gold-500);
  font-family: var(--body);
}

.quote-summary-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.quote-summary h3 {
  font-size: 20px;
  color: #fff;
  font-weight: 700;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 12px;
}

.quote-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--lav-200);
  margin-top: 8px;
  text-transform: uppercase;
}

.quote-items-list {
  flex: 1;
  margin: 20px 0;
  overflow-y: auto;
  max-height: 280px;
}

.empty-quote-state {
  text-align: center;
  color: var(--lav-200);
  font-size: 13.5px;
  line-height: 1.5;
  padding: 40px 0;
}

.quote-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  gap: 12px;
}

.quote-item-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.quote-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-item-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--lav-200);
  margin-top: 3px;
}

.quote-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.qty-btn {
  background: none;
  border: none;
  color: #fff;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  cursor: pointer;
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.qty-val {
  font-family: var(--mono);
  font-size: 12px;
  min-width: 14px;
  text-align: center;
}

.quote-footer {
  border-top: 2px solid rgba(255, 255, 255, 0.15);
  padding-top: 18px;
  margin-top: auto;
}

.quote-totals {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
}

.quote-totals span {
  font-size: 12px;
  color: var(--lav-200);
  text-transform: uppercase;
}

.quote-subtotal {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-300);
}

/* Catalog page responsive styles */
@media (max-width: 1120px) {
  .catalog-layout {
    grid-template-columns: 240px 1fr;
    grid-template-areas:
      "filters toolbar"
      "filters grid"
      "filters pag"
      "quote quote";
  }

  .quote-summary {
    grid-area: quote;
    position: static;
    margin-top: 20px;
  }

  .quote-summary-inner {
    min-height: auto;
  }

  .quote-items-list {
    max-height: 180px;
  }
}

@media (max-width: 860px) {
  .catalog-layout {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .filters-sidebar {
    width: 100%;
  }

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

  .quote-summary {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .sort-select-wrapper {
    width: 100%;
  }

  .sort-select-wrapper select {
    width: 100%;
  }
}

/* ============ ACCESSIBILITY SYSTEM ============ */
*:focus {
  outline: none !important;
}

*:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 3px !important;
}

/* Focused states for custom cubist checkboxes and radio buttons */
.cubist-checkbox input:focus ~ .box {
  outline: none !important;
}
.cubist-checkbox input:focus-visible ~ .box {
  outline: 3px solid #005fcc !important;
  outline-offset: 3px !important;
}

.cubist-radio input:focus ~ .circle {
  outline: none !important;
}
.cubist-radio input:focus-visible ~ .circle {
  outline: 3px solid #005fcc !important;
  outline-offset: 3px !important;
}

/* ============ QUOTE DETAILS MODAL STYLES ============ */
.quote-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.quote-modal-card {
  background: var(--paper);
  border: 3px solid var(--plum-950);
  box-shadow: 10px 10px 0 var(--plum-950);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 0px; /* Sharp cubist style */
  animation: modalSlide 0.25s cubic-bezier(.22, .9, .28, 1);
}

@keyframes modalSlide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.quote-modal-header {
  padding: 20px 24px;
  border-bottom: 2px solid var(--plum-950);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quote-modal-header h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--plum-950);
  margin: 0;
}

.quote-modal-close {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--plum-950);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.quote-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--lav-200);
}

.modal-item-row:last-child {
  border-bottom: none;
}

.modal-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-item-name {
  font-weight: 700;
  color: var(--plum-950);
  font-size: 15px;
}

.modal-item-meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.modal-item-subtotal {
  font-weight: 700;
  color: var(--plum-950);
  font-size: 15px;
}

.quote-modal-totals {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px dashed var(--plum-950);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}

.quote-modal-totals b {
  font-size: 20px;
  color: var(--plum-950);
}

.quote-modal-footer {
  padding: 20px 24px;
  border-top: 2px solid var(--plum-950);
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  background: var(--lav-050);
}

/* ============ BOOK DETAIL MODAL STYLES ============ */
.book-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.book-modal-card {
  background: var(--paper);
  border: 3px solid var(--plum-950);
  box-shadow: 12px 12px 0 var(--plum-950);
  width: 92%;
  max-width: 880px;
  max-height: 90vh;
  position: relative;
  border-radius: 0px;
  animation: modalSlide 0.25s cubic-bezier(.22, .9, .28, 1);
  overflow: auto;
}

.book-modal-close {
  position: absolute;
  top: 10px;
  right: 18px;
  background: none;
  border: none;
  font-size: 36px;
  color: var(--plum-950);
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 4px;
}

.book-modal-body-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: 480px;
}

.book-modal-cover-section {
  background: var(--lav-050);
  border-right: 3px solid var(--plum-950);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-modal-cover-placeholder {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 2px solid var(--plum-950);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.book-modal-info-section {
  padding: 50px 50px 40px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.book-modal-info-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--plum-950);
  margin: 8px 0 4px;
  line-height: 1.2;
}

.book-modal-info-section p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.book-specs-table {
  border-top: 2px dashed var(--lav-200);
  padding-top: 16px;
  margin-bottom: 24px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--lav-050);
  font-size: 14.5px;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.spec-value {
  font-weight: 600;
  color: var(--plum-950);
}

.book-modal-actions {
  margin-top: auto;
}

@media (max-width: 680px) {
  .book-modal-body-layout {
    grid-template-columns: 1fr;
  }
  .book-modal-cover-section {
    border-right: none;
    border-bottom: 3px solid var(--plum-950);
    padding: 20px;
  }
  .book-modal-info-section {
    padding: 24px;
  }
}

.prod-card {
  cursor: pointer;
}

/* Override badge position in book detail modal to prevent close button collision */
.book-modal-info-section .prod-badge {
  position: static !important;
  display: inline-block;
  margin-bottom: 12px;
  box-shadow: 2px 2px 0 var(--plum-950);
}

/* ============ ADMIN PANEL LAYOUT ============ */
body.admin-body,
body.admin-layout {
  margin: 0;
  padding: 0;
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
}

.admin-layout {
  display: flex !important;
  flex-direction: row;
  min-height: 100vh;
  width: 100%;
  background: var(--paper);
  font-size: 16px;
  position: relative;
  box-sizing: border-box;
}

.admin-sidebar {
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  background: var(--plum-950);
  color: #fff;
  border-right: 3px solid var(--plum-950);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  box-sizing: border-box;
  z-index: 10;
  overflow-y: auto;
}

.admin-logo {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold-300);
  margin-bottom: 24px;
  border-bottom: 2px dashed rgba(255,255,255,0.15);
  padding-bottom: 16px;
  text-align: center;
}

.admin-logo img {
  max-width: 80px;
  height: auto;
  margin: 0 auto 8px;
  display: block;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--lav-200);
  font-weight: 600;
  font-size: 16.5px;
  border-radius: 4px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.admin-nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.admin-nav-link.active {
  border-left: 4px solid var(--gold-500);
  background: rgba(255,255,255,0.12);
  color: var(--gold-300);
  padding-left: 10px;
}

.admin-main {
  flex: 1;
  min-width: 0; /* CRITICAL: Evita que tablas y formularios desborden el contenedor principal */
  padding: 36px 40px;
  box-sizing: border-box;
  overflow-x: auto;
  font-size: 17px;
}

.admin-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 1 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 20px !important;
  margin: 0 0 32px 0 !important;
  border-bottom: 3px solid var(--plum-950) !important;
  padding: 0 0 20px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  box-shadow: none !important;
}

.admin-header-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-header-badge {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--plum-600);
  letter-spacing: 0.08em;
  display: inline-block;
}

.admin-header h1 {
  font-family: var(--body) !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  color: var(--plum-950) !important;
  margin: 2px 0 0 0 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
}

.admin-header p {
  font-family: var(--body) !important;
  font-size: 16px !important;
  color: var(--ink-soft) !important;
  margin: 4px 0 0 0 !important;
  line-height: 1.4 !important;
}

.admin-user-tag {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--plum-950);
  background: var(--paper);
  border: 2px solid var(--plum-950);
  padding: 8px 16px;
  box-shadow: 3px 3px 0 var(--plum-950);
  white-space: nowrap;
}

/* Stats Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.admin-stat-card {
  background: var(--paper);
  border: 3px solid var(--plum-950);
  box-shadow: 6px 6px 0 var(--plum-900);
  padding: 24px;
}

.admin-stat-title {
  font-family: var(--mono);
  font-size: 14.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.admin-stat-value {
  font-size: 44px;
  font-weight: 800;
  color: var(--plum-950);
  line-height: 1;
}

.admin-stat-desc {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* Tables styling & Responsive Horizontal Scroll */
.admin-table-container,
.table-responsive,
.table-scroll-wrap {
  background: var(--paper);
  border: 3px solid var(--plum-950);
  box-shadow: 6px 6px 0 var(--plum-950);
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  max-width: 100%;
  width: 100%;
  margin-bottom: 36px;
  display: block;
}

.admin-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  text-align: left;
}

/* Global scrollable table containers */
.admin-table-container table,
.table-responsive table,
.table-scroll-wrap table,
div[style*="overflow-x:auto"] > table,
div[style*="overflow-x: auto"] > table {
  min-width: 520px;
}

/* Asegurar que las columnas del grid no desborden y respeten el scroll */
.form-grid-2 > *,
.admin-main,
.admin-layout {
  min-width: 0;
}

/* Barra de desplazamiento lateral visible y estilizada */
.admin-table-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.table-scroll-wrap::-webkit-scrollbar,
div[style*="overflow-x:auto"]::-webkit-scrollbar,
div[style*="overflow-x: auto"]::-webkit-scrollbar {
  height: 8px;
}

.admin-table-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.table-scroll-wrap::-webkit-scrollbar-track,
div[style*="overflow-x:auto"]::-webkit-scrollbar-track,
div[style*="overflow-x: auto"]::-webkit-scrollbar-track {
  background: var(--lav-100);
  border-radius: 4px;
}

.admin-table-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.table-scroll-wrap::-webkit-scrollbar-thumb,
div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb {
  background: var(--plum-900);
  border-radius: 4px;
}

.admin-table-container::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover,
.table-scroll-wrap::-webkit-scrollbar-thumb:hover,
div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb:hover,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb:hover {
  background: var(--gold-600);
}

.admin-table th {
  background: var(--plum-950);
  color: #fff;
  font-family: var(--mono);
  font-size: 14.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.admin-table th:hover {
  background: var(--plum-800);
}

.admin-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--lav-200);
  font-size: 16.5px;
  color: var(--ink);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: var(--lav-050);
}

.stock-alert-row {
  background: #fef2f2 !important;
}

.stock-alert-text {
  color: #dc2626 !important;
  font-weight: 700;
}

/* Form Styles */
.admin-form-card {
  background: var(--paper);
  border: 3px solid var(--plum-950);
  box-shadow: 6px 6px 0 var(--plum-950);
  padding: 28px;
  max-width: 100%;
  margin-bottom: 36px;
  font-size: 16.5px;
  box-sizing: border-box;
}

.admin-form-card label,
.admin-main label {
  font-size: 15.5px;
  font-weight: 700;
}

.admin-form-card input,
.admin-form-card select,
.admin-form-card textarea,
.admin-main input[type="text"],
.admin-main select {
  font-size: 16px;
}

.status-badge {
  font-size: 13.5px !important;
  padding: 5px 12px !important;
  font-weight: 700;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ============ NATIVE APP UI MOBILE SYSTEM ============ */
@media (max-width: 992px) {
  .catalogo-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .filters-sidebar {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    box-shadow: 4px 4px 0 var(--plum-950) !important;
    padding: 16px !important;
    border-radius: 8px !important;
  }

  .admin-layout {
    flex-direction: column !important;
  }

  .admin-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    position: relative !important;
    top: auto !important;
    border-right: none !important;
    border-bottom: 3px solid var(--plum-950) !important;
    padding: 14px 12px !important;
    overflow-y: visible !important;
  }

  .admin-logo {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
  }

  .admin-logo img {
    max-width: 38px !important;
    margin: 0 !important;
  }

  .admin-nav {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .admin-nav-link {
    padding: 7px 10px !important;
    font-size: 13.5px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
  }

  .admin-sidebar-footer {
    margin-top: 10px !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
    padding-top: 8px !important;
  }

  .admin-main {
    padding: 16px 12px 80px 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .admin-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
  }

  .admin-header h1 {
    font-size: 22px !important;
  }

  .admin-header p {
    font-size: 13.5px !important;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
  }

  .admin-stat-card {
    padding: 14px !important;
    box-shadow: 3px 3px 0 var(--plum-900) !important;
    border-radius: 8px !important;
  }

  .admin-stat-value {
    font-size: 30px !important;
  }
}

@media (max-width: 768px) {
  /* Header App Bar */
  .site-header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    padding: 10px 14px !important;
    background: var(--paper) !important;
    border-bottom: 2.5px solid var(--plum-950) !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08) !important;
  }

  .nav-inner {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 0 !important;
  }

  .brand {
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .brand img {
    height: 34px !important;
    width: auto !important;
  }

  .brand-text b {
    font-size: 16px !important;
  }

  .brand-text span {
    font-size: 9px !important;
  }

  .nav-cta {
    gap: 6px !important;
  }

  .nav-cta .btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
  }

  /* Catalog Mobile Hero */
  .cat-hero {
    padding: 16px 14px !important;
    background: var(--plum-950) !important;
    color: #fff !important;
    border-bottom: 2px solid var(--gold-500) !important;
  }

  .cat-hero h1 {
    font-size: 20px !important;
    color: var(--gold-300) !important;
    margin: 4px 0 !important;
    font-weight: 800 !important;
  }

  .cat-subtitle {
    font-size: 12px !important;
    opacity: 0.9 !important;
  }

  /* Product Grid Mobile App Layout (2 Column Native App Grid) */
  .catalog-section {
    padding-bottom: 80px !important;
  }

  .product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 30px !important;
  }

  .prod-card {
    border: 2px solid var(--plum-950) !important;
    box-shadow: 3px 3px 0 var(--plum-950) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: var(--paper) !important;
  }

  .prod-cover-wrap {
    height: 140px !important;
    min-height: 140px !important;
    padding: 6px !important;
    background: #f8fafc !important;
  }

  .prod-cover-wrap img {
    max-height: 128px !important;
    width: auto !important;
  }

  .prod-badge {
    top: 6px !important;
    right: 6px !important;
    font-size: 9px !important;
    padding: 2px 5px !important;
  }

  .prod-info {
    padding: 8px 10px !important;
  }

  .prod-editorial {
    font-size: 10px !important;
  }

  .prod-title {
    font-size: 13px !important;
    line-height: 1.2 !important;
    min-height: 32px !important;
    margin: 3px 0 6px !important;
    font-weight: 800 !important;
  }

  .prod-meta {
    padding-top: 6px !important;
    margin-bottom: 6px !important;
  }

  .prod-price {
    font-size: 14px !important;
  }

  .prod-stock {
    font-size: 10.5px !important;
    padding: 1px 4px !important;
  }

  .add-to-quote-btn {
    padding: 6px 8px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
  }

  /* Sticky App Dock for Quote Summary / Cart */
  .quote-summary {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    background: var(--plum-950) !important;
    border-top: 3px solid var(--gold-500) !important;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2) !important;
  }

  .quote-summary-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .quote-summary h3 {
    display: none !important;
  }

  .quote-items-list {
    display: none !important;
  }

  .quote-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .quote-totals {
    color: #fff !important;
  }

  .quote-totals span {
    font-size: 10px !important;
    text-transform: uppercase !important;
    color: var(--lav-200) !important;
    display: block !important;
  }

  .quote-subtotal {
    font-size: 17px !important;
    color: var(--gold-300) !important;
    font-weight: 800 !important;
  }

  .request-quote-whatsapp {
    width: auto !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    box-shadow: 2px 2px 0 var(--gold-500) !important;
    border-radius: 6px !important;
  }

  /* Admin Tables & Forms App Styling */
  .admin-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-width: 2px !important;
    border-radius: 8px !important;
    box-shadow: 3px 3px 0 var(--plum-950) !important;
    margin-bottom: 20px !important;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 10px !important;
    font-size: 13px !important;
  }

  .admin-form-card {
    padding: 14px !important;
    box-shadow: 3px 3px 0 var(--plum-950) !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
  }

  .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .auth-card {
    padding: 20px 14px !important;
    margin: 0 10px !important;
    box-shadow: 4px 4px 0 var(--plum-950) !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .prod-cover-wrap {
    height: 130px !important;
    min-height: 130px !important;
  }

  .prod-title {
    font-size: 12.5px !important;
  }
}