/* Agregados de la tienda sobre la plantilla (muestras de color, avisos, favoritos, WhatsApp, buscador) */

/* Muestras de color: el color de la opción va en --sw (puede ser un degradé, como ORO o PLATA) */
.product-grid-item__color { background: var(--sw, #ccc) !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.product__available-colors a.unavailable .product-grid-item__color { opacity: .4; }
.product__available-colors a.unavailable .product-grid-item__color:after { content: ''; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: #555; transform: rotate(45deg); }
.product__option-chosen { display: block; margin-top: 2px; color: #666; text-transform: capitalize; font-size: 14px; }
.product__available-size li a.active { border-color: #000; background: #000; color: #fff; }
.product__available-size li a.unavailable { opacity: .5; text-decoration: line-through; border-style: dashed; }

/* Tarjeta del listado: color de la tarjeta debajo del nombre */
.product-grid-item__variant { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #666; }
.product-grid-item__variant .product-grid-item__color { width: 12px; height: 12px; border-radius: 50%; }

.product-grid-item__wishlist a.active { color: #9a7050; }
.product__second-action a.active { color: #9a7050; }

/* Ficha */
.product-image__none { display: flex; align-items: center; justify-content: center; aspect-ratio: 8 / 9; background: #f7f7f7; }
.product-image__none img { width: 40% !important; height: auto !important; opacity: .6; }
.product__stock { margin-top: 18px; font-size: 14px; color: #666; }
.product__stock--out { color: #b3261e; }
#pd-info.pd-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
.product__soldout { margin: 20px 0; padding: 18px 20px; border: 1px solid #9a7050; background: #faf6f2; }
.product__soldout p { margin: 0 0 10px; }
.product__soldout strong { text-transform: uppercase; letter-spacing: .05em; }

/* Avisos (agregado al carrito, favoritos, errores de stock) */
.store-toasts { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.store-toast { background: #000; color: #fff; padding: 14px 18px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18); display: flex; align-items: center; gap: 14px; animation: store-toast-in .2s ease-out; }
.store-toast a { color: #fff; text-decoration: underline; white-space: nowrap; }
.store-toast--error { background: #b3261e; }
@keyframes store-toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Aviso de stock en carrito y checkout */
.store-alert { border: 1px solid #b3261e; color: #b3261e; padding: 14px 18px; margin-bottom: 25px; font-size: 14px; }
.store-alert ul { margin: 0; padding-left: 18px; }

/* Buscador: sugerencias mientras se escribe */
.search-popup__results-products .product-grid-item { width: 20%; }
@media (max-width: 991px) { .search-popup__results-products .product-grid-item { width: 50%; } }
.search-popup__empty { color: #666; padding: 10px 0; }
.search-popups__results { display: none; }
.search-popups__results.active { display: block; }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 1040; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: transform .2s; }
.wa-float:hover { transform: scale(1.06); color: #fff; }
.wa-float svg { width: 30px; height: 30px; fill: currentColor; }
.wa-float--small { width: 44px; height: 44px; opacity: .9; }
.wa-float--small svg { width: 24px; height: 24px; }

/* Páginas de texto (cuidados, contacto, sobre nosotros, términos) */
.store-page { padding: 40px 0 80px; }
.store-page__title { font-size: 42px; margin-bottom: 10px; }
.store-page__lead { font-size: 18px; color: #666; max-width: 760px; margin-bottom: 40px; }
.store-page h2 { font-size: 24px; margin: 35px 0 12px; }
.store-page p, .store-page li { font-size: 16px; line-height: 1.7; color: #333; }
.store-page__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 30px 0; }
.store-page__card { border: 1px solid #e6e6e6; padding: 24px; }
.store-page__card i { font-size: 28px; color: #9a7050; }
.store-page__card h3 { font-size: 18px; margin: 12px 0 6px; }
.store-page__card p { margin: 0; font-size: 15px; }
.store-page__note { font-size: 13px; color: #999; margin-top: 40px; }

/* Favoritos */
.wishlist-empty { padding: 40px 0; text-align: center; color: #666; }

/* Celular: el WhatsApp flotante va por encima de la barra "Mostrar filtros" del catálogo */
@media (max-width: 991px) {
  body:has(.open-mobile-top-filter) .wa-float { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
/* Ficha: consulta por WhatsApp con el código de la variante */
.product__whatsapp { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 12px 0 4px; padding: 12px 16px; border: 1px solid #25d366; border-radius: 4px; color: #128c4b; font-weight: 500; text-decoration: none; transition: background .2s, color .2s; }
.product__whatsapp:hover { background: #25d366; color: #fff; }
.product__whatsapp svg { width: 20px; height: 20px; fill: currentColor; }
