/* ============================================================================
   shop-base.css
   ASSENT: fuente modular Shop (prefijo f)
   RUTA FUENTE: app/Modules/Shop/ShopFrontend/Assets/css/00-base.css
   PUBLICADO COMO: /assets/css/x/f1.css
   CLASES: .f-* (opaco, no delata el módulo)
   ============================================================================ */

/* --------------------------------------------------------------------------
   RESET & BASE (scope global solo para html/body)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

.f-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ey-brand-text, #111827);
  background: var(--ey-brand-background, #f3f4f6);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  min-height: 100vh;

  /* Branding global: Configuracion -> PublicLayout -> Shop */
  --f-red:        var(--ey-brand-primary, #dc2626);
  --f-red-dark:   color-mix(in srgb, var(--ey-brand-primary, #dc2626) 82%, #000);
  --f-red-light:  color-mix(in srgb, var(--ey-brand-primary, #dc2626) 16%, #fff);
  --f-red-pale:   color-mix(in srgb, var(--ey-brand-primary, #dc2626) 7%, #fff);
  --f-secondary:  var(--ey-brand-secondary, #374151);
  --f-accent:     var(--ey-brand-accent, #dc2626);
  --f-green:      #16a34a;
  --f-green-dark: #15803d;
  --f-green-pale: #f0fdf4;
  --f-yellow:     var(--ey-brand-accent, #d97706);
  --f-yellow-pale:color-mix(in srgb, var(--ey-brand-accent, #d97706) 8%, #fff);
  --f-gray-50:    #f9fafb;
  --f-gray-100:   #f3f4f6;
  --f-gray-200:   #e5e7eb;
  --f-gray-300:   #d1d5db;
  --f-gray-400:   #9ca3af;
  --f-gray-500:   #6b7280;
  --f-gray-600:   #4b5563;
  --f-gray-700:   #374151;
  --f-gray-800:   #1f2937;
  --f-gray-900:   #111827;
  --f-white:      #ffffff;
  --f-radius-sm:  0.375rem;
  --f-radius:     0.5rem;
  --f-radius-lg:  0.75rem;
  --f-radius-xl:  1rem;
  --f-radius-full: 9999px;
  --f-shadow-sm:  0 1px 2px 0 rgba(0,0,0,.05);
  --f-shadow:     0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  --f-shadow-md:  0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --f-shadow-lg:  0 10px 20px -3px rgba(0,0,0,.12), 0 4px 8px -4px rgba(0,0,0,.08);
  --f-transition: 150ms cubic-bezier(.4,0,.2,1);
}

/* Elementos base */
a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --------------------------------------------------------------------------
   ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes f-spin {
  to { transform: rotate(360deg); }
}

@keyframes f-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes f-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* --------------------------------------------------------------------------
   SHOP PAGE WRAPPER
   -------------------------------------------------------------------------- */
.f-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

/* --------------------------------------------------------------------------
   SHOP HEADER
   -------------------------------------------------------------------------- */
.f-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--ey-brand-background, #ffffff) 94%, #ffffff);
  border-bottom: 1px solid var(--f-gray-200);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.f-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.f-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--f-gray-900);
  flex-shrink: 0;
  text-decoration: none;
}

.f-logo-icon {
  width: 30px;
  height: 30px;
  background: var(--f-red);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.f-logo-icon svg {
  width: 16px;
  height: 16px;
  color: white;
}

.f-search-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.f-search {
  width: 100%;
  height: 36px;
  padding: 0 0.875rem 0 2.25rem;
  border: 1.5px solid var(--f-gray-200);
  border-radius: var(--f-radius-full);
  font-size: 0.875rem;
  background: var(--f-gray-50);
  color: var(--f-gray-900);
  outline: none;
  transition: border-color var(--f-transition), background var(--f-transition), box-shadow var(--f-transition);
}

.f-search:focus {
  border-color: var(--f-red);
  background: var(--f-white);
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.f-search-icon {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--f-gray-400);
  pointer-events: none;
  width: 14px;
  height: 14px;
}

.f-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  margin-left: auto;
  flex-shrink: 0;
}

.f-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--f-radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--f-gray-600);
  text-decoration: none;
  transition: background var(--f-transition), color var(--f-transition);
  white-space: nowrap;
}

.f-nav-link:hover {
  background: var(--f-gray-100);
  color: var(--f-gray-900);
}

.f-nav-link-primary {
  background: var(--f-red);
  color: var(--f-white) !important;
  font-weight: 600;
}

.f-nav-link-primary:hover {
  background: var(--f-red-dark) !important;
}

.f-cart-counter {
  background: var(--f-red);
  color: white;
  border-radius: var(--f-radius-full);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* --------------------------------------------------------------------------
   PAGE TITLE
   -------------------------------------------------------------------------- */
.f-page-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--f-gray-900);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   FILTER TABS
   -------------------------------------------------------------------------- */
.f-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.f-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 1rem;
  border-radius: var(--f-radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--f-gray-200);
  background: var(--f-white);
  color: var(--f-gray-600);
  transition: all var(--f-transition);
  white-space: nowrap;
}

.f-filter-btn:hover {
  border-color: var(--f-red);
  color: var(--f-red);
}

.f-filter-btn.f-active,
.f-filter-btn[data-active="true"] {
  background: var(--f-red);
  border-color: var(--f-red);
  color: var(--f-white);
}

/* --------------------------------------------------------------------------
   LOADING / SPINNER
   -------------------------------------------------------------------------- */
.f-loading {
  text-align: center;
  padding: 3.5rem 1rem;
}

.f-spinner {
  display: inline-block;
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid var(--f-gray-200);
  border-top-color: var(--f-red);
  border-radius: 50%;
  animation: f-spin 0.75s linear infinite;
}

.f-loading-text {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--f-gray-500);
}

/* --------------------------------------------------------------------------
   EMPTY / ERROR STATE
   -------------------------------------------------------------------------- */
.f-state-box {
  background: var(--f-white);
  border-radius: var(--f-radius-xl);
  border: 1px solid var(--f-gray-200);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.f-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.875rem;
}

.f-state-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--f-gray-800);
  margin-bottom: 0.375rem;
}

.f-state-desc {
  font-size: 0.875rem;
  color: var(--f-gray-500);
  margin-bottom: 1.25rem;
}

.f-error-pre {
  text-align: left;
  font-size: 0.75rem;
  background: var(--f-gray-100);
  padding: 0.75rem;
  border-radius: var(--f-radius);
  overflow: auto;
  max-width: 100%;
  white-space: pre-wrap;
  color: var(--f-gray-700);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   PRODUCT GRID
   -------------------------------------------------------------------------- */
.f-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
}

@media (min-width: 640px) {
  .f-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .f-product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1280px) {
  .f-product-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* --------------------------------------------------------------------------
   PRODUCT CARD
   -------------------------------------------------------------------------- */
.f-card {
  background: var(--f-white);
  border-radius: var(--f-radius-lg);
  border: 1px solid var(--f-gray-100);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 200ms ease, transform 200ms ease;
  animation: f-fade 0.25s ease-out;
}

.f-card:hover {
  box-shadow: var(--f-shadow-lg);
  transform: translateY(-2px);
}

.f-card-img-wrap {
  position: relative;
  background: var(--f-gray-50);
  overflow: hidden;
}

.f-card-img {
  width: 100%;
  height: 10rem;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

@media (min-width: 640px) {
  .f-card-img {
    height: 11rem;
  }
}

.f-card:hover .f-card-img {
  transform: scale(1.04);
}

.f-card-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.f-card-badge-right {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.f-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--f-radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

.f-badge-red {
  background: var(--f-red);
  color: #fff;
}

.f-badge-green {
  background: var(--f-green);
  color: #fff;
}

.f-badge-yellow {
  background: #f59e0b;
  color: #fff;
}

.f-badge-orange {
  background: #f97316;
  color: #fff;
}

.f-badge-gray {
  background: var(--f-gray-200);
  color: var(--f-gray-700);
}

.f-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.25rem;
}

.f-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--f-gray-900);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.f-card-comercio {
  font-size: 0.75rem;
  color: var(--f-gray-400);
}

.f-card-desc {
  font-size: 0.75rem;
  color: var(--f-gray-500);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.f-card-price {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--f-red);
  margin-top: 0.25rem;
}

.f-card-price-original {
  font-size: 0.75rem;
  color: var(--f-gray-400);
  text-decoration: line-through;
}

.f-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.625rem;
}

.f-stock-ok {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--f-green);
}

.f-stock-low {
  font-size: 0.7rem;
  font-weight: 500;
  color: #ea580c;
}

.f-stock-out {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--f-red);
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.f-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--f-transition);
  text-decoration: none;
  white-space: nowrap;
}

