/* ==========================================================================
   PERU SOLUTION — Sistema de Diseño 1:1 con eMarket.pe (Flexbox + CSS Grid)
   Misma tipografía Ember, mismas proporciones, mismas tarjetas y mismos
   breakpoints, diferenciado únicamente por la paleta corporativa PERU SOLUTION.
   ========================================================================== */

:root {
  /* Paleta Corporativa PERU SOLUTION */
  --ps-bg-light: #cdd5e0;          /* Equivalente al #CCCCCC de eMarket en tono Slate-Azulado */
  --ps-bg-dark: #0b1120;           /* Equivalente al #111111 de eMarket en tono Navy profundo */
  --ps-panel-dark: #132238;        /* Equivalente al #262626 (.custom-theme-two) de eMarket */
  --ps-panel-darker: #0f1b2d;      /* Equivalente al #1A1A1A de eMarket */
  --ps-modal-light: #e2e8f0;       /* Equivalente al #E4E4E4 (.custom-theme-three) de eMarket */
  --ps-modal-dark: #16243a;
  --ps-card-light: #ffffff;        /* Equivalente al #FFFFFF (.custom-theme-four) de eMarket */
  --ps-card-dark: #152238;         /* Equivalente al #222222 (.custom-theme-four dark) de eMarket */
  --ps-btn-primary: #0f2942;       /* Botón Compra principal (diferenciado del #262626 de eMarket) */
  --ps-btn-hover: #0284c7;         /* Hover Cyan Corporativo */
  --ps-accent: #0284c7;            /* Acento principal Sky/Cyan */
  --ps-accent-emerald: #059669;    /* Acento secundario Stock/Carrito */
  --ps-discount: #dc2626;          /* Círculo de oferta */
}

/* ==========================================================================
   1. TEMAS DE COLOR (.custom-theme-*) EXACTOS A EMARKET.PE CON COLORES PS
   ========================================================================== */

body {
  background-color: var(--ps-bg-light);
  color: #171717;
  font-family: Ember, Helvetica, Arial, sans-serif;
}

html.dark body,
body:is(.dark *) {
  background-color: var(--ps-bg-dark);
  color: #ffffff;
}

/* Theme One: Fondo general, Header fijo y Footer wrapper */
.custom-theme-one {
  color: #171717;
  background-color: var(--ps-bg-light);
}
html.dark .custom-theme-one,
.custom-theme-one:is(.dark *) {
  color: #ffffff;
  background-color: var(--ps-bg-dark);
}

.custom-theme-one .custom-theme-search {
  color: #171717;
  background-color: #ffffff;
}
html.dark .custom-theme-one .custom-theme-search,
.custom-theme-one .custom-theme-search:is(.dark *) {
  color: #d4d4d4;
  background-color: #1e293b;
}

/* Theme Two: Caja derecha de Sliders y Bloque de 5 columnas del Footer */
.custom-theme-two {
  color: #ffffff;
  background-color: var(--ps-panel-dark);
}
html.dark .custom-theme-two,
.custom-theme-two:is(.dark *) {
  color: #ffffff;
  background-color: var(--ps-panel-darker);
}
.custom-theme-two .custom-theme-secondary {
  color: #cbd5e1;
}
html.dark .custom-theme-two .custom-theme-secondary,
.custom-theme-two .custom-theme-secondary:is(.dark *) {
  color: #94a3b8;
}

/* Theme Three: Modales flotantes (Buscador Ctrl+K y Mega-menús) */
.custom-theme-three {
  color: #0f172a;
  background-color: var(--ps-modal-light);
}
html.dark .custom-theme-three,
.custom-theme-three:is(.dark *) {
  color: #ffffff;
  background-color: var(--ps-modal-dark);
}
.custom-theme-three .custom-theme-secondary {
  color: #475569;
}
html.dark .custom-theme-three .custom-theme-secondary,
.custom-theme-three .custom-theme-secondary:is(.dark *) {
  color: #94a3b8;
}
.custom-theme-three .custom-theme-footer {
  color: #0f172a;
  background-color: #cbd5e1;
}
html.dark .custom-theme-three .custom-theme-footer,
.custom-theme-three .custom-theme-footer:is(.dark *) {
  color: #ffffff;
  background-color: #0f172a;
}

