.litestore-products-grid {
  gap: 20px;
}

/* GLOBALS */

.litestore-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 50px;
  padding: 0 22px;

  border-radius: 12px;

  text-decoration: none;
  line-height: 1;

  font-size: 14px;
  font-weight: 500;

  transition: all 0.2s ease;
}

/* PRIMARY BASE */
.litestore-button--primary,
.woocommerce .litestore-button--primary,
.woocommerce button.litestore-button--primary {
  background: #1a1a1a;
  background: var(--color-primary);
  color: #fff;
}

/* SECONDARY BASE */
.litestore-button--secondary,
.woocommerce .litestore-button--secondary,
.woocommerce button.litestore-button--secondary {
  background: #f5f5f7;
  background: var(--color-secondary);
  border: 1px solid #e5e5ea;
  color: #1a1a1a;
}

.litestore-card {
  background: #fff;
  border: 1px solid #e9e9ee;
  border-radius: 28px;

  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.03),
    0 1px 3px rgba(0, 0, 0, 0.04);

  padding: 32px;
}

/* --------- WOOCOMMERCE NOTICES  ------------ */
.woocommerce-notices-wrapper {
  margin-bottom: 20px;
}

/* BASE CARD STYLE */
.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
  border: 1px solid #e9e9ee;
  background: #fff;
  border-radius: 18px;

  padding: 16px 18px;

  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.03),
    0 1px 3px rgba(0, 0, 0, 0.04);

  font-size: 14px;
  color: #333;
}

/* INFO */
.woocommerce-info {
  border-left: 4px solid #2f5cff;
}

/* SUCCESS */
.woocommerce-message {
  border-left: 4px solid #1f7a3a;
}

/* ERROR */
.woocommerce-error {
  border-left: 4px solid #b00020;
}

/* ICON STYLE (opcional ocultar o suavizar) */
.woocommerce-info::before,
.woocommerce-message::before,
.woocommerce-error::before {
  display: none !important;
}

/*
|--------------------------------------------------------------------------
| PRODUCT
|--------------------------------------------------------------------------
*/

.litestore-product {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  cursor: pointer;
}

.litestore-product:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Imagen */
.litestore-product-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
}

.litestore-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Contenido */
.litestore-product-content {
  padding: 14px 16px 16px;

  display: flex;
  flex-direction: column;

  gap: 8px;

  flex: 1;
}

/* Título */
.litestore-product-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: #111;
  line-height: 1.3;
}

/* Precio */
.litestore-product-price {
  font-size: 14px;
  color: #333;
}

/* Botones */
.litestore-product-buttons {
  display: flex;
  flex-direction: column;

  gap: 8px;

  margin-top: auto;
}

/* Botón comprar (principal) */
.litestore-buy-button {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.litestore-buy-button:hover {
  background: #1a1a1a;
  transform: scale(1.02);
  color: #fff;
}

.litestore-buy-button:active {
  transform: scale(0.98);
}

.litestore-buy-button:active {
  transform: scale(0.98);
}

/* Botón carrito (secundario) */
.litestore-cart-button,
.litestore-outofstock-button {
  background: #f1f1f1;
  color: #222;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.litestore-cart-button:hover {
  background: #e6e6e6;
  transform: scale(1.02);
  color: #222;
}

.litestore-outofstock-button {
  background: none;
  border: 1px solid #c2c2c2;
  color: #c2c2c2;
}

.litestore-outofstock-button:hover {
  background: none;
  border: 1px solid #c2c2c2;
  color: #c2c2c2;
}

.litestore-cart-button:active {
  transform: scale(0.98);
}

/* Responsive simple */
@media (max-width: 600px) {
  .litestore-product-content {
    padding: 12px;
  }

  .litestore-product-title {
    font-size: 14px;
  }
}

/*
|--------------------------------------------------------------------------
| MODAL
|--------------------------------------------------------------------------
*/

/* =========================
   MODAL BACKDROP
========================= */

.litestore-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.25s ease;
}

.litestore-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* overlay */
.litestore-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* =========================
   MODAL BOX