.f-btn-red {
  background: var(--f-red);
  color: var(--f-white);
  border-radius: var(--f-radius);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.f-btn-red:hover {
  background: var(--f-red-dark);
  color: white;
}

.f-btn-red:active {
  transform: scale(.97);
}

.f-btn-red:disabled {
  background: var(--f-gray-300);
  cursor: not-allowed;
  opacity: .7;
}

.f-btn-red-sm {
  background: var(--f-red);
  color: var(--f-white);
  border-radius: var(--f-radius-full);
  padding: 0.375rem 0.75rem;
  font-size: 0.78rem;
}

.f-btn-red-sm:hover {
  background: var(--f-red-dark);
  color: white;
}

.f-btn-red-sm:active {
  transform: scale(.97);
}

.f-btn-red-sm:disabled {
  background: var(--f-gray-300);
  cursor: not-allowed;
  opacity: .7;
}

.f-btn-red-lg {
  background: var(--f-red);
  color: var(--f-white);
  border-radius: var(--f-radius-lg);
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  display: block;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 14px rgba(220,38,38,.25);
}

.f-btn-red-lg:hover {
  background: var(--f-red-dark);
  color: white;
  box-shadow: 0 6px 18px rgba(220,38,38,.3);
}

.f-btn-red-lg:active {
  transform: scale(.98);
}

.f-btn-red-lg:disabled {
  background: var(--f-gray-400);
  box-shadow: none;
  cursor: not-allowed;
}

.f-btn-outline {
  background: var(--f-white);
  color: var(--f-gray-700);
  border: 1.5px solid var(--f-gray-200);
  border-radius: var(--f-radius);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.f-btn-outline:hover {
  border-color: var(--f-red);
  color: var(--f-red);
  background: var(--f-red-pale);
}

.f-btn-outline:active {
  transform: scale(.97);
}

.f-btn-ghost {
  background: none;
  color: var(--f-gray-500);
  border-radius: var(--f-radius);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.f-btn-ghost:hover {
  background: var(--f-gray-100);
  color: var(--f-gray-800);
}

.f-btn-loading {
  opacity: .75;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   CARRITO / BOLSON
   -------------------------------------------------------------------------- */
.f-cart-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

.f-cart-card {
  background: var(--f-white);
  border-radius: var(--f-radius-xl);
  border: 1px solid var(--f-gray-200);
  overflow: hidden;
  margin-bottom: 1rem;
}

.f-cart-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  background: var(--f-gray-50);
  border-bottom: 1px solid var(--f-gray-100);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--f-gray-700);
}

.f-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--f-gray-100);
  animation: f-fade 0.2s ease-out;
}