/* Theme Four: Tarjetas de Productos, Categorías, Servicios y Ficha Técnica */
.custom-theme-four {
  color: #171717;
  background-color: var(--ps-card-light);
}
html.dark .custom-theme-four,
.custom-theme-four:is(.dark *) {
  color: #ffffff;
  background-color: var(--ps-card-dark);
}
.custom-theme-four .custom-theme-secondary {
  color: #4b5563;
}
html.dark .custom-theme-four .custom-theme-secondary,
.custom-theme-four .custom-theme-secondary:is(.dark *) {
  color: #9ca3af;
}
.custom-theme-four .custom-theme-light {
  color: #9ca3af;
}
html.dark .custom-theme-four .custom-theme-light,
.custom-theme-four .custom-theme-light:is(.dark *) {
  color: #6b7280;
}
.custom-theme-four .custom-theme-stripe {
  background-color: #f1f5f9;
}
html.dark .custom-theme-four .custom-theme-stripe,
.custom-theme-four .custom-theme-stripe:is(.dark *) {
  background-color: #1e293b;
}
.custom-theme-four .custom-theme-border {
  border-color: #ffffff;
}
html.dark .custom-theme-four .custom-theme-border,
.custom-theme-four .custom-theme-border:is(.dark *) {
  border-color: var(--ps-card-dark);
}

/* Menú Lateral Izquierdo y Carrito Lateral Derecho */
.custom-theme-menu {
  color: #0f172a;
  background-color: #ffffff;
}
html.dark .custom-theme-menu,
.custom-theme-menu:is(.dark *) {
  color: #ffffff;
  background-color: #132238;
}
.custom-theme-cart {
  color: #0f172a;
  background-color: var(--ps-modal-light);
}
html.dark .custom-theme-cart,
.custom-theme-cart:is(.dark *) {
  color: #ffffff;
  background-color: #0d1829;
}
.custom-theme-cart .custom-theme-widget {
  background-color: #ffffff;
}
html.dark .custom-theme-cart .custom-theme-widget,
.custom-theme-cart .custom-theme-widget:is(.dark *) {
  background-color: #152238;
}

/* Columnas de Detalle de Producto */
.custom-content-product {
  background-color: #e2e8f0;
}
html.dark .custom-content-product,
.custom-content-product:is(.dark *) {
  background-color: #0f1b2d;
}
.custom-content-menu {
  background-color: #dbe3ee;
}
html.dark .custom-content-menu,
.custom-content-menu:is(.dark *) {
  background-color: #132238;
}

/* Botones de Acción ("COMPRA" y botones primarios) */
.grid\:prod\:vertical\:item\:click,
.grid\:prod\:horizontal\:click,
.blade\:element\:button\:standard\:primary {
  background-color: var(--ps-btn-primary) !important;
  color: #ffffff !important;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
html.dark .grid\:prod\:vertical\:item\:click,
html.dark .grid\:prod\:horizontal\:click,
html.dark .blade\:element\:button\:standard\:primary {
  background-color: #0369a1 !important;
}
.grid\:prod\:vertical\:item:hover .grid\:prod\:vertical\:item\:click,
.grid\:prod\:horizontal\:item:hover .grid\:prod\:horizontal\:click,
.blade\:element\:button\:standard\:primary:hover {
  background-color: var(--ps-btn-hover) !important;
}

/* Píldoras del menú superior en modo oscuro */
html.dark #head\:menu\:navs a > span {
  background-color: #1e293b !important;
  color: #f8fafc;
}
#head\:menu\:navs a:hover > span,
#head\:menu\:navs a.active > span {
  background-color: var(--ps-btn-primary) !important;
  color: #ffffff !important;
}
html.dark #head\:menu\:navs a:hover > span,
html.dark #head\:menu\:navs a.active > span {
  background-color: var(--ps-btn-hover) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   2. SISTEMA EXPLÍCITO DE FLEXBOX Y CSS GRID (GARANTÍA 100% RESPONSIVE)
   Asegura que absolutamente todas las secciones de Home, Catálogo, Producto,
   Header, Carrito, Modales y Footer funcionen con Flexbox y CSS Grid puros.
   ========================================================================== */

