/* ============================================================
   THEME: tienda_default — Green Online Store
   MODULE: online_store
   Light theme — WCAG AA. Emerald/green palette for tienda en línea.
   ============================================================ */
:root {
  /* ── Brand ────────────────────────────────────────────── */
  --t-primary: #059669;
  --t-primary-dark: #047857;
  --t-primary-light: #D1FAE5;
  --t-primary-rgb: 5, 150, 105;
  --t-secondary: #047857;
  --t-secondary-light: #065F46;
  --t-accent: #FFF;

  /* ── Surfaces ─────────────────────────────────────────── */
  --t-bg-page: #F9FAFB;
  --t-bg-surface: #FFF;
  --t-bg-surface-raised: #FFF;
  --t-bg-hero: #047857;
  --t-bg-section-alt: #F3F4F6;
  --t-bg-item-empty: #D1FAE5;

  /* ── Text ─────────────────────────────────────────────── */
  --t-text-heading: #111827;
  --t-text-body: #374151;
  --t-text-muted: #6B7280;
  --t-text-inverse: #FFF;
  --t-text-accent: #059669;
  --t-text-price: #047857;
  --t-text-link: #059669;
  --t-text-link-hover: #047857;

  /* ── Borders ──────────────────────────────────────────── */
  --t-border: #E5E7EB;
  --t-border-input: #D1D5DB;
  --t-border-focus: #059669;
  --t-border-error: #EF4444;
  --t-radius: 0.75rem;
  --t-radius-sm: 0.5rem;
  --t-radius-full: 9999px;

  /* ── Buttons ──────────────────────────────────────────── */
  --t-btn-primary-bg: #059669;
  --t-btn-primary-text: #FFF;
  --t-btn-primary-hover: #047857;
  --t-btn-secondary-bg: transparent;
  --t-btn-secondary-text: #059669;
  --t-btn-secondary-border: #059669;
  --t-btn-secondary-hover-bg: #D1FAE5;
  --t-btn-danger-bg: #EF4444;
  --t-btn-danger-text: #FFF;
  --t-btn-disabled-bg: #D1D5DB;
  --t-btn-disabled-text: #9CA3AF;

  /* ── Nav ──────────────────────────────────────────────── */
  --t-nav-bg: #047857;
  --t-nav-text: #F9FAFB;
  --t-nav-link-hover: rgb(255 255 255 / 10%);
  --t-nav-cta-bg: #059669;
  --t-nav-cta-text: #FFF;

  /* ── Badges ───────────────────────────────────────────── */
  --t-badge-bg: #D1FAE5;
  --t-badge-text: #047857;
  --t-badge-success-bg: #D1FAE5;
  --t-badge-success-text: #065F46;
  --t-badge-warning-bg: #FEF3C7;
  --t-badge-warning-text: #92400E;
  --t-badge-danger-bg: #FEE2E2;
  --t-badge-danger-text: #991B1B;
  --t-badge-neutral-bg: #F3F4F6;
  --t-badge-neutral-text: #374151;

  /* ── Forms ────────────────────────────────────────────── */
  --t-input-bg: #FFF;
  --t-input-text: #111827;
  --t-input-placeholder: #9CA3AF;
  --t-label-text: #374151;
  --t-hint-text: #6B7280;
  --t-error-text: #DC2626;
  --t-form-section-bg: #FFF;

  /* ── Alerts ───────────────────────────────────────────── */
  --t-alert-info-bg: #EFF6FF;
  --t-alert-info-text: #1E40AF;
  --t-alert-info-border: #BFDBFE;
  --t-alert-success-bg: #ECFDF5;
  --t-alert-success-text: #065F46;
  --t-alert-success-border: #A7F3D0;
  --t-alert-warning-bg: #FFFBEB;
  --t-alert-warning-text: #92400E;
  --t-alert-warning-border: #FDE68A;
  --t-alert-error-bg: #FEF2F2;
  --t-alert-error-text: #991B1B;
  --t-alert-error-border: #FECACA;

  /* ── Cart / Checkout ──────────────────────────────────── */
  --t-cart-header-bg: #047857;
  --t-cart-header-text: #FFF;
  --t-cart-summary-bg: #FFF;
  --t-cart-total-text: #047857;
  --t-coupon-bg: #D1FAE5;
  --t-coupon-text: #047857;

  /* ── Steps ────────────────────────────────────────────── */
  --t-step-active-bg: #059669;
  --t-step-active-text: #FFF;
  --t-step-done-bg: #047857;
  --t-step-done-text: #FFF;
  --t-step-pending-bg: #E5E7EB;
  --t-step-pending-text: #6B7280;
  --t-step-line: #E5E7EB;

  /* ── Footer ───────────────────────────────────────────── */
  --t-footer-bg: #047857;
  --t-footer-text: #D1D5DB;
  --t-footer-link: #E5E7EB;
  --t-footer-link-hover: #FFF;
  --t-footer-divider: #374151;

  /* ── Empty states ─────────────────────────────────────── */
  --t-empty-icon-bg: #D1FAE5;
  --t-empty-icon-text: #059669;

  /* ── Checkout flow layout ─────────────────────────────── */
  --t-checkout-back-bg: rgb(255 255 255 / 20%);
  --t-checkout-back-hover: rgb(255 255 255 / 30%);
  --t-checkout-back-border: rgb(255 255 255 / 30%);
  --t-checkout-grid-gap: 2rem;
  --t-option-card-border: #E5E7EB;
  --t-option-card-selected-border: var(--t-primary);
  --t-option-card-selected-bg: var(--t-primary-light);

  /* ── Container ──────────────────────────────────────────── */
  --t-container-padding-x: 1.5rem;

  /* ── Store index (/tienda) ──────────────────────────────── */
  --t-store-hero-padding-y: 3rem;
  --t-store-hero-title-size: 1.875rem;
  --t-store-hero-subtitle-size: 1.25rem;
  --t-store-hero-search-max-width: 42rem;
  --t-store-categories-padding-y: 0.75rem;
  --t-store-section-padding-y: 2rem;
  --t-store-grid-gap: 1.5rem;

  /* ── Product detail (/tienda/:slug) ─────────────────────── */
  --t-product-detail-padding-y: 2rem;
  --t-product-detail-padding-x: 1.5rem;
  --t-product-detail-content-padding: 1.5rem;
  --t-product-detail-content-radius: var(--t-radius);
  --t-product-gallery-bg: #E5E7EB;
  --t-product-gallery-empty-bg: #E5E7EB;
  --t-product-gallery-empty-text: #6B7280;
  --t-product-thumbnail-border: transparent;
  --t-product-thumbnail-border-hover: var(--t-primary);
  --t-product-condition-badge-bg: rgb(255 255 255 / 90%);
  --t-product-condition-badge-text: var(--t-text-heading);
  --t-product-discount-badge-bg: var(--t-badge-danger-bg);
  --t-product-discount-badge-text: var(--t-badge-danger-text);
  --t-product-carousel-arrow-bg: rgb(0 0 0 / 50%);
  --t-product-carousel-arrow-hover: rgb(0 0 0 / 70%);
  --t-product-carousel-counter-bg: rgb(0 0 0 / 60%);
  --t-product-detail-gap: 2rem;
  --t-product-detail-price-size: 2.25rem;
  --t-product-detail-price-old-size: 1.25rem;

  /* ── Marketplace landing (public root) ─────────────────── */
  --t-landing-hero-cta-bg: #FFF;
  --t-landing-hero-cta-text: #047857;
  --t-landing-hero-cta-hover: #D1FAE5;
  --t-landing-overlay-bg: rgb(0 0 0 / 70%);
  --t-landing-overlay-text: #FFF;
  --t-landing-promo-card-bg: var(--t-bg-surface);
  --t-landing-promo-card-border: var(--t-border);
}

