/** Tienda Digind — Mobile First **/

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--color-border);
}

.product-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-base);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__img--contain {
  object-fit: contain;
  padding: var(--space-6);
}

.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-border);
  font-size: 3rem;
}

.product-card__body {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.product-card__price {
  margin-top: auto;
  padding-top: var(--space-3);
}

.product-card__price-old {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.product-card__price-current {
  color: var(--color-accent);
  font-weight: 700;
  font-size: var(--text-xl);
  margin-left: var(--space-2);
}

.product-card__price-regular {
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--text-xl);
}

.product-card__price-currency {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.product-card__actions {
  margin-top: auto;
  padding: var(--space-4) var(--space-5) var(--space-5);
  display: flex;
  gap: var(--space-3);
  align-items: stretch;
  border-top: 1px solid var(--color-border);
}

.product-card__form {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
}

.product-card__cta,
.product-card__cta--primary {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding-inline: var(--space-4);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.product-card__cta-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card__cta-icon {
  flex-shrink: 0;
  font-size: 1.0625rem;
}

.product-card__badges {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.product-card__badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  line-height: 1.2;
}

.product-card__badge--promo {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.product-card__badge--featured {
  background: var(--color-navy);
  color: var(--color-text-inverse);
}

.product-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
  margin: 0 0 var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__price-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-left: var(--space-1);
}

.product-card__view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  background: var(--color-navy);
  color: var(--color-text-inverse);
  border-radius: var(--radius-base);
  text-decoration: none;
  font-size: 1.125rem;
  transition: background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.product-card__view-btn:hover {
  background: var(--color-navy-soft);
  color: var(--color-text-inverse);
}

.product-card__view-btn:active {
  transform: scale(0.97);
}

/* Store grid — overrides legados movidos al bloque v3.2.8 más abajo */

.client-logo__image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Product grids legados — sobreescritos por el bloque v3.2.8 más abajo */

.product-grid--related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .product-grid--related {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

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

/* ============================================================
   Product Show PDP — E-commerce
   ============================================================ */

.product-show {
  padding-top: var(--space-6);
  padding-bottom: var(--space-12);
}

@media (max-width: 767px) {
  .product-show {
    padding-bottom: var(--space-20);
  }
}

.product-show__breadcrumb {
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.product-show__breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.product-show__breadcrumb a:hover {
  color: var(--color-text);
}

.product-show__breadcrumb [aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

.product-show__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

@media (min-width: 1024px) {
  .product-show__layout {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-10);
    align-items: start;
  }
}

.product-show__media {
  min-width: 0;
}

@media (min-width: 1024px) {
  .product-show__media {
    position: sticky;
    top: calc(5rem + var(--space-4));
  }
}

.product-show__stage {
  background: var(--color-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.product-show__placeholder {
  width: 7.5rem;
  height: 7.5rem;
  background: var(--color-border);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 3rem;
}

.product-show__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-show__img--contain {
  max-height: 12.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: var(--space-6);
}

.product-show__thumbs {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-1);
}

.product-show__thumb-btn {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 4.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-base);
  background: var(--color-surface);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.product-show__thumb-btn:hover {
  border-color: var(--color-navy-muted);
}

.product-show__thumb-btn.is-active {
  border-color: var(--color-text);
  box-shadow: 0 0 0 2px var(--color-glow-navy);
}

.product-show__thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-show__video {
  text-align: center;
}

.product-show__video .btn i {
  margin-right: var(--space-2);
}

.product-show__info {
  min-width: 0;
}

@media (min-width: 1024px) {
  .product-show__info {
    position: sticky;
    top: calc(5rem + var(--space-4));
  }
}

.product-show__brand {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-2);
}

.product-show__title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

.product-show__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.product-show__sku {
  font-variant-numeric: tabular-nums;
}

.product-show__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
}

.product-show__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}

.product-show__price .product-card__price-old,
.product-show__price .product-card__price-current,
.product-show__price .product-card__price-regular {
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
}

.product-show__badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-inverse);
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.product-show__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.product-show__chip {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-accent-soft);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.product-show__chip:hover {
  background: var(--color-navy);
  color: var(--color-text-inverse);
}

.product-show__short-desc {
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
  line-height: 1.65;
}

.product-show__purchase {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}

@media (max-width: 767px) {
  .product-show__purchase {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-left: calc(-1 * var(--space-6));
    margin-right: calc(-1 * var(--space-6));
    padding-left: var(--space-6);
    padding-right: var(--space-6);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px color-mix(in srgb, var(--fg) 12%, transparent);
  }
}

@media (max-width: 640px) {
  .product-show__purchase {
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

.product-show__config {
  background: var(--color-base);
  border-radius: var(--radius-base);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.product-show__config-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

.product-show__config .field {
  margin-bottom: var(--space-4);
}

.product-show__config .field:last-child {
  margin-bottom: 0;
}

.product-show__config-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: normal;
}

.product-show__config-unit {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.product-show__field {
  margin-bottom: var(--space-5);
}

.product-show__field label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.quantity-stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.quantity-stepper .btn--sm {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  line-height: 1;
}

.quantity-stepper .product-config-input,
.quantity-stepper .product-quantity-input,
.quantity-stepper .product-months-input {
  width: 4rem;
  min-height: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.product-show__total {
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
  border-radius: var(--radius-base);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.product-show__total-label {
  font-weight: 600;
  color: var(--color-text);
}

.product-show__total-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-success);
  font-variant-numeric: tabular-nums;
}

.product-show__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.product-show__actions .btn--primary {
  width: 100%;
  min-height: 48px;
}

.product-show__actions .btn--whatsapp {
  width: 100%;
  min-height: 48px;
  background: transparent;
  color: #128c7e;
  border: 2px solid #25d366;
}

.product-show__actions .btn--whatsapp:hover {
  background: #25d366;
  color: #fff;
}

.product-show__details {
  margin-bottom: var(--space-16);
  padding-block: var(--space-12);
}

.product-show__details-inner {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-12);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}

.product-show__details-inner:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-glow);
}

.product-show__details-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 20%,
    transparent 40%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 80%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.product-show__details-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.product-show__details-title {
  margin: 0;
}

.product-show__details-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: var(--radius-full);
}

.product-show__details-body {
  color: var(--fg);
  line-height: 1.8;
  font-size: var(--text-lg);
}

.product-show__details-body .trix-content {
  font-size: var(--text-lg);
}

.product-show__details-body .trix-content p {
  margin-bottom: var(--space-4);
  color: var(--fg-muted);
}

.product-show__details-body .trix-content p:last-child {
  margin-bottom: 0;
}

.product-show__details-body .trix-content h1,
.product-show__details-body .trix-content h2,
.product-show__details-body .trix-content h3,
.product-show__details-body .trix-content h4 {
  font-family: var(--font-heading);
  color: var(--fg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  font-weight: 600;
}

.product-show__details-body .trix-content h1 { font-size: var(--text-2xl); }
.product-show__details-body .trix-content h2 { font-size: var(--text-xl); }
.product-show__details-body .trix-content h3 { font-size: var(--text-lg); }

.product-show__details-body .trix-content ul,
.product-show__details-body .trix-content ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
  color: var(--fg-muted);
}

.product-show__details-body .trix-content li {
  margin-bottom: var(--space-2);
}

.product-show__details-body .trix-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin-block: var(--space-6);
  box-shadow: var(--shadow-card);
}

