/* ==========================================================================
   Mil Detalles — Diseño Boutique Minimalista (3 Estilos Editables + Admin)
   Estilos: botanico (por defecto) | editorial | boutique
   ========================================================================== */

:root,
html[data-md-theme="botanico"] {
  --md-serif: "Cormorant Garamond", Georgia, serif;
  --md-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --md-bg: #ffffff;
  --md-surface: #ffffff;
  --md-soft: #eef5f1;
  --md-header-bg: #ffffff;
  --md-header-ink: #123326;
  --md-header-line: #dce8e1;
  --md-ink: #132920;
  --md-muted: #587066;
  --md-accent: #12523d;
  --md-accent-hover: #0b3a2a;
  --md-price: #12523d;
  --md-line: #dde7e1;
  --md-bar-bg: #12523d;
  --md-bar-ink: #ffffff;
  --md-gold: #12523d;
  --md-radius: 10px;
  --md-btn-radius: 999px;
}

html[data-md-theme="editorial"] {
  --md-serif: "Playfair Display", Georgia, serif;
  --md-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --md-bg: #f6f6f6;
  --md-surface: #ffffff;
  --md-soft: #141414;
  --md-header-bg: #111111;
  --md-header-ink: #ffffff;
  --md-header-line: #2a2a2a;
  --md-ink: #111111;
  --md-muted: #5f5f5f;
  --md-accent: #111111;
  --md-accent-hover: #c9a24d;
  --md-price: #9c7424;
  --md-line: #dfdfdf;
  --md-bar-bg: #c9a24d;
  --md-bar-ink: #111111;
  --md-gold: #c9a24d;
  --md-radius: 0px;
  --md-btn-radius: 0px;
}

html[data-md-theme="boutique"] {
  --md-serif: "Fraunces", Georgia, serif;
  --md-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --md-bg: #fbf3ef;
  --md-surface: #ffffff;
  --md-soft: #f3e3dd;
  --md-header-bg: #fbf3ef;
  --md-header-ink: #5c1b2c;
  --md-header-line: #ead3cb;
  --md-ink: #3b1c24;
  --md-muted: #7e5c65;
  --md-accent: #7a253b;
  --md-accent-hover: #5a1829;
  --md-price: #7a253b;
  --md-line: #ebd6ce;
  --md-bar-bg: #7a253b;
  --md-bar-ink: #fff8f5;
  --md-gold: #b56576;
  --md-radius: 18px;
  --md-btn-radius: 999px;
}

/* Base limpia SOLO en la tienda pública (nunca altera el Administrador .workspace) */
html[data-md-theme] body:not(:has(.workspace)),
html[data-md-theme] #root:not(:has(.workspace)),
html[data-md-theme] #root:not(:has(.workspace)) .catalog,
html[data-md-theme] #root:not(:has(.workspace)) .faqsection,
html[data-md-theme] #root:not(:has(.workspace)) .story,
html[data-md-theme] #root:not(:has(.workspace)) .productpagecontent {
  background: var(--md-bg) !important;
  color: var(--md-ink) !important;
  font-family: var(--md-sans) !important;
}
#root:not(:has(.workspace)) h1,
#root:not(:has(.workspace)) h2,
#root:not(:has(.workspace)) .brand,
#root:not(:has(.workspace)) .productmeta h3,
#root:not(:has(.workspace)) .modalbody h2,
#root:not(:has(.workspace)) .drawer > h2,
#root:not(:has(.workspace)) .md-trust-card strong,
#root:not(:has(.workspace)) .md-featured-head h2,
#root:not(:has(.workspace)) .md-featured-card h3 {
  font-family: var(--md-serif) !important;
  color: var(--md-ink) !important;
  font-weight: 600 !important;
}
#root:not(:has(.workspace)) .eyebrow { color: var(--md-gold) !important; font-family: var(--md-sans) !important; }
#root:not(:has(.workspace)) .textbutton { color: var(--md-accent) !important; border-color: var(--md-accent) !important; }

/* 1. Barra superior integrada (1 sola franja limpia, grande y legible en escritorio y móvil) */
#root .md-cutoff-bar { display: none !important; }
#root:not(:has(.workspace)) .announcement {
  background: var(--md-bar-bg) !important;
  color: var(--md-bar-ink) !important;
  font: 600 14.5px/1.38 var(--md-sans) !important;
  letter-spacing: .2px !important;
  padding: 10px 4% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap;
  gap: 6px 14px !important;
  text-align: center !important;
}
#root:not(:has(.workspace)) .announcement > span {
  font-size: inherit !important;
  line-height: 1.38 !important;
  margin: 0 !important;
}
#root .announcement .md-ann-pill {
  font: 800 12px/1.2 var(--md-sans) !important;
  letter-spacing: .9px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  white-space: nowrap;
}
#root .announcement a.md-wa-top {
  color: inherit !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
  font-size: 14px !important;
}

/* 2. Encabezado fijo + barra de menú adaptados al estilo activo */
#root:not(:has(.workspace)) header {
  position: sticky !important;
  top: 0 !important;
  z-index: 25 !important;
  background: var(--md-header-bg) !important;
  color: var(--md-header-ink) !important;
  border-bottom: 1px solid var(--md-header-line) !important;
  box-shadow: none !important;
  padding-top: 15px !important;
  padding-bottom: 15px !important;
}
#root:not(:has(.workspace)) header .brand,
#root:not(:has(.workspace)) header .brand small,
#root:not(:has(.workspace)) header .tools,
#root:not(:has(.workspace)) header .tools button,
#root:not(:has(.workspace)) header nav a,
#root:not(:has(.workspace)) header .horizontalnav a {
  color: var(--md-header-ink) !important;
}
#root:not(:has(.workspace)) header .brand svg { color: var(--md-gold) !important; }
#root:not(:has(.workspace)) header nav a,
#root:not(:has(.workspace)) header .horizontalnav a {
  background: transparent !important;
  border: 0 !important;
  font: 600 12px/1.2 var(--md-sans) !important;
  letter-spacing: .7px;
  text-transform: uppercase;
}
#root:not(:has(.workspace)) .storemenubar:not(.device-mobile) {
  position: sticky !important;
  top: var(--md-header-h, 74px) !important;
  z-index: 20 !important;
  background: var(--md-header-bg) !important;
  border-bottom: 1px solid var(--md-header-line) !important;
  color: var(--md-header-ink) !important;
}
#root:not(:has(.workspace)) .storemenubar:not(.device-mobile) a,
#root:not(:has(.workspace)) .storemenubar:not(.device-mobile) summary {
  color: var(--md-header-ink) !important;
}
#root:not(:has(.workspace)) .storemenubar:not(.device-mobile) .collectiondropdown > div {
  background: var(--md-surface) !important;
  color: var(--md-ink) !important;
  border-color: var(--md-line) !important;
}
#root:not(:has(.workspace)) .storemenubar:not(.device-mobile) .collectiondropdown > div a {
  color: var(--md-ink) !important;
}
html[data-md-theme="editorial"] #root:not(:has(.workspace)) header .brand {
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
html[data-md-theme="editorial"] #root:not(:has(.workspace)) header .brand small { color: #c9a24d !important; }
html[data-md-theme="boutique"] #root:not(:has(.workspace)) header .brand small { color: #b56576 !important; }

#root .overlay { z-index: 60 !important; }
#root .shopmenuoverlay { z-index: 70 !important; }
#root header .tools button[aria-label*="Admin"],
#root header .tools button[title*="Admin"],
#root header .tools button[aria-label*="admin"],
#root header .tools button[title*="admin"],
#root header .tools b:empty,
#root .md-bag-zero { display: none !important; }

.md-mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  color: var(--md-header-ink);
  font-size: 21px;
  flex-shrink: 0;
}
.md-fav-header-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  color: var(--md-header-ink);
  font-size: 18px;
}
.md-fav-header-btn .md-fav-count {
  position: absolute; top: 0; right: -2px;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--md-gold); color: #fff;
  font: 700 9.5px/15px var(--md-sans); text-align: center;
}
html[data-md-theme="editorial"] .md-fav-header-btn .md-fav-count { color: #111111; }
.md-fav-header-btn .md-fav-count:empty { display: none; }

@media (max-width: 700px) {
  #root:not(:has(.workspace)) .announcement {
    font-size: 13.5px !important;
    line-height: 1.38 !important;
    padding: 9px 12px !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    gap: 5px 8px !important;
  }
  #root:not(:has(.workspace)) .announcement .md-ann-pill {
    font-size: 11.5px !important;
    padding: 3px 10px !important;
  }
  #root:not(:has(.workspace)) .announcement .md-ann-wa-wrap { display: none !important; }
  #root:not(:has(.workspace)) header {
    min-height: 64px !important;
    padding: 10px 14px !important;
    display: grid !important;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 8px !important;
  }
  .md-mobile-menu-btn {
    display: inline-flex !important;
    width: 46px !important;
    height: 46px !important;
    font-size: 27px !important;
    font-weight: 600 !important;
  }
  #root:not(:has(.workspace)) header .brand {
    justify-content: center;
    font-size: 23px !important;
  }
  #root:not(:has(.workspace)) header .brand svg {
    width: 30px !important;
    height: 30px !important;
  }
  #root:not(:has(.workspace)) header .brand small {
    font-family: var(--md-sans) !important;
    font-size: 8.5px !important;
    letter-spacing: 3.2px !important;
    opacity: .86;
  }
  #root:not(:has(.workspace)) header .tools {
    justify-content: flex-end;
    gap: 8px !important;
  }
  #root:not(:has(.workspace)) header .tools button,
  .md-fav-header-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 22px !important;
  }
  #root:not(:has(.workspace)) header .tools svg {
    width: 24px !important;
    height: 24px !important;
  }
  /* Menú desplegable (☰) más grande y cómodo en celular */
  #root:not(:has(.workspace)) .shopmenupanel {
    width: min(92vw, 390px) !important;
    padding: 0 22px 36px !important;
  }
  #root:not(:has(.workspace)) .shopmenupanel nav a,
  #root:not(:has(.workspace)) .shopmenupanel nav button,
  #root:not(:has(.workspace)) .shopmenupanel nav summary {
    font-size: 17.5px !important;
    line-height: 1.3 !important;
    min-height: 50px !important;
    padding: 12px 14px !important;
    gap: 13px !important;
  }
  #root:not(:has(.workspace)) .shopmenupanel nav svg {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
  }
  #root:not(:has(.workspace)) .shopmenupanel .collectiondropdown > div a {
    font-size: 16px !important;
    padding: 11px 14px !important;
  }
  #root:not(:has(.workspace)) .shopmenupanel .shopmenuhead,
  #root:not(:has(.workspace)) .shopmenupanel h3 {
    font-size: 21px !important;
  }
  /* Colapsar barra "Explorar tienda" sin ocultar .shopmenuoverlay */
  #root:not(:has(.workspace)) .storemenubar.device-mobile {
    display: block !important; min-height: 0 !important; height: 0 !important;
    padding: 0 !important; margin: 0 !important; border: 0 !important;
    background: transparent !important; box-shadow: none !important;
    overflow: visible !important; position: static !important;
  }
  #root:not(:has(.workspace)) .storemenubar.device-mobile > .menutrigger,
  #root:not(:has(.workspace)) .storemenubar.device-mobile > .horizontalnav,
  #root:not(:has(.workspace)) .storemenubar.device-mobile > .store-dropdown {
    position: absolute !important; width: 1px !important; height: 1px !important;
    overflow: hidden !important; opacity: 0 !important; pointer-events: none !important;
  }
  #root:not(:has(.workspace)) header .tools button[aria-label*="Bolsa"],
  #root:not(:has(.workspace)) header .tools button[aria-label*="bolsa"] { display: none !important; }
}

/* 3. Portada (Hero) — adaptada a los 3 estilos */
@media (min-width: 701px) {
  #root:not(:has(.workspace)) .hero {
    min-height: 390px !important;
    border-bottom: 1px solid var(--md-line);
    background: var(--md-soft) !important;
  }
  html[data-md-theme="botanico"] #root:not(:has(.workspace)) .hero {
    background: #f2f7f4 !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  html[data-md-theme="botanico"] #root:not(:has(.workspace)) .hero:after {
    background: linear-gradient(90deg, #fffffffa 0%, #ffffffdb 36%, #ffffff00 76%) !important;
  }
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero {
    background: #141414 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-bottom: 2px solid #c9a24d !important;
  }
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero:after {
    background: linear-gradient(90deg, #111111fa 0%, #111111d4 42%, #11111122 80%) !important;
  }
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero h1,
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero p { color: #ffffff !important; }
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero .primary {
    background: #c9a24d !important; border-color: #c9a24d !important;
    color: #111111 !important; font-weight: 700 !important;
  }
  html[data-md-theme="boutique"] #root:not(:has(.workspace)) .hero {
    background: #f4e4de !important;
    margin: 22px 4% 8px !important;
    border-radius: 26px !important;
    border: 1px solid #ead2ca !important;
    box-shadow: 0 14px 36px rgba(122, 37, 59, .08);
  }
  html[data-md-theme="boutique"] #root:not(:has(.workspace)) .hero:after {
    background: linear-gradient(90deg, #fbf3effa 0%, #fbf3efd6 38%, #fbf3ef00 76%) !important;
  }
  #root:not(:has(.workspace)) .hero .primary {
    background: var(--md-accent) !important;
    border-color: var(--md-accent) !important;
    border-radius: var(--md-btn-radius) !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    font: 600 11.5px/1.2 var(--md-sans) !important;
    padding: 14px 28px !important;
  }
}