.f-cart-item:last-child {
  border-bottom: none;
}

.f-cart-img {
  width: 68px;
  height: 68px;
  border-radius: var(--f-radius);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--f-gray-100);
}

.f-cart-info {
  flex: 1;
  min-width: 0;
}

.f-cart-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--f-gray-900);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f-cart-unit-price {
  font-size: 0.78rem;
  color: var(--f-gray-400);
  margin-bottom: 0.5rem;
}

.f-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--f-gray-200);
  border-radius: var(--f-radius-full);
  overflow: hidden;
}

.f-qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--f-gray-50);
  font-size: 1rem;
  font-weight: 700;
  color: var(--f-gray-600);
  cursor: pointer;
  border: none;
  transition: background var(--f-transition);
}

.f-qty-btn:hover {
  background: var(--f-gray-200);
}

.f-qty-val {
  width: 34px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--f-gray-900);
  background: white;
  border: none;
  border-left: 1px solid var(--f-gray-200);
  border-right: 1px solid var(--f-gray-200);
  outline: none;
  padding: 0;
  height: 28px;
}

.f-cart-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
  flex-shrink: 0;
}

.f-cart-subtotal {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--f-gray-900);
}

.f-delete-btn {
  color: var(--f-gray-300);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: color var(--f-transition), background var(--f-transition);
  display: flex;
  align-items: center;
}