.product-show__details-body .trix-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration-fast) var(--ease-out);
}

.product-show__details-body .trix-content a:hover {
  color: var(--accent-hover);
}

.product-show__details-body .trix-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-5);
  margin-left: 0;
  margin-block: var(--space-6);
  color: var(--fg);
  font-style: italic;
  opacity: 0.85;
}

.product-show__details-body .trix-content pre {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-base);
  padding: var(--space-5);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-block: var(--space-6);
}

@supports not (backdrop-filter: blur(1px)) {
  .product-show__details-inner {
    background: var(--bg-elevated);
  }
}

@media (max-width: 768px) {
  .product-show__details {
    padding-block: var(--space-8);
  }

  .product-show__details-inner {
    padding: var(--space-6);
    border-radius: var(--radius-lg);
  }

  .product-show__details-header {
    margin-bottom: var(--space-6);
  }

  .product-show__details-body {
    font-size: var(--text-base);
  }

  .product-show__details-body .trix-content {
    font-size: var(--text-base);
  }
}

.product-show__related {
  margin-bottom: var(--space-16);
}

.product-show__related-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin: 0 0 var(--space-6);
  color: var(--color-text);
}

@media (prefers-reduced-motion: reduce) {
  .product-show__thumb-btn,
  .related-carousel__track {
    transition: none;
  }
}

