/*
Theme Name: FCSD Boilerplate - Shop Enhancements
Description: Estilos específicos para WooCommerce y tienda
Version: 2.0.1
*/

/* ==============================
   NAVBAR DE FILTROS (Archive)
   ============================== */

.shop-filters {
  background-color: var(--panel) !important;
  border: 1px solid var(--panel-border);
}

body.theme-dark .shop-filters {
  background-color: var(--panel) !important;
  border-color: var(--panel-border-strong);
}

/* Inputs y selects dentro del navbar (asegura contraste en dark) */
.shop-filters .form-control,
.shop-filters .form-select {
  background-color: var(--panel);
}

body.theme-dark .shop-filters .form-control,
body.theme-dark .shop-filters .form-select {
  background-color: var(--panel-strong);
  border-color: var(--panel-border-strong);
  color: var(--text);
}

body.theme-dark .shop-filters .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.9;
}

/* Botones/píldoras de color (btn-check + label) */
body.theme-dark .shop-filters .btn-outline-secondary {
  background-color: transparent;
}

body.theme-dark .shop-filters .btn-check:checked + .btn-outline-secondary,
body.theme-dark .shop-filters .btn-outline-secondary.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
}

/* Icono del toggler visible en dark */
body.theme-dark .shop-filters .navbar-toggler {
  border-color: var(--panel-border-strong);
}

body.theme-dark .shop-filters .navbar-toggler-icon {
  filter: invert(1) grayscale(1);
}

/* ==============================
   PRODUCTOS - CARDS EN GRID
   ============================== */

/*
  Breakpoints unificados (comunes en toda la web):
  - < 512px    : 1 columna
  - 512-767px  : 2 columnas
  - 768-1199px : 3 columnas
  - >= 1200px  : 4 columnas

  Nota: el markup usa Bootstrap (.row + .col-*) y aquí forzamos el ancho
  de las columnas SOLO dentro del grid de tienda para seguir el patrón anterior.
*/

.shop-archive .shop-grid.row {
  --fcsd-card-cols: 1;
}

@media (min-width: 512px) {
  .shop-archive .shop-grid.row {
    --fcsd-card-cols: 2;
  }
}

@media (min-width: 768px) {
  .shop-archive .shop-grid.row {
    --fcsd-card-cols: 3;
  }
}

@media (min-width: 1200px) {
  .shop-archive .shop-grid.row {
    --fcsd-card-cols: 4;
  }
}

/* Forzamos el ancho de las columnas (solo las que son cols de Bootstrap). */
.shop-archive .shop-grid.row > [class*="col-"] {
  flex: 0 0 calc(100% / var(--fcsd-card-cols));
  max-width: calc(100% / var(--fcsd-card-cols));
}

/* Elementos no-card dentro de la .row (paginación) deben ocupar el ancho completo. */
.shop-archive .shop-grid.row > .shop-pagination {
  flex: 0 0 100%;
  max-width: 100%;
}

.product-card {
  margin-bottom: var(--space-xl);
}

/*
  En el markup actual del grid (template-parts/product-card.php) la tarjeta usa
  la clase .product-card (no .product-card-inner). Le damos el mismo tratamiento
  visual que el resto de superficies para asegurar legibilidad en theme-dark.
*/
.shop-archive .product-card {
  background-color: var(--panel);
  color: var(--bs-body-color);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 16px;
}

body.theme-dark .shop-archive .product-card {
  background-color: var(--panel-strong);
  border-color: var(--panel-border-strong);
}

/* Exposició itinerant (obres d'art) – mismo look que shop-archive */
.expo-archive .product-card {
  background-color: var(--panel);
  color: var(--bs-body-color);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 16px;
}

body.theme-dark .expo-archive .product-card {
  background-color: var(--panel-strong);
  border-color: var(--panel-border-strong);
}


/* Texto auxiliar (p.ej. "Preu especial...") con contraste correcto en dark */
body.theme-dark .shop-archive .product-card .text-muted,
body.theme-dark .shop-archive .product-card small {
  color: var(--text-muted) !important;
  opacity: 1;
}