@media (max-width: 700px) {
  #root:not(:has(.workspace)) .hero {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--md-bg) !important;
    border-bottom: 1px solid var(--md-line);
    border-radius: 0 !important;
  }
  #root:not(:has(.workspace)) .hero:after { display: none !important; }
  #root:not(:has(.workspace)) .hero .heroimage {
    position: relative !important; inset: auto !important;
    width: 100% !important; height: 245px !important; min-height: 245px !important; max-height: 260px !important;
    margin: 0 !important; border-radius: 0 !important; order: 1;
    background: var(--md-soft) !important;
    overflow: hidden !important;
  }
  #root:not(:has(.workspace)) .hero .heroimage picture,
  #root:not(:has(.workspace)) .hero .heroimage img {
    position: static !important; display: block !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; object-position: 62% center !important;
  }
  #root:not(:has(.workspace)) .hero .herotext {
    order: 2; max-width: 100% !important; width: 100% !important;
    margin: 0 !important; padding: 20px 18px 22px !important;
    background: var(--md-bg) !important; text-align: center;
  }
  #root:not(:has(.workspace)) .hero .herotext .eyebrow {
    display: block !important;
    font-size: 11px !important;
    letter-spacing: 2px !important;
    margin: 0 auto 6px !important;
    text-transform: uppercase;
  }
  #root:not(:has(.workspace)) .hero .herotext h1 {
    font-size: 32px !important; line-height: 1.12 !important;
    margin: 0 auto 10px !important; max-width: 340px !important;
  }
  #root:not(:has(.workspace)) .hero .herotext > p:not(.eyebrow) {
    display: block !important;
    font-size: 14.5px !important;
    line-height: 1.5 !important;
    color: var(--md-muted) !important;
    max-width: 340px !important;
    margin: 0 auto 16px !important;
  }
  #root:not(:has(.workspace)) .hero .herotext .primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 48px !important;
    padding: 12px 26px !important;
    border-radius: var(--md-btn-radius) !important;
    background: var(--md-accent) !important;
    border: 1.5px solid var(--md-accent) !important;
    color: #ffffff !important;
    font: 700 13.5px/1.2 var(--md-sans) !important;
    letter-spacing: .9px !important;
    text-transform: uppercase !important;
    box-shadow: 0 8px 20px rgba(18, 82, 61, .2) !important;
  }
  #root:not(:has(.workspace)) .hero .herotext .heronote { display: none !important; }
  .md-hero-cutoff { display: none !important; }

  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero,
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero .herotext {
    background: #141414 !important; border-bottom: 2px solid #c9a24d;
  }
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero .herotext h1,
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero .herotext p { color: #ffffff !important; }
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .hero .herotext .primary {
    background: #c9a24d !important; border-color: #c9a24d !important; color: #111111 !important;
  }

  html[data-md-theme="boutique"] #root:not(:has(.workspace)) .hero { padding: 12px 12px 0 !important; background: #fbf3ef !important; }
  html[data-md-theme="boutique"] #root:not(:has(.workspace)) .hero .heroimage { border-radius: 22px !important; overflow: hidden; box-shadow: 0 8px 22px rgba(122, 37, 59, .14); }
}
@media (min-width: 701px) { .md-hero-cutoff { display: none !important; } }

/* 4. Colecciones */
@media (min-width: 701px) {
  #root:not(:has(.workspace)) .categorycardssection {
    max-width: 1320px; margin: 0 auto 10px !important;
    padding: 36px 4% 12px !important; background: transparent !important;
  }
  #root:not(:has(.workspace)) .categorycardssection > h2 {
    font-size: 34px !important; color: var(--md-ink) !important; margin-bottom: 24px !important;
  }
  #root:not(:has(.workspace)) .categorycards {
    display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important; overflow: visible !important;
  }
  #root:not(:has(.workspace)) .categorycards > a {
    flex: none !important; width: 100% !important;
    display: flex !important; flex-direction: column !important;
    grid-template-rows: auto auto auto !important;
    background: transparent !important; border: 0 !important;
    box-shadow: none !important; border-radius: 0 !important; padding: 0 !important;
    text-align: left;
  }
  #root:not(:has(.workspace)) .categorycards > a > svg { display: none !important; }
  #root:not(:has(.workspace)) .categorycards > a img {
    width: 100% !important; height: auto !important; aspect-ratio: 1 / 1 !important;
    padding: 0 !important; object-fit: cover !important;
    border-radius: var(--md-radius) !important; background: var(--md-soft) !important;
    transition: transform .35s ease;
  }
  #root:not(:has(.workspace)) .categorycards > a:hover img { transform: scale(1.025); }
  #root:not(:has(.workspace)) .categorycards h3 {
    font-family: var(--md-serif) !important; font-size: 23px !important; font-weight: 700 !important;
    color: var(--md-ink) !important; margin: 14px 0 4px !important;
  }
  #root:not(:has(.workspace)) .categorycards a > span {
    font: 600 12.5px/1.25 var(--md-sans) !important; letter-spacing: .7px; text-transform: uppercase;
    color: var(--md-muted) !important; margin: 0 !important;
  }
  #root:not(:has(.workspace)) .categorycardssection > button:not(.textbutton) { display: none !important; }

  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .categorycards > a {
    background: #ffffff !important; border: 1px solid #e2e2e2 !important;
    padding: 0 0 14px !important; text-align: center !important;
  }
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .categorycards h3 {
    text-transform: uppercase; letter-spacing: 1px; font-size: 17px !important;
  }
  html[data-md-theme="boutique"] #root:not(:has(.workspace)) .categorycards > a {
    background: #ffffff !important; border: 1px solid #eed7cf !important;
    border-radius: 22px !important; padding: 10px 10px 14px !important;
    text-align: center !important; box-shadow: 0 8px 20px rgba(122, 37, 59, .06) !important;
  }
  html[data-md-theme="boutique"] #root:not(:has(.workspace)) .categorycards > a img { border-radius: 16px !important; }
}

@media (max-width: 700px) {
  #root:not(:has(.workspace)) .categorycardssection {
    padding: 18px 0 12px !important;
    background: transparent !important;
  }
  #root:not(:has(.workspace)) .categorycards {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    gap: 16px !important;
    padding: 4px 16px 8px !important;
    max-height: none !important;
  }
  #root:not(:has(.workspace)) .categorycards::-webkit-scrollbar { display: none; }
  #root:not(:has(.workspace)) .categorycards > a {
    flex: 0 0 98px !important;
    width: 98px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    scroll-snap-align: start;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
  }
  #root:not(:has(.workspace)) .categorycards > a img {
    width: 90px !important; height: 90px !important; aspect-ratio: 1 / 1 !important;
    padding: 3px !important; border-radius: 50% !important;
    border: 2.5px solid var(--md-accent) !important; object-fit: cover !important;
  }
  html[data-md-theme="editorial"] #root:not(:has(.workspace)) .categorycards > a img { border-radius: 0 !important; border: 1.5px solid #111111 !important; padding: 0 !important; }
  html[data-md-theme="boutique"] #root:not(:has(.workspace)) .categorycards > a img { border-radius: 50% !important; border: 2.5px solid #b56576 !important; }
  #root:not(:has(.workspace)) .categorycards h3 {
    font-family: var(--md-sans) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin: 8px 0 0 !important;
    color: var(--md-ink) !important;
  }
}