/* Cart badge in navbar */
.nav__cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.nav__cart-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  background: #e11d48;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Store category links */
.store-category-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.15s;
}

.store-category-link:hover {
  background: var(--scrim-strong);
}

.store-category-link.is-active {
  background: var(--brand-navy);
  color: #fff;
}

/* Checkbox inline */
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

/* Admin nested fields */
.nested-fields {
  background: var(--bg);
}

/* Dialog backdrop for YouTube modal */
dialog.youtube-modal::backdrop {
  background: transparent;
}

/* Checkout page */
.checkout-page .field input,
.checkout-page .field textarea,
.checkout-page .field select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  background: var(--bg-elevated);
}

.checkout-page .field input:focus {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 10%, transparent);
}

/* Cart page */
.cart-page .field input,
.cart-page .field textarea,
.cart-page .field select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
}

/* Product show form inputs */
.product-config-input,
.product-quantity-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
}

/* Button WhatsApp override */
.btn--whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
}

.btn--whatsapp:hover {
  background: #128c7e;
}

/* ActionText content styling */
.trix-content {
  line-height: 1.7;
}

.trix-content h1,
.trix-content h2,
.trix-content h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.trix-content ul,
.trix-content ol {
  padding-left: 1.25rem;
}

.trix-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* ============================================================
   Store Index — catalog UX v3.2.8 (mobile-first, desktop breathing)
   ============================================================ */

.store-index {
  background: var(--bg);
}

.store-content {
  padding: var(--space-6) 0 var(--space-12);
}

.container--wide {
  max-width: 1320px;
}

@media (min-width: 1024px) {
  .container--wide {
    max-width: none;
  }
}

/* ---------- Hero compacto ---------- */
.store-hero {
  padding-top: var(--space-12);
  padding-bottom: var(--space-10);
}

.store-hero__intro {
  margin-bottom: var(--space-8);
}

.store-hero__title {
  margin-bottom: var(--space-3);
}

.store-hero__lead {
  max-width: 620px;
  margin-inline: auto;
}

.store-hero__search {
  margin-bottom: 0;
}

/* ---------- Layout principal ---------- */
.store-layout--index {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}

.store-main {
  min-width: 0;
}

/* ---------- Chips de categorías (mobile scroll) ---------- */
.store-chips {
  display: block;
  margin: 0 calc(-1 * var(--space-4)) var(--space-3);
  padding: var(--space-2) var(--space-4);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.store-chips::-webkit-scrollbar { display: none; }

.store-chips__list {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}

.store-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  scroll-snap-align: start;
  text-decoration: none;
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.store-chip:hover {
  border-color: var(--border-strong);
  background: var(--bg);
}

.store-chip:active {
  transform: scale(0.97);
}

.store-chip.is-active {
  background: var(--brand-navy);
  color: #fff;
  border-color: var(--brand-navy);
}

@media (min-width: 769px) {
  .store-chips { display: none; }
}

/* ---------- Sidebar (desktop) ---------- */
.store-sidebar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  position: static;
}

.store-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.store-sidebar__heading {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg);
  margin: 0;
}

.store-sidebar__clear {
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease-out);
}