.product-card-inner {
  background-color: var(--panel);
  color: var(--bs-body-color);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-card-inner:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Contenedor de imagen con etiqueta de precio */
.product-card-thumb {
  position: relative;
}

.product-card-thumb-link,
.product-card-thumb-link:hover {
  display: block;
  text-decoration: none;
}

.product-card .product-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* Etiqueta de precio flotante */
.product-card-price-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--accent);
  color: var(--text-inverse);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  line-height: 1;
  box-shadow: var(--shadow-md);
  z-index: 2;
  white-space: nowrap;
  transition: background-color var(--transition-fast);
}

body.theme-dark .product-card-price-tag {
  background-color: var(--accent-hover);
}

/* < 512px (mobile) */
@media (max-width: 511.98px) {
  .product-card-price-tag {
    top: 10px;
    right: 10px;
    padding: 0.35rem 0.8rem;
    font-size: var(--font-size-xs);
  }
}

/* Cuerpo de la card */
.product-card-body {
  padding: 16px 16px 8px;
  flex: 1 1 auto;
}

.product-card-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
}

.product-card-title a {
  text-decoration: none;
  color: var(--bs-body-color);
  transition: color var(--transition-fast);
}

.product-card-title a:hover {
  text-decoration: underline;
  color: var(--accent);
}

.product-card-excerpt {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.5;
  min-height: 3em;
  margin-bottom: var(--space-sm);
}

.product-card-footer {
  padding: 0 16px 16px;
  overflow: hidden; /* evita que el CTA “se salga” en layouts estrechos */
}

/* Etiquetas "Colors disponibles" / "Talles disponibles" dentro de la card */
.shop-archive .product-card-attr-label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* En el grid no queremos la separación tipo "form" por encima del CTA */
.shop-archive .product-card .add-to-cart-form {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

/* Acciones: spinner + botón en una misma fila */
.shop-archive .product-card-actions > .d-flex {
  width: 100%;
}

.shop-archive .product-card-actions .fcsd-qty-spinner {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  width: auto;
}

/* Bootstrap define .input-group { width: 100%; } y en algunos anchos fuerza overflow.
   En la card queremos que el spinner mida lo justo. */
.shop-archive .product-card-actions .fcsd-qty-spinner.input-group {
  width: auto;
}

.shop-archive .product-card-actions .fcsd-qty-spinner .btn {
  padding: 0.35rem 0.6rem;
}

.shop-archive .product-card-actions .fcsd-qty-spinner .form-control {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  width: 50px;
  flex: 0 0 50px;
}

/* El botón debe ocupar el resto del ancho disponible sin forzar overflow */
.shop-archive .product-card-actions .js-add-to-cart-btn {
  flex: 1 1 auto;
  min-width: 0;
}

/* Bootstrap a veces aplica min-width en .btn dentro de flex */
.shop-archive .product-card-actions .btn {
  min-width: 0;
}

/* ==============================
   PRODUCT CARD (ARCHIVE) – COMPACT & CLEAN CONTROLS
   Reduce visual weight of swatches, size pills, quantity and CTA
   without affecting single product pages.
   ============================== */

/* Swatches (smaller, flatter) */
.shop-archive .product-card .fcsd-color-circle {
  width: 22px;
  height: 22px;
  border-width: 1px;
  box-shadow: none;
}

.shop-archive .product-card .fcsd-color-circle:hover {
  transform: none;
}

.shop-archive .product-card .fcsd-color-swatch input:checked + .fcsd-color-circle {
  border-width: 2px !important;
  box-shadow: 0 0 0 2px var(--accent-light);
}

/* Size pills (smaller, with subtle outline) */
.shop-archive .product-card .fcsd-size-pill {
  min-width: 34px;
  padding: 5px 10px;
  font-size: var(--font-size-xs);
  border: 1px solid var(--panel-border);
  background-color: transparent;
}

.shop-archive .product-card .fcsd-size-pill:hover {
  background-color: var(--accent-light);
}

.shop-archive .product-card .fcsd-size-pill input:checked ~ span,
.shop-archive .product-card .fcsd-size-pill input:checked + span {
  padding: 5px 10px;
  margin: -5px -10px;
}

/* Quantity + CTA (smaller, consistent heights) */
.shop-archive .product-card-actions .fcsd-qty-spinner .btn {
  padding: 0.25rem 0.5rem;
  font-size: var(--font-size-sm);
  line-height: 1;
}

.shop-archive .product-card-actions .fcsd-qty-spinner .form-control {
  width: 44px;
  flex: 0 0 44px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: var(--font-size-sm);
}

.shop-archive .product-card-actions .js-add-to-cart-btn {
  padding: 0.35rem 0.85rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

/* Atributos en dos columnas dentro de la card */
.shop-archive .product-card-attrs {
  margin-left: 0;
  margin-right: 0;
}

/* ==============================
   ATRIBUTOS DE PRODUCTO (Color/Talla)
   ============================== */

.fcsd-product-attribute {
  margin-bottom: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.fcsd-product-attribute label.form-label {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--bs-body-color);
  width: 100%;
  margin-bottom: var(--space-xs);
}

/* === COLORES === */
.fcsd-color-swatch {
  position: relative;
}

.fcsd-color-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fcsd-color-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--panel-border);
  display: inline-block;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fcsd-color-circle:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

.fcsd-color-swatch input:checked + .fcsd-color-circle {
  border-color: var(--accent) !important;
  border-width: 3px !important;
  box-shadow: 0 0 0 2px var(--accent-light), 0 2px 4px rgba(0, 0, 0, 0.15);
}

body.theme-dark .fcsd-color-circle {
  border-color: var(--panel-border-strong);
}

body.theme-dark .fcsd-color-swatch input:checked + .fcsd-color-circle {
  border-color: var(--accent);
}

/* === TALLAS === */
.fcsd-size-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background-color: transparent;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--bs-body-color);
}

