/* OZ Cotizador — Design pack "grupesac" (admin: GRUPESAC)
 *
 * Cards de loop (tienda / categorias / relacionados / sliders) bajo
 * `.ozc-product-card--pack-grupesac`.
 *
 * Referencia de diseno (imagen del cliente):
 * - Card blanca, esquinas redondeadas (12px), borde suave y sombra ligera.
 * - Imagen del producto centrada (contain) sobre fondo blanco.
 * - Titulo negro, centrado, hasta 2 lineas.
 * - Selector de cantidad (- 1 +) centrado, en caja redondeada con borde.
 * - Boton rojo "Agregar a cotizacion" a todo el ancho (esquinas redondeadas).
 *
 * Solo estilo visual: la estructura/orden la define loop-product-card.php
 * y las secciones visibles se controlan en OZ Cotizador -> Loops.
 */

/* =========================================================
   VARIABLES DEL PACK
   ========================================================= */
.ozc-product-card--pack-grupesac {
  --gs-red: #E30613;
  --gs-red-hover: #C00510;
  --gs-text: #1f2937;
  --gs-muted: #6b7280;
  --gs-border: #e6e8eb;
  --gs-surface: #ffffff;
  --gs-radius: 12px;
  --gs-btn-radius: 8px;
  --gs-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  --gs-shadow-hover: 0 14px 30px rgba(15, 23, 42, 0.12);

  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--gs-surface);
  border: 1px solid var(--gs-border);
  border-radius: var(--gs-radius);
  box-shadow: var(--gs-shadow);
  padding: 16px 16px 18px;
  text-align: center;
  color: var(--gs-text);
  font-family: var(--OZ-Font-Base, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.ozc-product-card--pack-grupesac *,
.ozc-product-card--pack-grupesac *::before,
.ozc-product-card--pack-grupesac *::after {
  box-sizing: border-box;
}

.ozc-product-card--pack-grupesac:hover,
.ozc-product-card--pack-grupesac:focus-within {
  border-color: #d8dbdf;
  box-shadow: var(--gs-shadow-hover);
  transform: translateY(-2px);
}

/* =========================================================
   IMAGEN (centrada, contain sobre fondo blanco)
   ========================================================= */
.ozc-product-card--pack-grupesac .ozc-product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 14px 0;
  text-decoration: none;
}

.ozc-product-card--pack-grupesac .ozc-product-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.35s ease;
}

.ozc-product-card--pack-grupesac:hover .ozc-product-card__media img {
  transform: scale(1.03);
}

.ozc-product-card--pack-grupesac .ozc-product-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: #f3f4f6;
  border-radius: 8px;
}

/* La marca como badge sobre la imagen NO aplica en este pack */
.ozc-product-card--pack-grupesac .ozc-product-card__media .ozc-product-card__badge {
  display: none;
}

/* =========================================================
   SECCIONES (resetea padding/margenes del base)
   ========================================================= */
.ozc-product-card--pack-grupesac .ozc-product-card__section {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  margin: 0;
  border: 0;
}

/* Categoria, marca y extracto no se muestran en esta card */
.ozc-product-card--pack-grupesac .ozc-product-card__category,
.ozc-product-card--pack-grupesac .ozc-product-card__brand,
.ozc-product-card--pack-grupesac .ozc-product-card__excerpt {
  display: none;
}

/* =========================================================
   TITULO (negro, centrado, hasta 2 lineas)
   ========================================================= */
.ozc-product-card--pack-grupesac .ozc-product-card__title {
  margin: 0 0 14px 0;
  padding: 0 4px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gs-text);
  text-align: center;

  /* Altura homogenea en el grid: max. 2 lineas + ellipsis */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}

.ozc-product-card--pack-grupesac .ozc-product-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

.ozc-product-card--pack-grupesac .ozc-product-card__title a:hover {
  color: #000;
}

/* =========================================================
   PRECIO (si se activa en Loops; oculto por defecto)
   ========================================================= */