@media (width >= 768px) {
  :root {
    --t-store-hero-padding-y: 4rem;
    --t-store-hero-title-size: 2.25rem;
    --t-store-hero-subtitle-size: 1.5rem;
    --t-store-section-padding-y: 3rem;
  }
}

/* ================================================================
   COMPONENT STYLES — All colors from variables above
   ================================================================ */
.theme-page { background-color: var(--t-bg-page); min-height: 100vh; }
.theme-surface { background-color: var(--t-bg-surface); }
.theme-surface-raised { background-color: var(--t-bg-surface-raised); box-shadow: 0 4px 6px -1px rgb(0 0 0 / 10%), 0 2px 4px -2px rgb(0 0 0 / 10%); }
.theme-hero { background-color: var(--t-bg-hero); color: var(--t-text-inverse); }
.theme-section-alt { background-color: var(--t-bg-section-alt); }
.theme-divider { border-color: var(--t-border); }

.theme-heading { color: var(--t-text-heading); }
.theme-subheading { color: var(--t-text-heading); }
.theme-body { color: var(--t-text-body); }
.theme-muted { color: var(--t-text-muted); }
.theme-inverse-text { color: var(--t-text-inverse); }
.theme-link { color: var(--t-text-link); text-decoration: none; }
.theme-link:hover { color: var(--t-text-link-hover); text-decoration: underline; }
.theme-price { color: var(--t-text-price); font-weight: 700; }
.theme-accent-text { color: var(--t-text-accent); }

.theme-nav,
.theme-header { background-color: var(--t-nav-bg); color: var(--t-nav-text); box-shadow: 0 1px 0 0 rgb(0 0 0 / 6%); }
.theme-nav-link { color: var(--t-nav-text); transition: background-color 0.15s; border: none; background: transparent; border-radius: var(--t-radius-sm); padding: 0.5rem 1rem; text-decoration: none; font-size: 0.9375rem; }
.theme-nav-link:hover { background-color: var(--t-nav-link-hover); }
.theme-nav-link-active { background-color: var(--t-nav-link-hover); font-weight: 600; }
.theme-nav-cta { background-color: var(--t-nav-cta-bg); color: var(--t-nav-cta-text); border-radius: var(--t-radius-sm); padding: 0.5rem 1rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.theme-nav-cta:hover { opacity: 0.95; color: var(--t-nav-cta-text); }
.theme-breadcrumb { color: var(--t-text-muted); font-size: 0.875rem; }

.theme-btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background-color: var(--t-btn-primary-bg);
  color: var(--t-btn-primary-text);
  border: none; border-radius: var(--t-radius-sm);
  padding: 0.625rem 1.5rem; font-weight: 600; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}