.fcsd-size-pill:hover {
  border-color: var(--accent);
  background-color: var(--accent-light);
}

.fcsd-size-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fcsd-size-pill input:checked ~ span,
.fcsd-size-pill input:checked + span {
  background-color: var(--accent);
  color: var(--text-inverse);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  margin: -8px -14px;
}

.fcsd-size-pill input:checked ~ * {
  font-weight: var(--font-weight-semibold);
}

body.theme-dark .fcsd-size-pill:hover {
  border-color: var(--accent);
}

/* Talla no seleccionable (deshabilitada) */
.fcsd-size-pill--static {
  cursor: default;
  opacity: 0.5;
}

.fcsd-size-pill--static:hover {
  border-color: var(--panel-border);
  background-color: transparent;
}

/* ==============================
   FORMULARIO AÑADIR AL CARRITO
   ============================== */

.add-to-cart-form {
  border-top: 1px dashed var(--panel-border);
  padding-top: var(--space-md);
  margin-top: 1.25rem;
}

body.theme-dark .add-to-cart-form {
  border-color: var(--panel-border-strong);
}

.add-to-cart-form .quantity {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.add-to-cart-form .quantity label {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  margin: 0;
}

.add-to-cart-form .quantity input[type="number"] {
  max-width: 80px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  background-color: var(--panel);
  color: var(--bs-body-color);
  transition: border-color var(--transition-fast);
}

.add-to-cart-form .quantity input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem var(--accent-light);
}

body.theme-dark .add-to-cart-form .quantity input[type="number"] {
  border-color: var(--panel-border-strong);
  background-color: var(--panel-strong);
}