/* 5. Carrusel automático de Productos más destacados */
.md-featured-section {
  max-width: 1320px;
  margin: 14px auto 26px;
  padding: 28px 4% 26px;
  border-top: 1px solid var(--md-line);
  border-bottom: 1px solid var(--md-line);
  background: var(--md-soft);
}
.md-featured-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.md-featured-eyebrow { font: 700 10.5px/1.2 var(--md-sans); letter-spacing: 2px; text-transform: uppercase; color: var(--md-gold); margin-bottom: 4px; }
.md-featured-head h2 { font-size: 28px !important; margin: 0 !important; line-height: 1.15 !important; }
.md-featured-controls { display: flex; align-items: center; gap: 6px; }
.md-featured-controls button {
  height: 32px; min-width: 32px; padding: 0 11px; border-radius: var(--md-btn-radius);
  border: 1px solid var(--md-line); background: var(--md-surface); color: var(--md-ink);
  font: 600 11.5px/1 var(--md-sans); cursor: pointer;
}
.md-featured-controls button:hover { background: var(--md-accent); color: #fff; border-color: var(--md-accent); opacity: 1 !important; }
.md-featured-viewport { overflow: hidden; }
.md-featured-track { display: flex; transition: transform .55s cubic-bezier(.22, .61, .36, 1); }
.md-featured-slide { padding: 0 9px; box-sizing: border-box; flex-shrink: 0; }
.md-featured-card { background: transparent; border: 0; display: flex; flex-direction: column; height: 100%; }
.md-featured-img { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; background: #ffffff; border: 1px solid rgba(31, 45, 36, .08); overflow: hidden; border-radius: var(--md-radius); }
.md-featured-img img { width: 100%; height: 100%; object-fit: contain !important; object-position: center; background: #ffffff; display: block; transition: transform .35s ease; }
.md-featured-card:hover .md-featured-img img { transform: scale(1.03); }
.md-featured-body { padding: 12px 2px 4px; display: flex; flex-direction: column; flex: 1; }
.md-featured-card h3 { font-size: 18px !important; margin: 0 0 5px !important; line-height: 1.28 !important; }
.md-featured-price { font: 700 15.5px/1.2 var(--md-sans); color: var(--md-price); }
.md-featured-usd { font: 400 11px/1.3 var(--md-sans); color: var(--md-muted); margin-top: 2px; }
.md-featured-cta {
  margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; width: 100%;
  padding: 10px 14px; border-radius: var(--md-btn-radius);
  border: 1.5px solid var(--md-accent); background: transparent; color: var(--md-accent) !important;
  font: 700 11.5px/1.2 var(--md-sans); letter-spacing: .6px; text-transform: uppercase; cursor: pointer;
  transition: all .15s ease;
}
.md-featured-cta:hover { background: var(--md-accent); color: #fff !important; opacity: 1 !important; }
.md-featured-dots { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; }
.md-featured-dot { height: 6px; width: 6px; border-radius: 999px; background: #c9c5bc; padding: 0; transition: all .2s; }
.md-featured-dot.active { width: 22px; background: var(--md-accent); }

html[data-md-theme="editorial"] .md-featured-section { background: #141414 !important; border-top: 2px solid #c9a24d; border-bottom: 2px solid #c9a24d; }
html[data-md-theme="editorial"] .md-featured-head h2,
html[data-md-theme="editorial"] .md-featured-card h3 { color: #ffffff !important; }
html[data-md-theme="editorial"] .md-featured-card { text-align: center; }
html[data-md-theme="editorial"] .md-featured-price { color: #e2be6c !important; }
html[data-md-theme="editorial"] .md-featured-usd { color: #a9a9a9 !important; }
html[data-md-theme="editorial"] .md-featured-controls button { background: #222222; color: #ffffff; border-color: #444444; }
html[data-md-theme="editorial"] .md-featured-cta { border-color: #c9a24d; color: #c9a24d !important; }
html[data-md-theme="editorial"] .md-featured-cta:hover { background: #c9a24d; color: #111111 !important; }
html[data-md-theme="editorial"] .md-featured-dot.active { background: #c9a24d; }

html[data-md-theme="boutique"] .md-featured-section { background: #f3e3dd !important; border-radius: 26px; }
html[data-md-theme="boutique"] .md-featured-card { background: #ffffff; border: 1px solid #ecd6ce; border-radius: 20px; padding: 10px; box-shadow: 0 10px 24px rgba(122, 37, 59, .08); }
html[data-md-theme="boutique"] .md-featured-body { padding: 12px 6px 4px; }
html[data-md-theme="boutique"] .md-featured-cta { background: var(--md-accent); color: #ffffff !important; border-color: var(--md-accent); }

@media (max-width: 700px) {
  .md-featured-section { margin: 6px 0 14px; padding: 18px 12px 16px; border-radius: 0 !important; }
  .md-featured-head h2 { font-size: 22px !important; }
  .md-featured-slide { padding: 0 4px; }
  .md-featured-img { aspect-ratio: 1 / 1; }
}

/* 6. Filtros y tarjetas de producto */
#root:not(:has(.workspace)) .catalog { padding-top: 26px !important; }
#root:not(:has(.workspace)) .horizontalfilters,
#root:not(:has(.workspace)) .md-filter-panel {
  background: var(--md-surface) !important;
  border: 1px solid var(--md-line) !important;
  border-radius: var(--md-radius) !important;
}
#root:not(:has(.workspace)) .chips button,
#root:not(:has(.workspace)) .filterchips button {
  background: var(--md-surface) !important;
  border: 1px solid var(--md-line) !important;
  color: var(--md-ink) !important;
  border-radius: var(--md-btn-radius) !important;
}
#root:not(:has(.workspace)) .chips button.active,
#root:not(:has(.workspace)) .filterchips button.active {
  background: var(--md-accent) !important;
  border-color: var(--md-accent) !important;
  color: #ffffff !important;
}
@media (min-width: 1001px) {
  #root .catalogsidebar .md-filter-apply,
  #root .catalogsidebar button.primary.full { display: none !important; }
}

#root .productgrid { gap: 32px 22px !important; }
#root .productgrid .product {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 0 42px !important;
  overflow: visible !important;
  position: relative;
}
#root .productimage {
  position: relative !important;
  background: #ffffff !important;
  border: 1px solid rgba(31, 45, 36, .08);
  aspect-ratio: 4 / 5 !important;
  height: auto !important;
  overflow: hidden;
  border-radius: var(--md-radius) !important;
}
#root .productimage img {
  width: 100% !important; height: 100% !important;
  object-fit: contain !important; object-position: center !important;
  background: #ffffff !important;
  transition: transform .35s ease !important;
}
#root .product:hover .productimage img { transform: scale(1.03) !important; }
#root .productmeta { padding: 12px 2px 0 !important; margin-top: 0 !important; }
#root .productmeta h3 { font-size: 20px !important; line-height: 1.24 !important; margin: 0 0 6px !important; }
#root .productmeta > span { font-family: var(--md-sans) !important; font-size: 15.5px !important; font-weight: 700 !important; color: var(--md-price) !important; }
#root .productgrid .md-usd-price, .md-usd-price {
  display: block !important;
  font: 400 11.5px/1.35 var(--md-sans) !important;
  color: var(--md-muted) !important;
  margin-top: 2px !important;
}

html[data-md-theme="editorial"] #root .productgrid .product {
  background: #ffffff !important; border: 1px solid #e0e0e0 !important;
  border-radius: 0 !important; padding: 0 0 54px !important; text-align: center !important;
}
html[data-md-theme="editorial"] #root .productimage { border-radius: 0 !important; background: #f0f0f0 !important; }
html[data-md-theme="editorial"] #root .productmeta { display: block !important; text-align: center !important; padding: 14px 12px 0 !important; }
html[data-md-theme="editorial"] #root .productmeta h3 { font-size: 17.5px !important; letter-spacing: .2px; }
html[data-md-theme="editorial"] #root .product > .md-add-product {
  left: 12px !important; right: 12px !important; bottom: 12px !important; width: calc(100% - 24px) !important;
  background: var(--md-accent) !important; color: #ffffff !important; border-color: var(--md-accent) !important;
  border-radius: 0 !important; text-transform: uppercase; letter-spacing: 1px; font-size: 11px !important;
}
html[data-md-theme="editorial"] #root .product > .md-add-product:hover {
  background: #c9a24d !important; border-color: #c9a24d !important; color: #111111 !important;
}

html[data-md-theme="boutique"] #root .productgrid .product {
  background: #ffffff !important; border: 1px solid #edd6ce !important;
  border-radius: 22px !important; box-shadow: 0 10px 26px rgba(122, 37, 59, .08) !important;
  padding: 10px 10px 54px !important;
}
html[data-md-theme="boutique"] #root .productimage { border-radius: 16px !important; background: #f7ece8 !important; }
html[data-md-theme="boutique"] #root .productmeta { padding: 12px 6px 0 !important; }
html[data-md-theme="boutique"] #root .productmeta h3 { font-size: 17.5px !important; }
html[data-md-theme="boutique"] #root .product > .md-add-product {
  left: 10px !important; right: 10px !important; bottom: 10px !important; width: calc(100% - 20px) !important;
  background: var(--md-accent) !important; color: #ffffff !important; border-color: var(--md-accent) !important;
  border-radius: 999px !important;
}

/* Ocultar etiqueta repetida 112 veces y botón secundario redundante */
#root .product > .deliverypricelabel,
#root .product .md-card-perk,
#root .productgrid .md-view-product,
#root .productgrid button.md-secondary-detail { display: none !important; }

#root .product > .md-add-product {
  right: 0 !important; bottom: 4px !important;
  border: 1.5px solid var(--md-accent) !important;
  background: transparent !important;
  color: var(--md-accent) !important;
  border-radius: var(--md-btn-radius) !important;
  font-weight: 700 !important;
}
#root .product > .md-add-product:hover { background: var(--md-accent) !important; color: #fff !important; border-color: var(--md-accent) !important; }

@media (max-width: 700px) {
  #root .productgrid { gap: 20px 12px !important; }
  #root .productgrid .product { padding-bottom: 12px !important; }
  html[data-md-theme="editorial"] #root .productgrid .product { padding: 0 0 12px !important; }
  html[data-md-theme="boutique"] #root .productgrid .product { padding: 8px 8px 12px !important; border-radius: 18px !important; }
  #root .productmeta { padding: 10px 2px 0 !important; }
  html[data-md-theme="editorial"] #root .productmeta { padding: 10px 8px 0 !important; }
  #root .productgrid .productmeta h3 {
    font-size: 17px !important;
    line-height: 1.28 !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
  }
  #root .productgrid .productmeta > span { font-size: 16px !important; }
  #root .productgrid .md-usd-price { font-size: 12px !important; }
  #root .productgrid .md-add-product {
    position: static !important;
    width: 100% !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 44px !important;
    margin: 10px 0 0 !important;
    background: var(--md-accent) !important;
    color: #fff !important;
    border-color: var(--md-accent) !important;
    border-radius: var(--md-btn-radius) !important;
    font: 700 13.5px/1.2 var(--md-sans) !important;
  }
  html[data-md-theme="editorial"] #root .productgrid .md-add-product { width: calc(100% - 16px) !important; margin: 10px auto 0 !important; }
}

/* Botón y modal de Vista Previa (arriba de + Agregar, dejando la foto limpia y sin recortes) */
.md-quickview-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 36px !important;
  margin: 10px 0 4px !important;
  padding: 6px 12px !important;
  border-radius: var(--md-btn-radius) !important;
  border: 1.5px solid var(--md-accent) !important;
  background: transparent !important;
  color: var(--md-accent) !important;
  font: 700 12.5px/1.2 var(--md-sans) !important;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.md-quickview-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.md-quickview-btn:hover { background: var(--md-soft) !important; opacity: 1 !important; }
html[data-md-theme="editorial"] .md-quickview-btn {
  width: calc(100% - 24px) !important;
  margin: 10px auto 4px !important;
}
@media (max-width: 700px) {
  .md-quickview-btn {
    min-height: 40px !important;
    margin: 10px 0 0 !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
    background: var(--md-surface) !important;
  }
  #root .productgrid .md-add-product {
    margin: 7px 0 0 !important;
  }
  html[data-md-theme="editorial"] .md-quickview-btn {
    width: calc(100% - 16px) !important;
    margin: 10px auto 0 !important;
  }
}
.md-qv-overlay {
  position: fixed;
  inset: 0;
  z-index: 96;
  background: rgba(15, 22, 19, .58);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.md-qv-modal {
  position: relative;
  width: min(100%, 760px);
  max-height: 90vh;
  background: #ffffff;
  color: var(--md-ink);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.md-qv-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #1c2420;
  border: 1px solid #e2ded6;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.md-qv-media {
  background: #faf8f4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.md-qv-media img {
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain !important;
  display: block;
  border-radius: 10px;
}
.md-qv-body {
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.md-qv-eyebrow {
  font: 700 11px/1.2 var(--md-sans);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--md-gold);
}
.md-qv-body h3 {
  margin: 0;
  font: 600 26px/1.18 var(--md-serif);
  color: var(--md-ink);
}
.md-qv-price {
  font: 700 21px/1.2 var(--md-sans);
  color: var(--md-price);
}
.md-qv-usd {
  font: 500 12.5px/1.3 var(--md-sans);
  color: var(--md-muted);
  margin-top: -6px;
}
.md-qv-desc {
  margin: 4px 0 8px;
  font: 400 15.5px/1.6 var(--md-sans);
  color: #24332c;
}
.md-qv-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.md-qv-add {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: var(--md-btn-radius);
  background: var(--md-accent);
  color: #ffffff;
  font: 700 14.5px/1.2 var(--md-sans);
  cursor: pointer;
}
.md-qv-full {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: var(--md-btn-radius);
  border: 1.5px solid var(--md-accent);
  background: transparent;
  color: var(--md-accent);
  font: 700 13px/1.2 var(--md-sans);
  cursor: pointer;
}
@media (max-width: 700px) {
  .md-qv-modal { grid-template-columns: 1fr; max-height: 88vh; }
  .md-qv-media img { max-height: 44vh; }
  .md-qv-body { padding: 16px 16px 20px; }
  .md-qv-body h3 { font-size: 24px; }
}

.md-prod-badge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  padding: 3px 9px; border-radius: var(--md-btn-radius);
  font: 700 9.5px/1.2 var(--md-sans); letter-spacing: .7px; text-transform: uppercase;
  background: rgba(255, 255, 255, .94); color: var(--md-ink);
}
html[data-md-theme="editorial"] .md-prod-badge { background: #111111; color: #c9a24d; }
html[data-md-theme="boutique"] .md-prod-badge { background: var(--md-accent); color: #ffffff; }

.md-fav-heart {
  position: absolute; top: 9px; right: 9px; z-index: 4;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: #555;
  display: grid; place-items: center; font-size: 15px;
}
.md-fav-heart.is-fav { color: #b8324a; }

/* Cajón lateral de Favoritos */
.md-favs-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(15, 20, 18, .45); backdrop-filter: blur(3px); display: flex; justify-content: flex-end; }
.md-favs-drawer { width: min(100%, 380px); background: var(--md-bg); height: 100%; padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.md-favs-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--md-line); padding-bottom: 12px; }
.md-favs-head h3 { font-family: var(--md-serif); font-size: 22px; color: var(--md-ink); margin: 0; }
.md-fav-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--md-line); }
.md-fav-row img { width: 64px; height: 76px; border-radius: var(--md-radius); object-fit: contain; background: #ffffff; border: 1px solid rgba(31, 45, 36, .08); flex-shrink: 0; }
.md-fav-row-info { flex: 1; min-width: 0; }
.md-fav-row-info strong { display: block; font-size: 13.5px; color: var(--md-ink); line-height: 1.3; }
.md-fav-row-info span { display: block; font: 700 13px/1.3 var(--md-sans); color: var(--md-price); margin-top: 3px; }
.md-fav-row-actions { display: flex; gap: 10px; margin-top: 7px; align-items: center; }

/* 7. Ficha de producto limpia (oculta .hero + acordeón cuidados + etiquetas editables) */
#root.product-route:not(:has(.workspace)) .hero,
#root:has(.productpagecontent):not(:has(.workspace)) .hero,
#root:has(.productpagecontent) .md-featured-section,
#root:has(.productpagecontent) .md-trust-section,
#root:has(.workspace) .md-featured-section,
#root:has(.workspace) .md-trust-section { display: none !important; }

.md-pdp-trust { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.md-pdp-trust span {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--md-surface); border: 1px solid var(--md-line); color: var(--md-ink);
  border-radius: 999px; padding: 4px 10px; font: 500 11.5px/1.25 var(--md-sans);
}
.md-bullets-desc { margin: 10px 0 14px; padding-left: 18px; color: var(--md-ink); font-size: 15.5px !important; line-height: 1.62 !important; }
.md-bullets-desc li { margin-bottom: 5px; }
#root:not(:has(.workspace)) .modalbody > p,
#root:not(:has(.workspace)) .productpagecontent .modalbody p {
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: var(--md-ink) !important;
}
#root:not(:has(.workspace)) .productmodal > img,
#root:not(:has(.workspace)) .productpagecontent .productgallery > img {
  width: 100% !important;
  height: auto !important;
  max-height: 540px !important;
  object-fit: contain !important;
  background: #faf8f4 !important;
}
.md-variant-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; margin: 8px 0 14px; }
.md-variant-card { padding: 10px 8px; border-radius: var(--md-radius); border: 1px solid var(--md-line); background: var(--md-surface); color: var(--md-ink); text-align: center; font: 600 12px/1.3 var(--md-sans); cursor: pointer; }
.md-variant-card.active { border-color: var(--md-accent); background: var(--md-bg); box-shadow: 0 0 0 1.5px var(--md-accent); }
.md-pdp-accordion { border-top: 1px solid var(--md-line); padding: 12px 0 !important; margin: 0 !important; }
.md-pdp-accordion summary { display: flex; justify-content: space-between; align-items: center; font: 600 13.5px/1.3 var(--md-sans); color: var(--md-ink); list-style: none; cursor: pointer; }
.md-pdp-accordion summary::-webkit-details-marker { display: none; }
.md-pdp-accordion summary:after { content: '⌄'; font-size: 15px; transition: transform .15s; }
.md-pdp-accordion[open] summary:after { transform: rotate(180deg); }
.md-pdp-accordion ul { margin: 8px 0 0; padding-left: 18px; font: 400 14px/1.58 var(--md-sans); color: var(--md-muted); }
#root .modalbody label.check { display: flex !important; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--md-line); border-radius: var(--md-radius); background: var(--md-surface); margin: 7px 0 !important; }
.md-extra-thumb { width: 42px; height: 42px; border-radius: var(--md-radius); object-fit: contain; background: #ffffff; flex-shrink: 0; border: 1px solid var(--md-line); }
#root .productmodal .primary.full { background: var(--md-accent) !important; border-color: var(--md-accent) !important; border-radius: var(--md-btn-radius) !important; }

@media (max-width: 700px) {
  #root .productpagecontent { padding: 0 0 110px !important; }
  #root .productpagecontent .modal { border-radius: 0 !important; box-shadow: none !important; background: var(--md-bg) !important; }
  #root .productpagecontent .productgallery, #root .productmodal > img { background: #faf8f4 !important; width: 100% !important; padding: 0 !important; }
  #root .productpagecontent .productgallery > img, #root .productmodal > img {
    width: 100% !important;
    height: auto !important;
    min-height: 220px !important;
    max-height: 420px !important;
    object-fit: contain !important;
    background: #faf8f4 !important;
    display: block;
  }
  #root .productpagecontent .modalbody, #root .productmodal .modalbody { padding: 18px 16px 36px !important; }
  #root .productpagecontent .modalbody h2, #root .productmodal .modalbody h2 { font-size: 27px !important; line-height: 1.18 !important; margin-bottom: 8px !important; }
  #root:not(:has(.workspace)) .modalbody > p,
  #root:not(:has(.workspace)) .productpagecontent .modalbody p {
    font-size: 15.5px !important;
    line-height: 1.6 !important;
    margin-bottom: 14px !important;
  }
  .md-pdp-trust {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    gap: 6px !important;
    margin: 8px 0 12px !important;
  }
  .md-pdp-trust span { white-space: normal !important; font-size: 12px !important; padding: 5px 10px !important; }
  #root .productpagecontent .full, #root .productmodal .primary.full {
    position: static !important;
    margin-top: 16px !important;
    min-height: 50px !important;
    font: 700 15px/1.2 var(--md-sans) !important;
    background: var(--md-accent) !important;
    color: #fff !important;
    border-radius: var(--md-btn-radius) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .14) !important;
  }
  #root:has(.productpagecontent) .whatsappfloat, #root:has(.productmodal) .whatsappfloat { display: none !important; }
  #root a[href*="print"], #root button[aria-label*="PDF"], #root .md-print-catalog-btn { display: none !important; }
  #root a.wafloat, #root .whatsappfloat {
    left: auto !important;
    right: 14px !important;
    bottom: 82px !important;
    width: 52px !important;
    height: 52px !important;
    max-width: 52px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #25d366 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(18, 128, 60, .34) !important;
  }
  #root a.wafloat svg, #root .whatsappfloat svg {
    width: 28px !important;
    height: 28px !important;
    fill: #ffffff !important;
  }
}
@media (min-width: 701px) {
  #root a.wafloat, #root .whatsappfloat {
    bottom: 26px !important;
    background: #25d366 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 26px rgba(18, 128, 60, .32) !important;
  }
  #root a.wafloat svg, #root .whatsappfloat svg {
    width: 24px !important;
    height: 24px !important;
    fill: #ffffff !important;
  }
}