.theme-btn-primary:hover { background-color: var(--t-btn-primary-hover); color: var(--t-btn-primary-text); }
.theme-btn-primary:active { transform: scale(0.98); }

.theme-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background-color: var(--t-btn-secondary-bg);
  color: var(--t-btn-secondary-text);
  border: 1.5px solid var(--t-btn-secondary-border);
  border-radius: var(--t-radius-sm);
  padding: 0.625rem 1.5rem; font-weight: 600; cursor: pointer;
  transition: background-color 0.15s ease;
  text-decoration: none;
}
.theme-btn-secondary:hover { background-color: var(--t-btn-secondary-hover-bg); color: var(--t-btn-secondary-text); }

.theme-btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  background-color: var(--t-btn-danger-bg); color: var(--t-btn-danger-text);
  border: none; border-radius: var(--t-radius-sm);
  padding: 0.625rem 1.5rem; font-weight: 600; cursor: pointer;
  text-decoration: none;
}

.theme-btn-disabled {
  background-color: var(--t-btn-disabled-bg) !important;
  color: var(--t-btn-disabled-text) !important;
  cursor: not-allowed; pointer-events: none;
}

.theme-card {
  background-color: var(--t-bg-surface);
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  overflow: hidden;
}
.theme-card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.theme-card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 25px -5px rgb(0 0 0 / 15%); }
.theme-card-selected { border-color: var(--t-primary); box-shadow: 0 0 0 2px rgba(var(--t-primary-rgb), 0.2); }
.theme-item-name { color: var(--t-text-heading); font-weight: 700; }
.theme-item-price { color: var(--t-text-price); font-weight: 700; }
.theme-item-meta { color: var(--t-text-muted); font-size: 0.875rem; }
.theme-item-tag { background-color: var(--t-badge-bg); color: var(--t-badge-text); border-radius: var(--t-radius-full); padding: 0.125rem 0.625rem; font-size: 0.75rem; font-weight: 600; }
.theme-item-image-bg { background-color: var(--t-bg-item-empty); }

.theme-badge { background-color: var(--t-badge-bg); color: var(--t-badge-text); border-radius: var(--t-radius-full); padding: 0.2rem 0.7rem; font-size: 0.75rem; font-weight: 600; }
.theme-badge-success { background-color: var(--t-badge-success-bg); color: var(--t-badge-success-text); border-radius: var(--t-radius-full); padding: 0.2rem 0.7rem; font-size: 0.75rem; font-weight: 600; }
.theme-badge-warning { background-color: var(--t-badge-warning-bg); color: var(--t-badge-warning-text); border-radius: var(--t-radius-full); padding: 0.2rem 0.7rem; font-size: 0.75rem; font-weight: 600; }
.theme-badge-danger { background-color: var(--t-badge-danger-bg); color: var(--t-badge-danger-text); border-radius: var(--t-radius-full); padding: 0.2rem 0.7rem; font-size: 0.75rem; font-weight: 600; }
.theme-badge-neutral { background-color: var(--t-badge-neutral-bg); color: var(--t-badge-neutral-text); border-radius: var(--t-radius-full); padding: 0.2rem 0.7rem; font-size: 0.75rem; font-weight: 600; }
.theme-tag { background-color: var(--t-badge-bg); color: var(--t-badge-text); border-radius: var(--t-radius-full); padding: 0.25rem 0.875rem; font-size: 0.875rem; font-weight: 500; }
.theme-category-pill { line-height: 1.25; }
.theme-categories-row { align-items: center; }
.theme-category-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.375rem; font-size: 0.75rem; font-weight: 700; border-radius: 9999px; background-color: var(--t-primary); color: var(--t-btn-primary-text); line-height: 1; vertical-align: middle; }

.theme-form-label { color: var(--t-label-text); font-size: 0.875rem; font-weight: 500; }

.theme-input {
  background-color: var(--t-input-bg);
  color: var(--t-input-text);
  border: 1.5px solid var(--t-border-input);
  border-radius: var(--t-radius-sm);
  padding: 0.5rem 0.75rem;
  width: 100%;
  transition: border-color 0.15s;
}
.theme-input::placeholder { color: var(--t-input-placeholder); }
.theme-input:focus { outline: none; border-color: var(--t-border-focus); box-shadow: 0 0 0 3px rgba(var(--t-primary-rgb), 0.15); }
.theme-input-error { border-color: var(--t-border-error) !important; }

