/* =============================================================================
   3D THINGMAKER - CSS GLOBAL MAESTRO (VERCEL STANDALONE + TIENDA ONLINE + CMS)
   ============================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@600;700;800&display=swap');

:root {
  --axis-z: #C82B7B;        /* Magenta Eje Z / SLA */
  --axis-x: #F37023;        /* Naranja Eje X / Láser */
  --axis-y: #00A3E0;        /* Cian Eje Y / Cricut */
  --axis-yellow: #FBB03B;   /* Ambar / FDM */
  --grad-logo: linear-gradient(135deg, var(--axis-z) 0%, var(--axis-x) 50%, var(--axis-y) 100%);
  --radius-panel: 18px;
  --radius-btn: 999px;
  
  /* Tokens por defecto (Dark Mode / Obsidian Cyber) */
  --bg-dark: #080b0e;
  --bg-wrapper: rgba(8, 11, 14, 0.78);
  --bg-header: rgba(8, 11, 14, 0.92);
  --bg-card: rgba(17, 22, 29, 0.65);
  --bg-card-hover: rgba(24, 32, 44, 0.85);
  --text-main: #f1f5f9;
  --text-muted: #8b9bb4;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --shadow-elevation: 0 14px 34px rgba(0, 0, 0, 0.45);
  --grid-line: rgba(255, 255, 255, 0.035);
  --footer-bg: rgba(10, 14, 20, 0.92);
  --footer-card: rgba(17, 22, 29, 0.65);
}

html[data-theme="light"],
body[data-theme="light"] {
  --bg-dark: #f4f6f9;
  --bg-wrapper: rgba(244, 246, 249, 0.88);
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-card: rgba(255, 255, 255, 0.90);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-subtle: rgba(15, 23, 42, 0.12);
  --shadow-elevation: 0 10px 30px rgba(0, 0, 0, 0.08);
  --grid-line: rgba(0, 0, 0, 0.04);
  --footer-bg: rgba(241, 245, 249, 0.95);
  --footer-card: rgba(255, 255, 255, 0.90);
}

* {
  box-sizing: border-box;
}

html, body {
  background-color: var(--bg-dark) !important;
  color: var(--text-main) !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  overflow-x: hidden;
  margin: 0 !important;
  padding: 0 !important;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.page-wrapper {
  background-color: var(--bg-wrapper) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  min-height: 100vh !important;
  position: relative !important;
  z-index: 2 !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: background-color 0.35s ease;
}

/* NAVBAR HEADER */
header.navbar {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  border-top: none !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  background: var(--bg-header) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  z-index: 99999 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-brand img {
  max-height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--axis-y);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tm-ctrl-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none !important;
}
.tm-ctrl-pill:hover {
  transform: translateY(-1px);
  border-color: var(--axis-y);
  color: var(--axis-y);
  box-shadow: 0 4px 14px rgba(0, 163, 224, 0.25);
}

/* Ocultar barra Google Translate */
.goog-te-banner-frame,
.skiptranslate iframe,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}
body {
  top: 0px !important;
}

/* Canvas de Manufactura y Malla 60 FPS */
#tm-global-mesh-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
.tm-global-mesh-grid {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 38px 38px;
  z-index: 0 !important;
  pointer-events: none !important;
}

/* Layout y Botones */
.tm-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn-primary, .btn-tm-primary {
  background: var(--grad-logo) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600 !important;
  border-radius: var(--radius-btn) !important;
  padding: 12px 28px !important;
  box-shadow: 0 6px 20px rgba(243, 112, 35, 0.28) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}
.btn-primary:hover, .btn-tm-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 28px rgba(200, 43, 123, 0.4) !important;
  color: #fff !important;
}

.btn-tm-glass {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-btn);
  padding: 12px 26px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: 0.3s ease;
}
.btn-tm-glass:hover {
  background: var(--bg-card-hover);
  border-color: var(--axis-y);
  color: var(--axis-y);
}

.tm-hero {
  padding: 60px 0 50px;
}
.tm-title-gradient {
  background: var(--grad-logo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  line-height: 1.12;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
}

.axis-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.tm-glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  padding: 28px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-elevation);
}
.tm-glass-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--c-accent, var(--grad-logo));
}
.tm-glass-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: var(--shadow-elevation) !important;
  background: var(--bg-card-hover) !important;
}

