/* Tienda. Los colores de marca llegan como variables CSS desde la configuración (layout shop.php). */
body {
  background: #fff;
  color: #1d1d1f;
  -webkit-font-smoothing: antialiased;
}

.btn-brand {
  --bs-btn-color: var(--brand-contrast);
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: var(--brand-contrast);
  --bs-btn-hover-bg: color-mix(in srgb, var(--brand) 88%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--brand) 88%, #000);
  --bs-btn-active-color: var(--brand-contrast);
  --bs-btn-active-bg: color-mix(in srgb, var(--brand) 80%, #000);
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
  --bs-btn-disabled-color: var(--brand-contrast);
}

a { color: var(--brand); }

.announcement {
  background: var(--brand);
  color: var(--brand-contrast);
}

.site-header { z-index: 1020; }
.brand-logo { max-height: 44px; max-width: 180px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.35rem; color: #1d1d1f; letter-spacing: -.01em; }
.search-form { width: min(380px, 40vw); }
.cart-badge { background: var(--accent); color: var(--accent-contrast); font-size: .7rem; }

.category-nav { scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  padding: .3rem .85rem;
  border-radius: 999px;
  border: 1px solid #dee2e6;
  color: #1d1d1f;
  text-decoration: none;
  font-size: .9rem;
}
.chip:hover { border-color: #adb5bd; color: #1d1d1f; }
.chip.active { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }

/* Portada */
.hero { position: relative; overflow: hidden; }
.hero-plain { background: color-mix(in srgb, var(--brand) 8%, #fff); padding: 4rem 0; }
.hero-image { min-height: 46vh; display: flex; align-items: flex-end; padding: 3rem 0; color: #fff; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,.05) 60%); }
.hero-content { position: relative; z-index: 1; }
.hero-title { font-weight: 800; font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: -.02em; margin: 0; }
.hero-tagline { font-size: clamp(1rem, 2.4vw, 1.25rem); opacity: .9; max-width: 40rem; }

.section-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 1rem; }

/* Grilla de productos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem .75rem;
}
@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 1.25rem; } }

.product-card { display: block; color: inherit; text-decoration: none; }
.product-card:hover { color: inherit; }
.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: .75rem;
  overflow: hidden;
  background: #f4f4f5;
}
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s, transform .35s; }
.fit-contain .product-media img { object-fit: contain; background: #fff; }
.product-media .img-alt { opacity: 0; }
@media (hover: hover) {
  .product-card:hover .img-alt { opacity: 1; }
  .product-card:hover .img-main { transform: scale(1.03); }
}
.product-badge { position: absolute; top: .5rem; left: .5rem; }
.badge-accent { background: var(--accent); color: var(--accent-contrast); }
.sold-out .product-media img { filter: grayscale(.6); opacity: .7; }
.product-info { padding: .5rem .15rem 0; }
.product-name { font-size: .95rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-weight: 700; margin-top: .15rem; }

/* Galería del producto: deslizable en el celular */
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 1rem;
  background: #f4f4f5;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1 / 1; }
.gallery-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; }
.gallery-thumbs button { border: 2px solid transparent; padding: 0; border-radius: .5rem; overflow: hidden; background: none; flex: 0 0 64px; height: 64px; }
.gallery-thumbs button.active { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.qty-input { width: 5.5rem; }
.product-description { color: #3a3a3c; line-height: 1.6; }

/* Botones de compartir */
.share-row { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.5rem; }
.share-label { font-size: .9rem; color: #6b7280; margin-right: .25rem; }
.share-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
  transition: transform .12s, filter .12s;
}
.share-btn:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.share-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.share-wa { background: #25d366; }
.share-fb { background: #1877f2; }
.share-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.share-link { background: #e9ecef; color: #1d1d1f; }
.share-link:hover { color: #1d1d1f; }

.cart-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: .5rem; background: #f4f4f5; }
.min-w-0 { min-width: 0; }
.shipping-option { cursor: pointer; }
.shipping-option:has(input:checked) { border-color: var(--brand) !important; background: color-mix(in srgb, var(--brand) 5%, #fff); }
@media (min-width: 992px) { .checkout-summary { position: sticky; top: 7rem; } }

.site-footer { background: #fafafa; }

.wa-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  z-index: 1030;
}
.wa-float:hover { color: #fff; filter: brightness(1.05); }

.toast-cart {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1080;
}