/* Search bar: icon and input in one row so icon never overlaps placeholder */
.theme-search-wrapper {
  background-color: var(--t-input-bg);
  border: 1.5px solid var(--t-border-input);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
  transition: border-color 0.15s;
  width: 100%;
}
.theme-search-wrapper:focus-within { outline: none; border-color: var(--t-border-focus); box-shadow: 0 0 0 3px rgba(var(--t-primary-rgb), 0.15); }
.theme-search-row { display: flex; align-items: center; border-radius: var(--t-radius); overflow: hidden; }
.theme-search-icon { padding-left: 1rem; flex-shrink: 0; pointer-events: none; }
.theme-search-icon-i { font-size: 1rem; }
.theme-search-input { flex: 1; min-width: 0; padding: 0.75rem 1rem; border: 0; background: transparent; font-size: 1rem; color: var(--t-text-body); }
.theme-search-input::placeholder { color: var(--t-input-placeholder); }
.theme-search-input:focus { outline: none; }
.theme-search-clear { padding-right: 0.75rem; flex-shrink: 0; }
.theme-search-clear.theme-hidden { display: none !important; }
.theme-search-clear-btn { padding: 0.25rem; background: none; border: none; cursor: pointer; color: inherit; }
.theme-hidden { display: none !important; }
.hidden { display: none !important; }
.theme-store-categories-bar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--t-border); }
.theme-store-categories { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; overflow-x: auto; padding-top: var(--t-store-categories-padding-y); padding-bottom: var(--t-store-categories-padding-y); scrollbar-width: none; -ms-overflow-style: none; }
.theme-store-categories::-webkit-scrollbar { display: none; }
.theme-store-categories .theme-category-pill { white-space: nowrap; min-height: 2rem; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; border-radius: var(--t-radius-full); display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.theme-store-card-image-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.theme-store-card-image-placeholder-icon { font-size: 2.5rem; }
.theme-store-card-prices { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: auto; }
.theme-price-old { text-decoration: line-through; font-size: 0.875rem; }
.theme-store-card-btn { width: 100%; justify-content: center; align-items: center; gap: 0.5rem; font-weight: 600; padding: 0.5rem 1rem; }
.theme-store-card-btn i { flex-shrink: 0; }
.theme-store-empty-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
.theme-store-empty-icon-i { font-size: 2.5rem; }
.theme-form-hint { color: var(--t-hint-text); font-size: 0.8125rem; margin-top: 0.25rem; }
.theme-form-error { color: var(--t-error-text); font-size: 0.8125rem; margin-top: 0.25rem; }
.theme-form-section { background-color: var(--t-form-section-bg); border: 1px solid var(--t-border); border-radius: var(--t-radius); padding: 1.5rem; }
.theme-fieldset-legend { color: var(--t-text-heading); font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }

.theme-alert-info { background-color: var(--t-alert-info-bg); color: var(--t-alert-info-text); border: 1px solid var(--t-alert-info-border); border-radius: var(--t-radius); padding: 1rem; }
.theme-alert-success { background-color: var(--t-alert-success-bg); color: var(--t-alert-success-text); border: 1px solid var(--t-alert-success-border); border-radius: var(--t-radius); padding: 1rem; }
.theme-alert-warning { background-color: var(--t-alert-warning-bg); color: var(--t-alert-warning-text); border: 1px solid var(--t-alert-warning-border); border-radius: var(--t-radius); padding: 1rem; }
.theme-alert-error { background-color: var(--t-alert-error-bg); color: var(--t-alert-error-text); border: 1px solid var(--t-alert-error-border); border-radius: var(--t-radius); padding: 1rem; }

.theme-cart-header { background-color: var(--t-cart-header-bg); color: var(--t-cart-header-text); }
.theme-cart-header .grid { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: center; }

@media (width >= 1024px) {
  .theme-cart-header .grid { grid-template-columns: 1fr 1fr 1fr; }
  .theme-cart-header .grid > *:nth-child(2) { min-width: 0; }
}
.theme-cart-header-text { color: var(--t-cart-header-text); }
.theme-cart-item { border-bottom: 1px solid var(--t-border); }
.theme-cart-remove-btn { padding: 0.375rem; border-radius: var(--t-radius-full); background-color: var(--t-btn-danger-bg); color: var(--t-btn-danger-text); border: none; cursor: pointer; transition: opacity 0.15s; flex-shrink: 0; }
.theme-cart-remove-btn:hover { opacity: 0.9; }
.theme-cart-summary { background-color: var(--t-cart-summary-bg); border: 1px solid var(--t-border); border-radius: var(--t-radius); padding: 1.5rem; }
.theme-cart-total { color: var(--t-cart-total-text); font-weight: 700; font-size: 1.125rem; }
.theme-coupon-badge { background-color: var(--t-coupon-bg); color: var(--t-coupon-text); border-radius: var(--t-radius-sm); padding: 0.25rem 0.625rem; font-size: 0.875rem; font-weight: 500; }

.theme-step-active { background-color: var(--t-step-active-bg); color: var(--t-step-active-text); border-radius: var(--t-radius-full); width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 600; }
.theme-step-completed { background-color: var(--t-step-done-bg); color: var(--t-step-done-text); border-radius: var(--t-radius-full); width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; font-size: 0.875rem; }
.theme-step-pending { background-color: var(--t-step-pending-bg); color: var(--t-step-pending-text); border-radius: var(--t-radius-full); width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; font-size: 0.875rem; }
.theme-step-line { background-color: var(--t-step-line); height: 2px; flex: 1; }

/* Checkout flow layout */
.theme-checkout-page { min-height: 100vh; background-color: var(--t-bg-page); overflow-x: hidden; }
.theme-checkout-back { display: inline-flex; align-items: center; padding: 0.5rem 1rem; border-radius: var(--t-radius); font-weight: 500; border: 1px solid var(--t-checkout-back-border); background-color: var(--t-checkout-back-bg); color: var(--t-cart-header-text); text-decoration: none; transition: background-color 0.15s; }
.theme-checkout-back:hover { background-color: var(--t-checkout-back-hover); color: var(--t-cart-header-text); }
.theme-checkout-header-row { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: center; }
.theme-checkout-mobile-actions { padding: 1rem var(--t-container-padding-x); }
.theme-checkout-main { padding-top: 0.5rem; padding-bottom: 3rem; }

@media (width >= 768px) {
  .theme-checkout-main { padding-top: 2rem; padding-bottom: 4rem; }
}
.theme-checkout-grid { display: grid; grid-template-columns: 1fr; gap: var(--t-checkout-grid-gap); }
.theme-checkout-summary-col { margin-bottom: 3rem; }
.theme-option-card { display: flex; align-items: flex-start; padding: 1rem; border: 2px solid var(--t-option-card-border); border-radius: var(--t-radius); cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.theme-option-card:hover { border-color: var(--t-border-input); }
.theme-option-card-selected { border-color: var(--t-option-card-selected-border); background-color: var(--t-option-card-selected-bg); }
.theme-quantity-control { display: flex; align-items: center; border: 1px solid var(--t-border); border-radius: var(--t-radius-sm); overflow: hidden; }
.theme-quantity-btn { padding: 0.375rem 0.625rem; color: var(--t-text-muted); background: transparent; border: none; cursor: pointer; transition: background-color 0.15s; }
.theme-quantity-btn:hover { background-color: var(--t-bg-section-alt); }
.theme-quantity-value { padding: 0.375rem 0.75rem; min-width: 2rem; text-align: center; font-size: 0.875rem; font-weight: 500; color: var(--t-text-body); }
.theme-discount-row { color: var(--t-text-price); }

@media (width >= 1024px) {
  .theme-checkout-header-row { grid-template-columns: 1fr auto 1fr; }
  .theme-checkout-grid { grid-template-columns: 1fr 1fr 1fr; }
  .theme-checkout-form-col { grid-column: span 2; }
  .theme-checkout-summary-col { margin-bottom: 0; }
  .theme-checkout-summary-sticky { position: sticky; top: 1.5rem; }
}
.theme-checkout-grid-payment { display: grid; grid-template-columns: 1fr; gap: var(--t-checkout-grid-gap); }

@media (width >= 1024px) {
  .theme-checkout-grid-payment { grid-template-columns: repeat(5, 1fr); }
  .theme-checkout-form-col-payment { grid-column: span 3; }
  .theme-checkout-summary-col-payment { grid-column: span 2; }
}

.theme-empty-icon { background-color: var(--t-empty-icon-bg); border-radius: var(--t-radius-full); display: inline-flex; align-items: center; justify-content: center; width: 5rem; height: 5rem; color: var(--t-empty-icon-text); font-size: 2rem; }
.theme-empty-heading { color: var(--t-text-heading); font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.theme-empty-body { color: var(--t-text-muted); font-size: 0.9375rem; margin-top: 0.5rem; }

/* Store index (/tienda) */
.theme-store-page { background-color: var(--t-bg-section-alt); }
.theme-container { max-width: 80rem; margin-left: auto; margin-right: auto; padding-left: var(--t-container-padding-x); padding-right: var(--t-container-padding-x); }
.theme-page .theme-container { padding-left: var(--t-container-padding-x); padding-right: var(--t-container-padding-x); }
.theme-store-hero { padding-top: var(--t-store-hero-padding-y); padding-bottom: var(--t-store-hero-padding-y); text-align: center; }
.theme-store-hero-inner { max-width: 80rem; margin-left: auto; margin-right: auto; padding-left: var(--t-container-padding-x); padding-right: var(--t-container-padding-x); }
.theme-store-hero-title { font-size: var(--t-store-hero-title-size); font-weight: 700; margin-bottom: 1rem; }
.theme-store-hero-subtitle { font-size: var(--t-store-hero-subtitle-size); margin-bottom: 1.5rem; opacity: 0.9; }
.theme-store-hero-search { max-width: var(--t-store-hero-search-max-width); margin-left: auto; margin-right: auto; }
.theme-store-section { padding-top: var(--t-store-section-padding-y); padding-bottom: var(--t-store-section-padding-y); }
.theme-store-grid { display: grid; grid-template-columns: 1fr; gap: var(--t-store-grid-gap); }
.theme-store-empty { text-align: center; padding-top: 4rem; padding-bottom: 4rem; }
.theme-store-empty-inner { max-width: 28rem; margin-left: auto; margin-right: auto; }
.theme-store-empty-icon { width: 4rem; height: 4rem; margin-left: auto; margin-right: auto; margin-bottom: 1rem; }
.theme-store-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: var(--t-radius); box-shadow: 0 4px 6px -1px rgb(0 0 0 / 10%); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.theme-store-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px -5px rgb(0 0 0 / 15%); }
.theme-store-page .theme-store-section { padding-bottom: 1.5rem; }
.theme-store-card-link { flex: 1; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.theme-store-card-image-wrap { position: relative; width: 100%; padding-bottom: 75%; overflow: hidden; }
.theme-store-card-image-wrap img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.theme-store-card-link:hover .theme-store-card-image-wrap img { transform: scale(1.05); }
.theme-store-card-badge-tl { position: absolute; top: 0.75rem; left: 0.75rem; }
.theme-store-card-badge-tr { position: absolute; top: 0.75rem; right: 0.75rem; }
.theme-store-card-out-of-stock { position: absolute; inset: 0; background-color: rgb(0 0 0 / 60%); display: flex; align-items: center; justify-content: center; }
.theme-store-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.theme-store-card-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--t-text-heading); }
.theme-store-card-title:hover { opacity: 0.8; }
.theme-store-card-meta { margin-bottom: 0.75rem; flex: 1; }
.theme-store-card-footer { padding: 1rem; padding-top: 0; }
.theme-line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (width >= 640px) { .theme-store-grid { grid-template-columns: repeat(2, 1fr); } }

@media (width >= 1024px) { .theme-store-grid { grid-template-columns: repeat(3, 1fr); } }

@media (width >= 1280px) { .theme-store-grid { grid-template-columns: repeat(4, 1fr); } }

/* Product detail (/tienda/:slug) */
.theme-product-detail-page { background-color: var(--t-bg-page); min-height: 100vh; }
.theme-product-detail-container { max-width: 80rem; margin-left: auto; margin-right: auto; padding: var(--t-product-detail-padding-y) var(--t-product-detail-padding-x); }
.theme-product-detail-grid { display: grid; grid-template-columns: 1fr; gap: var(--t-product-detail-gap); }
.theme-product-detail-card { background-color: var(--t-bg-surface); border-radius: var(--t-product-detail-content-radius); box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%); padding: var(--t-product-detail-content-padding); }
.theme-product-breadcrumb { font-size: 0.875rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; color: var(--t-text-muted); }
.theme-product-breadcrumb-link { color: var(--t-text-link); text-decoration: none; }
.theme-product-breadcrumb-link:hover { color: var(--t-text-link-hover); text-decoration: underline; }
.theme-product-breadcrumb-current { color: var(--t-text-heading); font-weight: 500; }
.theme-product-breadcrumb-sep { color: var(--t-border); }
.theme-product-gallery { background-color: var(--t-product-gallery-bg); border-radius: var(--t-radius); overflow: hidden; position: relative; }
.theme-product-gallery-aspect { aspect-ratio: 1 / 1; position: relative; width: 100%; }
.theme-product-gallery-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.theme-product-gallery-frame img { object-fit: cover; width: 100%; height: 100%; display: block; }
.theme-product-gallery-empty { background-color: var(--t-product-gallery-empty-bg); border-radius: var(--t-radius); display: flex; align-items: center; justify-content: center; color: var(--t-product-gallery-empty-text); flex-direction: column; }
.theme-product-gallery-empty-fill { width: 100%; height: 100%; }
.theme-product-gallery-empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.theme-product-gallery-thumbnails { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; margin-top: 1rem; }
.theme-product-badge-pos-tl { position: absolute; top: 0.5rem; left: 0.5rem; }
.theme-product-badge-pos-tr { position: absolute; top: 0.5rem; right: 0.5rem; }
.theme-product-badge-pos-bl { position: absolute; bottom: 0.5rem; left: 0.5rem; }
.theme-product-carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; border-radius: var(--t-radius-full); z-index: 10; background-color: var(--t-product-carousel-arrow-bg); color: var(--t-text-inverse); transition: background-color 0.15s; }
.theme-product-carousel-arrow:hover { background-color: var(--t-product-carousel-arrow-hover); }
.theme-product-carousel-arrow-prev { left: 0.5rem; }
.theme-product-carousel-arrow-next { right: 0.5rem; }
.theme-product-carousel-counter { background-color: var(--t-product-carousel-counter-bg); color: var(--t-text-inverse); border-radius: var(--t-radius-sm); font-size: 0.75rem; padding: 0.25rem 0.75rem; }
.theme-product-thumbnail { border: 2px solid var(--t-product-thumbnail-border); border-radius: var(--t-radius-sm); overflow: hidden; transition: border-color 0.2s; flex-shrink: 0; cursor: pointer; width: 5rem; height: 5rem; display: block; }
.theme-product-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.theme-product-thumbnail:hover { border-color: var(--t-product-thumbnail-border-hover); }
.theme-product-thumbnail-active { border-color: var(--t-product-thumbnail-border-hover); }
.theme-product-condition-badge { background-color: var(--t-product-condition-badge-bg); color: var(--t-product-condition-badge-text); font-size: 0.75rem; font-weight: 600; border-radius: var(--t-radius-full); padding: 0.25rem 0.75rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%); }
.theme-product-discount-badge { background-color: var(--t-product-discount-badge-bg); color: var(--t-product-discount-badge-text); font-size: 0.75rem; font-weight: 700; border-radius: var(--t-radius-full); padding: 0.25rem 0.75rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 10%); }
.theme-product-save-badge { background-color: var(--t-badge-success-bg); color: var(--t-badge-success-text); font-size: 0.875rem; font-weight: 600; border-radius: var(--t-radius-full); padding: 0.25rem 0.75rem; }
.theme-product-detail-section { border-bottom: 1px solid var(--t-border); padding-bottom: var(--t-product-detail-content-padding); margin-bottom: var(--t-product-detail-content-padding); }
.theme-product-detail-section:last-of-type { border-bottom: none; }
.theme-product-detail-info { display: flex; flex-direction: column; gap: 1rem; }
.theme-product-detail-info-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; }
.theme-product-detail-info-label { color: var(--t-text-muted); }
.theme-product-detail-info-value { color: var(--t-text-heading); font-weight: 500; }
.theme-product-detail-cta-block { border-top: 1px solid var(--t-border); padding-top: var(--t-product-detail-content-padding); }
.theme-product-detail-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; font-weight: 700; padding: 1rem 1.5rem; border-radius: var(--t-radius); font-size: 1.125rem; text-decoration: none; border: none; cursor: pointer; transition: background-color 0.2s; }
.theme-product-detail-btn-primary { background-color: var(--t-btn-primary-bg); color: var(--t-btn-primary-text); }
.theme-product-detail-btn-primary:hover { background-color: var(--t-btn-primary-hover); }
.theme-product-detail-btn-disabled { background-color: var(--t-btn-disabled-bg); color: var(--t-btn-disabled-text); cursor: not-allowed; }
.theme-product-detail-btn-sm { font-size: 0.875rem; padding: 0.75rem 1rem; }
.theme-product-prose { color: var(--t-text-body); max-width: none; }
.theme-product-detail-title { font-size: 1.875rem; margin-bottom: 1rem; }
.theme-product-detail-category-wrap { margin-bottom: 1rem; }
.theme-product-detail-price-wrap { display: flex; align-items: baseline; gap: 0.75rem; }
.theme-product-detail-price-save { margin-top: 0.5rem; }
.theme-product-detail-description-heading { font-size: 1.25rem; margin-bottom: 0.75rem; }
.theme-product-detail-price-lg { font-size: var(--t-product-detail-price-size); }
.theme-product-detail-price-old { font-size: var(--t-product-detail-price-old-size); text-decoration: line-through; }
.theme-product-detail-price-inquiry { font-size: var(--t-product-detail-price-size); }