/* Cotizador Interactivo */
.cotizador-wrap {
  background: var(--bg-card) !important;
  backdrop-filter: blur(14px) !important;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  padding: 30px;
  box-shadow: var(--shadow-elevation);
}
.service-toggle-btn {
  background: var(--bg-card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.service-toggle-btn.active {
  background: rgba(0, 163, 224, 0.16);
  border-color: var(--axis-y);
  color: var(--text-main);
}
.service-toggle-btn.active.axis-z {
  background: rgba(200, 43, 123, 0.18);
  border-color: var(--axis-z);
}
.service-toggle-btn.active.axis-x {
  background: rgba(243, 112, 35, 0.18);
  border-color: var(--axis-x);
}
.tm-input {
  background: var(--bg-card) !important;
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-main) !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  font-size: 0.95rem !important;
  width: 100%;
}
.calc-summary-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.calc-price-display {
  font-family: 'Space Grotesk', monospace;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--axis-yellow);
}

/* =============================================================================
   TIENDA ONLINE CON SIDEBAR RETRÁCTIL & PIN
   ============================================================================= */
.tm-store-layout {
  display: flex;
  min-height: calc(100vh - 75px);
  position: relative;
}

/* Sidebar */
.tm-sidebar {
  width: 320px;
  background: var(--bg-header);
  border-right: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  padding: 24px 18px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
  z-index: 100;
}

/* Backdrop Overlay y Drawer Móvil */
.tm-sidebar-backdrop {
  display: none;
}

.tm-sidebar-close-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.tm-sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--axis-x);
}

@media (max-width: 991px) {
  .tm-sidebar {
    position: fixed;
    top: 70px;
    bottom: 0;
    left: -330px;
    max-width: 85vw;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.7);
    z-index: 1000;
  }
  .tm-sidebar.is-open {
    left: 0;
  }
  .tm-sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 11, 14, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 990;
  }
  .tm-sidebar-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
  }
  .tm-sidebar-close-btn {
    display: flex;
  }
  .tm-desktop-only {
    display: none !important;
  }
}

.tm-sidebar.is-pinned {
  box-shadow: 2px 0 15px rgba(0, 163, 224, 0.15);
  border-right-color: var(--axis-y);
}

.tm-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.tm-pin-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.tm-pin-btn.active, .tm-pin-btn:hover {
  background: var(--axis-y);
  color: #fff;
  border-color: var(--axis-y);
}

.tm-sidebar-search {
  position: relative;
  margin-bottom: 22px;
}
.tm-sidebar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.tm-sidebar-search input {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 9px 14px 9px 34px;
  color: var(--text-main);
  font-size: 0.88rem;
}

.tm-tree-section {
  margin-bottom: 24px;
}
.tm-tree-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--axis-yellow);
  letter-spacing: 1px;
  margin-bottom: 10px;
  cursor: pointer;
}
.tm-tree-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tm-tree-cat-item {
  margin-bottom: 8px;
}
.tm-tree-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  user-select: none;
}
.tm-tree-cat-link:hover,
.tm-tree-cat-item.is-expanded > .tm-tree-cat-link {
  background: rgba(255, 255, 255, 0.06);
  color: var(--axis-y);
}
.tm-tree-cat-link small {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-right: 6px;
}
.tm-cat-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  display: inline-block;
}
.tm-tree-cat-item.is-expanded > .tm-tree-cat-link .tm-cat-arrow {
  transform: rotate(90deg);
  color: var(--axis-yellow);
}

/* Acordeón para subcategorías colapsadas por defecto */
.tm-tree-sub-list {
  list-style: none;
  padding-left: 14px;
  margin: 0;
  border-left: 2px solid var(--border-subtle);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin 0.25s ease;
}
.tm-tree-cat-item.is-expanded > .tm-tree-sub-list {
  max-height: 600px;
  opacity: 1;
  margin: 4px 0 10px;
}
.tm-tree-sub-list li a {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.tm-tree-sub-list li a:hover {
  color: var(--axis-y);
  background: rgba(0, 163, 224, 0.08);
}

/* Área de Productos de la Tienda */
.tm-store-main {
  flex: 1;
  padding: 30px 35px;
  overflow-y: auto;
}
.tm-store-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
}

.tm-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tm-product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow-elevation);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.tm-product-card:hover {
  transform: translateY(-8px);
  border-color: var(--axis-y);
  box-shadow: 0 18px 36px rgba(0, 163, 224, 0.2);
}

.tm-prod-thumb-wrap {
  height: 220px;
  width: 100%;
  position: relative;
  background: rgba(0,0,0,0.3);
  overflow: hidden;
}
.tm-prod-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.tm-product-card:hover .tm-prod-thumb {
  transform: scale(1.06);
}
.tm-photo-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.tm-sec-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(8, 11, 14, 0.85);
  border: 1px solid;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
}

/* =============================================================================
   NIVELES JERÁRQUICOS DE LA TIENDA (NIVEL 1, NIVEL 2, NIVEL 3)
   ============================================================================= */