/* 8. Carrito y Checkout: Seguir comprando + Usar mis datos + Tarjeta en vivo */
#root .drawer.md-ref { background: var(--md-bg) !important; }
#root .drawer.md-ref .primary { background: var(--md-accent) !important; border-radius: var(--md-btn-radius) !important; }
.md-continue-shopping-btn {
  display: flex !important; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin: 4px 0 14px !important; padding: 10px 14px !important; min-height: 42px !important;
  border: 1.5px dashed var(--md-accent) !important; border-radius: var(--md-btn-radius) !important;
  background: transparent !important; color: var(--md-accent) !important; font: 600 12.5px/1.25 var(--md-sans) !important;
}
.md-same-recipient-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; margin: 4px 0 12px; border: 1px solid var(--md-line); border-radius: var(--md-radius); background: var(--md-surface); color: var(--md-ink); }
.md-same-recipient-btn.is-copied { border-color: var(--md-accent); background: var(--md-accent); color: #fff; }
.md-same-icon { width: 32px; height: 32px; border-radius: 6px; background: var(--md-bg); color: var(--md-ink); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.md-same-copy { flex: 1; display: grid; gap: 2px; }
.md-same-copy strong { font: 600 12.5px/1.25 var(--md-sans); color: inherit; }
.md-same-copy small { font: 400 11px/1.3 var(--md-sans); color: var(--md-muted); }
.md-same-recipient-btn.is-copied .md-same-copy small { color: rgba(255, 255, 255, .82); }
.md-same-action { padding: 4px 10px; border-radius: 999px; background: var(--md-accent); color: #fff; font: 700 11px/1.2 var(--md-sans); white-space: nowrap; }
.md-same-recipient-btn.is-copied .md-same-action { background: #fff; color: var(--md-ink); }

.md-quick-dates { display: flex; gap: 8px; margin: 6px 0 8px; }
.md-quick-date-btn { flex: 1; padding: 8px 10px; border-radius: var(--md-btn-radius); border: 1px solid var(--md-line); background: var(--md-surface); color: var(--md-ink); font: 600 12px/1.2 var(--md-sans); }
.md-quick-date-btn.active { background: var(--md-accent); color: #fff; border-color: var(--md-accent); }
.md-msg-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.md-msg-idea { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--md-line); background: var(--md-surface); color: var(--md-ink); font: 600 11px/1.2 var(--md-sans); }

.md-live-card-preview { margin-top: 10px; padding: 16px 14px; border-radius: var(--md-radius); background: #ffffff; border: 1px solid var(--md-line); text-align: center; position: relative; }
.md-live-card-preview:before { content: ""; position: absolute; inset: 6px; border: 1px dashed #dcd4c6; border-radius: 4px; pointer-events: none; }
.md-live-card-brand { font: 700 9.5px/1.2 var(--md-sans); letter-spacing: 2px; text-transform: uppercase; color: var(--md-gold); margin-bottom: 6px; }
.md-live-card-text { font: italic 15px/1.5 var(--md-serif); color: var(--md-ink); margin: 0 0 6px; padding: 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.md-live-card-sign { font: 500 10.5px/1.2 var(--md-sans); color: var(--md-muted); }

.md-transfer-hint { margin: 10px 0 0; padding: 9px 11px; border-radius: var(--md-radius); background: var(--md-surface); border: 1px solid var(--md-line); color: var(--md-ink); font: 500 12px/1.45 var(--md-sans); }
.md-secure-note { text-align: center; font: 500 11.5px/1.4 var(--md-sans); color: var(--md-muted); margin: 10px 0 0; }
#root .drawer .md-checkout-form > button.primary.full { position: static; margin-top: 12px !important; min-height: 48px !important; font: 700 14.5px/1.2 var(--md-sans) !important; }

/* 9. Tarjetas de confianza + Pie de página + Barra inferior móvil */
.md-trust-section { max-width: 1320px; margin: 28px auto 0; padding: 32px 4%; border-top: 1px solid var(--md-line); background: var(--md-surface); }
.md-trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.md-trust-card { background: transparent; border: 0; padding: 4px 0; }
.md-trust-icon { font-size: 18px; color: var(--md-gold); margin-bottom: 8px; display: block; }
.md-trust-card strong { display: block; font-size: 18px !important; margin-bottom: 6px; }
.md-trust-card p { margin: 0; font: 400 13.5px/1.55 var(--md-sans); color: var(--md-muted); }
@media (max-width: 960px) { .md-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 600px) { .md-trust-grid { grid-template-columns: 1fr; } }

html[data-md-theme="editorial"] .md-trust-section { background: #141414; border-top: 2px solid #c9a24d; }
html[data-md-theme="editorial"] .md-trust-card strong { color: #ffffff !important; }
html[data-md-theme="editorial"] .md-trust-card p { color: #b8b8b8 !important; }

#root:not(:has(.workspace)) footer.compactfooter { background: var(--md-accent) !important; color: #ffffff !important; }
#root:not(:has(.workspace)) footer.compactfooter :is(.brand, .brand small, .brand svg, .textbutton, a, button, h4, p, summary) {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, .5) !important;
}
#root:not(:has(.workspace)) footer.compactfooter .collectiondropdown > div,
#root:not(:has(.workspace)) footer.compactfooter .collectiondropdown > div a {
  color: var(--md-ink) !important;
}
html[data-md-theme="editorial"] #root:not(:has(.workspace)) footer.compactfooter { background: #0d0d0d !important; color: #f0f0f0 !important; border-top: 1px solid #2b2b2b; }

#root:not(:has(.workspace)) .md-bottom-nav { background: var(--md-header-bg) !important; border-top: 1px solid var(--md-header-line) !important; color: var(--md-header-ink) !important; }
#root:not(:has(.workspace)) .md-bottom-nav button { color: var(--md-header-ink) !important; }
@media (max-width: 700px) {
  #root:not(:has(.workspace)) .md-bottom-nav {
    min-height: 68px !important;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #root:not(:has(.workspace)) .md-bottom-nav :is(a, button) {
    min-height: 54px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    gap: 4px !important;
  }
  #root:not(:has(.workspace)) .md-bottom-nav svg {
    width: 24px !important;
    height: 24px !important;
  }
}

/* 10. Aviso único al agregar */
#root .toast { display: none !important; }
.md-add-banner {
  position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%); z-index: 95;
  background: var(--md-accent); color: #fff; padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .24); display: flex; align-items: center; gap: 12px;
  font: 600 12.5px/1.3 var(--md-sans); max-width: calc(100vw - 24px);
}
.md-add-banner button { background: #fff; color: #141414; border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 11.5px; white-space: nowrap; }

/* 11. Mis pedidos y Seguimiento (diseño boutique limpio, sin texto regado ni desbordes) */
#root .md-lookup-wrap {
  max-width: 620px !important;
  margin: 0 auto !important;
  padding: 20px 14px 90px !important;
}
#root .md-lookup-card {
  background: #ffffff !important;
  border: 1px solid var(--md-line) !important;
  border-radius: 16px !important;
  padding: 20px 18px !important;
  box-shadow: 0 8px 26px rgba(18, 51, 38, .06) !important;
  overflow: hidden !important;
}
#root .md-lookup-card .md-lookup-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid #eef2ef !important;
  margin-bottom: 14px !important;
}
#root .md-lookup-card .md-lookup-head strong {
  font: 700 16px/1.2 var(--md-sans) !important;
  color: var(--md-ink) !important;
  letter-spacing: .4px;
}
#root .md-lookup-card .md-order-item,
#root .md-lookup-card .cartitem {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 6px 0 !important;
}
#root .md-lookup-card img {
  width: 72px !important;
  height: 72px !important;
  border-radius: 12px !important;
  object-fit: cover !important;
  background: var(--md-soft) !important;
  flex-shrink: 0 !important;
}
#root .md-lookup-card .md-order-total {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  padding: 12px 0 !important;
  margin: 10px 0 4px !important;
  border-top: 1px solid #eef2ef !important;
  border-bottom: 1px solid #eef2ef !important;
}
#root .md-lookup-card .md-status-chip {
  padding: 5px 12px !important;
  border-radius: 999px !important;
  font: 700 12px/1.2 var(--md-sans) !important;
  white-space: nowrap !important;
}
#root .md-lookup-card .md-status-chip.md-chip-pending { background: #fff4d6 !important; color: #825200 !important; border: 1px solid #f0d28b !important; }
#root .md-lookup-card .md-status-chip.md-chip-approved { background: #e6f4ea !important; color: #1b5e30 !important; border: 1px solid #bfe0c9 !important; }
#root .md-lookup-card .md-status-chip.md-chip-failed { background: #fdeceb !important; color: #8e2420 !important; border: 1px solid #f2c3bf !important; }