@media (width >= 1024px) {
  .theme-product-detail-grid { grid-template-columns: 1fr 1fr; }
  .theme-product-detail-card { padding: 2rem; }
}

.theme-footer { background-color: var(--t-footer-bg); color: var(--t-footer-text); }
.theme-footer-link { color: var(--t-footer-link); text-decoration: none; }
.theme-footer-link:hover { color: var(--t-footer-link-hover); text-decoration: underline; }
.theme-footer-divider { border-color: var(--t-footer-divider); }
.theme-footer .theme-container { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.theme-footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.theme-footer-nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; }
.theme-footer-social { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; }
.theme-footer-social-link { color: var(--t-footer-link); text-decoration: none; font-size: 1.25rem; }
.theme-footer-social-link:hover { color: var(--t-footer-link-hover); }
.theme-footer-copy { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--t-footer-divider); font-size: 0.875rem; color: inherit; }
.theme-footer-powered { margin-top: 0.75rem; font-size: 0.8125rem; color: inherit; opacity: 0.9; }
.theme-footer-powered a { color: var(--t-footer-link); text-decoration: none; }
.theme-footer-powered a:hover { color: var(--t-footer-link-hover); text-decoration: underline; }

.theme-nav .theme-container,
.theme-header .theme-container { display: flex; align-items: center; justify-content: space-between; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.theme-header-brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; flex-shrink: 0; }