/* === BOTÓN AÑADIR AL CARRITO === */
.add-to-cart-form .btn,
.add-to-cart-form .btn-primary,
.add-to-cart-form button[type="submit"],
.single_add_to_cart_button {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.75rem;
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.add-to-cart-form .btn:hover,
.add-to-cart-form .btn:focus,
.add-to-cart-form .btn-primary:hover,
.add-to-cart-form .btn-primary:focus,
.add-to-cart-form button[type="submit"]:hover,
.add-to-cart-form button[type="submit"]:focus,
.single_add_to_cart_button:hover,
.single_add_to_cart_button:focus {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.add-to-cart-form .btn:active,
.add-to-cart-form .btn-primary:active,
.add-to-cart-form button[type="submit"]:active,
.single_add_to_cart_button:active {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--text-inverse);
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Estado de carga */
.add-to-cart-form .btn.is-loading,
.add-to-cart-form button[type="submit"].is-loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.add-to-cart-form .btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid var(--text-inverse);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* ==============================
   FICHA DE PRODUCTO (Single Product)
   ============================== */

/*
  NOTE: This file is plain CSS (not SCSS). Some selectors were previously
  accidentally written using SCSS-like nesting, which breaks parsing and can
  lead to unpredictable overrides. The blocks below are the cleaned, valid CSS
  equivalents.

  Breakpoints (shared across the site):
  - < 512px    : mobile
  - 512-767px  : small
  - 768-1199px : medium
  - >= 1200px  : large
*/

.single-product,
.single-fcsd_product {
  position: relative;
  z-index: 1;
  padding-top: var(--space-2xl);
  padding-bottom: 4rem;
}

.single-product .product-single-card,
.single-fcsd_product .product-single-card {
  background-color: var(--panel);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 2.25rem 2.5rem;
  margin: 0 auto;
  transition: background-color var(--transition-base);
}

body.theme-dark .single-product .product-single-card,
body.theme-dark .single-fcsd_product .product-single-card {
  background-color: var(--panel-strong);
}

.single-product .product-single-media,
.single-fcsd_product .product-single-media {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Contenedor de imagen principal */
.single-product .product-image,
.single-fcsd_product .product-image {
  border-radius: 18px;
  overflow: hidden;
  background: #f4eee4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

body.theme-dark .single-product .product-image,
body.theme-dark .single-fcsd_product .product-image {
  background: rgba(255, 255, 255, 0.03);
}

.single-product .product-image img,
.single-fcsd_product .product-image img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  display: block;
}

/* Galería de miniaturas */
.single-product .product-gallery,
.single-fcsd_product .product-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.single-product .product-gallery-item,
.single-fcsd_product .product-gallery-item {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background-color: var(--panel);
}

.single-product .product-gallery-item:hover,
.single-fcsd_product .product-gallery-item:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.single-product .product-gallery-item.active,
.single-fcsd_product .product-gallery-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

body.theme-dark .single-product .product-gallery-item,
body.theme-dark .single-fcsd_product .product-gallery-item {
  border-color: var(--panel-border-strong);
  background-color: var(--panel-strong);
}

.single-product .product-gallery-item img,
.single-fcsd_product .product-gallery-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

/* Resumen del producto */
.single-product .product-single-summary,
.single-fcsd_product .product-single-summary {
  min-height: 100%;
}

.product-single-header h1 {
  font-size: clamp(1.8rem, 1.5rem + 0.7vw, 2.2rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  color: var(--bs-body-color);
}

/* Precio destacado */
.single-product .product-price,
.single-product .h4.mb-1,
.single-fcsd_product .product-price,
.single-fcsd_product .h4.mb-1 {
  font-size: 1.7rem;
  font-weight: var(--font-weight-bold);
  color: var(--accent);
  margin-bottom: var(--space-md);
}

body.theme-dark .single-product .product-price,
body.theme-dark .single-product .h4.mb-1,
body.theme-dark .single-fcsd_product .product-price,
body.theme-dark .single-fcsd_product .h4.mb-1 {
  color: var(--accent);
}

/* Descripción */
.single-product .product-description,
.single-fcsd_product .product-description {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.single-product .product-description p:last-child,
.single-fcsd_product .product-description p:last-child {
  margin-bottom: 0;
}

/* ==============================
   CARRITO Y CHECKOUT
   ============================== */

.cart-page,
.checkout-page,
.shop-archive {
  margin-top: 25px;
}

.cart-table {
  background-color: var(--panel);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

body.theme-dark .cart-table {
  background-color: var(--panel-strong);
}

.cart-table td,
.cart-table th {
  vertical-align: middle;
  padding: var(--space-md);
  border-color: var(--panel-border);
}

body.theme-dark .cart-table td,
body.theme-dark .cart-table th {
  border-color: var(--panel-border-strong);
}

.cart-table thead {
  background-color: var(--accent-light);
  font-weight: var(--font-weight-semibold);
}

body.theme-dark .cart-table thead {
  background-color: rgba(var(--accent-rgb), 0.08);
}

/* Botones de acción del carrito */
.cart-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.cart-actions .btn {
  border-radius: var(--radius-pill);
  font-weight: var(--font-weight-semibold);
  padding: 0.6rem 1.5rem;
}

.cart-actions .btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
}

.cart-actions .btn-primary:hover,
.cart-actions .btn-primary:focus {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.cart-actions .btn-primary:active {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(0);
}

.cart-actions .btn-outline-secondary {
  border-color: var(--panel-border);
  color: var(--bs-body-color);
}

.cart-actions .btn-outline-secondary:hover {
  background-color: var(--panel);
  border-color: var(--accent);
  color: var(--accent);
}

body.theme-dark .cart-actions .btn-outline-secondary {
  border-color: var(--panel-border-strong);
}

/* Totales del carrito */
.cart-totals {
  background-color: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

body.theme-dark .cart-totals {
  background-color: var(--panel-strong);
  border-color: var(--panel-border-strong);
}

.cart-totals h2 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
}

.cart-totals .total-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px dashed var(--panel-border);
}

body.theme-dark .cart-totals .total-row {
  border-color: var(--panel-border-strong);
}

.cart-totals .total-row:last-child {
  border-bottom: none;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  padding-top: var(--space-md);
  color: var(--accent);
}

/* ==============================
   PRODUCT GALLERY (carousel + zoom)
   ============================== */

.fcsd-product-carousel {
  border-radius: 1rem;
  overflow: hidden;
}

.fcsd-product-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fcsd-product-carousel .carousel-control-prev,
.fcsd-product-carousel .carousel-control-next {
  width: 15%;
}

.fcsd-product-carousel .carousel-control-prev-icon,
.fcsd-product-carousel .carousel-control-next-icon {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.fcsd-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 99999;
  padding: 18px;
}

.fcsd-lightbox.is-open {
  display: flex;
}

.fcsd-lightbox__inner {
  position: relative;
  width: min(1100px, 100%);
  height: min(78vh, 760px);
  background: rgba(10, 10, 10, 0.4);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.fcsd-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fcsd-lightbox__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.fcsd-lightbox__stage.is-dragging {
  cursor: grabbing;
}

.fcsd-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  pointer-events: none;
}

.fcsd-lightbox__hint {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.fcsd-lightbox-open {
  overflow: hidden;
}

/* ==============================
   RESPONSIVE
   ============================== */

/* < 1200px: compact spacing (matches the grid system breakpoint) */
@media (max-width: 1199.98px) {
  .single-product,
  .single-fcsd_product {
    padding-top: 2.5rem;
    padding-bottom: var(--space-2xl);
  }

  .single-product .product-single-card,
  .single-fcsd_product .product-single-card {
    padding: 1.75rem 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .product-single-header h1 {
    font-size: 1.6rem;
  }

  .single-product .product-gallery-item,
  .single-fcsd_product .product-gallery-item {
    width: 64px;
    height: 64px;
  }
  
  .cart-table {
    font-size: var(--font-size-sm);
  }
  
  .cart-table td,
  .cart-table th {
    padding: var(--space-sm);
  }
}

/* ==============================
   EXPO (exposicio-itinerant)
   ============================== */

.expo-archive .expo-filters{
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.08);
  border-radius: 18px;
}

.expo-archive .fcsd-pagination .pagination{
  gap: .35rem;
  margin-bottom: 0;
}

.expo-archive .fcsd-pagination .page-item .page-link{
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.06);
  padding: .5rem .85rem;
}

.expo-archive .fcsd-pagination .page-item.active .page-link{
  font-weight: 700;
}

.expo-archive .fcsd-pagination .page-item.disabled .page-link{
  opacity: .55;
}

body.theme-dark .expo-archive .expo-filters,
body.theme-dark .expo-archive .fcsd-pagination .page-item .page-link{
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

/* Carousel controls/indicators visibility (cards + single) */
.fcsd-product-carousel .carousel-control-prev-icon,
.fcsd-product-carousel .carousel-control-next-icon{
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background-color: rgba(0,0,0,.35);
  background-size: 50% 50%;
}

.fcsd-product-carousel .carousel-control-prev,
.fcsd-product-carousel .carousel-control-next{
  opacity: .95;
}

.fcsd-product-carousel .carousel-indicators{
  margin-bottom: .5rem;
}

.fcsd-product-carousel .carousel-indicators [data-bs-target]{
  width: .6rem;
  height: .6rem;
  border-radius: 999px;
  margin: 0 .2rem;
}

/* Slightly larger dots on cards (better tap target) */
.product-card .fcsd-product-carousel .carousel-indicators [data-bs-target]{
  width: .7rem;
  height: .7rem;
}


/* ==============================
   THANK YOU / ORDER & DONATION RESULT
   ============================== */

.fcsd-thankyou-page {
  margin-top: 1.25rem;
  margin-bottom: 2.5rem;
}

.fcsd-thankyou-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fcsd-thankyou-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-sm);
}

body.theme-dark .fcsd-thankyou-hero {
  border-color: var(--panel-border-strong);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.14), rgba(20, 26, 35, 0.94));
}

.fcsd-thankyou-hero::after {
  content: "";
  position: absolute;
  inset: auto -6rem -6rem auto;
  width: 16rem;
  height: 16rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.10);
  pointer-events: none;
}

.fcsd-thankyou-hero__inner {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 2vw + 1rem, 2.5rem);
}