.f-delete-btn:hover {
  color: var(--f-red);
  background: var(--f-red-light);
}

.f-cart-summary {
  background: var(--f-white);
  border-radius: var(--f-radius-xl);
  border: 1px solid var(--f-gray-200);
  padding: 1.25rem;
}

.f-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--f-gray-600);
}

.f-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.875rem;
  margin-top: 0.625rem;
  border-top: 2px solid var(--f-gray-100);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--f-gray-900);
}

/* --------------------------------------------------------------------------
   CHECKOUT
   -------------------------------------------------------------------------- */
.f-checkout-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.f-checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .f-checkout-grid {
    grid-template-columns: 1fr 380px;
  }
}

.f-section {
  background: var(--f-white);
  border-radius: var(--f-radius-xl);
  border: 1px solid var(--f-gray-200);
  overflow: hidden;
  margin-bottom: 1rem;
}

.f-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--f-gray-100);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--f-gray-900);
}

.f-section-num {
  width: 22px;
  height: 22px;
  background: var(--f-red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.f-section-body {
  padding: 1.25rem;
}

.f-form-group {
  margin-bottom: 1rem;
}

.f-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--f-gray-600);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.f-input, .f-select, .f-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--f-gray-200);
  border-radius: var(--f-radius);
  font-size: 0.9rem;
  color: var(--f-gray-900);
  background: var(--f-white);
  outline: none;
  transition: border-color var(--f-transition), box-shadow var(--f-transition);
}

.f-input:focus, .f-select:focus, .f-textarea:focus {
  border-color: var(--f-red);
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.f-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.f-payment-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  border: 1.5px solid var(--f-gray-200);
  border-radius: var(--f-radius-lg);
  cursor: pointer;
  transition: all var(--f-transition);
  margin-bottom: 0.625rem;
}

.f-payment-option:hover {
  border-color: #fca5a5;
  background: var(--f-red-pale);
}

.f-payment-option.f-selected {
  border-color: var(--f-red);
  background: var(--f-red-pale);
}

.f-order-summary {
  background: var(--f-gray-50);
  border-radius: var(--f-radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--f-gray-200);
}

/* --------------------------------------------------------------------------
   PRODUCT DETAIL (adicional)
   -------------------------------------------------------------------------- */
.f-detail-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.f-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .f-detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.f-gallery {
  background: var(--f-gray-50);
  border-radius: var(--f-radius-xl);
  overflow: hidden;
  border: 1px solid var(--f-gray-200);
}

.f-gallery img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.f-detail-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--f-gray-900);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.f-detail-price {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--f-red);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.f-detail-price-orig {
  font-size: 1rem;
  color: var(--f-gray-400);
  text-decoration: line-through;
  margin-bottom: 1rem;
}

.f-qty-lg {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--f-gray-200);
  border-radius: var(--f-radius);
  overflow: hidden;
}

.f-qty-lg-btn {
  width: 40px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--f-gray-50);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--f-gray-600);
  cursor: pointer;
  border: none;
  transition: background var(--f-transition);
}