/* Barra de progreso de 4 pasos perfectamente alineada (sin círculos heredados sobre .done) */
#root .md-order-progress {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 14px 0 14px !important;
  padding: 12px 12px 10px !important;
  background: #f7faf8 !important;
  border: 1px solid #e4ece7 !important;
  border-radius: 12px !important;
}
#root .md-order-progress-step,
#root .md-order-progress-step.done {
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: center !important;
  font: 600 11.5px/1.25 var(--md-sans) !important;
  color: var(--md-muted) !important;
}
#root .md-order-progress-step::before,
#root .md-order-progress-step::after,
#root .md-order-progress-step.done::before,
#root .md-order-progress-step.done::after {
  display: none !important;
  content: none !important;
}
#root .md-order-progress-bar {
  display: block !important;
  width: 100% !important;
  height: 6px !important;
  border-radius: 999px !important;
  background: #dce5df !important;
  margin: 0 0 7px !important;
}
#root .md-order-progress-step.done { color: var(--md-accent) !important; font-weight: 700 !important; }
#root .md-order-progress-step.done .md-order-progress-bar { background: var(--md-accent) !important; }

/* Metadatos limpios y ocultar acordeón redundante "Fecha y entrega" cuando ya existe el resumen boutique */
#root .md-lookup-card > p {
  margin: 0 0 8px !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  background: #fafaf8 !important;
  border: 1px solid #eceee9 !important;
  font: 500 13px/1.4 var(--md-sans) !important;
  color: var(--md-ink) !important;
}
#root .md-lookup-card:has(.md-boutique-summary) > details {
  display: none !important;
}
#root .md-lookup-card .md-boutique-summary {
  margin-top: 12px !important;
}
@media (max-width: 600px) {
  #root .md-lookup-card { padding: 16px 14px !important; }
  #root .md-order-progress { gap: 5px !important; padding: 10px 8px !important; }
  #root .md-order-progress-step,
  #root .md-order-progress-step.done { font-size: 10.5px !important; }
}

/* 12. Estilos del selector visual en el Administrador (Mejoras y TRM) */
.workspace .md-enh-admin .panel textarea { min-height: 58px; }
.workspace .md-admin-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 18px;
}
@media (max-width: 900px) { .workspace .md-admin-theme-grid { grid-template-columns: 1fr; } }
.workspace .md-admin-theme-card {
  text-align: left;
  padding: 16px;
  border: 1.5px solid #dfd9ce;
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.workspace .md-admin-theme-card:hover { border-color: #29483e; opacity: 1 !important; }
.workspace .md-admin-theme-card.selected {
  border-color: #12523d;
  background: #f2f8f5;
  box-shadow: 0 0 0 2px rgba(18, 82, 61, .18);
}
.workspace .md-admin-theme-swatches { display: flex; gap: 6px; }
.workspace .md-admin-theme-swatches span {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .18); display: inline-block;
}
.workspace .md-admin-theme-card strong { font: 700 14px/1.3 Arial, sans-serif; color: #1c2c24; }
.workspace .md-admin-theme-card small { font: 400 12px/1.45 Arial, sans-serif; color: #5b635e; }
.workspace .md-admin-theme-badge {
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #12523d;
  color: #ffffff;
  font: 700 11px/1.2 Arial, sans-serif;
}
.workspace .md-admin-color-overrides {
  border-top: 1px solid #e7e2d8;
  padding-top: 16px;
  margin-top: 6px;
}
.workspace .md-admin-color-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}
.workspace .md-admin-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.workspace .md-admin-color-item {
  margin: 0 !important;
  padding: 10px 12px;
  border: 1px solid #e5dfd5;
  border-radius: 10px;
  background: #faf9f6;
}
.workspace .md-admin-color-item span { display: block; font-weight: 600; font-size: 11.5px; color: #3a3f3c; margin-bottom: 6px; }
.workspace .md-admin-color-input { display: flex; align-items: center; gap: 10px; }
.workspace .md-admin-color-input input[type="color"] { width: 42px; height: 34px; padding: 2px; margin: 0; border-radius: 6px; cursor: pointer; }
.workspace .md-admin-color-input code { font: 600 12px/1 monospace; color: #444; }
.workspace .md-admin-feature-toggles {
  border-top: 1px solid #e7e2d8;
  margin-top: 18px;
  padding-top: 14px;
}
.workspace .md-admin-feature-toggles h4 { margin: 0 0 10px; font-size: 13.5px; color: #1c2c24; }
.workspace .md-admin-policy-item {
  border: 1px solid #e5dfd5;
  border-radius: 10px;
  padding: 12px 14px !important;
  margin: 10px 0 !important;
  background: #faf9f6;
}
.workspace .md-admin-policy-item summary {
  font: 700 13.5px/1.3 Arial, sans-serif;
  color: #1c2c24;
  cursor: pointer;
}
.workspace .md-admin-policy-item textarea { min-height: 110px !important; }

/* 13. Barra de políticas legales en el pie de página + casilla obligatoria checkout + modal lector */
.md-policies-bar {
  display: block !important;
  background: var(--md-header-bg);
  color: var(--md-header-ink);
  border-top: 1px solid var(--md-header-line);
  padding: 18px 5% 22px;
}
@media (max-width: 700px) {
  .md-policies-bar {
    padding: 20px 14px 132px !important;
    background: var(--md-soft) !important;
  }
  .md-policies-inner { flex-direction: column !important; gap: 12px !important; }
  .md-policies-label { font-size: 12.5px !important; opacity: .9 !important; color: var(--md-accent) !important; }
  .md-policies-links { gap: 8px !important; }
  .md-policies-links button {
    font-size: 14px !important;
    padding: 9px 14px !important;
    border: 1px solid var(--md-line) !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: var(--md-ink) !important;
    text-decoration: none !important;
  }
  .md-policy-body { font-size: 15px !important; line-height: 1.65 !important; }
  .md-policy-tab { font-size: 13px !important; padding: 8px 14px !important; }
}
.md-policies-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
}
.md-policies-label {
  font: 700 11.5px/1.2 var(--md-sans);
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .72;
}
.md-policies-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
}
.md-policies-links button {
  font: 600 12.5px/1.4 var(--md-sans);
  color: var(--md-header-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(128, 128, 128, .45);
  padding: 2px 4px;
  cursor: pointer;
}
.md-policies-links button:hover { opacity: 1 !important; color: var(--md-gold); }

.md-policy-consent {
  margin: 12px 0 6px;
  padding: 12px 13px;
  border-radius: var(--md-radius);
  border: 1.5px solid var(--md-line);
  background: var(--md-surface);
  transition: border-color .15s, background .15s;
}
.md-policy-consent.is-invalid {
  border-color: #c2392b;
  background: #fff5f4;
}
.md-policy-consent-row {
  display: flex !important;
  align-items: flex-start !important;
  gap: 11px !important;
  margin: 0 !important;
  cursor: pointer;
}
.md-policy-consent-check {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  margin: 2px 0 0 !important;
  accent-color: var(--md-accent);
  cursor: pointer;
  flex-shrink: 0;
}
.md-policy-consent-text {
  font: 400 13px/1.5 var(--md-sans);
  color: var(--md-ink);
}
.md-policy-consent-text button {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--md-accent);
  font: 700 13px/1.5 var(--md-sans);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.md-policy-consent-err {
  margin: 8px 0 0;
  font: 600 12.5px/1.4 var(--md-sans);
  color: #b42318;
}
.md-checkout-legal { display: none !important; }

.md-policy-overlay {
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(15, 20, 18, .56);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.md-policy-modal {
  width: min(100%, 700px);
  max-height: 86vh;
  background: #ffffff;
  color: #1c2420;
  border-radius: 14px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--md-sans);
}
.md-policy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #ece8e0;
}
.md-policy-eyebrow {
  display: block;
  font: 700 10px/1.2 var(--md-sans);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--md-gold);
  margin-bottom: 4px;
}
.md-policy-head h3 {
  margin: 0;
  font: 600 24px/1.2 var(--md-serif);
  color: #14221c;
}
.md-policy-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f3f2ee;
  color: #222;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.md-policy-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 22px;
  background: #faf9f6;
  border-bottom: 1px solid #ece8e0;
  scrollbar-width: none;
}
.md-policy-tabs::-webkit-scrollbar { display: none; }
.md-policy-tab {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dfd9cd;
  background: #ffffff;
  color: #3d4742;
  font: 600 12px/1.2 var(--md-sans);
  cursor: pointer;
}
.md-policy-tab.active {
  background: var(--md-accent);
  border-color: var(--md-accent);
  color: #ffffff;
}
.md-policy-body {
  padding: 18px 22px;
  overflow-y: auto;
  font: 400 14px/1.65 var(--md-sans);
  color: #2d3632;
}
.md-policy-body p {
  margin: 0 0 12px;
  color: #2d3632;
}
.md-policy-body p strong {
  color: #12211b;
}
.md-policy-foot {
  padding: 13px 22px;
  border-top: 1px solid #ece8e0;
  background: #faf9f6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 500 12.5px/1.3 var(--md-sans);
  color: #5b6460;
}
.md-policy-foot a {
  color: var(--md-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 14. Recibo de pedido y Resumen Opción 1 (Boutique limpia) */
.md-transfer-prehint {
  margin: 6px 0 10px;
  padding: 9px 12px;
  border-radius: var(--md-radius);
  background: var(--md-soft);
  border: 1px solid var(--md-line);
  font: 500 12px/1.45 var(--md-sans);
  color: var(--md-ink);
}
.md-receipt-card {
  max-width: 620px !important;
  margin: 18px auto 34px !important;
  padding: 28px 26px !important;
  border-radius: 16px !important;
  border: 1px solid var(--md-line) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06) !important;
  background: #ffffff !important;
}
.md-receipt-card .md-ref-result { gap: 12px !important; }
.md-receipt-card .md-ref-result > h2 { font-size: 26px !important; margin-bottom: 2px !important; }
.md-receipt-card .md-ref-check { width: 42px !important; height: 42px !important; margin: 2px auto !important; }
.md-receipt-card .md-order-confirmation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 12px 15px !important;
  border-radius: 11px !important;
}
.md-receipt-card .md-order-confirmation p { margin: 0 !important; font-size: 13px !important; }
.md-receipt-card .md-order-confirmation > p:nth-child(2) { display: none !important; }
.md-receipt-card .md-delivery-card { display: none !important; }
.md-receipt-card .md-transfer-panel {
  border-radius: 12px !important;
  padding: 14px 16px !important;
  margin: 4px 0 2px !important;
}
.md-receipt-card .md-receipt-proof-top {
  margin-top: 2px !important;
  margin-bottom: 6px !important;
  min-height: 46px !important;
  font-weight: 700 !important;
}

.md-boutique-summary-wrap {
  margin-top: 6px;
}
.md-boutique-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.md-boutique-summary-top > span {
  font: 700 11px/1.2 var(--md-sans);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--md-muted);
}
.md-boutique-summary-top > a {
  font: 600 12px/1.2 var(--md-sans);
  color: var(--md-accent) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.md-boutique-summary {
  border: 1px solid var(--md-line);
  border-radius: 13px;
  background: #ffffff;
  overflow: hidden;
  margin: 8px 0;
}
.md-boutique-block {
  padding: 15px 18px;
  border-bottom: 1px solid var(--md-line);
}
.md-boutique-block:last-child { border-bottom: 0; }
.md-boutique-heading {
  margin: 0 0 8px !important;
  font: 700 11px/1.2 var(--md-sans) !important;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--md-accent) !important;
}
.md-boutique-rows { display: flex; flex-direction: column; }
.md-boutique-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid #eef2ef;
  font-size: 13px;
  line-height: 1.45;
}
.md-boutique-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.md-boutique-label {
  color: var(--md-muted);
  font: 500 12.5px/1.4 var(--md-sans);
  flex-shrink: 0;
}
.md-boutique-value {
  color: var(--md-ink);
  font: 600 13px/1.45 var(--md-sans);
  text-align: right;
  min-width: 0;
  overflow-wrap: break-word;
}
.md-boutique-card-note {
  padding: 16px 18px;
  background: #faf9f5;
  text-align: center;
}
.md-boutique-card-eyebrow {
  font: 700 11px/1.2 var(--md-sans);
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--md-accent);
  margin-bottom: 6px;
}
.md-boutique-card-msg {
  margin: 0 auto !important;
  max-width: 460px !important;
  font: italic 15px/1.55 var(--md-serif) !important;
  color: var(--md-ink) !important;
  white-space: pre-wrap;
}
.md-boutique-card-sign {
  margin-top: 6px;
  font: 600 11.5px/1.3 var(--md-sans);
  color: var(--md-muted);
}
@media (max-width: 600px) {
  .md-receipt-card { padding: 20px 15px !important; margin: 10px 10px 26px !important; }
  .md-boutique-block, .md-boutique-card-note { padding: 13px 14px; }
  .md-boutique-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 7px 0;
  }
  .md-boutique-value { text-align: left; }
}