.fcsd-thankyou-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
  font-size: .875rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}

.fcsd-thankyou-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
}

.fcsd-thankyou-lead {
  max-width: 48rem;
  margin: .85rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.fcsd-thankyou-hero.is-success {
  border-color: rgba(40, 167, 69, .22);
}

.fcsd-thankyou-hero.is-warning {
  border-color: rgba(255, 193, 7, .28);
}

.fcsd-thankyou-hero.is-danger {
  border-color: rgba(220, 53, 69, .22);
}

.fcsd-thankyou-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1.5vw + 1rem, 2rem);
  box-shadow: var(--shadow-sm);
}

body.theme-dark .fcsd-thankyou-card {
  background: var(--panel-strong);
  border-color: var(--panel-border-strong);
}

.fcsd-thankyou-card + .fcsd-thankyou-card {
  margin-top: 1rem;
}

.fcsd-thankyou-card--content > .card,
.fcsd-thankyou-card--content > .alert,
.fcsd-thankyou-card--content > .notice-success {
  margin-bottom: 1rem;
}

.fcsd-thankyou-card--content > .card:last-child,
.fcsd-thankyou-card--content > .alert:last-child,
.fcsd-thankyou-card--content > .notice-success:last-child {
  margin-bottom: 0;
}

.fcsd-thankyou-copy p,
.fcsd-thankyou-card p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.fcsd-thankyou-copy p:last-child,
.fcsd-thankyou-card p:last-child {
  margin-bottom: 0;
}