.f-qty-lg-btn:hover {
  background: var(--f-gray-200);
}

.f-qty-lg-val {
  width: 56px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-left: 1px solid var(--f-gray-200);
  border-right: 1px solid var(--f-gray-200);
  outline: none;
  height: 42px;
  color: var(--f-gray-900);
}

/* --------------------------------------------------------------------------
   ORDERS / PEDIDOS (proyección)
   -------------------------------------------------------------------------- */
.f-orders-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

.f-order-card {
  background: var(--f-white);
  border-radius: var(--f-radius-xl);
  border: 1px solid var(--f-gray-200);
  overflow: hidden;
  margin-bottom: 0.75rem;
  transition: box-shadow 200ms;
}

.f-order-card:hover {
  box-shadow: var(--f-shadow-md);
}

.f-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.875rem 1.125rem;
  background: var(--f-gray-50);
  border-bottom: 1px solid var(--f-gray-100);
}

.f-order-id {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--f-gray-800);
}

.f-order-date {
  font-size: 0.78rem;
  color: var(--f-gray-400);
}

.f-order-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--f-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.f-status-pending {
  background: #fef9c3;
  color: #a16207;
}

.f-status-confirmed {
  background: #dbeafe;
  color: #1d4ed8;
}

.f-status-preparing {
  background: #fce7f3;
  color: #be185d;
}

.f-status-ready {
  background: #d1fae5;
  color: #065f46;
}

.f-status-delivered {
  background: #dcfce7;
  color: var(--f-green-dark);
}

.f-status-cancelled {
  background: var(--f-red-light);
  color: var(--f-red-dark);
}

.f-order-body {
  padding: 1rem 1.125rem;
}

.f-order-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--f-gray-100);
}

.f-order-item:last-child {
  border-bottom: none;
}

.f-order-item-img {
  width: 48px;
  height: 48px;
  border-radius: var(--f-radius-sm);
  object-fit: cover;
  background: var(--f-gray-100);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   MOBILE FOOTER NAV
   -------------------------------------------------------------------------- */
.f-footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--f-white);
  border-top: 1px solid var(--f-gray-200);
  display: flex;
  align-items: stretch;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 768px) {
  .f-footer-nav {
    display: none;
  }
}

.f-footer-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--f-gray-400);
  font-size: 0.625rem;
  font-weight: 500;
  min-height: 52px;
  transition: color var(--f-transition);
}

.f-footer-item.f-active {
  color: var(--f-red);
}

.f-footer-item:hover {
  color: var(--f-gray-700);
}

.f-footer-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.f-footer-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 15px;
  height: 15px;
  background: var(--f-red);
  color: white;
  border-radius: var(--f-radius-full);
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* --------------------------------------------------------------------------
   ALERTS
   -------------------------------------------------------------------------- */
.f-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--f-radius-lg);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.f-alert-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.f-alert-success {
  background: var(--f-green-pale);
  color: var(--f-green-dark);
  border: 1px solid #bbf7d0;
}

.f-alert-warning {
  background: var(--f-yellow-pale);
  color: #92400e;
  border: 1px solid #fde68a;
}

.f-alert-error {
  background: var(--f-red-pale);
  color: var(--f-red-dark);
  border: 1px solid #fecaca;
}

/* --------------------------------------------------------------------------
   UTILITIES
   -------------------------------------------------------------------------- */
.f-hidden {
  display: none !important;
}

.f-divider {
  border: none;
  border-top: 1px solid var(--f-gray-100);
  margin: 0.875rem 0;
}

.f-text-red {
  color: var(--f-red);
}

.f-text-green {
  color: var(--f-green);
}

.f-text-gray {
  color: var(--f-gray-500);
}

.f-text-sm {
  font-size: 0.875rem;
}

.f-text-xs {
  font-size: 0.75rem;
}

.f-text-bold {
  font-weight: 700;
}

.f-mt-1 {
  margin-top: 0.25rem;
}

.f-mt-2 {
  margin-top: 0.5rem;
}