========================= */
.litestore-modal-box {
  position: relative;
  width: min(920px, 92vw);
  max-height: 90vh;

  display: flex;
  flex-direction: row; /* clave nueva */
  overflow: hidden;

  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);

  transform: translateY(-20px);
  opacity: 0;

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.litestore-modal.is-active .litestore-modal-box {
  transform: translateY(0);
  opacity: 1;
}

.litestore-modal.is-closing .litestore-modal-box {
  transform: translateY(-20px);
  opacity: 0;
}

/* =========================
   IMAGEN
========================= */

.litestore-modal-media {
  flex: 0 0 42%;
  background: #f5f5f5;
  overflow: hidden;
}

.litestore-modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   CONTENIDO
========================= */

.litestore-modal-body {
  display: flex;
  flex-direction: column;

  flex: 1;
  min-height: 0;

  padding: 22px;
  overflow: hidden;
}

.litestore-modal-header {
  margin-bottom: 10px;
}

.litestore-modal-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  text-wrap: balance;
}
.litestore-modal-description {
  font-size: 14px;
  line-height: 1.5;
  color: #444;

  overflow-y: auto;
  flex: 1;
  min-height: 0;

  padding-right: 6px;
}

.litestore-modal-price {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;

  margin-top: 10px;
  flex-shrink: 0;
  padding-bottom: 10px;
}

/* =========================
   BOTONES
========================= */

.litestore-modal-actions {
  margin-top: auto;
  padding-top: 12px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  flex-shrink: 0;
}

/* Comprar */
.litestore-modal-buy-button {
  background: #1a1a1a;
  color: #fff;
  text-decoration: none;

  padding: 12px 14px;
  border-radius: 999px;
  text-align: center;

  font-size: 14px;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.litestore-modal-buy-button.is-disabled {
  background: none;
  border: 1px solid #c2c2c2;
  color: #c2c2c2;
  cursor: not-allowed;
}

.litestore-modal-buy-button.is-disabled:hover {
  background: none;
  border: 1px solid #c2c2c2;
  color: #c2c2c2;
  transform: scale(1) !important;
}

.litestore-modal-buy-button.is-disabled:active {
  background: none;
  border: 1px solid #c2c2c2;
  color: #c2c2c2;
}

.litestore-modal-buy-button:hover {
  background: #000;
  transform: scale(1.02);
  color: #fff;
}

.litestore-modal-buy-button:active {
  transform: scale(0.98);
}

/* Carrito */
.litestore-modal-cart-button {
  background: #f1f1f1;
  color: #222;
  text-decoration: none;

  padding: 12px 14px;
  border-radius: 999px;
  text-align: center;

  font-size: 14px;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.litestore-modal-cart-button:hover {
  background: #e6e6e6;
  transform: scale(1.02);
}

.litestore-modal-cart-button:active {
  transform: scale(0.98);
}

/* =========================
   CLOSE BUTTON
========================= */

.litestore-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 36px;
  height: 36px;

  border-radius: 999px;
  border: none;

  background: rgba(184, 184, 184, 0.274);
  color: #1a1a1a;

  font-size: 20px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    background 0.2s ease,
    transform 0.1s ease;
  z-index: 10;
}

.litestore-modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(1.02);
}

.litestore-modal-close:active {
  transform: scale(0.98);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  .litestore-modal-box {
    flex-direction: column;
  }

  .litestore-modal-media {
    aspect-ratio: 4 / 5;
    flex: unset;
  }

  .litestore-modal-body {
    padding: 20px;
  }

  .litestore-modal-close {
    width: 42px;
    height: 42px;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.3);
  }
}

/*
|--------------------------------------------------------------------------
| BODY
|--------------------------------------------------------------------------
*/

body.litestore-modal-open {
  overflow: hidden;
}

/*
|--------------------------------------------------------------------------
| MOBILE
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {
  .litestore-modal-box {
    grid-template-columns: 1fr;

    padding: 0;
  }
}

/*
|--------------------------------------------------------------------------
| CART
|--------------------------------------------------------------------------
*/

.litestore-cart {
  display: flex;
  flex-direction: column;
}

/* =========================================
   ITEMS CONTAINER
========================================= */