/* Header Principal Flexbox y Contenedor Maestro Alineado (1280px = max-w-screen-xl) */
#page\:head\:wrap,
#cont\:wrap,
.custom-content,
#page\:foot\:menu {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

#page\:head\:wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#head\:menu\:navs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
}

#head\:menu\:navs > div {
  display: flex;
  flex: 1 1 0%;
  align-items: center;
  height: 100%;
}

/* Hero Slider Principal y Sliders Simples (CSS Grid 5 Columnas en Desktop sin descuadrarse nunca) */
.\@\:script\:slider\:main,
.\@\:script\:slider\:simple,
.\@\:script\:slider\:search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  border-radius: 0.5rem;
  overflow: hidden;
  align-items: stretch;
}

.\@\:script\:slider\:main\:media,
.\@\:script\:slider\:simple\:media,
.\@\:script\:slider\:search\:media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: #0f172a;
}

.\@\:script\:slider\:main\:image,
.\@\:script\:slider\:simple\:image,
.\@\:script\:slider\:search\:image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.\@\:script\:slider\:main\:texts,
.\@\:script\:slider\:simple\:texts,
.\@\:script\:slider\:search\:texts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 0.5rem;
  box-sizing: border-box;
}

@media (min-width: 896px) {
  .\@\:script\:slider\:main,
  .\@\:script\:slider\:simple,
  .\@\:script\:slider\:search {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 18rem;
  }
  .\@\:script\:slider\:main\:media,
  .\@\:script\:slider\:simple\:media,
  .\@\:script\:slider\:search\:media {
    grid-column: span 3 / span 3;
    height: 100%;
  }
  .\@\:script\:slider\:main\:texts,
  .\@\:script\:slider\:simple\:texts,
  .\@\:script\:slider\:search\:texts {
    grid-column: span 2 / span 2;
    height: 100%;
  }
}

/* Sección Home Split: Categorías (2 cols) + Tarjetas Visuales (3 cols) */
.page\:home\:cate\:main,
.page\:home\:blog\:main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 1280px) {
  .page\:home\:cate\:main,
  .page\:home\:blog\:main {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }
  .page\:home\:cate\:menu,
  .page\:home\:blog\:menu {
    display: grid !important;
    grid-column: span 2 / span 2;
  }
  .page\:home\:cate\:list,
  .page\:home\:blog\:list {
    grid-column: span 3 / span 3;
  }
}

.page\:home\:cate\:body,
.page\:home\:blog\:body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  height: 100%;
}

@media (min-width: 480px) {
  .page\:home\:cate\:body,
  .page\:home\:blog\:body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Snippets Circulares de Categorías (Flexbox) */
.partials\:menu\:snippet {
  display: flex;
  align-items: center;
}
.partials\:menu\:snippet\:icon {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.partials\:menu\:snippet\:icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9999px;
}

/* Grid Derecha de 6 Tarjetas Visuales en Home (.page:home:cate:grid) */
.page\:home\:cate\:grid,
.page\:home\:blog\:list\:body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  height: 100%;
}

@media (min-width: 480px) {
  .page\:home\:cate\:grid,
  .page\:home\:blog\:list\:body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 712px) {
  .page\:home\:cate\:grid,
  .page\:home\:blog\:list\:body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

.partial\:target\:home {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
}
.partial\:target\:home\:head {
  flex: 1 1 0%;
  position: relative;
  min-height: 140px;
  background-color: #ffffff;
}
.partial\:target\:home\:head img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fila de 5 Tarjetas de Servicio (.page:home:card:list) */
.page\:home\:card\:list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 480px) {
  .page\:home\:card\:list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 712px) {
  .page\:home\:card\:list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}