.f-mt-4 {
  margin-top: 1rem;
}

.f-mb-4 {
  margin-bottom: 1rem;
}

.f-gap-1 {
  gap: 0.25rem;
}

.f-flex {
  display: flex;
}

.f-items-center {
  align-items: center;
}

.f-justify-between {
  justify-content: space-between;
}

.f-w-full {
  width: 100%;
}
/* --------------------------------------------------------------------------
   SUBHEADER — barra secundaria del header
   -------------------------------------------------------------------------- */
.f-subheader {
  background: var(--f-gray-50);
  border-bottom: 1px solid var(--f-gray-100);
}

.f-subheader-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.f-subnav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.f-subnav-link {
  padding: 0.25rem 0.625rem;
  font-size: 0.8rem;
  color: var(--f-gray-500);
  text-decoration: none;
  border-radius: var(--f-radius-sm);
  transition: color var(--f-transition), background var(--f-transition);
}

.f-subnav-link:hover {
  color: var(--f-gray-800);
  background: var(--f-gray-200);
}

.f-subheader-info {
  font-size: 0.75rem;
  color: var(--f-gray-400);
}

/* --------------------------------------------------------------------------
   CART COUNTER — badge de ítems en carrito
   -------------------------------------------------------------------------- */
.f-cart-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--f-red);
  color: white;
  border-radius: var(--f-radius-full);
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   MOBILE HEADER — botón volver
   -------------------------------------------------------------------------- */
.f-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--f-gray-600);
  padding: 0.25rem;
  border-radius: var(--f-radius-sm);
  transition: color var(--f-transition), background var(--f-transition);
  flex-shrink: 0;
}

.f-back-btn:hover {
  color: var(--f-gray-900);
  background: var(--f-gray-100);
}

/* --------------------------------------------------------------------------
   FOOTER LABEL
   -------------------------------------------------------------------------- */