.fcsd-thankyou-muted {
  color: var(--text-muted);
}

.fcsd-thankyou-section-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: var(--font-weight-bold);
}

.fcsd-thankyou-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
}

.fcsd-thankyou-actions .btn {
  min-width: 13rem;
  border-radius: var(--radius-pill);
  padding: .8rem 1.35rem;
  font-weight: var(--font-weight-semibold);
}

.fcsd-thankyou-notice {
  border-radius: var(--radius-md);
  padding: .95rem 1.1rem;
  border: 1px solid transparent;
}

.fcsd-thankyou-notice p {
  margin: 0;
}

.fcsd-thankyou-notice.is-success {
  background: rgba(40, 167, 69, .1);
  border-color: rgba(40, 167, 69, .24);
}

.fcsd-thankyou-notice.is-warning {
  background: rgba(255, 193, 7, .12);
  border-color: rgba(255, 193, 7, .28);
}

.fcsd-thankyou-notice.is-info {
  background: rgba(var(--accent-rgb), .10);
  border-color: rgba(var(--accent-rgb), .18);
}

.fcsd-thankyou-notice.is-danger {
  background: rgba(220, 53, 69, .1);
  border-color: rgba(220, 53, 69, .24);
}

.fcsd-thankyou-summary-list {
  margin: 0;
}

.fcsd-thankyou-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px dashed var(--panel-border);
}

body.theme-dark .fcsd-thankyou-summary-item {
  border-color: var(--panel-border-strong);
}

.fcsd-thankyou-summary-item:first-child {
  padding-top: 0;
}

.fcsd-thankyou-summary-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.fcsd-thankyou-summary-item dt,
.fcsd-thankyou-summary-item dd {
  margin: 0;
}

.fcsd-thankyou-summary-item dt {
  color: var(--text-muted);
}

.fcsd-thankyou-summary-item dd {
  text-align: right;
  font-weight: var(--font-weight-semibold);
}

.fcsd-thankyou-help-link {
  margin-top: 1rem;
  font-weight: var(--font-weight-semibold);
}