@media (min-width: 1280px) {
  .page\:home\:card\:list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Fila de 5 Categorías Cuadradas (.partials:category:square) y 5 Productos Verticales (.page:home:cate:prod) */
.page\:home\:cate\:list.grid,
.page\:home\:cate\:prod {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 480px) {
  .page\:home\:cate\:list.grid,
  .page\:home\:cate\:prod {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 712px) {
  .page\:home\:cate\:list.grid,
  .page\:home\:cate\:prod {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}
@media (min-width: 1280px) {
  .page\:home\:cate\:list.grid,
  .page\:home\:cate\:prod {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.partials\:category\:square {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  border-radius: 0.5rem;
  overflow: hidden;
}
.partials\:category\:square\:image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.25rem 1.25rem 3.25rem 1.25rem;
  background-color: #ffffff;
  transition: transform 0.25s ease;
}
.partials\:category\:square:hover .partials\:category\:square\:image {
  transform: scale(1.05);
}

/* ==========================================================================
   3. TARJETAS DE PRODUCTO VERTICALES Y HORIZONTALES (FLEXBOX PURO)
   ========================================================================== */

/* Tarjeta Vertical (.grid:prod:vertical:item) */
.grid\:prod\:vertical\:item {
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}
.grid\:prod\:vertical\:item\:cont {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
}
.grid\:prod\:vertical\:item\:image {
  margin-bottom: 1rem;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border-radius: 0.5rem;
  overflow: hidden;
}
html.dark .grid\:prod\:vertical\:item\:image {
  border-radius: 9999px;
}
.grid\:prod\:vertical\:item\:media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  background-color: #ffffff;
}
.grid\:prod\:vertical\:item\:title {
  flex: 1 1 0%;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grid\:prod\:vertical\:item\:price {
  margin-bottom: 1.25rem;
  text-align: center;
  font-weight: 700;
  line-height: 1;
}

/* Tarjeta Horizontal (.grid:prod:horizontal:item) */
.grid\:prod\:horizontal\:item {
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}
.grid\:prod\:horizontal\:cont {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem;
  height: 100%;
  align-items: center;
}
.grid\:prod\:horizontal\:image {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 4rem;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  border-radius: 0.5rem;
}
@media (min-width: 480px) {
  .grid\:prod\:horizontal\:image,
  .grid\:prod\:horizontal\:price {
    width: 5rem;
  }
}
@media (min-width: 1440px) {
  .grid\:prod\:horizontal\:image,
  .grid\:prod\:horizontal\:price {
    width: 6rem;
  }
}
.grid\:prod\:horizontal\:media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
  background-color: #ffffff;
  border-radius: 0.5rem;
}
html.dark .grid\:prod\:horizontal\:media {
  border-radius: 9999px;
}
.grid\:prod\:horizontal\:title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 0%;
  padding-left: 1rem;
  padding-right: 0.5rem;
  overflow: hidden;
}
.grid\:prod\:horizontal\:break {
  flex-basis: 100%;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}
.grid\:prod\:horizontal\:price {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 4rem;
}
.grid\:prod\:horizontal\:shops {
  display: flex;
  flex: 1 1 0%;
  align-items: center;
  justify-content: center;
  padding-left: 1rem;
}

/* ==========================================================================
   4. CATÁLOGO Y PÍLDORAS DE FILTRO (CSS GRID)
   ========================================================================== */

/* Barra de 4/5 Píldoras de Filtro en Catálogo */
#\@\:catalog\:products\:data > div,
.ps-catalog-filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  width: 100%;
}
@media (min-width: 374px) {
  #\@\:catalog\:products\:data > div,
  .ps-catalog-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  #\@\:catalog\:products\:data > div,
  .ps-catalog-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
}
@media (min-width: 1280px) {
  #\@\:catalog\:products\:data > div,
  .ps-catalog-filters-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Grilla de Productos del Catálogo (Vertical 5 cols / Horizontal 3 cols) */
#\@\:catalog\:products\:view.ps-view-vertical {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  #\@\:catalog\:products\:view.ps-view-vertical {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  #\@\:catalog\:products\:view.ps-view-vertical {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  #\@\:catalog\:products\:view.ps-view-vertical {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

#\@\:catalog\:products\:view.ps-view-horizontal {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 712px) {
  #\@\:catalog\:products\:view.ps-view-horizontal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  #\@\:catalog\:products\:view.ps-view-horizontal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   5. PÁGINA DE DETALLE DE PRODUCTO (FLEXBOX & CSS GRID - NUNCA SE DESCUADRA)
   ========================================================================== */

.ps-icon-xs {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.ps-icon-sm {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* 5.1 Header Oscuro del Producto */
.ps-product-header {
  background-color: #132238;
  color: #ffffff;
  border-radius: 0.5rem 0.5rem 0 0;
  overflow: hidden;
  width: 100%;
  margin-bottom: 0;
}
.dark .ps-product-header {
  background-color: #0b1526;
}
.ps-product-header-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  min-height: 160px;
}
.ps-product-header-text {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 768px) {
  .ps-product-header-text {
    padding: 2rem 2.5rem;
  }
}
.ps-product-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
  text-decoration: none;
}
.ps-product-breadcrumb:hover {
  color: #7dd3fc;
}
.ps-product-title {
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.65rem 0;
}
@media (min-width: 640px) {
  .ps-product-title {
    font-size: 1.5rem;
  }
}
@media (min-width: 1280px) {
  .ps-product-title {
    font-size: 1.75rem;
  }
}
.ps-product-subtitle {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ps-product-header-thumb {
  display: none;
}
@media (min-width: 768px) {
  .ps-product-header-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 210px;
    min-width: 210px;
    background-color: #ffffff;
    padding: 1rem;
    flex-shrink: 0;
  }
  .ps-product-header-thumb img {
    width: 100%;
    height: 100%;
    max-width: 170px;
    max-height: 170px;
    object-fit: contain;
    display: block;
  }
}

/* 5.2 Contenedor Principal de 2 Columnas (67% Izquierda / 33% Derecha) */
.ps-product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  .ps-product-layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
  }
  .ps-product-side-col {
    position: -webkit-sticky;
    position: sticky;
    top: 5.75rem;
    align-self: start;
  }
}
.ps-product-main-col,
.ps-product-side-col {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 5.3 Bloque Superior: Galería + Tarjeta Resumen */
.ps-product-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
}
@media (min-width: 768px) {
  .ps-product-top-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: stretch;
  }
}