/* 15. Campanita sonora y alerta en vivo en el Administrador */
.workspace .md-admin-bell-btn.active {
  background: #edf5f0 !important;
  border-color: #12523d !important;
  color: #12523d !important;
  font-weight: 700 !important;
}
.md-admin-live-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  background: #12523d;
  color: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .28);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(460px, calc(100vw - 28px));
  font-family: Arial, sans-serif;
}
.md-admin-live-toast-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
.md-admin-live-toast-copy strong { font-size: 14px; color: #ffffff; }
.md-admin-live-toast-copy span { font-size: 12px; color: #dceee4; }
.md-admin-live-toast-btn {
  background: #ffffff;
  color: #12523d;
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.md-admin-live-toast-close {
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
}



/* ==========================================================================
   MIL DETALLES — ADMIN PRO 2.0 (Shopify Polaris + Boutique Forest Edition)
   Aplica exclusivamente dentro de .workspace (0 impacto en la tienda pública)
   ========================================================================== */

:root {
  --ap-sidebar-bg: #0d2017;
  --ap-sidebar-bg-2: #142d21;
  --ap-sidebar-border: rgba(255, 255, 255, 0.08);
  --ap-sidebar-text: #c7d8ce;
  --ap-sidebar-muted: #7e9b8b;
  --ap-sidebar-active-bg: rgba(52, 211, 153, 0.14);
  --ap-sidebar-active-bar: #34d399;
  --ap-canvas: #f2f5f3;
  --ap-surface: #ffffff;
  --ap-surface-soft: #f8faf8;
  --ap-border: #e1e7e3;
  --ap-border-strong: #cdd7d1;
  --ap-ink: #11221a;
  --ap-muted: #5a6e63;
  --ap-accent: #145338;
  --ap-accent-hover: #0f3f2a;
  --ap-accent-soft: #e8f5ee;
  --ap-gold: #c9a24d;
  --ap-shadow-sm: 0 1px 2px rgba(13, 32, 23, 0.05), 0 1px 3px rgba(13, 32, 23, 0.04);
  --ap-shadow-md: 0 8px 24px -6px rgba(13, 32, 23, 0.09), 0 2px 6px rgba(13, 32, 23, 0.04);
  --ap-shadow-lg: 0 20px 50px -12px rgba(13, 32, 23, 0.24);
  --ap-radius: 16px;
  --ap-radius-sm: 10px;
}

/* 1. Shell general */
.workspace {
  background: var(--ap-canvas) !important;
  color: var(--ap-ink) !important;
  font-family: 'Plus Jakarta Sans', 'DM Sans', system-ui, -apple-system, sans-serif !important;
  min-height: 100vh;
}

/* 2. Sidebar oscura elegante verde bosque */
.workspace .sidebar {
  background: linear-gradient(180deg, var(--ap-sidebar-bg) 0%, var(--ap-sidebar-bg-2) 100%) !important;
  border-right: 1px solid var(--ap-sidebar-border) !important;
  color: var(--ap-sidebar-text) !important;
  padding: 20px 14px 18px !important;
  box-shadow: 4px 0 24px rgba(8, 22, 15, 0.14);
}

.workspace .sidebar .brand {
  padding: 8px 10px 14px !important;
  margin-bottom: 6px !important;
  border-bottom: 1px solid var(--ap-sidebar-border);
  color: #ffffff !important;
  gap: 11px !important;
}

.workspace .sidebar .brand svg {
  color: #6ee7b7 !important;
  filter: drop-shadow(0 2px 8px rgba(110, 231, 183, 0.28));
}

.workspace .sidebar .brand span {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  letter-spacing: -0.01em;
}

.workspace .sidebar .brand small {
  color: #93b5a2 !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  font-weight: 700 !important;
}

.workspace .sidebar .workspacebadge {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  background: rgba(52, 211, 153, 0.12) !important;
  border: 1px solid rgba(52, 211, 153, 0.28) !important;
  color: #a7f3d0 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 6px 11px !important;
  border-radius: 999px !important;
  margin: 10px 6px 12px !important;
  width: fit-content;
}

.workspace .sidebar .workspacebadge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65);
  animation: mdPulseLive 2.2s infinite;
}

@keyframes mdPulseLive {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.workspace .sidebar .md-nav-group-label {
  color: var(--ap-sidebar-muted) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  padding: 14px 12px 6px !important;
  margin-top: 2px;
}

.workspace .sidebar nav button {
  position: relative;
  color: var(--ap-sidebar-text) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  padding: 10px 12px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease !important;
}

.workspace .sidebar nav button svg {
  color: #88ab98 !important;
  transition: color 0.16s ease;
}

.workspace .sidebar nav button:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
}

.workspace .sidebar nav button:hover svg {
  color: #a7f3d0 !important;
}

.workspace .sidebar nav button.chosen {
  background: var(--ap-sidebar-active-bg) !important;
  border-color: rgba(52, 211, 153, 0.24) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: inset 3px 0 0 var(--ap-sidebar-active-bar) !important;
}

.workspace .sidebar nav button.chosen svg {
  color: #6ee7b7 !important;
}

.workspace .sidebar nav button b,
.workspace .sidebar nav button .md-nav-badge {
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.workspace .sidebar .sidebottom {
  margin-top: auto;
  padding: 14px 12px 6px !important;
  border-top: 1px solid var(--ap-sidebar-border) !important;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
}

.workspace .sidebar .sidebottom p {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  margin-bottom: 2px !important;
}

.workspace .sidebar .sidebottom small {
  color: var(--ap-sidebar-muted) !important;
  font-size: 11.5px !important;
}

.workspace .sidebar .sidebottom button {
  margin-top: 10px !important;
  width: 100%;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
  font-weight: 600 !important;
  transition: all 0.16s ease !important;
}

.workspace .sidebar .sidebottom button:hover {
  background: #34d399 !important;
  border-color: #34d399 !important;
  color: #0b1c14 !important;
}

/* 3. Top Command Bar (Sticky Glass Header) */
.workspace .worktop {
  position: sticky !important;
  top: 0;
  z-index: 35;
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ap-border) !important;
  padding: 12px 24px !important;
  box-shadow: 0 2px 12px rgba(13, 32, 23, 0.04);
}

.workspace .worktop > span {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--ap-ink) !important;
  letter-spacing: -0.01em;
}

.workspace .worktop > span small {
  color: var(--ap-muted) !important;
  font-weight: 600 !important;
}

.workspace .worktop .draftdot {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  background: #eef4f0 !important;
  border: 1px solid #d5e3da !important;
  color: #215239 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.workspace .worktop button.primary {
  background: linear-gradient(135deg, #155c3d 0%, #0e3d28 100%) !important;
  border: 0 !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(15, 61, 40, 0.25) !important;
  transition: transform 0.14s ease, box-shadow 0.14s ease !important;
}

.workspace .worktop button.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 61, 40, 0.34) !important;
}

.workspace .worktop button.outline {
  background: #ffffff !important;
  border: 1px solid var(--ap-border-strong) !important;
  color: var(--ap-ink) !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
}

.workspace .worktop button.outline:hover:not(:disabled) {
  border-color: var(--ap-accent) !important;
  color: var(--ap-accent) !important;
  background: var(--ap-accent-soft) !important;
}

/* 4. Área principal y paneles generales */
.workspace .workbody {
  padding: 24px 28px 48px !important;
  max-width: 1360px;
}

.workspace .panel,
.workspace .editcard {
  background: var(--ap-surface) !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: var(--ap-radius) !important;
  box-shadow: var(--ap-shadow-sm) !important;
}

.workspace input[type="text"],
.workspace input[type="search"],
.workspace input[type="number"],
.workspace input[type="email"],
.workspace input[type="date"],
.workspace input[type="time"],
.workspace input[type="url"],
.workspace select,
.workspace textarea {
  border: 1px solid var(--ap-border-strong) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: var(--ap-ink) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.workspace input:focus,
.workspace select:focus,
.workspace textarea:focus {
  outline: none !important;
  border-color: var(--ap-accent) !important;
  box-shadow: 0 0 0 3px rgba(20, 83, 56, 0.14) !important;
}

/* 5. Centro de Mando Pro (Greeting + View Switch) */
.workspace .md-pro-greeting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ap-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.workspace .md-ops-title {
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  color: var(--ap-ink) !important;
}

.workspace .md-view-switch {
  display: inline-flex;
  padding: 3px;
  background: #e5ece8;
  border-radius: 11px;
  border: 1px solid #d4dfd8;
  gap: 2px;
}

.workspace .md-view-switch button {
  border: 0 !important;
  background: transparent !important;
  color: #425a4e !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.workspace .md-view-switch button.active {
  background: #ffffff !important;
  color: var(--ap-accent) !important;
  box-shadow: 0 1px 4px rgba(13, 32, 23, 0.12) !important;
}

.workspace button.is-toggled {
  background: var(--ap-accent-soft) !important;
  border-color: #9ed4b8 !important;
  color: var(--ap-accent) !important;
}

/* 6. Tarjetas KPI Pro */
.workspace .md-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin: 18px 0 !important;
}

.workspace .md-kpi-card {
  position: relative;
  text-align: left !important;
  background: #ffffff !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: var(--ap-radius) !important;
  padding: 16px 18px !important;
  box-shadow: var(--ap-shadow-sm) !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.workspace .md-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ap-shadow-md) !important;
  border-color: #b7cfc2 !important;
}

.workspace .md-kpi-card.is-selected {
  border-color: var(--ap-accent) !important;
  box-shadow: 0 0 0 2px rgba(20, 83, 56, 0.16), var(--ap-shadow-md) !important;
}

.workspace .md-kpi-card.is-alert {
  border-top: 3px solid #ef4444 !important;
}

.workspace .md-kpi-card.is-warn {
  border-top: 3px solid #f59e0b !important;
}

.workspace .md-kpi-card.is-success {
  border-top: 3px solid #10b981 !important;
}

.workspace .md-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workspace .md-kpi-label {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--ap-muted) !important;
}

.workspace .md-kpi-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.workspace .md-kpi-icon.is-amber { background: #fef3c7; color: #b45309; }
.workspace .md-kpi-icon.is-emerald { background: #d1fae5; color: #047857; }
.workspace .md-kpi-icon.is-indigo { background: #e0e7ff; color: #4338ca; }
.workspace .md-kpi-icon.is-teal { background: #ccfbf1; color: #0f766e; }

.workspace .md-kpi-num {
  font-size: 30px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  color: var(--ap-ink) !important;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 2px;
}

.workspace .md-kpi-card small {
  font-size: 12px !important;
  color: var(--ap-muted) !important;
  font-weight: 500;
}

/* 7. Gráfica Interactiva 7 días + Progreso de Hoy */
.workspace .md-analytics-row {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.workspace .md-chart-card,
.workspace .md-progress-card {
  background: #ffffff;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 18px 20px;
  box-shadow: var(--ap-shadow-sm);
}

.workspace .md-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.workspace .md-chart-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ap-muted);
  margin-bottom: 4px;
}

.workspace .md-chart-big {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace .md-chart-big strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--ap-ink);
  font-variant-numeric: tabular-nums;
}

.workspace .md-chart-sub {
  font-size: 12.5px;
  color: var(--ap-muted);
  font-weight: 600;
}

.workspace .md-chart-tooltip {
  background: #0f261b;
  color: #ffffff;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  box-shadow: 0 6px 16px rgba(13, 32, 23, 0.18);
}

.workspace .md-chart-tooltip strong {
  font-size: 11px;
  color: #86efac;
  text-transform: capitalize;
}

.workspace .md-chart-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  height: 118px;
  padding-top: 8px;
}

.workspace .md-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  height: 100%;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  cursor: pointer;
}