.litestore-cart-items {
  display: flex;
  flex-direction: column;

  gap: 0; /* importante: lo reemplazamos por bandas */
  padding: 0;
}

/* =========================================
   CART ITEM (BASE)
========================================= */

.litestore-cart-item {
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  gap: 16px;

  align-items: center;

  padding: 14px 12px;

  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

/* bandas alternadas */
.litestore-cart-item:nth-child(odd) {
  background: rgba(245, 245, 247, 0.35);
}

.litestore-cart-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.25);
}

/* =========================================
   IMAGE
========================================= */

.litestore-cart-item-image img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
}

/* =========================================
   TEXT CONTENT
========================================= */

.litestore-cart-item-title {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: #1a1a1a;
}

.litestore-cart-item-meta {
  display: flex;
  gap: 12px;

  margin-top: 4px;

  font-size: 13px;
  color: #6b6b6b;

  opacity: 1;
}

/* =========================================
   REMOVE BUTTON
========================================= */

.litestore-remove-cart-item {
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  justify-self: end; /* lo pega a la derecha de la banda */

  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;

  cursor: pointer;

  font-size: 18px;
  line-height: 1;

  padding: 0; /* clave para evitar elongación */
  box-sizing: border-box;

  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.litestore-remove-cart-item:hover {
  background: rgba(0, 0, 0, 0.1);
}

.litestore-remove-cart-item:active {
  transform: scale(0.92);
}
/* =========================================
   FOOTER
========================================= */

.litestore-cart-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "total action";

  align-items: center;
  column-gap: 16px;

  padding: 18px;
}

/* =========================================
   TOTAL ROW
========================================= */

.litestore-cart-total {
  grid-area: total;

  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.litestore-cart-total-label {
  font-weight: 600;
  color: #1a1a1a;
}

/* opcional: valor más claro para jerarquía */
.litestore-cart-total-value {
  color: #1a1a1a;
}

/* =========================================
   ACTIONS (CHECKOUT)
========================================= */

.litestore-cart-actions {
  grid-area: action;

  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* =========================================
   CHECKOUT BUTTON (MODERNO)
========================================= */

.litestore-cart-checkout {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;

  padding: 0 22px;

  border-radius: 999px;

  background: #1a1a1a;
  color: #fff;

  text-decoration: none;

  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.litestore-cart-checkout:hover {
  color: #fff;
  background: #2a2a2a;
  transform: translateY(-1px);
}

.litestore-cart-checkout:active {
  color: #fff;
  transform: scale(0.97);
}

/* =========================================
   EMPTY STATE
========================================= */

.litestore-cart-empty {
  opacity: 0.7;
  padding: 18px 6px;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
}

/* ------------ ITEMS COUNT BADGE ANIMATION ------------------- */

[data-cart-badge] {
  transform-origin: center;

  will-change: transform, opacity;
  backface-visibility: hidden;
}

[data-cart-badge].is-bouncing {
  animation: litestoreBadgeBounce 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes litestoreBadgeBounce {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.16);
  }

  55% {
    transform: scale(0.96);
  }

  100% {
    transform: scale(1);
  }
}

[data-cart-badge].is-entering {
  animation: litestoreBadgeEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes litestoreBadgeEnter {
  0% {
    opacity: 0;

    transform: translateY(8px) scale(0.72);
  }

  65% {
    opacity: 1;

    transform: translateY(-1px) scale(1.04);
  }

  100% {
    opacity: 1;

    transform: translateY(0) scale(1);
  }
}
[data-cart-badge].is-hiding {
  animation: litestoreBadgeHide 0.32s cubic-bezier(0.32, 0, 0.67, 0) forwards;
}

@keyframes litestoreBadgeHide {
  0% {
    opacity: 1;

    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;

    transform: translateY(6px) scale(0.82);
  }
}

/* DEBUG BADGE 

.litestore-test-badge {
  position: fixed;

  top: 40px;
  right: 40px;

  width: 42px;
  height: 42px;

  border-radius: 999px;

  background: #000;
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: 700;

  z-index: 999999;
}
*/

/* ------------ MODAL LOCK ---------------- */
html.litestore-modal-open,
body.litestore-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}