/* Galería Izquierda (Miniaturas + Imagen Principal 1:1) */
.ps-product-gallery-box {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  min-width: 0;
}
@media (min-width: 560px) {
  .ps-product-gallery-box {
    flex-direction: row;
    align-items: stretch;
  }
}
.ps-product-thumbs-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.ps-product-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  flex-shrink: 0;
}
.ps-thumbs-next-btn {
  display: none;
}
@media (min-width: 560px) {
  .ps-product-thumbs-wrap {
    position: relative;
    width: 60px;
    min-width: 60px;
    align-self: stretch;
  }
  .ps-product-thumbs-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .ps-product-thumbs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .ps-product-thumbs::-webkit-scrollbar {
    display: none;
  }
  .ps-thumbs-next-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 9999px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    transition: border-color 0.15s, color 0.15s;
  }
  .ps-thumbs-next-btn:hover {
    border-color: #0284c7;
    color: #0284c7;
  }
  .dark .ps-thumbs-next-btn {
    background-color: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
  }
}
.ps-thumb-item,
.ps-thumb-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  background-color: #ffffff;
  border: 2px solid #e2e8f0;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
}
@media (min-width: 560px) {
  .ps-thumb-item,
  .ps-thumb-placeholder {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    flex: 0 0 56px;
  }
}
.dark .ps-thumb-placeholder {
  background-color: #1e293b;
  border-color: #334155;
  color: #475569;
}
.ps-thumb-item {
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.ps-thumb-item:hover,
.ps-thumb-item.is-active {
  border-color: #0284c7;
}
.ps-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ps-thumb-placeholder {
  color: #cbd5e1;
  padding: 0.85rem;
}
.ps-thumb-placeholder svg {
  width: 100%;
  height: 100%;
}

/* Lienzo Principal Cuadrado 600x600 WebP */
.ps-product-stage {
  flex: 1 1 auto;
  min-width: 0;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  border-radius: 0.5rem;
  padding: 1.25rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.ps-product-stage-picture {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-product-stage-picture img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}
.ps-product-discount-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: #dc2626;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tarjeta Derecha de Resumen y Compra */
.ps-product-summary-card {
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.ps-summary-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}
.ps-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ps-stock-badge.is-instock {
  color: #16a34a;
}
.dark .ps-stock-badge.is-instock {
  color: #4ade80;
}
.ps-stock-badge.is-order {
  color: #f59e0b;
}

.ps-quick-meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}
.ps-quick-meta-table tr {
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.ps-quick-meta-table tr:last-child {
  border-bottom: none;
}
.ps-quick-meta-table th {
  padding: 0.45rem 0.25rem 0.45rem 0;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.ps-quick-meta-table td {
  padding: 0.45rem 0.25rem;
  text-align: right;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-quick-meta-table td.ps-meta-action {
  width: 1.75rem;
  padding-right: 0;
}
.ps-meta-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.25rem;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.ps-summary-desc p {
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ps-summary-price-box {
  text-align: center;
}
.ps-price-old {
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  opacity: 0.75;
}
.ps-price-main {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
}
.ps-price-usd {
  margin-top: 0.35rem;
  font-size: 0.75rem;
}

.ps-summary-cta {
  margin-top: 0.85rem;
}
.ps-btn-add-cart {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 9999px;
  background-color: #16a34a;
  color: #ffffff;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.ps-btn-add-cart:hover {
  background-color: #15803d;
}

/* 5.4 Tres Tarjetas de Beneficios (#@:shopping:product:card) */
.ps-service-cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  width: 100%;
}
@media (min-width: 768px) {
  .ps-service-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.ps-service-card {
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.ps-service-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}
.ps-service-icon svg {
  width: 100%;
  height: 100%;
}
.ps-service-text {
  min-width: 0;
  flex: 1 1 auto;
}
.ps-service-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.ps-service-text p {
  font-size: 0.75rem;
  line-height: 1.35;
  margin: 0;
}

/* 5.5 Cajas de Contenido (Almacenes, Descripción, Especificaciones) */
.ps-product-box {
  padding: 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 640px) {
  .ps-product-box {
    padding: 1.5rem;
  }
}
.ps-box-heading {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem 0;
}

/* Almacenes */
.ps-warehouse-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.ps-warehouse-header .ps-box-heading {
  margin-bottom: 0;
}
.ps-part-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0284c7;
}
.dark .ps-part-badge {
  color: #38bdf8;
}
.ps-warehouse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .ps-warehouse-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.ps-warehouse-item {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}
.ps-warehouse-item.has-stock {
  border-color: rgba(16, 185, 129, 0.4);
  background-color: rgba(16, 185, 129, 0.06);
}
.ps-warehouse-item.no-stock {
  opacity: 0.6;
}
.ps-warehouse-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0.5rem;
}
.ps-warehouse-qty {
  font-weight: 700;
}
.ps-warehouse-item.has-stock .ps-warehouse-qty {
  color: #059669;
}
.dark .ps-warehouse-item.has-stock .ps-warehouse-qty {
  color: #34d399;
}

/* Descripción SEO */
.ps-product-prose {
  font-size: 0.875rem;
  line-height: 1.65;
}
.ps-product-prose p,
.ps-product-prose ul {
  margin-top: 0;
  margin-bottom: 0.75rem;
}
.ps-product-prose h2,
.ps-product-prose h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem 0;
}
.ps-product-prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}

/* Tabla de Especificaciones Técnicas */
.ps-specs-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.ps-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.ps-specs-table tr:nth-child(even) {
  background-color: rgba(148, 163, 184, 0.12);
}
.ps-specs-table th,
.ps-specs-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.ps-specs-table th {
  width: 38%;
  font-weight: 700;
}

/* Productos Relacionados */
.ps-related-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .ps-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  .ps-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 5.6 Columna Derecha de Servicios y Promociones */
.ps-side-features-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}
@media (min-width: 640px) and (max-width: 1023px) {
  .ps-side-features-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ps-side-feature-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.ps-side-feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 2px solid #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ps-side-feature-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}
.ps-side-feature-body {
  min-width: 0;
  flex: 1 1 auto;
}
.ps-side-feature-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.ps-side-feature-body p {
  font-size: 0.75rem;
  line-height: 1.4;
  margin: 0;
}

.ps-side-promos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
@media (min-width: 560px) and (max-width: 1023px) {
  .ps-side-promos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ps-side-promo-card {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.ps-side-promo-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.ps-side-promo-pic {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #0f172a;
  overflow: hidden;
}
.ps-side-promo-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-side-promo-text {
  padding: 1rem;
  text-align: center;
}
.ps-side-promo-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.ps-side-promo-text p {
  font-size: 0.8125rem;
  line-height: 1.4;
  margin: 0;
}

/* Modales Rápidos de Garantía y SKU */
.ps-product-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgba(15, 23, 42, 0.8);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ps-product-modal-card {
  max-width: 28rem;
  width: 100%;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
}
.ps-modal-close-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

/* ==========================================================================
   6. FOOTER DE 5 COLUMNAS (#page:foot:menu)
   ========================================================================== */

#page\:foot\:menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0.5rem;
}
@media (min-width: 480px) {
  #page\:foot\:menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 712px) {
  #page\:foot\:menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  #page\:foot\:menu {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ==========================================================================
   7. BUSCADOR MODAL (#area:find)
   ========================================================================== */

#area\:find\:body {
  width: 100%;
  max-width: 100%;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}
@media (min-width: 768px) {
  #area\:find\:body {
    width: min(92vw, 54rem) !important;
    max-width: 54rem !important;
  }
}

.ps-search-body {
  padding: 0 0.75rem 0.75rem;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 58vh;
  text-align: left;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .ps-search-body {
    padding: 0 1.25rem 1rem;
  }
}

.ps-search-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  padding-top: 0.75rem;
  padding-bottom: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 720px) {
  .ps-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.ps-search-status {
  grid-column: 1 / -1;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}
.ps-search-status.ps-search-loading {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0284c7;
}
.ps-search-status.ps-search-error {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ef4444;
}

.ps-search-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ps-search-card:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.ps-search-card-thumb {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}
.ps-search-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ps-search-card-info {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ps-search-card-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  font-size: 0.6875rem;
  line-height: 1.2;
}
.ps-search-card-brand {
  font-weight: 700;
  color: #0284c7;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.dark .ps-search-card-brand {
  color: #38bdf8;
}
.ps-search-card-sep {
  color: #94a3b8;
  flex-shrink: 0;
}
.ps-search-card-sku {
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.dark .ps-search-card-sku {
  color: #94a3b8;
}
.ps-search-card-stock {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}
.dark .ps-search-card-stock {
  color: #34d399;
}
.ps-search-card-stock.is-low {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.ps-search-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.ps-search-card-price {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding-left: 0.25rem;
}
.ps-search-card-pen {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0284c7;
  white-space: nowrap;
  line-height: 1.2;
}
.dark .ps-search-card-pen {
  color: #38bdf8;
}
.ps-search-card-usd {
  font-size: 0.6875rem;
  opacity: 0.7;
  white-space: nowrap;
  line-height: 1.2;
  margin-top: 2px;
}

.ps-search-cat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.ps-search-cat-card:hover {
  border-color: #0284c7;
}
.ps-search-cat-thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: #ffffff;
  padding: 4px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.ps-search-cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9999px;
  display: block;
}
.ps-search-cat-info {
  flex: 1 1 0%;
  min-width: 0;
}
.ps-search-cat-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-search-cat-sub {
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   8. CAJA DE CÓDIGOS DE PRODUCTO (CÓDIGO / P/N / MINI)
   ========================================================================== */

.ps-product-codes-box {
  margin-top: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  overflow: hidden;
  background: #ffffff;
}
.dark .ps-product-codes-box {
  border-color: #334155;
  background: #0f172a;
}
.ps-product-codes-top {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.dark .ps-product-codes-top {
  border-bottom-color: #334155;
}
.ps-product-codes-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ps-code-cell {
  padding: 0.625rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.ps-code-cell + .ps-code-cell {
  border-left: 1px solid #e2e8f0;
}
.dark .ps-code-cell + .ps-code-cell {
  border-left-color: #334155;
}
.ps-code-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ps-code-value {
  font-size: 0.875rem;
  font-weight: 800;
  color: #0f172a;
  word-break: break-word;
}
.dark .ps-code-value {
  color: #f8fafc;
}
.ps-code-mini {
  color: #0369a1;
}
.dark .ps-code-mini {
  color: #38bdf8;
}

/* ==========================================================================
   9. HERO PRINCIPAL UNIFICADO EN UNA SOLA PIEZA
   ========================================================================== */

.ps-hero-unified {
  gap: 0 !important;
  border-radius: 0.75rem;
  overflow: hidden;
}
.ps-hero-unified > * {
  border-radius: 0 !important;
}

/* ==========================================================================
   10. CARRITO LATERAL Y SIDEBAR DERECHO (#page:side)
   ========================================================================== */

.ps-cart-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 0.5rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}
.ps-cart-stat span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.15rem;
}
.ps-cart-stat strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.2;
}
.ps-cart-stat-total strong {
  color: #0284c7;
}
.dark .ps-cart-stat-total strong {
  color: #38bdf8;
}

.ps-cart-empty {
  padding: 0.75rem 0.5rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0.75;
}

.ps-cart-filled {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}
.ps-cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}
.ps-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  min-width: 0;
  box-sizing: border-box;
}
.ps-cart-item-thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 0.45rem;
  background: #ffffff;
  object-fit: contain;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.ps-cart-item-info {
  flex: 1 1 0%;
  min-width: 0;
}
.ps-cart-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}
.ps-cart-item-name {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.ps-cart-item-name:hover {
  color: #0284c7;
}
.ps-cart-item-del {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.ps-cart-item-del:hover {
  color: #ef4444;
}
.ps-cart-item-sku {
  font-size: 0.6875rem;
  opacity: 0.7;
  margin-top: 2px;
}
.ps-cart-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
  gap: 0.5rem;
}
.ps-cart-item-price {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #0284c7;
}
.dark .ps-cart-item-price {
  color: #38bdf8;
}
.ps-cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
  padding: 1px 4px;
}
.ps-cart-qty button {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.18);
  color: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ps-cart-qty button:hover {
  background: #0284c7;
  color: #ffffff;
}
.ps-cart-qty span {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.ps-cart-breakdown {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.3);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}
.ps-cart-breakdown > div {
  display: flex;
  gap: 0.35rem;
}