.f-footer-label {
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   LAYOUT PRINCIPAL
   -------------------------------------------------------------------------- */
.f-content {
  min-height: calc(100vh - 90px - 54px);
}

/* --------------------------------------------------------------------------
   SITE FOOTER
   -------------------------------------------------------------------------- */
.f-site-footer {
  background: var(--f-gray-800);
  color: var(--f-gray-300);
  padding: 1.5rem 1rem;
  margin-top: 3rem;
}

.f-site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   HEADER NAV — ocultar en mobile (lo maneja MobileFooter)
   -------------------------------------------------------------------------- */
.f-nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .f-nav-desktop {
    display: flex;
  }
}
/* ENCARNA:SHOP_HOME_PUBLICIDAD_V1 */
.ey-home{max-width:1180px;margin:0 auto 1rem}.ey-verticals{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.65rem;margin:1rem 0}.ey-verticals a{display:flex;align-items:center;justify-content:center;gap:.45rem;min-height:52px;padding:.65rem;background:#fff;border:1px solid #e5e7eb;border-radius:15px;text-decoration:none;color:#111827;box-shadow:0 2px 9px rgba(15,23,42,.04)}.ey-verticals a span{font-size:1.35rem}.ey-ad-slot--hero{min-height:190px;border-radius:20px;padding:1.4rem 1.55rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;overflow:hidden;background:linear-gradient(120deg,#8f1117,#d71920 48%,#ff765c);color:#fff;box-shadow:0 10px 30px rgba(128,15,20,.16)}.ey-ad-copy{max-width:650px}.ey-ad-copy small{font-weight:900;letter-spacing:.12em;opacity:.85}.ey-ad-copy h2{font-size:clamp(1.55rem,4vw,2.35rem);line-height:1.05;margin:.55rem 0}.ey-ad-copy p{margin:.2rem 0 1rem;opacity:.93}.ey-ad-copy a{display:inline-block;background:#fff;color:#9d1116;border-radius:999px;padding:.7rem 1rem;font-weight:900;text-decoration:none}.ey-ad-art{font-weight:900;font-size:clamp(1.2rem,3vw,2.2rem);opacity:.35;transform:rotate(-8deg)}.ey-ad-strip{display:flex;justify-content:space-between;gap:1rem;margin:.8rem 0 1rem;padding:.8rem 1rem;border-radius:14px;background:#111827;color:#fff}.ey-ad-strip span{color:#d1d5db;font-size:.9rem}
@media(max-width:720px){.ey-home{margin-left:-.15rem;margin-right:-.15rem}.ey-verticals{display:flex;overflow-x:auto;scrollbar-width:none;margin:.8rem -.65rem;padding:0 .65rem .25rem}.ey-verticals::-webkit-scrollbar{display:none}.ey-verticals a{flex:0 0 96px;flex-direction:column;gap:.15rem;font-size:.76rem}.ey-ad-slot--hero{min-height:170px;padding:1.1rem;border-radius:17px}.ey-ad-art{display:none}.ey-ad-strip{flex-direction:column;gap:.2rem}.f-page-title{margin-top:.8rem}}
@media(max-width:380px){.ey-verticals a{flex-basis:88px}.ey-ad-copy p{font-size:.9rem}}


/* ============================================================================
   ENCARNA:SHOP_RESPONSIVE_BRANDING_V2
   Branding configurable + shell responsive. No toca datos de negocio.
   ============================================================================ */
.f-header-inner,
.f-subheader-inner,
.f-search-wrap {
  min-width: 0;
}

.f-search {
  min-height: 44px;
}

.f-logo {
  color: var(--ey-brand-text, var(--f-gray-900));
}

.f-logo-icon {
  background: var(--f-red);
}

.f-subheader {
  background: color-mix(in srgb, var(--ey-brand-background, #ffffff) 92%, var(--f-gray-50));
}

.f-site-footer {
  background: var(--f-secondary);
  color: color-mix(in srgb, var(--ey-brand-background, #ffffff) 78%, #ffffff);
}

.f-footer-item.f-active,
.f-footer-item:focus-visible {
  color: var(--f-red);
}

@media (max-width: 767px) {
  .f-header-inner {
    min-height: 62px;
    height: auto;
    padding: 7px 0.65rem;
    gap: 0.55rem;
  }

  .f-logo {
    max-width: 122px;
  }

  .f-logo picture,
  .f-logo picture img {
    max-width: 118px !important;
  }

  .f-search-wrap {
    flex: 1 1 auto;
  }

  .f-search {
    height: 44px;
    padding-left: 2.15rem;
    padding-right: 0.7rem;
    font-size: 0.82rem;
    background: #fff;
  }

  .f-subheader-inner {
    min-height: 36px;
    height: auto;
    padding: 5px 0.7rem;
  }

  .f-subnav {
    display: none;
  }

  .f-subheader-info {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--f-secondary);
    font-weight: 700;
  }

  .f-content {
    min-height: calc(100vh - 98px);
  }
}

@media (max-width: 420px) {
  .f-logo > .f-logo-icon + span {
    display: none;
  }

  .f-logo {
    max-width: 42px;
  }

  .f-logo picture,
  .f-logo picture img {
    max-width: 76px !important;
  }

  .f-search {
    font-size: 0.78rem;
  }
}

@media (max-width: 340px) {
  .f-header-inner {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    gap: 0.4rem;
  }

  .f-logo {
    max-width: 36px;
  }

  .f-logo picture,
  .f-logo picture img {
    max-width: 62px !important;
  }

  .f-search {
    padding-left: 1.9rem;
    padding-right: 0.55rem;
    font-size: 0.74rem;
  }
}


/* ============================================================================
   ENCARNA:SHOP_MARKETPLACE_SHELL_V3
   Alineación final header/footer responsive.
   ============================================================================ */

.f-search-form {
  display: block;
  width: 100%;
}

.f-logo picture {
  display: block;
  max-width: 180px;
}

.f-logo picture img {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 40px;
  object-fit: contain;
}

.f-logo-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.f-logo-name-mobile {
  display: none;
}

.f-mobile-actions {
  display: none;
}

.f-footer-item {
  position: relative;
}

.f-footer-item .f-cart-counter {
  position: absolute;
  top: 2px;
  right: calc(50% - 24px);
}

@media (max-width: 767px) {
  .f-header {
    position: sticky;
    top: 0;
  }

  .f-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "search search";
    align-items: center;
    min-height: 0;
    height: auto;
    gap: 0.45rem 0.6rem;
    padding: 0.5rem 0.65rem 0.55rem;
  }

  .f-logo {
    grid-area: brand;
    min-width: 0;
    max-width: 100%;
    gap: 0.42rem;
    font-size: 0.92rem;
  }

  .f-logo picture {
    max-width: 150px;
  }

  .f-logo picture img {
    max-width: 150px !important;
    max-height: 34px;
  }

  .f-logo-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .f-logo-name {
    min-width: 0;
    max-width: 150px;
    overflow: hidden;
  }

  .f-logo-name-desktop {
    display: none;
  }

  .f-logo-name-mobile {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .f-search-wrap {
    grid-area: search;
    width: 100%;
    max-width: none;
  }

  .f-search {
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 0 0.8rem 0 2.2rem;
    border-radius: 12px;
    border-color: color-mix(in srgb, var(--ey-brand-secondary, #374151) 18%, #e2e8f0);
    background: #fff;
    font-size: 0.82rem;
  }

  .f-search-icon {
    left: 0.75rem;
    width: 15px;
    height: 15px;
  }

  .f-mobile-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
  }

  .f-mobile-action {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    border-radius: 12px;
    color: var(--ey-brand-text, #111827);
    text-decoration: none;
    background: color-mix(in srgb, var(--ey-brand-background, #ffffff) 93%, var(--ey-brand-primary, #dc2626));
  }

  .f-mobile-action:focus-visible {
    outline: 2px solid var(--ey-brand-primary, #dc2626);
    outline-offset: 2px;
  }

  .f-mobile-action svg {
    width: 21px;
    height: 21px;
  }

  .f-mobile-cart-counter {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
  }

  .f-subheader {
    border-top: 1px solid color-mix(in srgb, var(--ey-brand-secondary, #374151) 7%, #e2e8f0);
  }

  .f-subheader-inner {
    min-height: 30px;
    height: auto;
    padding: 0.28rem 0.7rem;
  }

  .f-subheader-info {
    font-size: 0.69rem;
    font-weight: 700;
  }

  .f-content {
    min-height: calc(100vh - 126px);
  }

  .f-footer-nav {
    min-height: 58px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    padding: 0.18rem 0 max(0.18rem, env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--ey-brand-background, #ffffff) 97%, #ffffff);
    border-top-color: color-mix(in srgb, var(--ey-brand-secondary, #374151) 12%, #e2e8f0);
    backdrop-filter: blur(12px);
  }

  .f-footer-item {
    min-width: 0;
    min-height: 52px;
    padding: 0.35rem 0.15rem;
    gap: 0.1rem;
    font-size: 0.58rem;
    font-weight: 650;
  }

  .f-footer-icon {
    width: 23px;
    height: 23px;
  }

  .f-footer-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .f-footer-item.f-active {
    color: var(--ey-brand-primary, #dc2626);
  }
}

@media (max-width: 380px) {
  .f-header-inner {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .f-logo picture,
  .f-logo picture img {
    max-width: 128px !important;
  }

  .f-logo-name {
    max-width: 116px;
  }

  .f-mobile-actions {
    gap: 0.1rem;
  }

  .f-mobile-action {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .f-search {
    font-size: 0.78rem;
  }
}

@media (max-width: 340px) {
  .f-logo picture,
  .f-logo picture img {
    max-width: 108px !important;
  }

  .f-logo-name {
    max-width: 94px;
  }

  .f-mobile-action {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .f-search {
    min-height: 42px;
    height: 42px;
    font-size: 0.74rem;
  }
}