.tm-levels-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.tm-level-section {
  position: relative;
  background: rgba(14, 20, 27, 0.45);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 26px 24px;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s ease;
}

.tm-level-section:hover {
  border-color: rgba(0, 163, 224, 0.35);
}

.tm-level-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.tm-level-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tm-level-badge {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tm-level-badge.level-1 {
  background: rgba(255, 184, 0, 0.15);
  color: var(--axis-yellow);
  border: 1px solid rgba(255, 184, 0, 0.4);
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.15);
}

.tm-level-badge.level-2 {
  background: rgba(239, 68, 68, 0.15);
  color: var(--axis-x);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.tm-level-badge.level-3 {
  background: rgba(139, 92, 246, 0.15);
  color: var(--axis-z);
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

.tm-level-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tm-level-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

.tm-level-counter {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-family: 'Space Grotesk', monospace;
}

/* Tarjeta especial para Campañas Festivas / Temporada */
.tm-season-card {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.06), rgba(8, 11, 14, 0.85));
  border: 1px solid rgba(255, 184, 0, 0.35);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow-elevation);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.tm-season-card:hover {
  transform: translateY(-8px);
  border-color: var(--axis-yellow);
  box-shadow: 0 18px 36px rgba(255, 184, 0, 0.22);
}

.tm-season-card-thumb-wrap {
  height: 220px;
  width: 100%;
  position: relative;
  background: rgba(0,0,0,0.4);
  overflow: hidden;
}

.tm-season-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tm-season-card:hover .tm-season-card-thumb {
  transform: scale(1.06);
}

/* Botones de Filtro Activos */
.tm-filter-pill {
  transition: all 0.25s ease;
  cursor: pointer;
}

.tm-filter-pill.active {
  background: rgba(0, 163, 224, 0.2) !important;
  border-color: var(--axis-y) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(0, 163, 224, 0.35);
}

.tm-filter-pill.active.pill-temporada {
  background: rgba(255, 184, 0, 0.2) !important;
  border-color: var(--axis-yellow) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(255, 184, 0, 0.35);
}

.tm-filter-pill.active.pill-servicios {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: var(--axis-x) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}

.tm-filter-pill.active.pill-productos {
  background: rgba(139, 92, 246, 0.2) !important;
  border-color: var(--axis-z) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}

/* =============================================================================
   MODAL DE DETALLE CON CARRUSEL DE 1 A 5 FOTOGRAFÍAS & CMS MODALS
   ============================================================================= */
.tm-modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 999999 !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  padding: 30px 20px !important;
  margin: 0 !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

/* Envoltorio exterior relativo para posicionar botón flotante de cierre fuera del contenedor */
.tm-modal-wrapper {
  position: relative !important;
  width: 100% !important;
  max-width: 1020px;
  margin: auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Botón flotante emergente circular externo (ubicado en el borde superior fuera del contenedor) */
.tm-modal-floating-close {
  position: absolute !important;
  top: -18px !important;
  right: -18px !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.7), 0 0 14px rgba(0, 0, 0, 0.8) !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2147483647 !important;
  pointer-events: auto !important;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  outline: none !important;
}

.tm-modal-floating-close:hover {
  background: #ef4444 !important;
  transform: scale(1.15) rotate(90deg) !important;
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.75) !important;
}

/* Contenedor principal del modal */
.tm-modal-card {
  background: var(--bg-card-hover) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 24px !important;
  width: 100% !important;
  height: 85vh !important;
  max-height: 85vh !important;
  overflow: hidden !important;
  position: relative !important;
  padding: 30px !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Modal específico para CMS Studio con scroll vertical completo y elegante */
.tm-cms-modal-card {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: block !important;
}

.tm-cms-modal-card::-webkit-scrollbar {
  width: 8px;
}
.tm-cms-modal-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}
.tm-cms-modal-card::-webkit-scrollbar-thumb {
  background: var(--axis-z);
  border-radius: 8px;
}

/* Distribución en 2 Columnas: Izquierda Fija / Derecha Scrollable */
.tm-modal-split-grid {
  display: grid !important;
  grid-template-columns: 1fr 1.15fr !important;
  gap: 32px !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  align-items: stretch !important;
}