.theme-nav .theme-heading,
.theme-header .theme-heading { color: inherit; font-size: 1.125rem; font-weight: 700; }
.theme-header-logo { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.theme-nav-desktop { display: flex; align-items: center; gap: 0.75rem; }
.theme-nav-welcome { position: relative; }
.theme-nav-welcome-menu { position: absolute; top: 100%; right: 0; margin-top: 0.25rem; min-width: 10rem; background-color: var(--t-bg-surface); color: var(--t-text-heading); border: 1px solid var(--t-border); border-radius: var(--t-radius-sm); box-shadow: 0 4px 12px rgb(0 0 0 / 15%); z-index: 30; padding: 0.5rem 0; }
.theme-nav-welcome-menu a { display: block; padding: 0.5rem 1rem; color: var(--t-text-body); text-decoration: none; font-size: 0.9375rem; }
.theme-nav-welcome-menu a:hover { background-color: var(--t-bg-section-alt); color: var(--t-text-heading); }
.theme-nav-burger { display: none; background: none; border: none; color: inherit; padding: 0.5rem; cursor: pointer; font-size: 1.25rem; }
.theme-nav-drawer { position: fixed; top: 0; right: 0; width: 280px; max-width: 85vw; height: 100%; z-index: 50; transition: transform 0.25s ease; transform: translateX(100%); overflow-y: auto; background-color: var(--t-nav-bg); color: var(--t-nav-text); padding: 1.5rem 1rem; }
.theme-nav-drawer.is-open { transform: translateX(0); }
.theme-nav-drawer a { color: var(--t-nav-text); text-decoration: none; display: block; padding: 0.75rem 0; font-size: 0.9375rem; border-bottom: 1px solid var(--t-footer-divider); }
.theme-nav-drawer a:hover { opacity: 0.9; }
.theme-nav-drawer-overlay { position: fixed; inset: 0; background: rgb(0 0 0 / 40%); z-index: 40; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.theme-nav-drawer-overlay.is-visible { opacity: 1; pointer-events: auto; }

@media (width <= 767px) {
  .theme-nav-desktop { display: none !important; }
  .theme-nav-burger { display: block; }
}

@media (width >= 768px) {
  .theme-nav-drawer { display: none !important; }
  .theme-nav-drawer-overlay { display: none !important; }
}

/* ================================================================
   MARKETPLACE LANDING (public root)
   ================================================================ */
.theme-landing-hero-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background-color: var(--t-landing-hero-cta-bg);
  color: var(--t-landing-hero-cta-text);
  border: none; border-radius: var(--t-radius);
  padding: 0.75rem 1.5rem; font-weight: 600;
  text-decoration: none; transition: background-color 0.15s ease;
}
.theme-landing-hero-cta:hover { background-color: var(--t-landing-hero-cta-hover); color: var(--t-landing-hero-cta-text); }

.theme-landing-overlay-box {
  background-color: var(--t-landing-overlay-bg);
  color: var(--t-landing-overlay-text);
  border-radius: var(--t-radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(4px);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
}

.theme-landing-promo-card {
  background-color: var(--t-landing-promo-card-bg);
  border: 1px solid var(--t-landing-promo-card-border);
  border-radius: var(--t-radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.theme-landing-promo-card:hover { box-shadow: 0 4px 12px rgb(0 0 0 / 10%); }

.theme-landing-product-card {
  background-color: var(--t-bg-surface);
  border-radius: var(--t-radius);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 10%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column; height: 100%;
}
.theme-landing-product-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px -5px rgb(0 0 0 / 15%); }
.theme-landing-product-card .theme-item-name:hover { color: var(--t-text-link); }
.theme-landing-empty-icon-wrap { background-color: var(--t-empty-icon-bg); color: var(--t-empty-icon-text); border-radius: var(--t-radius-full); display: inline-flex; align-items: center; justify-content: center; width: 5rem; height: 5rem; font-size: 3rem; margin-bottom: 1rem; }
.theme-landing-section-strip { border-top: 1px solid var(--t-border); }
.theme-landing-contact-link { color: var(--t-text-body); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; transition: color 0.15s; }
.theme-landing-contact-link:hover { color: var(--t-text-link); }
.theme-landing-map-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: var(--t-radius); font-weight: 500; background-color: var(--t-btn-primary-bg); color: var(--t-btn-primary-text); text-decoration: none; transition: background-color 0.15s; }
.theme-landing-map-btn:hover { background-color: var(--t-btn-primary-hover); color: var(--t-btn-primary-text); }
.theme-landing-service-card { background-color: var(--t-bg-surface); border: 1px solid var(--t-border); border-radius: var(--t-radius); overflow: hidden; box-shadow: 0 1px 3px rgb(0 0 0 / 10%); transition: box-shadow 0.2s; flex-shrink: 0; width: 18rem; }
.theme-landing-service-card:hover { box-shadow: 0 4px 12px rgb(0 0 0 / 10%); }
.theme-landing-faq-item { border-bottom: 1px solid var(--t-border); padding: 1.25rem 0; }
.theme-landing-faq-item:last-of-type { border-bottom: none; padding-bottom: 0; }
.theme-landing-prose { color: var(--t-text-body); max-width: none; }
.theme-landing-prose-center { text-align: center; margin-left: auto; margin-right: auto; }