.workspace .md-chart-bar-wrap {
  width: 100%;
  max-width: 38px;
  flex: 1;
  background: #eef3f0;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.workspace .md-chart-bar {
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #34d399 0%, #145338 100%);
  transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.15s ease;
}

.workspace .md-chart-col.is-today .md-chart-bar {
  background: linear-gradient(180deg, #e5b85c 0%, #b58225 100%);
}

.workspace .md-chart-col.is-active .md-chart-bar,
.workspace .md-chart-col:hover .md-chart-bar {
  filter: brightness(1.08);
}

.workspace .md-chart-day {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ap-muted);
  text-transform: capitalize;
}

.workspace .md-chart-col.is-active .md-chart-day,
.workspace .md-chart-col.is-today .md-chart-day {
  color: var(--ap-ink);
}

.workspace .md-progress-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.workspace .md-progress-num {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 0 10px;
}

.workspace .md-progress-num strong {
  font-size: 28px;
  font-weight: 800;
  color: var(--ap-ink);
  font-variant-numeric: tabular-nums;
}

.workspace .md-progress-num span {
  font-size: 12.5px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 3px 9px;
  border-radius: 999px;
}

.workspace .md-progress-track {
  width: 100%;
  height: 10px;
  background: #e8efeb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.workspace .md-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #145338 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.workspace .md-progress-stats {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--ap-muted);
}

.workspace .md-progress-stats > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace .md-progress-stats strong {
  margin-left: auto;
  color: var(--ap-ink);
  font-variant-numeric: tabular-nums;
}

.workspace .md-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.workspace .md-dot.is-indigo { background: #6366f1; }
.workspace .md-dot.is-teal { background: #14b8a6; }
.workspace .md-dot.is-emerald { background: #10b981; }

/* 8. Tablero Kanban Interactivo */
.workspace .md-kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(245px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.workspace .md-kanban-col {
  background: #eaf0ec;
  border: 1px solid #d8e2dc;
  border-radius: 15px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
}

.workspace .md-kanban-col.is-amber { border-top: 3px solid #f59e0b; }
.workspace .md-kanban-col.is-indigo { border-top: 3px solid #6366f1; }
.workspace .md-kanban-col.is-teal { border-top: 3px solid #0d9488; }
.workspace .md-kanban-col.is-emerald { border-top: 3px solid #10b981; }

.workspace .md-kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}

.workspace .md-kanban-head strong {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ap-ink);
}

.workspace .md-kanban-count {
  background: #ffffff;
  color: var(--ap-ink);
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid #d4dfd8;
}

.workspace .md-kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workspace .md-kanban-card {
  background: #ffffff;
  border: 1px solid var(--ap-border);
  border-radius: 13px;
  padding: 11px;
  box-shadow: var(--ap-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.workspace .md-kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ap-shadow-md);
}

.workspace .md-kanban-card-top {
  display: flex;
  gap: 10px;
  cursor: pointer;
}

.workspace .md-kanban-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #e6ece8;
  flex-shrink: 0;
}

.workspace .md-kanban-meta {
  flex: 1;
  min-width: 0;
}

.workspace .md-kanban-idrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.workspace .md-kanban-idrow strong {
  font-size: 12.5px;
  color: var(--ap-accent);
}

.workspace .md-kanban-price {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ap-ink);
  font-variant-numeric: tabular-nums;
}

.workspace .md-kanban-buyer {
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.workspace .md-kanban-meta small {
  font-size: 11.5px;
  color: var(--ap-muted);
}

.workspace .md-kanban-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #e5ebe7;
}

.workspace .md-kanban-next {
  padding: 5px 10px !important;
  font-size: 11.5px !important;
}

.workspace .md-kanban-empty {
  text-align: center;
  padding: 26px 10px;
  font-size: 12.5px;
  color: var(--ap-muted);
  border: 1px dashed #c8d5cd;
  border-radius: 11px;
}

/* 9. Tarjetas de pedido mejoradas + Slide-Over Drawer */
.workspace .md-ops-card {
  background: #ffffff !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 14px !important;
  box-shadow: var(--ap-shadow-sm) !important;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease !important;
}

.workspace .md-ops-card:hover {
  border-color: #b4cec0 !important;
  box-shadow: var(--ap-shadow-md) !important;
  transform: translateY(-1px);
}

.workspace .md-ops-thumb,
.workspace .md-ops-item-line img {
  object-fit: contain !important;
  background: #ffffff !important;
  border: 1px solid #e4eae6 !important;
}

.workspace .overlay.md-drawer-backdrop {
  justify-content: flex-end !important;
  align-items: stretch !important;
  padding: 0 !important;
  background: rgba(11, 28, 20, 0.45) !important;
  backdrop-filter: blur(4px);
}

.workspace .modal.md-drawer-panel {
  width: min(560px, 100vw) !important;
  max-width: 560px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 !important;
  border-radius: 20px 0 0 20px !important;
  padding: 22px 24px 36px !important;
  overflow-y: auto !important;
  box-shadow: var(--ap-shadow-lg) !important;
  animation: mdSlideInRight 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mdSlideInRight {
  from { transform: translateX(36px); opacity: 0.7; }
  to { transform: translateX(0); opacity: 1; }
}

/* 10. Productos en el Admin: switches modernos, botones pro y Editor en Panel Lateral Deslizable */
.workspace .workbody {
  padding-bottom: 112px !important;
}

/* Interruptores (Toggle Switches tipo Shopify/iOS) en TODO el administrador */
.workspace label.check input[type="checkbox"],
.workspace .md-product-row input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 40px !important;
  height: 22px !important;
  min-width: 40px !important;
  border-radius: 999px !important;
  background: #cbd5d0 !important;
  border: 0 !important;
  position: relative !important;
  cursor: pointer !important;
  transition: background 0.18s ease !important;
  margin: 0 !important;
  vertical-align: middle;
}

.workspace label.check input[type="checkbox"]::after,
.workspace .md-product-row input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.workspace label.check input[type="checkbox"]:checked,
.workspace .md-product-row input[type="checkbox"]:checked {
  background: #10b981 !important;
}

.workspace label.check input[type="checkbox"]:checked::after,
.workspace .md-product-row input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

/* Cabecera Guía Ejecutiva en cada sección del menú lateral */
.workspace .md-section-guide {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f4faf6 100%);
  border: 1px solid #d5e6dc;
  border-left: 4px solid var(--ap-accent);
  border-radius: var(--ap-radius);
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: var(--ap-shadow-sm);
}

.workspace .md-sg-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ap-accent-soft);
  border: 1px solid #c6e6d5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.workspace .md-sg-body h3 {
  margin: 0 0 4px !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--ap-ink) !important;
}

.workspace .md-sg-what,
.workspace .md-sg-impact {
  margin: 2px 0 0 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: var(--ap-muted) !important;
}

.workspace .md-sg-what strong,
.workspace .md-sg-impact strong {
  color: var(--ap-ink) !important;
}

/* Textos y botones: tarjetas interactivas con vista previa en vivo del botón real */
.workspace .buttontextgrid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-top: 14px !important;
}

.workspace .buttontextgrid label {
  background: #f9fbfa !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.workspace .buttontextgrid label:focus-within {
  background: #ffffff !important;
  border-color: var(--ap-accent) !important;
  box-shadow: var(--ap-shadow-md);
}

.workspace .md-bt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace .md-bt-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-ink);
}

.workspace .md-btn-live-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace .md-btn-live-pill.is-primary {
  background: #145338;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(20, 83, 56, 0.25);
}

.workspace .md-btn-live-pill.is-wa {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.28);
}

.workspace .md-btn-live-pill.is-outline {
  background: #ffffff;
  color: #145338;
  border: 1.5px solid #145338;
}

/* Funciones: tarjetas con acento de color y switches modernos */
.workspace .modulegrid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.workspace .modulecard {
  border-top: 3px solid #cbd5e1 !important;
  padding: 18px 20px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}

.workspace .modulecard.is-enabled {
  border-top-color: #10b981 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f6fcf8 100%) !important;
}

.workspace .modulecard:hover {
  transform: translateY(-2px);
  box-shadow: var(--ap-shadow-md) !important;
}

.workspace .modulecontrols {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-top: 12px !important;
  margin-top: 10px !important;
  border-top: 1px solid #edf2ef !important;
}

.workspace .modulecontrols label.check {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  color: var(--ap-ink) !important;
}

/* Filas de productos modernas */
.workspace .md-product-row {
  background: #ffffff !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease !important;
}

.workspace .md-product-row:hover {
  border-color: #9ec5b2 !important;
  box-shadow: var(--ap-shadow-md) !important;
  transform: translateY(-1px);
}

.workspace .md-product-row img {
  object-fit: contain !important;
  background: #ffffff !important;
  border: 1px solid #e6ece8 !important;
  border-radius: 10px !important;
}

.workspace .md-product-row button {
  border-radius: 9px !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  padding: 7px 13px !important;
}

/* Editor de Producto como Panel Lateral Deslizable (Slide-Over Drawer) */
.workspace .md-single-editor:has(.editcard) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 95 !important;
  background: rgba(11, 28, 20, 0.48) !important;
  backdrop-filter: blur(4px);
  display: flex !important;
  justify-content: flex-end !important;
  align-items: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
}

.workspace .md-single-editor:has(.editcard) .editcard {
  width: min(640px, 100vw) !important;
  max-width: 640px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  border-radius: 22px 0 0 22px !important;
  border: 0 !important;
  padding: 0 24px 36px !important;
  box-shadow: var(--ap-shadow-lg) !important;
  animation: mdSlideInRight 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.workspace .md-prod-drawer-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -24px 6px;
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--ap-border);
}

.workspace .md-pdh-kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ap-accent);
}

.workspace .md-pdh-title {
  margin: 2px 0 0 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--ap-ink) !important;
}

.workspace .md-single-editor:has(.editcard) .editcard > img {
  width: 100% !important;
  max-height: 240px !important;
  object-fit: contain !important;
  background: #ffffff !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 14px !important;
  padding: 8px;
}

@media (max-width: 820px) {
  .workspace .buttontextgrid,
  .workspace .modulegrid {
    grid-template-columns: 1fr !important;
  }
  .workspace .md-single-editor:has(.editcard) .editcard {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 92vh !important;
    margin-top: auto !important;
    border-radius: 22px 22px 0 0 !important;
    padding: 0 16px 32px !important;
  }
  .workspace .md-prod-drawer-head {
    margin: 0 -16px 6px;
    padding: 14px 16px 12px;
  }
}

/* 12. Nuevo Panel Lateral de Producto con 4 Pestañas + Biblioteca de Complementos + Vista Tarjetas */
.workspace .md-prod-pro-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}

.workspace .md-admin-list.is-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)) !important;
  gap: 14px !important;
}

.workspace .md-admin-list.is-grid .md-product-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding: 14px !important;
}

.workspace .md-admin-list.is-grid .md-product-row img {
  width: 100% !important;
  height: 168px !important;
  margin: 0 !important;
}

/* Panel Lateral de Producto (MdProductDrawer) */
.workspace .modal.md-prod-drawer {
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  width: min(720px, 100vw) !important;
  max-width: 720px !important;
}

.workspace .md-pd-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  grid-template-columns: none !important;
  gap: 10px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 6 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ap-border) !important;
  padding: 18px 24px 0 !important;
}

.workspace .md-pd-head-top {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
}

.workspace .md-pd-thumb {
  width: 62px !important;
  height: 62px !important;
  border-radius: 12px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--ap-border);
  flex-shrink: 0;
}

.workspace .md-pd-head-info {
  flex: 1;
  min-width: 0;
}

.workspace .md-pd-head-info .md-pdh-title {
  font-size: 19px !important;
  line-height: 1.25 !important;
  margin: 2px 0 2px !important;
}

.workspace .md-pd-price {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--ap-accent);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.workspace .md-pd-quick-switches {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin: 2px 0 2px !important;
}

.workspace .md-pd-switch-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f4f7f5;
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  padding: 5px 13px 5px 7px;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--ap-ink) !important;
  white-space: nowrap !important;
}

.workspace .md-pd-tabs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  overflow: visible !important;
  margin-top: 2px !important;
  padding-bottom: 0 !important;
}