.ps-cart-quick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.ps-cart-link-continue {
  color: #0284c7;
  text-decoration: none;
}
.ps-cart-link-continue:hover {
  text-decoration: underline;
}
.ps-cart-link-clear {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}
.ps-cart-link-clear:hover {
  text-decoration: underline;
}

.ps-side-cats {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.ps-side-cat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.625rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color .15s ease, transform .15s ease;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.ps-side-cat-card:hover {
  border-color: #0284c7;
  transform: translateY(-1px);
}
.ps-side-cat-thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 9999px;
  padding: 4px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-sizing: border-box;
}
.ps-side-cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9999px;
  display: block;
}
.ps-side-cat-info {
  flex: 1 1 0%;
  min-width: 0;
}
.ps-side-cat-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.ps-side-cat-desc {
  font-size: 0.72rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ps-side-foot {
  padding: 0.9rem 1.25rem 1.1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.ps-side-cta-wrap {
  width: 100%;
}
.ps-side-cta-btn {
  display: flex;
  width: 100%;
  height: 3.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #0f172a;
  color: #ffffff !important;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background .15s ease;
}
.ps-side-cta-btn:hover {
  background: #1e293b;
}
.ps-side-cta-primary {
  background: #0284c7;
}
.ps-side-cta-primary:hover {
  background: #0369a1;
}