.fcsd-thankyou-sidebar {
  position: sticky;
  top: 2rem;
}

.fcsd-thankyou-card--content .table-responsive {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
}

body.theme-dark .fcsd-thankyou-card--content .table-responsive {
  border-color: var(--panel-border-strong);
}

.fcsd-thankyou-card--content .table {
  margin-bottom: 0;
}

.fcsd-thankyou-card--content .table thead {
  background-color: var(--accent-light);
}

body.theme-dark .fcsd-thankyou-card--content .table thead {
  background-color: rgba(var(--accent-rgb), 0.08);
}

.fcsd-thankyou-card--content .border.rounded,
.fcsd-thankyou-card--content .alert {
  border-radius: var(--radius-md) !important;
}

@media (max-width: 1199.98px) {
  .fcsd-thankyou-sidebar {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .fcsd-thankyou-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .fcsd-thankyou-summary-item {
    flex-direction: column;
    gap: .25rem;
  }

  .fcsd-thankyou-summary-item dd {
    text-align: left;
  }
}

.fcsd-order-detail-card {
  border-radius: 24px;
  overflow: hidden;
}

.fcsd-order-detail-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.fcsd-order-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.fcsd-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  background: #f3f4f6;
  color: #111827;
}

.fcsd-status-pill.is-paid,
.fcsd-status-pill.is-succeeded,
.fcsd-status-pill.is-active,
.fcsd-status-pill.is-shipped,
.fcsd-status-pill.is-delivered {
  background: #e8f7ee;
  color: #166534;
}

.fcsd-status-pill.is-pending,
.fcsd-status-pill.is-authorized,
.fcsd-status-pill.is-processing,
.fcsd-status-pill.is-preparing,
.fcsd-status-pill.is-ready {
  background: #fff4db;
  color: #92400e;
}

.fcsd-status-pill.is-failed,
.fcsd-status-pill.is-canceled,
.fcsd-status-pill.is-cancelled,
.fcsd-status-pill.is-expired {
  background: #fdecec;
  color: #b42318;
}

.fcsd-order-detail-panel {
  background: rgba(248, 250, 252, 0.85);
}

body.theme-dark .fcsd-order-detail-panel {
  background: rgba(17, 24, 39, 0.65);
}


/* Taxonomy service area: product cards share the same grid/card treatment as shop archive */
.taxonomy-service-area__product-grid > [class*="col-"] {
  display: flex;
}

.taxonomy-service-area .product-card {
  width: 100%;
  background-color: var(--panel);
  color: var(--bs-body-color);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 16px;
}

body.theme-dark .taxonomy-service-area .product-card {
  background-color: var(--panel-strong);
  border-color: var(--panel-border-strong);
}

.taxonomy-service-area .product-card .text-muted,
.taxonomy-service-area .product-card small {
  color: var(--text-muted) !important;
  opacity: 1;
}

.taxonomy-service-area .product-card .add-to-cart-form {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.taxonomy-service-area .product-card-actions > .d-flex {
  width: 100%;
}

.taxonomy-service-area .product-card-actions .fcsd-qty-spinner,
.taxonomy-service-area .product-card-actions .fcsd-qty-spinner.input-group {
  width: auto;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.taxonomy-service-area .product-card-actions .fcsd-qty-spinner .btn {
  padding: 0.25rem 0.5rem;
  font-size: var(--font-size-sm);
  line-height: 1;
}

.taxonomy-service-area .product-card-actions .fcsd-qty-spinner .form-control {
  width: 44px;
  flex: 0 0 44px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: var(--font-size-sm);
}

.taxonomy-service-area .product-card-actions .js-add-to-cart-btn,
.taxonomy-service-area .product-card-actions .btn {
  min-width: 0;
}

.taxonomy-service-area .product-card-actions .js-add-to-cart-btn {
  flex: 1 1 auto;
  padding: 0.35rem 0.85rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.taxonomy-service-area .product-card .fcsd-color-circle {
  width: 22px;
  height: 22px;
  border-width: 1px;
  box-shadow: none;
}

.taxonomy-service-area .product-card .fcsd-size-pill {
  min-width: 34px;
  padding: 5px 10px;
  font-size: var(--font-size-xs);
  border: 1px solid var(--panel-border);
  background-color: transparent;
}