.store-sidebar__clear:hover {
  background: var(--scrim);
  text-decoration: underline;
}

.store-categories {
  list-style: none;
  margin: 0;
  padding: 0;
}

.store-categories li {
  margin-bottom: var(--space-1);
}

.store-categories li:last-child {
  margin-bottom: 0;
}

.store-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-base);
  color: var(--fg);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  min-height: 40px;
  transition: background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.store-category-link:hover {
  background: var(--scrim-strong);
  color: var(--fg);
}

.store-category-link.is-active {
  background: var(--brand-navy);
  color: #fff;
}

.store-category-link__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-category-link__count {
  flex: 0 0 auto;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fg-muted);
  background: var(--scrim);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.store-category-link.is-active .store-category-link__count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.store-categories-select {
  display: none;
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-8) 0 var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-base);
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: var(--text-base);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
}

.store-categories-select:focus {
  outline: 2px solid var(--brand-navy);
  outline-offset: 2px;
}

/* ---------- Toolbar (sticky con blur) ---------- */
.store-toolbar {
  position: sticky;
  top: calc(var(--nav-height, 80px) + var(--space-2));
  z-index: 15;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-base);
  padding: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@supports not (backdrop-filter: blur(1px)) {
  .store-toolbar { background: var(--bg); }
}

.store-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  justify-content: space-between;
}

.store-results-meta {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.4;
}

.store-results-meta__count {
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.store-results-meta__filter {
  color: var(--fg-muted);
  margin-left: var(--space-1);
}

.store-toolbar__sort-form {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.store-toolbar__sort-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  font-weight: 600;
  white-space: nowrap;
}

.store-toolbar__sort-label i {
  font-size: 0.95em;
  color: var(--fg);
}

.store-toolbar__sort-select {
  min-height: 40px;
  padding: 0 var(--space-8) 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  appearance: none;
  max-width: 14rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
}

.store-toolbar__sort-select:focus {
  outline: 2px solid var(--brand-navy);
  outline-offset: 2px;
}

.store-toolbar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.store-active-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fg);
  min-height: 32px;
}

.store-active-chip i {
  color: var(--fg-muted);
  font-size: 0.85em;
}

.store-active-chip__remove {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 1.05rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  margin-right: -4px;
  margin-left: var(--space-1);
  transition: background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.store-active-chip__remove:hover {
  color: var(--accent);
  background: var(--scrim);
}

/* ---------- Cabecera de categoría ---------- */
.store-category-header {
  margin-bottom: var(--space-5);
}

.store-category-header__title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin: 0 0 var(--space-2);
  color: var(--fg);
  letter-spacing: -0.02em;
}

.store-category-header__desc {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.55;
  max-width: 60ch;
}

/* ---------- Grid de productos ---------- */
.product-grid--store {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .product-grid--store {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-5);
  }
}

@media (min-width: 1024px) {
  .product-grid--store {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

@media (min-width: 1320px) {
  .product-grid--store {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

@media (max-width: 380px) {
  .product-grid--store {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }
}

/* ---------- Paginación / empty / trust ---------- */
.store-pagination {
  margin-top: var(--space-8);
  display: flex;
  justify-content: center;
}

.store-empty {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.store-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--scrim-strong);
  color: var(--fg-muted);
  font-size: 1.75rem;
  margin-bottom: var(--space-4);
}

.store-empty__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin: 0 0 var(--space-3);
  color: var(--fg);
}

.store-empty__text {
  color: var(--fg-muted);
  max-width: 28rem;
  margin: 0 auto var(--space-6);
  line-height: 1.55;
}

.store-empty__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  max-width: 20rem;
  margin: 0 auto;
}

.store-empty__actions .btn {
  width: 100%;
  min-height: 48px;
}

.store-empty__whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.store-trust {
  list-style: none;
  width: 100%;
  margin: var(--space-12) 0 0;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4) var(--space-6);
}

.store-trust__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--fg);
  font-weight: 500;
  line-height: 1.3;
}