.workspace .md-pd-tab {
  border: 0 !important;
  border-bottom: 2.5px solid transparent !important;
  background: transparent !important;
  color: var(--ap-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 10px 12px !important;
  border-radius: 8px 8px 0 0 !important;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.workspace .md-pd-tab:hover {
  color: var(--ap-ink) !important;
  background: #f3f7f4 !important;
}

.workspace .md-pd-tab.active {
  color: var(--ap-accent) !important;
  border-bottom-color: var(--ap-accent) !important;
  background: #eff7f2 !important;
}

.workspace .md-pd-body {
  padding: 18px 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.workspace .md-pd-footer {
  position: sticky;
  bottom: 0;
  z-index: 6;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--ap-border);
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 16px rgba(13, 32, 23, 0.06);
}

.workspace .md-pd-status {
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
}

.workspace .md-pd-status.is-dirty {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.workspace .md-pd-status.is-clean {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.workspace .md-pd-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.workspace .md-pd-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.workspace .md-pd-section > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-ink);
}

.workspace .md-pd-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workspace .md-pd-grid-2 > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-ink);
}

.workspace .md-pd-photo-stage {
  background: #ffffff;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 230px;
}

.workspace .md-pd-photo-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.workspace .md-pd-hint {
  font-size: 13px;
  color: var(--ap-muted);
  margin: 0;
  line-height: 1.45;
}

/* Selector 3 modos de Complementos dentro del producto */
.workspace .md-extras-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.workspace .md-emode-card {
  text-align: left !important;
  background: #f8faf9 !important;
  border: 1.5px solid var(--ap-border) !important;
  border-radius: 13px !important;
  padding: 12px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.workspace .md-emode-card strong {
  font-size: 13px;
  color: var(--ap-ink);
}

.workspace .md-emode-card small {
  font-size: 11.5px;
  color: var(--ap-muted);
  line-height: 1.3;
}

.workspace .md-emode-card.active {
  background: #eef8f2 !important;
  border-color: var(--ap-accent) !important;
  box-shadow: 0 0 0 2px rgba(20, 83, 56, 0.14);
}

.workspace .md-emode-preview {
  background: #f8faf9;
  border: 1px solid var(--ap-border);
  border-radius: 13px;
  padding: 14px;
}

.workspace .md-emode-preview h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ap-ink);
}

.workspace .md-emode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace .md-emode-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  padding: 4px 11px 4px 5px;
  font-size: 12.5px;
  font-weight: 600;
}

.workspace .md-emode-chip img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
}

.workspace .md-emode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workspace .md-emode-row {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  background: #ffffff;
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.workspace .md-emode-row.is-on {
  border-color: #6ee7b7;
  background: #f3fcf7;
}

.workspace .md-emode-row-img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #e6ece8;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace .md-emode-row-txt {
  display: flex;
  flex-direction: column;
}

.workspace .md-emode-row-txt strong {
  font-size: 13.5px;
  color: var(--ap-ink);
}

.workspace .md-emode-row-txt small {
  font-size: 12px;
  color: var(--ap-accent);
  font-weight: 700;
}

/* Biblioteca de Complementos (MdExtrasPanel) */
.workspace .md-extras-manager {
  margin-top: 22px !important;
  padding: 20px 22px !important;
}

.workspace .md-em-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.workspace .md-em-head h3 {
  margin: 0 0 4px !important;
  font-size: 19px !important;
  font-weight: 800 !important;
}

.workspace .md-em-head p {
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--ap-muted) !important;
}

.workspace .md-em-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.workspace .md-em-card {
  background: #f9fbfa;
  border: 1px solid var(--ap-border);
  border-radius: 15px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workspace .md-em-card.is-hidden {
  opacity: 0.72;
}

.workspace .md-em-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.workspace .md-em-thumb {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--ap-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.workspace .md-em-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workspace .md-em-photo-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.workspace .md-em-upload-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.workspace .md-em-linker {
  background: #ffffff;
  border: 1px solid #b5d4c3;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workspace .md-em-linker-list {
  max-height: 210px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.workspace .md-em-linker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: #f8faf9 !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 10px !important;
  padding: 7px 10px !important;
  cursor: pointer;
}

.workspace .md-em-linker-item:hover {
  border-color: var(--ap-accent) !important;
  background: #eef8f2 !important;
}

.workspace .md-em-linker-item img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  flex-shrink: 0;
}

.workspace .md-em-linker-item > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.workspace .md-em-linker-item strong {
  font-size: 13px;
  color: var(--ap-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace .md-em-linker-item small {
  font-size: 11.5px;
  color: var(--ap-muted);
}

.workspace .md-em-use-tag {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ap-accent);
  background: #dcfce7;
  padding: 4px 9px;
  border-radius: 999px;
}

.workspace .md-em-cats {
  border-top: 1px dashed #d9e4de;
  padding-top: 10px;
}

.workspace .md-em-cats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ap-muted);
}

.workspace .md-em-cats-quick {
  display: flex;
  gap: 10px;
}

.workspace .md-em-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace .md-em-cat-chip {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  border: 1px solid var(--ap-border-strong) !important;
  color: var(--ap-muted) !important;
  cursor: pointer;
}

.workspace .md-em-cat-chip.active {
  background: var(--ap-accent) !important;
  border-color: var(--ap-accent) !important;
  color: #ffffff !important;
}

.workspace .md-em-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e6ece8;
  padding-top: 10px;
}

/* Selector Grupo -> Categoría en Complementos */
.workspace .md-em-rule-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.workspace .md-em-rule-picker select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px !important;
  font-size: 12.5px !important;
}

.workspace .md-em-rule-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eaf5ef;
  border: 1px solid #b5dac6;
  color: #0f3f2a;
  border-radius: 999px;
  padding: 5px 8px 5px 11px;
  font-size: 12px;
}

.workspace .md-em-rule-tag small {
  color: #466958;
  font-weight: 600;
}

.workspace .md-em-rule-tag strong {
  font-weight: 800;
}

.workspace .md-em-rule-tag button {
  border: 0 !important;
  background: rgba(15, 63, 42, 0.12) !important;
  color: #0f3f2a !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 10px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace .md-em-rule-tag button:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* Categorías compactas por pestañas de grupo (sin desbordes ni estrechez) */
.workspace .md-cat-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 12px;
  padding: 10px 12px;
  background: #f3f7f4;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
}

.workspace .md-cat-gtab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 8px 13px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1px solid var(--ap-border-strong) !important;
  color: var(--ap-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.workspace .md-cat-gtab b {
  background: #e6efea;
  color: #215239;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
}

.workspace .md-cat-gtab.active {
  background: var(--ap-accent) !important;
  border-color: var(--ap-accent) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(20, 83, 56, 0.24);
}

.workspace .md-cat-gtab.active b {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.workspace .md-cat-opt-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.workspace .md-cat-opt-search input {
  flex: 1 1 280px;
  max-width: 480px;
  padding: 10px 14px !important;
  font-size: 13.5px !important;
}

.workspace section.filtergroupeditor {
  background: #ffffff !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 16px !important;
  padding: 18px 20px !important;
  margin-bottom: 16px !important;
  box-shadow: var(--ap-shadow-sm);
}

.workspace section.filtergroupeditor > .row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 12px !important;
  padding-bottom: 14px !important;
  margin-bottom: 14px !important;
  border-bottom: 1px solid #e6ece8 !important;
}

.workspace section.filtergroupeditor > .row > label:first-child {
  flex: 1 1 200px;
  max-width: 260px;
}

.workspace section.filtergroupeditor > .row > label.check {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f4f7f5;
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  padding: 5px 12px 5px 7px;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.workspace section.filtergroupeditor > .row > button.outline.compact {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Vista 1: Tabla compacta en 1 sola línea limpia por opción */
.workspace section.filtergroupeditor .inlineeditor {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 12px !important;
  background: #f9fbfa !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  margin-bottom: 8px !important;
}

.workspace section.filtergroupeditor .inlineeditor > label:first-child {
  flex: 1 1 170px !important;
  max-width: 240px !important;
  margin: 0 !important;
}

.workspace section.filtergroupeditor .inlineeditor > label:first-child input {
  padding: 7px 10px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
}

.workspace section.filtergroupeditor .inlineeditor > label.check {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
  background: #ffffff !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 999px !important;
  padding: 5px 12px 5px 7px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

.workspace section.filtergroupeditor .inlineeditor > details.optionpageeditor {
  width: auto !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  padding: 6px 12px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

.workspace section.filtergroupeditor .inlineeditor > details.optionpageeditor[open] {
  flex: 1 0 100% !important;
  order: 20;
  padding: 12px 14px !important;
  margin-top: 6px !important;
}

.workspace section.filtergroupeditor .inlineeditor > button.outline.compact {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.workspace section.filtergroupeditor .inlineeditor > button.textbutton {
  flex: 0 0 auto !important;
  margin-left: auto;
  font-size: 12px !important;
  color: #b91c1c !important;
  padding: 5px 9px !important;
}

/* Vista 2: Cuadrícula de tarjetas (2 por fila) */
.workspace section.filtergroupeditor.is-cat-cards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.workspace section.filtergroupeditor.is-cat-cards > .row,
.workspace section.filtergroupeditor.is-cat-cards > button {
  grid-column: 1 / -1 !important;
}

.workspace section.filtergroupeditor.is-cat-cards .inlineeditor {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  margin-bottom: 0 !important;
  padding: 14px !important;
  background: #ffffff !important;
  box-shadow: var(--ap-shadow-sm);
}

.workspace section.filtergroupeditor.is-cat-cards .inlineeditor > label:first-child {
  max-width: none !important;
  flex: none !important;
}

.workspace section.filtergroupeditor.is-cat-cards .inlineeditor > button.textbutton {
  margin-left: 0;
  align-self: flex-start;
}

@media (max-width: 820px) {
  .workspace section.filtergroupeditor.is-cat-cards {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 780px) {
  .workspace .md-em-rule-picker {
    grid-template-columns: 1fr;
  }
}

/* Reubicar #md-access-bar (Administración / Propietario) a la izquierda para que NUNCA tape Guardar y publicar ni filas */
#md-access-bar {
  right: auto !important;
  left: 14px !important;
  bottom: 14px !important;
  z-index: 45 !important;
  max-width: 236px !important;
  padding: 6px 8px !important;
  box-shadow: 0 6px 20px rgba(8, 22, 15, 0.22) !important;
}

body:has(.md-drawer-backdrop) #md-access-bar {
  opacity: 0 !important;
  pointer-events: none !important;
}

.workspace .overlay.md-drawer-backdrop {
  z-index: 120 !important;
}

/* Botón "¿Olvidaste tu contraseña?" en el login: fondo claro y texto verde nítido */
#md-access form button.md-forgot-btn,
#md-access button.textbutton.md-forgot-btn {
  background: #f4f7f5 !important;
  color: #145338 !important;
  border: 1px solid #c7d6ce !important;
  border-radius: 10px !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  width: auto !important;
  display: inline-block !important;
  margin: 4px auto 0 !important;
  box-shadow: none !important;
}

#md-access form button.md-forgot-btn:hover,
#md-access button.textbutton.md-forgot-btn:hover {
  background: #e6f2eb !important;
  border-color: #145338 !important;
}

/* Separar el enlace "Administrar" en .demobar del botón flotante verde de WhatsApp */
#root .demobar {
  justify-content: flex-start !important;
  padding: 10px 200px 10px 22px !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

#root .demobar button {
  padding: 6px 14px !important;
  border-radius: 999px !important;
  background: #f2f6f3 !important;
  border: 1px solid #d2dfd7 !important;
  color: #145338 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  font-size: 12.5px !important;
}

#root .demobar button:hover {
  background: #145338 !important;
  color: #ffffff !important;
  border-color: #145338 !important;
}

@media (max-width: 760px) {
  #root .demobar {
    padding: 10px 84px 10px 16px !important;
  }
  #md-access-bar {
    bottom: 72px !important;
    left: 10px !important;
  }
}

@media (max-width: 960px) {
  .workspace .md-em-grid,
  .workspace .md-extras-mode-grid,
  .workspace .md-pd-grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* 11. Responsive Tablet y Móvil */
@media (max-width: 1080px) {
  .workspace .md-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .workspace .md-analytics-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .workspace .worktop {
    padding: 10px 14px !important;
  }
  .workspace .workbody {
    padding: 14px 12px 92px !important;
  }
  .workspace .md-ops-title {
    font-size: 21px !important;
  }
  .workspace .md-kpi-grid {
    gap: 10px !important;
  }
  .workspace .md-kpi-card {
    padding: 13px 14px !important;
  }
  .workspace .md-kpi-num {
    font-size: 24px !important;
  }
  .workspace .modal.md-drawer-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 92vh !important;
    margin-top: auto !important;
    border-radius: 22px 22px 0 0 !important;
    padding: 18px 16px 32px !important;
  }
  .workspace .md-admin-mobile-nav {
    background: #0f2419 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -6px 20px rgba(8, 22, 15, 0.22) !important;
  }
  .workspace .md-admin-mobile-nav button {
    color: #9eb9aa !important;
  }
  .workspace .md-admin-mobile-nav button.active {
    color: #6ee7b7 !important;
  }
}