.ozc-product-card--pack-grupesac .ozc-product-card__price {
  margin: 0 0 12px 0;
  color: var(--gs-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.ozc-product-card--pack-grupesac .ozc-product-card__price del {
  margin-right: 6px;
  color: var(--gs-muted);
  font-size: 14px;
  font-weight: 400;
}

.ozc-product-card--pack-grupesac .ozc-product-card__price ins {
  text-decoration: none;
  color: var(--gs-text);
}

/* =========================================================
   ACCIONES (cantidad arriba centrada + boton rojo a todo ancho)
   ========================================================= */
.ozc-product-card--pack-grupesac .ozc-product-card__actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px;
  margin-top: auto;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0 !important;
}

/* =========================================================
   QTY STEPPER (caja redondeada centrada con borde)
   ========================================================= */
.ozc-product-card--pack-grupesac .ozc-product-card__qty {
  display: inline-flex !important;
  align-items: center;
  justify-content: space-between;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  height: 42px;
  padding: 0 8px;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: var(--gs-btn-radius);
  box-sizing: border-box;
}

.ozc-product-card--pack-grupesac .ozc-product-card__qty-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px !important;
  height: 34px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  border: 0;
  color: var(--gs-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.12s ease;
}

.ozc-product-card--pack-grupesac .ozc-product-card__qty-btn:hover {
  color: var(--gs-red);
}

.ozc-product-card--pack-grupesac .ozc-product-card__qty-btn:active {
  transform: scale(0.9);
}

.ozc-product-card--pack-grupesac .ozc-product-card__qty-input {
  width: 44px !important;
  min-width: 0 !important;
  flex: 0 0 auto;
  height: 34px;
  padding: 0 !important;
  margin: 0;
  background: transparent;
  border: 0;
  outline: 0;
  text-align: center;
  color: var(--gs-text);
  font-family: inherit;
  font-size: 15px !important;
  font-weight: 600;
  line-height: 1;
  -moz-appearance: textfield;
}

.ozc-product-card--pack-grupesac .ozc-product-card__qty-input::-webkit-outer-spin-button,
.ozc-product-card--pack-grupesac .ozc-product-card__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* =========================================================
   BOTON "Agregar a cotizacion" (rojo, a todo el ancho)
   ========================================================= */
.ozc-product-card--pack-grupesac .ozc-product-card__btn,
.ozc-product-card--pack-grupesac .ozc-product-card__btn--primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 48px;
  padding: 10px 14px !important;
  background: var(--gs-red) !important;
  border: 0 !important;
  border-radius: var(--gs-btn-radius) !important;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 16px !important;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  white-space: normal;
  box-sizing: border-box !important;
  box-shadow: none;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.ozc-product-card--pack-grupesac .ozc-product-card__btn:hover,
.ozc-product-card--pack-grupesac .ozc-product-card__btn--primary:hover {
  background: var(--gs-red-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(227, 6, 19, 0.28);
}

.ozc-product-card--pack-grupesac .ozc-product-card__btn:active,
.ozc-product-card--pack-grupesac .ozc-product-card__btn--primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.ozc-product-card--pack-grupesac .ozc-product-card__btn:focus-visible,
.ozc-product-card--pack-grupesac .ozc-product-card__btn--primary:focus-visible {
  outline: 2px solid var(--gs-red);
  outline-offset: 2px;
}

/* Estado "Agregado" (WooCommerce ajax_add_to_cart) */
.ozc-product-card--pack-grupesac .ozc-product-card__btn--added::before {
  content: '\2713';
  font-weight: 900;
  margin-right: 8px;
}

.ozc-product-card--pack-grupesac .ozc-product-card__btn--loading {
  opacity: 0.75;
  pointer-events: none;
}

/* =========================================================
   WHATSAPP — oculto en el loop de este pack (boton fuera de la card)
   ========================================================= */
.ozc-product-card--pack-grupesac .ozc-product-card__wa {
  display: none !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .ozc-product-card--pack-grupesac {
    padding: 14px 14px 16px;
  }

  .ozc-product-card--pack-grupesac .ozc-product-card__title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .ozc-product-card--pack-grupesac .ozc-product-card__btn,
  .ozc-product-card--pack-grupesac .ozc-product-card__btn--primary {
    min-height: 46px;
    font-size: 15px;
  }
}

/* Movil 2 columnas: cards angostas. Compactar cantidad y boton para que
   NO se desborden. */
@media (max-width: 575px) {
  .ozc-product-card--pack-grupesac {
    padding: 10px 10px 12px;
  }
  .ozc-product-card--pack-grupesac .ozc-product-card__title {
    font-size: 14px;
    margin-bottom: 10px;
  }
  .ozc-product-card--pack-grupesac .ozc-product-card__qty {
    height: 38px;
    padding: 0 4px;
  }
  .ozc-product-card--pack-grupesac .ozc-product-card__qty-btn {
    width: 28px !important;
    height: 30px !important;
    font-size: 16px;
  }
  .ozc-product-card--pack-grupesac .ozc-product-card__qty-input {
    width: 30px !important;
    font-size: 14px !important;
  }
  .ozc-product-card--pack-grupesac .ozc-product-card__btn,
  .ozc-product-card--pack-grupesac .ozc-product-card__btn--primary {
    padding: 8px 8px !important;
    font-size: 13px !important;
    min-height: 42px;
  }
}

@media (max-width: 420px) {
  .ozc-product-card--pack-grupesac {
    padding: 10px 8px 12px;
  }

  .ozc-product-card--pack-grupesac .ozc-product-card__title {
    font-size: 13px;
  }
}