.store-trust__item i {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
}

.store-trust__link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.store-trust__link:hover {
  text-decoration: underline;
}

/* ---------- Product card refinada (store context) ---------- */
.product-card--store {
  background: var(--bg-elevated);
  border-color: var(--border);
  transition:
    transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.product-card--store:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.product-card--store .product-card__image {
  background: var(--bg);
  aspect-ratio: 4 / 3;
  position: relative;
}

.product-card--store .product-card__brand {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  margin: 0 0 var(--space-1);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card--store .product-card__body {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.product-card--store .product-card__title {
  font-size: var(--text-sm);
  line-height: 1.4;
  font-weight: 600;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(var(--text-sm) * 1.4 * 2);
  margin: 0;
}

.product-card--store .product-card__excerpt {
  font-size: var(--text-xs);
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card--store .product-card__price {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}

.product-card--store .product-card__price-old {
  text-decoration: line-through;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.product-card--store .product-card__price-current,
.product-card--store .product-card__price-regular {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.product-card--store .product-card__price-current {
  color: var(--accent);
}

.product-card--store .product-card__price-currency {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fg-muted);
  margin-left: 2px;
}

.product-card--store .product-card__price-note {
  font-size: var(--text-xs);
  color: var(--fg-muted);
  font-weight: 500;
}

.product-card--store .product-card__badges {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  right: var(--space-2);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  pointer-events: none;
}

.product-card--store .product-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  line-height: 1.2;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.product-card--store .product-card__badge i {
  font-size: 0.7em;
}

.product-card--store .product-card__badge--promo {
  background: var(--accent);
  color: #fff;
}

.product-card--store .product-card__badge--featured {
  background: var(--brand-navy);
  color: #fff;
}

.product-card--store .product-card__badge--digital {
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid var(--border);
}

.product-card--store .product-card__actions {
  margin-top: 0;
  padding: 0 var(--space-4) var(--space-4);
  border-top: 0;
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}

.product-card--store .product-card__form {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
}

.product-card--store .product-card__cta {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding-inline: var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  gap: var(--space-2);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.product-card--store .product-card__cta:hover {
  box-shadow: 0 4px 14px var(--accent-glow);
}

.product-card--store .product-card__cta:active {
  transform: scale(0.98);
}

.product-card--store .product-card__cta-icon {
  flex-shrink: 0;
  font-size: 0.95rem;
}

.product-card--store .product-card__cta-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sin botón "Ver detalle" — toda la card es clickable */
.product-card--store .product-card__view-btn,
.product-card--store .product-card__view-label {
  display: none !important;
}

/* ---------- Dark mode refinements ---------- */
:root[data-theme="dark"] .store-toolbar {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-color: var(--border);
}

:root[data-theme="dark"] .product-card--store .product-card__image {
  background: var(--bg-sunken);
}

:root[data-theme="dark"] .product-card--store .product-card__badge--digital {
  background: var(--bg-sunken);
  border-color: var(--border);
}

:root[data-theme="dark"] .store-sidebar {
  background: var(--bg-elevated);
}

/* ---------- Breakpoint adjustments ---------- */
@media (max-width: 768px) {
  .store-hero {
    padding-top: var(--space-8);
    padding-bottom: var(--space-6);
  }

  .store-hero__intro {
    margin-bottom: var(--space-6);
  }

  .store-content {
    padding: var(--space-4) 0 var(--space-10);
  }

  .store-categories-select {
    display: block;
  }

  .store-categories--desktop {
    display: none;
  }

  .store-sidebar {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .store-toolbar {
    position: static;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
    border-color: var(--border);
  }
}

@media (min-width: 1024px) {
  .store-layout--index {
    grid-template-columns: 280px 1fr;
    gap: var(--space-8);
  }

  .store-sidebar {
    position: sticky;
    top: calc(var(--nav-height, 96px) + var(--space-4));
    max-height: calc(100vh - var(--nav-height, 96px) - var(--space-8));
    overflow-y: auto;
  }

  .store-content {
    padding: var(--space-8) 0 var(--space-16);
  }
}

@media (min-width: 1280px) {
  .store-layout--index {
    grid-template-columns: 300px 1fr;
    gap: var(--space-10);
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-chip,
  .product-card--store,
  .product-card--store .product-card__cta {
    transition: none;
  }

  .product-card--store:hover,
  .product-card--store .product-card__cta:hover {
    transform: none;
  }
}

/* ============================================================
   Related Products Carousel
   ============================================================ */

.related-carousel {
  position: relative;
  padding-inline: var(--space-8);
}

.related-carousel__viewport {
  overflow: hidden;
  padding-bottom: var(--space-8);
}

.related-carousel__track {
  display: flex;
  align-items: stretch;
  transition: transform 0.4s ease-in-out;
  gap: 1.5rem;
}

.related-carousel__slide {
  flex: 0 0 calc((100% - 3rem) / 3);
  min-width: 0;
  display: flex;
}

.related-carousel .product-card {
  overflow: visible;
  width: 100%;
}

.related-carousel .product-card__image {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.related-carousel .product-card__actions {
  padding-bottom: var(--space-6);
}

.related-carousel .product-card__actions form,
.related-carousel .product-card__form {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.related-carousel .product-card__actions .btn--primary {
  width: 100%;
}

.related-carousel .product-card:hover {
  transform: none;
  box-shadow: var(--shadow-hover);
}

.related-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--brand-navy);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.related-carousel__arrow:hover {
  background: #e11d48;
  transform: translateY(-50%) scale(1.05);
}

.related-carousel__arrow--prev {
  left: -24px;
}

.related-carousel__arrow--next {
  right: -24px;
}

@media (max-width: 768px) {
  .related-carousel {
    padding-inline: 0;
    max-width: 100%;
  }

  .related-carousel__viewport {
    overflow-x: hidden;
    max-width: 100%;
    padding-bottom: var(--space-4);
  }

  .related-carousel__track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    width: 100%;
    max-width: 100%;
    transform: none !important;
  }

  .related-carousel__slide {
    flex: none;
    min-width: 0;
    width: 100%;
  }

  .related-carousel__slide:nth-child(n+5) {
    display: none;
  }

  .related-carousel .product-card {
    min-width: 0;
  }

  .related-carousel .product-card__body {
    padding: var(--space-3) var(--space-3);
  }

  .related-carousel .product-card__title {
    font-size: var(--text-sm);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .related-carousel .product-card__price-regular,
  .related-carousel .product-card__price-current {
    font-size: var(--text-base);
  }

  .related-carousel .product-card__actions {
    padding: var(--space-3);
    gap: var(--space-2);
  }

  .related-carousel .product-card__view-btn {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .related-carousel .product-card__cta,
  .related-carousel .product-card__cta--primary {
    min-height: 44px;
    padding-inline: var(--space-2);
    font-size: var(--text-sm);
  }

  .related-carousel__arrow {
    display: none;
  }
}

@media (max-width: 640px) {
  .related-carousel__arrow--prev {
    left: -12px;
  }

  .related-carousel__arrow--next {
    right: -12px;
  }
}


/* ---------- Dark mode overrides for shop ---------- */
:root[data-theme="dark"] .product-card,
:root[data-theme="dark"] .cart-item,
:root[data-theme="dark"] .checkout-panel,
:root[data-theme="dark"] .order-summary,
:root[data-theme="dark"] .shipping-form,
:root[data-theme="dark"] .product-show__purchase {
  background: var(--bg-elevated);
  border-color: var(--border);
}

:root[data-theme="dark"] .product-card__image,
:root[data-theme="dark"] .cart-item__image {
  background: var(--bg-sunken);
}

:root[data-theme="dark"] .quantity-input {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--fg);
}

:root[data-theme="dark"] .form__input,
:root[data-theme="dark"] .form__select,
:root[data-theme="dark"] .form__textarea {
  background-color: var(--bg-elevated);
  color: var(--fg);
}