@media (max-width: 900px) {
  .tm-modal-backdrop {
    padding: 48px 14px 20px !important;
    align-items: flex-start !important;
  }
  .tm-modal-wrapper {
    margin-top: 8px !important;
  }
  .tm-modal-split-grid {
    grid-template-columns: 1fr !important;
    max-height: none !important;
    overflow-y: auto !important;
    gap: 16px !important;
  }
  .tm-modal-card {
    height: 88vh !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    padding: 18px 14px !important;
    border-radius: 20px !important;
  }
  .tm-modal-floating-close {
    top: -14px !important;
    right: -8px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 24px !important;
  }
  .tm-carousel-viewer {
    height: 270px !important;
    border-radius: 14px !important;
  }
  .tm-thumbs-track {
    margin-top: 8px !important;
    gap: 8px !important;
    padding-bottom: 4px !important;
  }
  .tm-thumb-img {
    width: 52px !important;
    height: 52px !important;
    border-radius: 8px !important;
  }
  #tm-modal-title {
    font-size: 1.22rem !important;
    margin: 4px 0 8px !important;
    line-height: 1.3 !important;
  }
  #tm-modal-desc {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
  }
  #tm-modal-customizer-box {
    padding: 12px 14px !important;
    margin-bottom: 14px !important;
    border-radius: 12px !important;
  }
  #tm-modal-customizer-box p {
    font-size: 0.78rem !important;
    margin-bottom: 8px !important;
  }
  #tm-modal-customizer-btn {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  .tm-carousel-viewer {
    height: 250px !important;
  }
  .tm-thumb-img {
    width: 48px !important;
    height: 48px !important;
  }
}

/* Columna Izquierda: Galería y Carrusel (Fija / Sticky) */
.tm-modal-col-media {
  display: flex !important;
  flex-direction: column !important;
  position: sticky !important;
  top: 0 !important;
}

/* Columna Derecha: Contenido con Scroll Independiente */
.tm-modal-col-content {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

.tm-modal-content-scroll {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overscroll-behavior: contain !important;
}

/* Estilo de barra de scroll elegante para la columna de contenido */
.tm-modal-content-scroll::-webkit-scrollbar {
  width: 6px;
}
.tm-modal-content-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}
.tm-modal-content-scroll::-webkit-scrollbar-thumb {
  background: var(--axis-y);
  border-radius: 8px;
}

.tm-carousel-viewer {
  width: 100%;
  height: 380px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-modal-big-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tm-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: 1px solid var(--border-subtle);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.tm-carousel-arrow.prev { left: 12px; }
.tm-carousel-arrow.next { right: 12px; }
.tm-carousel-arrow:hover { background: var(--axis-y); }

.tm-thumbs-track {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.tm-thumb-img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.2s ease;
}
.tm-thumb-img.active, .tm-thumb-img:hover {
  border-color: var(--axis-y);
  opacity: 1;
  transform: scale(1.05);
}

/* Video Opcional del Producto en Ventana Emergente */
.tm-modal-video-container {
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.tm-modal-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tm-modal-video-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--axis-y);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tm-modal-video-frame-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.tm-modal-video-frame-wrap iframe,
.tm-modal-video-frame-wrap video {
  width: 100%;
  height: 220px;
  border: none;
  display: block;
  object-fit: contain;
}

.tm-subcat-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
}

.tm-captcha-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  margin-top: 15px;
}

/* =============================================================================
   CMS STUDIO PRIVADO
   ============================================================================= */
.tm-cms-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: var(--bg-dark);
}

.tm-cms-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.tm-cms-table th {
  background: rgba(0,0,0,0.3);
  padding: 14px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
}
.tm-cms-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.tm-table-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.tm-form-label {
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

/* FOOTER GLASS */
footer.footer {
  background: var(--footer-bg) !important;
  border-top: 1px solid var(--border-subtle) !important;
  color: var(--text-muted) !important;
  padding: 40px 24px 30px !important;
  position: relative !important;
  z-index: 2 !important;
}
footer.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-logo);
  opacity: 0.8;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}
.footer-column {
  background: var(--footer-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-elevation) !important;
  padding: 28px 24px !important;
}
/* =============================================================================
   MÓDULO DE PRODUCTOS EXCLUSIVOS POR TEMPORADA & COMBOS CON CUENTA REGRESIVA
   ============================================================================= */
.tm-seasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 10px;
}

.tm-season-card {
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: var(--radius-panel);
}

.tm-season-card:hover {
  transform: translateY(-6px);
  border-color: var(--axis-yellow);
  box-shadow: 0 16px 40px -5px rgba(251, 176, 59, 0.25);
}

.tm-season-card:hover .tm-season-flyer-wrap img {
  transform: scale(1.05);
}

.tm-season-discount-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tm-countdown-container {
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.tm-countdown-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tm-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tm-countdown-unit-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
}

.tm-countdown-number {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--axis-yellow);
  line-height: 1;
}

.tm-countdown-text {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 3px;
}

.tm-countdown-pending-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.tm-season-logistics-note {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--axis-yellow);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.83rem;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.5;
}

.tm-season-logistics-note strong {
  color: var(--axis-yellow);
}
