/* Nestlé Brand Variables */
/* CSS variables with --nestle- prefix to avoid conflicts with Cartzilla's cz- prefix */
:root {
  --nestle-primary: #0075b0;
  --nestle-primary-darker: #0075b0;
  --nestle-secondary: #6B7280;
  --nestle-dark: #30261D;
  --nestle-medium: #D1CBC5;
  --nestle-light: #F6F5F4;
  
  /* RGB values for rgba() usage */
  --nestle-primary-rgb: 0, 124, 186;
  --nestle-secondary-rgb: 107, 114, 128;
  --nestle-dark-rgb: 48, 38, 29;
  --nestle-medium-rgb: 209, 203, 197;
  --nestle-light-rgb: 246, 245, 244;
  
  /* Additional Nestlé color variations */
  --nestle-primary-hover: #005a8b;
  --nestle-primary-hover-rgb: 0, 90, 139;
  --nestle-primary-light: #4A9FD4; /* Lighter blue for input background */
  --nestle-primary-light-rgb: 74, 159, 212;
  --nestle-input-bg: #0075b0; /* Light blue for count inputs */
  
  /* Gray colors from Figma */
  --nestle-gray-900: #181D25;
  --nestle-input-border: #CAD0D9;
  
  /* Common spacing values */
  --spacing-15: 15px;
  --spacing-16: 16px;
  
  /* Selector cantidad unificado: tamaños fijos en toda la app */
  --count-input-height: 2rem;
  --count-input-btn-size: 2rem;      /* botones - y + (cuadrados) */
  --count-input-min-width: 2rem;     /* alias para compatibilidad */
  --count-input-center-width: 3rem;  /* input numérico */
  
  /* Nestlé Font Family */
  --nestle-font-family: 'NestleText', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Override Cartzilla font variables */
  --cz-font-sans-serif: var(--nestle-font-family);
  --cz-body-font-family: var(--nestle-font-family);
}

/* NestleTextOTF Font Face Definitions */
@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-LightItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-LightCnd.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-stretch: condensed;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-LightCndItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-stretch: condensed;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-BookCnd.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-stretch: condensed;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-BookCndItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-stretch: condensed;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-BoldCnd.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-stretch: condensed;
    font-display: swap;
}

@font-face {
    font-family: 'NestleText';
    src: url('../fonts/NestleTextOTF-BoldCndItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-stretch: condensed;
    font-display: swap;
}

/* Utilities - Custom utilities not available in Bootstrap */
.fs-xs {
    font-size: 0.75rem !important; /* 12px */
}

/* Size utilities for icons and badges */
.w-6 { width: 1.5rem !important; }
.h-6 { height: 1.5rem !important; }
.w-8 { width: 2rem !important; }
.h-8 { height: 2rem !important; }

/* Login */

#lg_pass ~ .eye
{
    background-image: url(../../_img/eye.svg);
    color: #666;
    cursor: pointer;
    position: absolute;
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    top: 22px;
    right: 9px;
    z-index:10;
}

#lg_pass ~ .eye-slash
{
    background-image: url(../../_img/eye-slash.svg);
}

/* Login: ojo a la izquierda del icono X de error para que no se solapen */
form.was-validated .login-password-wrap .eye,
form.was-validated .login-password-wrap .eye-slash {
    right: 2.25rem !important;
}

/* Brand Colors */
.text-nestle-primary {
    color: var(--nestle-primary) !important;
}

.text-nestle-primary-darker {
    color: var(--nestle-primary-darker) !important;
}

.text-nestle-secondary {
    color: var(--nestle-secondary) !important;
}

.text-nestle-dark {
    color: var(--nestle-dark) !important;
}

.text-nestle-gray-900 {
    color: var(--nestle-gray-900) !important;
}

.bg-nestle-primary {
    background-color: var(--nestle-primary) !important;
}

.bg-nestle-medium {
    background-color: var(--nestle-medium) !important;
}

.bg-nestle-light {
    background-color: var(--nestle-light) !important;
}

.bg-nestle-dark {
    background-color: var(--nestle-dark) !important;
}

.border-nestle-primary {
    border-color: var(--nestle-primary) !important;
}

.border-nestle-dark {
    border-color: var(--nestle-dark) !important;
}

.border-input-gray {
    border-color: var(--nestle-input-border) !important;
}

/* Login Form Styles */
.form-control.border-input-gray:focus {
    border-color: var(--nestle-input-border) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--nestle-primary-rgb), 0.25);
}

/* Contact Form Styles */
.contact-type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--nestle-primary) !important;
    background-color: #fff !important;
    color: var(--nestle-dark) !important;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    min-height: 180px;
    text-align: center;
    box-shadow: none !important;
}

.contact-type-btn:hover:not(.active) {
    background-color: rgba(var(--nestle-primary-rgb), 0.05) !important;
    border-color: var(--nestle-primary) !important;
    transform: none;
    box-shadow: none !important;
}

.contact-type-btn.active {
    background-color: var(--nestle-primary) !important;
    border-color: var(--nestle-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(var(--nestle-primary-rgb), 0.25) !important;
}

.contact-type-icon {
    width: 100%;
    height: 100%;
    min-height: 180px;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
    background-color: rgba(var(--nestle-primary-rgb), 0.1);
    border: none;
    transition: all 0.3s ease;
}

.contact-type-btn.active .contact-type-icon {
    background-color: transparent;
}

.contact-type-icon i {
    font-size: 2.5rem;
    color: var(--nestle-primary);
    transition: color 0.3s ease;
    margin-bottom: 0.5rem;
}

.contact-type-btn.active .contact-type-icon i {
    color: #fff;
}

.contact-type-text {
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--nestle-dark);
    text-align: center;
    transition: color 0.3s ease;
}

.contact-type-btn.active .contact-type-text {
    color: #fff;
}

/* Contact Form Disabled Button */
.btn.disabled:not(.bg-nestle-primary),
.btn:disabled:not(.bg-nestle-primary) {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Contact Form Buttons - Disabled state (gray) */
#contact_form .btn.bg-nestle-primary.disabled,
#contact_form .btn.bg-nestle-primary:disabled,
#contact_form button.btn.bg-nestle-primary.disabled,
#contact_form button.btn.bg-nestle-primary:disabled,
#next_button.bg-nestle-primary.disabled,
#next_button.bg-nestle-primary:disabled,
#submit_button.bg-nestle-primary.disabled,
#submit_button.bg-nestle-primary:disabled {
    background-color: var(--nestle-medium) !important;
    border-color: var(--nestle-medium) !important;
    color: var(--nestle-dark) !important;
    opacity: 1;
    cursor: not-allowed;
    pointer-events: none;
}

/* Contact Form Buttons - Normal state (blue) */
#contact_form .btn.bg-nestle-primary:not(.disabled):not(:disabled),
#contact_form button.btn.bg-nestle-primary:not(.disabled):not(:disabled),
#next_button.bg-nestle-primary:not(.disabled):not(:disabled),
#submit_button.bg-nestle-primary:not(.disabled):not(:disabled) {
    background-color: var(--nestle-primary) !important;
    border-color: var(--nestle-primary) !important;
    color: #fff !important;
    opacity: 1;
}

/* Contact Form Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Contact Form File Upload */
#image_filename {
    font-style: italic;
}

/* Legal Popup Styles */
#legal_popup {
    backdrop-filter: blur(2px);
}

#legal_popup > div {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Hover Effects - Consolidated */
.btn-secondary.dropdown-toggle:hover,
.btn-outline-secondary.rounded-circle:hover,
.cart-btn:hover {
    /* transform: translateY(-2px); disabled because creates a bug on last pixels*/
}

/* Cart Badge - Desktop positioning */
@media(min-width:992px) {
    .cart-badge {
        top: -8px !important;
        right: -8px !important;
    }
}

/* Dropdown Menu */
.dropdown-menu:not(.dropdown-menu .dropdown-menu) {
    min-width: 240px;
    width: auto;
    max-width: 350px;
}

/* Ensure dropdown menu ::before covers the gap for hover continuity */
.dropdown .dropdown-menu::before {
    height: calc(var(--cz-dropdown-spacer) * 1.5) !important;
    pointer-events: auto;
}

/* Submenu */
.dropdown-menu .dropdown-menu {
    left: 95%;
    max-width: 100vw;
    overflow: hidden;
    margin-left: 0.5rem !important;
}

/* Submenu Mega */
.submenu-mega {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0.5rem !important;
    top: 0 !important;
    display: none !important;
    align-items: stretch !important;
}

.submenu-mega.show {
    display: flex !important;
}

/* Make submenu same height as parent menu */
.dropend.position-static {
    height: 100%;
}

/* Position submenu to align with parent ul content (accounting for ul's py-1 padding) */
.dropend.position-static .submenu-mega {
    top: -0.25rem !important;
    bottom: -0.25rem !important;
    height: auto !important;
    max-height: 80vh; /* Limit max height to viewport */
    overflow: hidden; /* Prevent outer scroll */
}

/* Container for submenu content - enable flex and limit height */
.submenu-mega > .d-flex {
    max-height: 100%;
    overflow: hidden;
}

/* Container for submenu list - limit height and enable scroll */
.submenu-mega > .d-flex > .flex-shrink-0 {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
}

/* Add scroll to submenu list when needed */
.submenu-mega .nav.flex-column {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem; /* Space for scrollbar */
    margin-right: -0.5rem; /* Compensate for padding */
    min-height: 0; /* Allow flex item to shrink */
}

/* Custom scrollbar styling for submenu */
.submenu-mega .nav.flex-column::-webkit-scrollbar {
    width: 6px;
}

.submenu-mega .nav.flex-column::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.submenu-mega .nav.flex-column::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.submenu-mega .nav.flex-column::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ensure the gap between trigger and submenu is covered for hover continuity */
.dropend {
    position: relative;
}

.dropend .dropdown-menu.submenu-mega::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0;
    width: 0.5rem;
    height: 100%;
    pointer-events: auto;
    z-index: 1;
}

/* Also add a bridge element to cover the gap */
.dropend::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 0;
    width: 0.5rem;
    height: 100%;
    pointer-events: auto;
    z-index: 1000;
    display: none;
}

.dropend:hover::after,
.dropend[data-bs-toggle="dropdown"]:hover ~ .dropdown-menu.submenu-mega::before {
    display: block;
}

/* Add padding between menu items */
.dropdown-menu > li {
    margin-bottom: 0;
}

.dropdown-menu > li > div {
    margin: 0;
}

/* Menu Items */
.dropdown-menu > li > div > a.dropdown-item {
    white-space: normal !important;
    overflow: visible !important;
}

.dropdown-menu > li > div > a.dropdown-item span {
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-overflow: clip !important;
    overflow: visible !important;
    max-width: none !important;
    flex: 1 1 auto;
    min-width: 0;
}

/* Submenu Banner */
.dropdown-menu .dropdown-menu .d-flex.flex-column.flex-lg-row {
    max-width: 100%;
    overflow: hidden;
}

.dropdown-menu .dropdown-menu .d-flex.flex-column.flex-lg-row > div {
    max-width: 100%;
    box-sizing: border-box;
}

.dropdown-menu .dropdown-menu .d-flex.flex-column.flex-lg-row .bg-body-secondary {
    max-width: 100%;
    box-sizing: border-box;
}

.dropdown-menu .dropdown-menu .d-flex.flex-column.flex-lg-row img {
    max-width: 100%;
    height: auto;
}

/* Hover effect for clickable elements */
.bg-nestle-light .cursor-pointer:hover {
    /* transform: translateY(-2px); disabled because creates a bug on last pixels*/
}

/* Search Block Styles */
.form-control:focus {
    border-color: var(--nestle-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--nestle-primary-rgb), 0.25);
}

/* Product Card */
.product-card-grocery {
    width: 100%;
    height: 100%;
    /*min-height: 364px;*/
    display: flex;
    flex-direction: column;
}

.product-card-image {
    width: 100%;
    max-width: 191px;
    height: 160px;
    object-fit: contain;
    object-position: center;
}

.product-card-wishlist-btn {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    width: 32px;
    height: 32px;
    border-radius: 19px;
    padding: 9px;
    transition: all 0.2s ease;
    z-index: 3;
}

.product-card-wishlist-btn:hover {
    background-color: #e8e5e2;
    transform: translateY(-1px);
}

.product-card-wishlist-btn.active {
    background-color: #ff6b6b;
}

.product-card-ean {
    background-color: #e8e5e2;
    gap: 8px;
    padding: 5px 10px;
}

.product-card-ean-text {
    width: 100%;
    max-width: 203px;
    font-size: 10px;
    line-height: 18px;
}

.product-card-body {
    background-color: var(--nestle-light);
    gap: 8px;
    padding: 10px;
}

.product-card-title {
    min-height: 44px;
    width: 100%;
}

.product-card-promotion-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    background-color: #D64123;
    border-radius: 4px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}

.product-card-promotion-badge-text {
    white-space: nowrap;
}

.product-card-original-price,
.product-card-unit-original-price {
    text-decoration: line-through;
}

.product-card-original-price {
    color: #D64123;
    white-space: nowrap;
}

.product-card-unit-original-price {
    color: #717171;
}

.product-card-thumb .ratio {
    width: 100%;
    max-width: 191px;
    margin: 0 auto;
}

.product-card-thumb .ratio .placeholder {
    /* border-radius: could use rounded in HTML */
    border-radius: 4px;
}

.product-card-thumb .promotion-btn {
    width: 100% !important;
    min-width: 0 !important;
}

.product-card-tags {
    position: absolute !important;
    top: 0.5rem !important;
    left: 0.5rem !important;
    gap: 6px; /* Custom gap, not standard Bootstrap */
    z-index: 2 !important;
}

.product-tag {
    gap: 6px; /* Custom gap, not standard Bootstrap */
    padding: 4px 8px; /* Custom padding, not standard Bootstrap */
    border-radius: 6px; /* rounded-2 = 6px in Bootstrap */
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
}

.product-tag i {
    font-size: 10px;
    line-height: 1;
}

.product-tag.tag-promo {
    background-color: #D64123;
}

.product-tag.tag-top {
    background-color: #00818F;
}

/* Highlight product name when in promotion (like baby_nutrition) */
.product-card-title.product-name-promo {
    color: #D64123 !important;
}

/* Promotion message styling */
.promo-message {
    flex-shrink: 0;
}

.product-tag.tag-new {
    background-color: #6F2277;
}

/* Product View - Tags positioning */
.swiper.position-relative .product-card-tags {
    left: 12px;
    top: 12px;
}

.swiper.position-relative .badge.text-bg-danger {
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
}

/* Wishlist & Interactive Buttons */
/* [aria-label*="Wishlist"]:hover,
[aria-label*="favoritos"]:hover {
    transform: scale(1.1);
} */

.submenu-item:hover .submenu-icon {
    transform: scale(1.05);
}

/* Transfer Catalog - Count Input */

/* Loading state */
.buy_button.loading .count-input {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.buy_button.loading .count-input * {
    pointer-events: none;
}

/* Spinner overlay durante loading */
.buy_button.loading .count-input.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--nestle-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    z-index: 10;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Count Input - Collapsed/Expanded states */
.buy_button {
    display: flex;
    justify-content: flex-end;
    /*min-height: 60px; A revisar, necesario en producto pero no en el listado*/
}

.buy_button .count-input-collapsible.collapsed {
    width: auto;
    justify-content: flex-end;
    flex-shrink: 0;
}

.buy_button .count-input:not(.count-input-unified):not(.collapsed) {
    width: 100%;
}

/* Base button styles - shared */
.buy_button .count-input .btn-icon,
.buy_button .count-input-collapsible.collapsed .product-card-button {
    background-color: var(--nestle-primary);
    border-color: var(--nestle-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.buy_button .count-input .btn-icon:hover,
.buy_button .count-input-collapsible.collapsed .product-card-button:hover {
    background-color: var(--nestle-primary-hover);
    border-color: var(--nestle-primary-hover);
}

/* Collapsed button specific */
.buy_button .count-input-collapsible.collapsed .product-card-button {
    border-radius: 0.375rem;
    width: var(--count-input-min-width);
    height: var(--count-input-height);
    min-width: var(--count-input-min-width);
    max-width: var(--count-input-min-width);
    padding: 0;
}

.buy_button .count-input-collapsible.collapsed .remove,
.buy_button .count-input-collapsible.collapsed .form-control {
    display: none;
}

/* Hover expand (Cartzilla style) - only when not loading */
.product-card-grocery:hover .buy_button:not(.loading) {
    width: 100%;
}

.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed {
    display: flex;
    width: 100%;
}

/* Show selector when product is added (not just on hover) - maintain all styles */
/* Unificado: NO aplicar width:100% ni space-between (mantener compacto) */
.buy_button.added .count-input-collapsible:not(.count-input-unified) {
    display: flex !important;
    width: 100% !important;
    align-items: stretch !important;
    justify-content: space-between !important;
}

.buy_button.added .count-input-collapsible.collapsed:not(.count-input-unified) {
    display: flex !important;
    width: 100% !important;
    align-items: stretch !important;
    justify-content: space-between !important;
}

.buy_button.added .count-input-collapsible .remove,
.buy_button.added .count-input-collapsible .add,
.buy_button.added .count-input-collapsible .product-card-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--nestle-primary) !important;
    border-color: var(--nestle-primary) !important;
    color: #fff !important;
    height: var(--count-input-height) !important;
    min-width: var(--count-input-min-width) !important;
    max-width: var(--count-input-min-width) !important;
    flex-shrink: 0 !important;
    border-radius: 0 !important;
}

.buy_button.added .count-input-collapsible .remove {
    border-radius: 0.375rem 0 0 0.375rem !important;
}

.buy_button.added .count-input-collapsible .add,
.buy_button.added .count-input-collapsible .product-card-button {
    border-radius: 0 0.375rem 0.375rem 0 !important;
}

.buy_button.added .count-input-collapsible:not(.count-input-unified) .form-control {
    display: block !important;
    background-color: var(--nestle-input-bg) !important;
    border-color: var(--nestle-input-bg) !important;
    color: #fff !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 0 !important;
    max-width: none !important;
    height: var(--count-input-height) !important;
    border-radius: 0 !important;
    border-right: 1px solid #ffffff !important;
    border-left: 1px solid #ffffff !important;
    text-align: center !important;
    padding: 0.25rem !important;
}

/* ES (cajas): input compacto para NO unificado; sin borde derecho para unir con "caja/s" */
.buy_button.added .count-input-collapsible:not(.count-input-unified) .form-control[data-display-boxes="1"] {
    min-width: 36px !important;
    max-width: 48px !important;
    width: 42px !important;
    flex: 0 0 42px !important;
    border-right: none !important;
    padding-right: 0.1rem !important;
}

.buy_button.added .count-input-collapsible .product-card-button [data-count-input-value] {
    display: none !important;
}

.buy_button.added .count-input-collapsible .product-card-button > i {
    display: inline-flex !important;
}

/* Loading state - maintain current size without expanding */
.buy_button.loading.added .count-input-collapsible {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
}

.buy_button.loading.added {
    width: auto !important;
}

.buy_button.loading.added .count-input-collapsible.collapsed .remove,
.buy_button.loading.added .count-input-collapsible.collapsed .form-control {
    display: block !important;
}

/* Asegurar azul claro durante loading */
.buy_button.loading.added .count-input-collapsible.collapsed .form-control {
    background-color: var(--nestle-input-bg) !important;
    border-color: var(--nestle-input-bg) !important;
    color: #fff !important;
}

.buy_button.loading.added .count-input-collapsible.collapsed .remove {
    display: inline-flex !important;
}

.buy_button.loading:not(.added) .count-input-collapsible.collapsed {
    width: auto !important;
}

.buy_button.loading:not(.added) {
    width: auto !important;
}

.buy_button.loading:not(.added) .count-input-collapsible.collapsed .remove,
.buy_button.loading:not(.added) .count-input-collapsible.collapsed .form-control {
    display: none !important;
}

/* Hover expand - show controls */
.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem 0 0 0.375rem;
    height: var(--count-input-height);
    min-width: var(--count-input-min-width);
    background-color: var(--nestle-primary);
    border-color: var(--nestle-primary);
    color: #fff;
}

/* Deshabilitar el botón - en el primer hover cuando el producto NO está añadido (estado collapsed) */
.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .remove {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .add,
.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .product-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0.375rem 0.375rem 0;
    height: var(--count-input-height);
    min-width: var(--count-input-min-width);
    background-color: var(--nestle-primary);
    border-color: var(--nestle-primary);
    color: #fff;
}

.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .form-control {
    display: block;
    border-radius: 0;
    height: var(--count-input-height);
    background-color: var(--nestle-input-bg) !important;
    border-color: var(--nestle-input-bg) !important;
    color: #fff !important;
    flex: 1 1 0%;
    min-width: 0;
    width: 0;
    max-width: none;
}

.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .product-card-button [data-count-input-value] {
    display: none;
}

.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .product-card-button > i {
    display: inline-flex;
}

/* Collapsed state - show number or icon */
.buy_button .count-input-collapsible.collapsed .product-card-button.has-value [data-count-input-value] {
    display: inline;
}

.buy_button .count-input-collapsible.collapsed .product-card-button.has-value > i {
    display: none;
}

.buy_button .count-input-collapsible.collapsed .product-card-button:not(.has-value) [data-count-input-value] {
    display: none;
}

.buy_button .count-input-collapsible.collapsed .product-card-button:not(.has-value) > i {
    display: inline-flex;
}

/* Buttons - Nestlé colors - Expanded state */
.buy_button .count-input:not(.collapsed) .remove,
.buy_button .count-input:not(.collapsed) .add,
.buy_button .count-input:not(.collapsed) .product-card-button {
    background-color: var(--nestle-primary);
    border-color: var(--nestle-primary);
    color: #fff;
    height: var(--count-input-height);
    min-width: var(--count-input-min-width);
    max-width: var(--count-input-min-width);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Buttons - Hover expand state */
.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .remove,
.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .add {
    background-color: var(--nestle-primary);
    border-color: var(--nestle-primary);
    color: #fff;
    height: var(--count-input-height);
    min-width: var(--count-input-min-width);
    max-width: var(--count-input-min-width);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.buy_button .count-input:not(.collapsed) .remove:hover:not(:disabled):not(.disabled),
.buy_button .count-input:not(.collapsed) .add:hover,
.buy_button .count-input:not(.collapsed) .product-card-button:hover,
.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .remove:hover:not(:disabled):not(.disabled),
.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .add:hover,
.product-card-grocery:hover .buy_button:not(.loading) .count-input-collapsible.collapsed .product-card-button:hover {
    background-color: var(--nestle-primary-hover);
    border-color: var(--nestle-primary-hover);
}

/* Disabled remove button styles */
.buy_button .count-input .remove:disabled,
.buy_button.added .count-input-collapsible .remove:disabled,
.buy_button .count-input .remove.disabled,
.buy_button.added .count-input-collapsible .remove.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Expanded state - input and layout (solo para count-input que NO sea unificado) */
.buy_button .count-input:not(.count-input-unified):not(.collapsed) {
    display: flex;
    align-items: stretch;
    width: 100%;
    justify-content: space-between;
}

/* Input expandido (NO unificado): fondo azul, texto blanco */
.buy_button .count-input:not(.count-input-unified):not(.collapsed) .form-control {
    background-color: var(--nestle-input-bg) !important;
    border-color: var(--nestle-input-bg) !important;
    color: #fff !important;
    flex: 1 1 0%;
    height: var(--count-input-height);
    border-radius: 0;
}

/* Cart table (mi-cesta) - match listing control: compact width and no gray border */
.count-input{
    border: 0 !important;
}

/* Shopping cart product images - prevent vertical stretching */
.cart_content img[width="110"],
.cart_content .cart_products img,
table tbody img[width="110"],
table tbody img[height="110"] {
    width: 110px !important;
    height: 110px !important;
    object-fit: contain !important;
    object-position: center;
    max-width: 110px !important;
    max-height: 110px !important;
}

.cart_content .buy_button .count-input {
    border: 0 !important;
    box-shadow: none !important;
}

/*
 * ============================================================
 * SELECTOR DE CANTIDAD UNIFICADO
 * Estructura: [- input (caja/cajas?) +]
 * Clases Bootstrap en el HTML hacen el layout:
 *   contenedor : d-inline-flex align-items-stretch flex-nowrap
 *   hijos      : bg-nestle-primary text-white border-white
 * Aquí solo las pocas propiedades que Bootstrap no cubre.
 * ============================================================
 */

/* --- Contenedor: altura fija, no expandir --- */
.count-input-unified {
    border: 0 !important;
    box-shadow: none !important;
    height: var(--count-input-height) !important;
    min-height: var(--count-input-height) !important;
    flex: 0 0 auto !important;
    width: max-content !important;
    max-width: 100%;
}
/* Ficha producto: selector compacto, no crecer con el contenedor */
.buy_button .count-input-unified {
    flex: 0 0 auto !important;
    width: max-content !important;
}

/* --- Todos los hijos: borde blanco lateral --- */
.count-input-unified > * {
    border: 1px solid #fff !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* --- Botones - y +: tamaño fijo cuadrado --- */
.count-input-unified .remove,
.count-input-unified .add,
.count-input-unified .product-card-button {
    width: var(--count-input-btn-size) !important;
    min-width: var(--count-input-btn-size) !important;
    max-width: var(--count-input-btn-size) !important;
    height: var(--count-input-height) !important;
    min-height: var(--count-input-height) !important;
    flex: 0 0 var(--count-input-btn-size) !important;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- Input: ancho y altura fijos, valor siempre visible --- */
.count-input-unified .form-control,
.buy_button.added .count-input-unified .form-control,
.product-card-grocery .count-input-unified .form-control,
.cart_content .count-input-unified .form-control {
    width: var(--count-input-center-width) !important;
    min-width: var(--count-input-center-width) !important;
    max-width: var(--count-input-center-width) !important;
    height: var(--count-input-height) !important;
    min-height: var(--count-input-height) !important;
    flex: 0 0 var(--count-input-center-width) !important;
    flex-shrink: 0 !important;
    background-color: var(--nestle-input-bg) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff !important;
    text-align: center !important;
    padding: 0 0.25rem !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}
/* Autofill: mantener fondo azul y texto blanco */
.count-input-unified .form-control:-webkit-autofill,
.count-input-unified .form-control:-webkit-autofill:hover,
.count-input-unified .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0 1000px var(--nestle-input-bg) inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}
/* Con "caja/cajas": sin borde derecho (se pega a la etiqueta). En carrito no hay etiqueta, mantener borde */
.count-input-unified .form-control[data-display-boxes="1"] {
    border-right: 0 !important;
}
.cart_content .count-input-unified .form-control[data-display-boxes="1"] {
    border-right: 1px solid #fff !important;
}

/* --- Etiqueta caja/cajas (ES) --- */
.count-input-unified .count-boxes-label {
    height: var(--count-input-height) !important;
    min-height: var(--count-input-height) !important;
    min-width: 3em;
    background-color: var(--nestle-input-bg) !important;
    color: #fff !important;
    font-size: 11px;
    padding: 0 0.3rem 0 0.1rem !important;
    white-space: nowrap;
    flex-shrink: 0;
    border-left: 0 !important;
}

/* Al expandir el selector, la etiqueta se muestra */
.count-input-unified:not(.collapsed) .count-boxes-label {
    display: inline-flex !important;
}

/* --- Carrito: mismo aspecto que listado/ficha (con cajas: [- nº cajas +]) --- */
.cart_content .buy_button .count-input {
    border: 0 !important;
    box-shadow: none !important;
}
/* Carrito con cajas: input y etiqueta azul, texto blanco (evitar override de tabla) */
.cart_content .count-input-unified .form-control,
.cart_content .count-input-unified .form-control[data-display-boxes="1"],
table .cart_content .count-input-unified .form-control {
    background-color: var(--nestle-input-bg) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* Cuando el selector se expande, ocultar el valor del botón y mostrar el icono + */
.buy_button .count-input:not(.collapsed) .product-card-button [data-count-input-value] {
    display: none;
}
.buy_button .count-input:not(.collapsed) .product-card-button > i {
    display: inline-flex;
}

/* Botones (no unificado): mínimo para que no se achiquen */
.buy_button .count-input:not(.count-input-unified) .btn-icon {
    min-width: 30px;
    min-height: 30px;
}

@media (max-width: 575.98px) {
    /* Unificado: mantener tamaños uniformes, solo reducir ligeramente */
    .count-input-unified .remove,
    .count-input-unified .add,
    .count-input-unified .product-card-button {
        width: 1.75rem !important;
        min-width: 1.75rem !important;
        max-width: 1.75rem !important;
        height: 1.75rem !important;
        min-height: 1.75rem !important;
        flex: 0 0 1.75rem !important;
    }
    .count-input-unified .form-control {
        width: 2.5rem !important;
        min-width: 2.5rem !important;
        max-width: 2.5rem !important;
        height: 1.75rem !important;
        min-height: 1.75rem !important;
        flex: 0 0 2.5rem !important;
        font-size: 0.8rem !important;
    }
    .count-input-unified {
        height: 1.75rem !important;
        min-height: 1.75rem !important;
    }
    .count-input-unified .count-boxes-label {
        height: 1.75rem !important;
        min-height: 1.75rem !important;
    }
    /* No unificado (fallback) */
    .buy_button .count-input:not(.count-input-unified) .btn-icon {
        min-width: 26px;
        min-height: 26px;
        padding: 0.2rem;
    }
    .buy_button .count-input:not(.count-input-unified) .form-control {
        min-width: 30px;
        max-width: 40px;
        font-size: 0.7rem;
    }
    .buy_button .count-input .ci-minus,
    .buy_button .count-input .ci-plus {
        font-size: 0.65rem;
    }
}

/* Promotions - Custom dimensions */
.promotion-card {
    width: 416px;
    height: 375px;
}

.promotion-image {
    background-color: #528d55;
    height: 234px;
}

.promotion-content {
    min-height: 139px;
    /* padding, gap, flex: already in HTML with p-3, gap-3, flex-fill Bootstrap classes */
}

/* Hero Carousel - Fixed Height */
.hero-carousel,
.hero-carousel .swiper-slide {
    height: 485px;
    /* width, max-width: could use w-100 mw-100 in HTML */
}

/* Footer */
.text-footer-muted {
    color: var(--cz-footer-text-muted) !important;
}

.text-footer-muted:hover{
    color: var(--cz-footer-text-muted) !important;
}

a.text-footer-muted:hover{
    color: white !important;
}

/* Submenu Styles - Cartzilla style */
/* Mobile horizontal scroll handled by Simplebar via data-simplebar attribute */
.bg-nestle-light .overflow-auto[data-simplebar] {
    /* Enable scrolling on mobile only */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* On desktop, disable scrolling and evenly space items */
@media (min-width: 576px) {
    .bg-nestle-light .overflow-auto[data-simplebar] {
        overflow-x: visible;
        overflow-y: visible;
    }
    
    .bg-nestle-light .nav.flex-nowrap {
        justify-content: space-around;
        gap: 3rem;
    }
    
    /* Ensure items don't shrink on desktop and have equal flex basis */
    .bg-nestle-light .nav.flex-nowrap .nav-link {
        flex-shrink: 0;
        flex-grow: 0;
        flex-basis: auto;
    }
}

/* Category Pills - Custom component */
.category-pill {
    gap: 12px;
    padding: 10px 20px;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: var(--nestle-dark);
    font-weight: 500;
    font-size: 13px;
}

.category-pill:hover {
    border-color: var(--nestle-primary);
    color: var(--nestle-primary);
    /* transform: translateY(-2px); disabled because creates a bug on last pixels*/
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background-color: #e8e5e2!important;
}

.category-pill i {
    font-size: 24px;
    color: var(--nestle-dark);
}

.category-pill:hover i {
    color: var(--nestle-primary);
}

/* Button Hover Effects - Consolidated */
.btn.bg-nestle-primary:hover {
    background-color: #005a8b !important;
    border-color: #005a8b !important;
    /* transform: translateY(-2px); disabled because creates a bug on last pixels*/
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.btn.bg-nestle-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.2);
}

/* Disable transform for cart buttons */
.buy_button .btn.bg-nestle-primary:hover,
.count-input .btn.bg-nestle-primary:hover,
.buy_button .btn.bg-nestle-primary:active,
.count-input .btn.bg-nestle-primary:active {
    transform: none;
}

/* White outlined buttons */
.btn.bg-white.text-nestle-primary.border-nestle-primary:hover {
    background-color: var(--nestle-primary) !important;
    color: #FFFFFF !important;
    border-color: var(--nestle-primary) !important;
    /* transform: translateY(-2px); disabled because creates a bug on last pixels*/
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.btn.bg-white.text-nestle-primary.border-nestle-primary:hover .ci-chevron-right {
    color: #FFFFFF !important;
}

.btn.bg-white.text-nestle-primary.border-nestle-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.2);
}

/* Registration Form - Step indicators */
.step-indicator.active {
    background-color: var(--nestle-gray-900);
    color: #FFFFFF;
}

.step-indicator.inactive {
    background-color: #E8E5E2;
    color: var(--nestle-dark);
}

/* New Account Form - Invalid Feedback Spacing */
.form-control.is-invalid ~ .invalid-feedback {
    display: block !important;
    margin-top: 0.5rem;
    color: #dc3545 !important; /* Red color for error messages */
}

.form-control.is-invalid {
    padding-right: calc(1.5em + 0.75rem + 2.5rem) !important; /* Extra space for help icon + error icon */
    border-color: #dc3545 !important; /* Red border for invalid inputs */
}

/* New Account Form - Disabled Button Styles */
.btn.bg-nestle-primary.disabled:not(#next_button):not(#submit_button),
.btn.bg-nestle-primary:disabled:not(#next_button):not(#submit_button) {
    background-color: var(--nestle-medium) !important;
    border-color: var(--nestle-medium) !important;
    color: var(--nestle-dark) !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Password Strength Indicator */
.password_level {
    margin-top: 0.5rem; /* mt-2 in Bootstrap */
    width: 100%; /* w-100 in Bootstrap */
    display: block;
    clear: both;
}

.password_level .graphic {
    border-radius: 6px; /* rounded-2 in Bootstrap */
    background: #c42727;
    width: 0%; /* Start at 0%, will be updated by JavaScript */
    height: 12px;
    margin-bottom: 0.5rem; /* mb-2 in Bootstrap */
    transition: width 0.3s ease, background 0.3s ease;
    overflow: hidden;
    display: block; /* Asegurar que se muestre */
}

.password_level.low .graphic {
    background: #c17426;
}

.password_level.medium .graphic {
    background: #c1c126;
}

.password_level.high .graphic {
    background: #72bf26;
}

.password_level.max .graphic {
    background: #26bf26;
}

.password_level .text {
    color: #888;
    font-size: 13px;
    line-height: 20px;
    width: 100%; /* w-100 in Bootstrap */
    /* display: could use d-block in HTML */
}

/* Homepage - Hero Section - Remove default spacing */
main.bg-white,
main > section.position-relative.overflow-hidden:first-of-type {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.hero-content-wrapper {
    padding: 180px 16px 32px;
    max-width: 100%;
}

@media (min-width: 992px) {
    .hero-content-wrapper {
        padding: 0% 0 0% 3% !important;
        max-width: 1420px;
        margin: 0 auto;
    }
}

.hero-image {
    object-position: center top;
    pointer-events: none;
    /* top, left: could use top-0 start-0 in HTML */
}

/* Homepage - Benefits Section */
.benefit-icon-container {
    width: 150px;
    height: 150px;
}

/* Responsive adjustments - Mobile */
@media (max-width: 991.98px) {
    .hero-height-mobile {
        height: 510px;
    }
    
    .d-flex.flex-wrap.justify-content-center.gap-4 {
        gap: 24px !important;
    }
}

/* Responsive adjustments - Desktop */
@media (min-width: 992px) {
    .hero-height-desktop {
        height: 450px;
    }
}

/* Homepage - Brands Section */
.brand-card {
    height: 86px;
    min-height: 86px;
}

.brand-bg-nestle {
    background-color: #0327af;
}

.brand-bg-litoral {
    background-color: #ad2333;
}

.brand-border-custom {
    border-color: #e0e5eb !important;
}

/* Apply NestleText as the primary font family - MUST BE AT THE END */
/* Override Cartzilla's Inter font with NestleText using maximum specificity */
html body,
body,
html body *:not([class*="ci-"]):not([class^="ci-"]):not(i):not([class*="icon"]):not([class^="icon"]) {
    font-family: 'NestleText', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Override CSS variables */
:root {
    --cz-font-sans-serif: 'NestleText', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --cz-body-font-family: 'NestleText', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Product variant buttons */
.product-variant-btn {
    border: 1px solid var(--nestle-input-border);
    background-color: white;
    padding: 0 !important;
    display: flex;
    align-items: stretch;
}

.product-variant-btn:hover,
.btn-check:checked + .product-variant-btn {
    border-color: var(--nestle-primary);
    background-color: white;
}


.btn-check:not(:checked) + .product-variant-btn {
    border-color: var(--nestle-input-border);
}

.btn-check:checked + .product-variant-btn > div,
.btn-check:not(:checked) + .product-variant-btn > div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

.btn-check:checked + .product-variant-btn > div {
    background-color: var(--nestle-light) !important;
}

.btn-check:not(:checked) + .product-variant-btn > div {
    background-color: white !important;
}

/* Product gallery offset and padding - Layout specific, cannot use Bootstrap utilities */
.product-gallery-offset {
    margin-top: -120px;
}

.product-gallery-padding {
    padding-top: 120px;
}

/* Product thumbs swiper - Specific dimensions */
.product-thumbs-swiper {
    max-width: 96px;
    height: 475px;
}

.product-thumb-size {
    max-width: 94px;
}

/* Product card ratio - Custom aspect ratio for product images */
.product-card-ratio {
    --cz-aspect-ratio: calc(160 / 191 * 100%);
}

/* Product card image - Consistent sizing */
.product-card-image {
    max-height: 180px;
    object-fit: contain;
}

/* Product detail page images - Prevent stretching */
.object-fit-contain,
.swiper-thumb-img.object-fit-contain {
    object-fit: contain !important;
    width: 100%;
    height: 100%;
}

/* Product quantity label - Positioned inside input (disable interaction) */
.product-quantity-label {
    pointer-events: none; /* pe-none not available in Bootstrap 5.1 */
}

/* Autocomplete Search Results - Minimal custom styles, mostly Bootstrap */
.results_container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid var(--nestle-input-border);
    border-top: 1px solid var(--nestle-input-border); /* Same color as rest of border, remove blue line */
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.08);
    z-index: 2000;
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: -2px;
    min-width: 100%;
    width: max-content;
    max-width: 100vw;
    display: none; /* Hidden by default, shown via JavaScript */
}

.results_container .results {
    padding: 0.5rem 0;
}

.results_container .results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.results_container .results li {
    list-style: none;
}

.results_container .results li:last-child {
    border-bottom: none !important;
}

.results_container .results a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.results_container .results a:hover,
.results_container .results a:focus {
    background-color: var(--nestle-light) !important;
}

.results_container .results a:hover img,
.results_container .results a:focus img {
    border-color: var(--nestle-primary) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results_container .results img {
    max-width: 48px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.results_container .results .result_content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.results_container .results .result_code {
    font-size: 0.8125rem;
    color: #495057;
    margin-bottom: 0.375rem;
    line-height: 1.3;
    display: block;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.results_container .results .result_code::before,
.results_container .results .result_code::after,
.results_container .results .result_name::before,
.results_container .results .result_name::after {
    content: none !important;
}

.results_container .results .result_name {
    font-size: 0.875rem;
    color: var(--nestle-dark, #212529);
    line-height: 1.4;
    word-break: break-word;
}

.results_container .results .highlight {
    font-weight: 700;
    color: var(--nestle-primary);
    background-color: rgba(var(--nestle-primary-rgb), 0.1);
    padding: 0 2px;
    border-radius: 2px;
}

.results_container .results .border-top.bg-nestle-light a:hover,
.results_container .results .border-top.bg-nestle-light a:focus {
    background-color: var(--nestle-primary) !important;
    color: #fff !important;
    padding-left: 1rem !important;
}

/* Position results container relative to input group */
.input-group.position-relative .results_container {
    margin-top: -1px;
}

/* Mobile search offcanvas - Consolidated overflow rules */
#mobileSearchOffcanvas,
#mobileSearchOffcanvas .offcanvas-body,
#mobileSearchOffcanvas .results_container,
#mobileSearchOffcanvas .results_container .results,
#mobileSearchOffcanvas .results_container .results ul,
#mobileSearchOffcanvas .results_container .results li,
#mobileSearchOffcanvas .results_container .results a {
    overflow-x: hidden !important;
}

#mobileSearchOffcanvas .offcanvas-body,
#mobileSearchOffcanvas .results_container,
#mobileSearchOffcanvas .results_container .results,
#mobileSearchOffcanvas .results_container .results ul,
#mobileSearchOffcanvas .results_container .results li {
    width: 100% !important;
    max-width: 100% !important;
}

#mobileSearchOffcanvas .offcanvas-body {
    max-width: 100vw !important;
}

#mobileSearchOffcanvas .results_container {
    position: relative;
    top: 0;
    margin-top: 0.75rem;
    border: 1px solid var(--nestle-input-border);
    border-radius: 0.5rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    box-sizing: border-box;
}

#mobileSearchOffcanvas .results_container .results a {
    padding: 0.875rem 1rem !important;
    min-height: auto;
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
}

#mobileSearchOffcanvas .results_container .results img {
    width: 48px !important;
    height: 48px !important;
    flex-shrink: 0;
}

#mobileSearchOffcanvas .results_container .results .flex-grow-1 {
    min-width: 0 !important;
    max-width: calc(100% - 64px) !important;
    overflow: hidden;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ============================================
   Filter Sidebar Styles (Products List)
   Based on Figma Design
   ============================================ */

/* Sticky Sidebar - Follows scroll on large screens */
@media (min-width: 992px) {
    /* Make the sidebar container sticky */
    aside.col-lg-3 {
        position: sticky;
        top: 140px; /* Distance from top when sticky (accounts for sticky header + extra spacing) */
        align-self: flex-start; /* Align to top of flex container */
        max-height: calc(100vh - 160px); /* Limit height to viewport minus header and spacing */
        overflow-y: auto; /* Enable scroll if content exceeds max-height */
        z-index: 10; /* Ensure it stays above other content */
    }
    
    /* Ensure the offcanvas container doesn't interfere with sticky behavior */
    aside.col-lg-3 .offcanvas-lg {
        position: static; /* Override offcanvas positioning on large screens */
        visibility: visible;
        transform: none;
        background-color: transparent;
        border: none;
    }
    
    /* Make the offcanvas body scrollable if needed */
    aside.col-lg-3 .offcanvas-body {
        max-height: calc(100vh - 160px);
        overflow-y: auto;
    }
}

/* Filter Sidebar - Simplebar track positioning to work with Bootstrap padding */
#filterSidebar .offcanvas-body[data-simplebar] .simplebar-track {
    right: 4px !important; /* Position scrollbar with margin from edge */
}

/* Categories Header - Now uses same style as Brands */
#categories .accordion-item {
    border: 0;
    margin-bottom: 0;
}

#categories .accordion-header {
    margin-bottom: 0;
}

#categories .filter-filter-btn {
    padding: 16px !important;
}

#categories .filter-filter-btn .d-flex {
    flex-grow: 1;
}

#categoriesContent,
#categories .accordion-body,
#brands .accordion-body {
    padding: 0 !important;
    margin: 0;
}

.filter-sidebar-title,
.filter-filter-title {
    font-family: var(--nestle-font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: var(--nestle-dark);
    margin: 0;
}

/* Category Items */
.filter-category-btn {
    gap: var(--spacing-16);
    padding: 12px var(--spacing-16) !important; /* 12px vertical vs Bootstrap py-2 = 8px */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove category accordion default arrows - Consolidated */
.filter-category-btn::after,
.filter-category-btn::before,
#categories .accordion-button::after,
#categories .accordion-button::before,
#categories .accordion-header .accordion-button::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}

.filter-category-icon {
    background-color: #fafafa;
    width: 56px;
    height: 56px;
}

.filter-category-btn:not(.collapsed) .filter-category-icon {
    background-color: rgba(var(--nestle-medium-rgb), 0.3);
}

.filter-category-text {
    font-family: var(--nestle-font-family);
    font-weight: 700;
    font-size: 14px;
    line-height: 22px;
    color: var(--nestle-dark);
    min-width: 0;
}

/* Subcategories - Using Cartzilla style */

#categories .accordion-body .nav {
    border-color: rgba(217, 217, 217, 0.3) !important;
    border-width: 1px !important;
}

#categories .accordion-body .nav-link {
    color: var(--bs-body-color);
    text-decoration: none;
}

#categories .accordion-body .nav-link:hover {
    text-decoration: underline;
}

/* Filter Headers (Marcas, Promoções, etc.) - Consolidated */
.filter-filter-header,
.filter-filter-header-with-switch {
    background-color: var(--nestle-light);
    border-top: 1px solid #473e36;
    padding: 0;
    margin: 0;
}

.filter-filter-header:not(:first-of-type),
.filter-filter-header-with-switch:not(:first-of-type) {
    border-top: 0;
    border-bottom: 1px solid #473e36;
}

.filter-filter-header-with-switch {
    position: relative;
}

.filter-filter-btn {
    gap: var(--spacing-16);
    padding: var(--spacing-16) !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove accordion default arrows - Consolidated */
.filter-filter-btn::after,
.filter-filter-btn::before,
#brands .accordion-button::after,
#brands .accordion-button::before,
#brands .accordion-header .accordion-button::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}


/* Chevron icons - Consolidated */
.filter-filter-chevron,
.filter-category-chevron {
    font-size: 16px;
    flex-shrink: 0;
}

.filter-filter-chevron {
    color: #222934;
}

.filter-category-chevron {
    color: var(--nestle-dark);
}

.filter-filter-btn[aria-expanded="true"] .filter-filter-chevron,
.filter-category-btn:not(.collapsed) .filter-category-chevron {
    transform: rotate(180deg);
}

.filter-filter-header-with-switch .d-flex {
    padding: var(--spacing-16);
    min-height: 56px;
    display: flex;
    align-items: center;
}

.filter-filter-header-with-switch .filter-filter-title {
    margin: 0;
    padding: 0;
    font-family: var(--nestle-font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: #30261d;
}

.filter-switch {
    width: 44px !important;
    height: 24px !important;
    background-color: #cad0d9 !important;
    border: none !important;
    cursor: pointer;
    border-radius: 100px !important;
    padding: 2px 3px !important;
}

.filter-switch:checked {
    background-color: #0075b0 !important;
}

.filter-switch:focus {
    box-shadow: none !important;
}

.filter-switch::after {
    width: 19px !important;
    height: 19px !important;
    background-color: white !important;
    border-radius: 50% !important;
    transition: transform 0.2s;
    margin-top: 0 !important;
}

.filter-switch:checked::after {
    transform: translateX(20px) !important;
}

/* Brands Content */
.filter-brands-content {
    padding: var(--spacing-16);
    overflow: hidden;
}

#brands .form-check {
    padding-left: 0;
    margin-bottom: 0;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
}

#brands .form-check-label {
    font-family: var(--nestle-font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--bs-body-color);
    cursor: pointer;
    word-break: break-word;
    overflow-wrap: break-word;
}

#brands .form-check-input {
    margin-top: 0.25em;
    margin-right: 0;
    margin-left: 0;
    flex-shrink: 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 1em !important;
    height: 1em !important;
    position: relative;
    float: none;
}

#brands .d-flex.flex-column {
    border: none !important;
    overflow: hidden;
    width: 100%;
}

#brands .d-flex.flex-column::before,
#brands .d-flex.flex-column::after {
    display: none !important;
    content: none !important;
}


/* Simplebar scrollbar for brands - Consolidated */
#brands [data-simplebar],
#brands [data-simplebar] .simplebar-content-wrapper,
#brands [data-simplebar] .simplebar-content,
#brands .form-check,
#brands .form-check-label {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#brands [data-simplebar] {
    padding-right: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden;
}

#brands [data-simplebar] .simplebar-content-wrapper {
    overflow-y: auto !important;
    overflow-x: hidden;
}

#brands [data-simplebar] .simplebar-content {
    overflow: visible;
    padding-right: var(--spacing-16);
}

#brands [data-simplebar] .simplebar-scrollbar::before {
    background: rgba(0, 0, 0, 0.2) !important;
}

#brands [data-simplebar] .simplebar-track {
    right: 0 !important;
}

#brands .form-check-label {
    max-width: calc(100% - 2em);
}

/* Promotion Banner - Figma Design */
.promotion-banners-container {
    gap: 35px; /* Custom gap: 35px vs Bootstrap gap-4 = 24px */
}

.promotion-banner {
    background-color: var(--nestle-medium);
    min-height: 149px;
    flex: 0 0 calc(50% - 17.5px);
    min-width: 0;
}

.promotion-banner-full {
    flex: 0 0 100%;
    max-width: 100%;
}

.promotion-banner-sidebar {
    flex: 0 0 100%;
    max-width: 100%;
    height: auto;
    min-height: 149px;
}

.promotion-banner-sidebar .promotion-image-wrapper {
    height: 158px;
    min-height: 158px;
}

.promotion-banner-sidebar .promotion-image,
.promotion-image {
    object-fit: cover;
    object-position: center;
}

.promotion-image-wrapper {
    width: 150px;
    height: 100%;
}

.promotion-content {
    gap: var(--spacing-15); /* 15px vs Bootstrap p-3 = 16px */
    padding: var(--spacing-15);
    min-width: 0;
}

.promotion-text,
.promotion-banner-in-grid-text {
    font-family: var(--nestle-font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: var(--nestle-dark);
    margin: 0;
    flex-shrink: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.promotion-text {
    min-height: 53px;
}

.promotion-btn {
    background-color: #fff !important;
    border: 1px solid #0075b0 !important;
    color: #0075b0 !important;
    font-family: var(--nestle-font-family);
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
    width: 131px;
    min-width: 131px;
}

.promotion-btn:hover {
    background-color: #e8e5e2!important;
    border-color: #0075b0 !important;
    color: #0075b0 !important;
    opacity: 0.9;
    text-decoration: none;
}

.promotion-btn:focus,
.promotion-btn:active {
    background-color: #fff !important;
    border-color: #0075b0 !important;
    color: #0075b0 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 124, 186, 0.25) !important;
    text-decoration: none;
}

.promotion-btn i {
    color: #0075b0 !important;
    font-size: 14px;
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .promotion-banner {
        flex: 0 0 100%;
    }
    
    .promotion-banners-container {
        gap: 20px;
    }
}

/* Promotion Banner in Product Grid */
.promotion-banner-in-grid {
    height: 100%;
}

.promotion-banner-in-grid-wrapper {
    background-color: var(--nestle-medium);
    /*min-height: 364px;*/
}

.promotion-banner-in-grid-image {
    /*height: 183px;*/
}

.promotion-banner-in-grid-content {
    gap: var(--spacing-15);
    padding: var(--spacing-15);
    background-color: var(--nestle-medium);
}

.promotion-banner-in-grid-text {
    min-height: 48px;
}

/* Show selector with unidades when product is added or loading */
.buy_button.added .selector-with-units,
.buy_button.loading .selector-with-units {
    display: flex !important;
}

.buy_button:not(.added):not(.loading) .selector-with-units {
    display: none !important;
}

/* Hide add button when loading or added */
.buy_button.loading .first_unit.add:not(.product-card-button),
.buy_button.added .first_unit.add:not(.product-card-button) {
    display: none !important;
}

/* Loading state styling - visual feedback on the selector */
.buy_button.loading .count-input {
    opacity: 0.6;
    pointer-events: none;
}

/* Show unidades only when selector is visible (not collapsed/hidden) */
.selector-with-units .count-input.collapsed + .product-units-label,
.selector-with-units .count-input.d-none + .product-units-label {
    display: none !important;
}

.selector-with-units .count-input:not(.collapsed):not(.d-none) ~ .product-units-label {
    display: inline-block !important;
}

.list-group-item.active i{
    color: #0075b0;
}

/* Header Search Bar - Fix for narrow resolutions */
/* Prevent header elements from breaking layout without changing order */
.navbar .container > .d-flex {
    flex-wrap: nowrap !important;
    min-width: 0;
}

/* Search bar container - ensure it doesn't break but maintains order */
@media (min-width: 992px) {
    .navbar .d-none.d-lg-flex {
        min-width: 0;
        flex: 1 1 auto;
        max-width: 100%;
    }
    
    .navbar .input-group {
        min-width: 200px;
        width: 100%;
        max-width: 100%;
    }
    
    .navbar .input-group > .position-relative {
        min-width: 0;
        flex: 1 1 auto;
    }
    
    .navbar #autocomplete_search {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
}

/* Fix header layout in medium screens (tablets) */
@media (min-width: 992px) and (max-width: 1399.98px) {
    /* Hide contact info in medium screens to give more space */
    .navbar .d-none.d-xl-flex {
        display: none !important;
    }
    
    /* Ensure search bar has proper constraints without breaking */
    .navbar .d-none.d-lg-flex {
        flex: 1 1 auto;
        min-width: 200px;
        max-width: 500px;
    }
}

/* Extra narrow desktop screens */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar .d-none.d-lg-flex {
        flex: 1 1 auto;
        min-width: 180px;
        max-width: 350px;
    }
}

/* Ensure search input doesn't overflow, but allow autocomplete dropdown to be visible */
.navbar .input-group {
    overflow: visible;
}

.navbar .input-group > .position-relative {
    overflow: visible;
    min-width: 0;
}

.navbar #autocomplete_search {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Container wider for dashboard hero section */
.container-wider {
    width: 100%;
    padding-right: var(--bs-gutter-x, 1.5rem);
    padding-left: var(--bs-gutter-x, 1.5rem);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container-wider {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container-wider {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container-wider {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container-wider {
        max-width: 1600px;
    }
}

/* DataTable email column truncation */
#dtUsersList_wrapper {
    overflow-x: hidden !important;
    width: 100%;
}

#dtUsersList_wrapper .dataTables_scroll {
    overflow-x: hidden !important;
}

#dtUsersList_wrapper .dataTables_scrollHead,
#dtUsersList_wrapper .dataTables_scrollBody {
    overflow-x: hidden !important;
}

#dtUsersList {
    width: 100% !important;
    margin: 0;
    table-layout: auto;
}

#dtUsersList td.email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0; /* Permite que la columna se ajuste */
}

#dtUsersList td.email span {
    display: inline-block;
    max-width: calc(100% - 30px); /* Restar espacio del icono */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

#dtUsersList td.tdlimitedfield {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1400px) {
    .container-wider {
        max-width: 1800px;
    }
}

/* Carrito (directo + transfer): móvil */
@media (min-width: 768px) {
    .table .d-md-table-header-group {
        display: table-header-group !important;
    }
}
@media (max-width: 767.98px) {
    .table .d-md-table-header-group {
        display: none !important;
    }
    /* Evitar scroll horizontal; tabla ancho fijo */
    .content-wrapper .table.mb-4 {
        table-layout: fixed;
        width: 100%;
    }
    .content-wrapper section.container {
        overflow-x: hidden;
    }
    /* Bootstrap no incluye min-width: 0; necesario para que flex/table no desborde */
    .min-w-0 { min-width: 0; }
}

/*Iconos*/

.ci-promo:before{
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../../_img/icon-promo.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

.ci-new:before{
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../../_img/icon-new.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

.ci-expositor:before{
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../../_img/icon-expositor.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

.ci-estacionalidad:before{
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../../_img/icon-estacionalidad.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

.ci-descuento:before{
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../../_img/icon-descuento.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

.ci-top:before{
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../../_img/icon-top.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

/* Botón TOP visible en todas las páginas (listados, fichas). Cartzilla no lo muestra ahí. */
.floating-buttons .btn-scroll-top,
.btn-scroll-top {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}
.floating-buttons .btn-scroll-top svg rect {
    transition: stroke-dashoffset 0.15s ease-out;
}
/* Smooth scroll when clicking TOP (and for anchor links) */
html {
    scroll-behavior: smooth !important;
}

.ci-christmas:before{
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../../_img/icon-christmas.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

.ci-box:before{
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../../_img/icon-box.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

/*Poner background en hovers de iconos de botones*/
.nav-link:hover span.rounded-circle,
.animate-underline .btn.btn-outline-secondary:hover,
.btn.btn-outline-secondary:hover,
.btn-catalogo:hover .btn{
    background-color: #e8e5e2!important;
}

/*Font size for +99 items on cart*/
.cart-max-items{
    font-size: 10px !important;
}

thead {
    background-color: #F6F5F4 !important;
}

thead th{
    background-color: transparent !important;
}

tbody, td, tfoot, th, thead, tr{
    border-color: #D1CBC5 !important;
}

table.dataTable.no-footer{
    border:none !important;
}

.nav-link-category{
    display: inline!important;
}

/* ============================================
   Promotion Scaled Transfer Styles
   ============================================ */

/* Sticky promotion bar - se posiciona al final del contenido */
#transfer-scaled-status {
  position: sticky;
  bottom: 0;
}

/* Goal bubble hover tooltip */
#scaled_discount > span[data-bought-units]:hover > span:first-child {
  opacity: 1 !important;
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
  #scaled_discount {
    gap: 0.5rem !important;
  }
  
  #scaled_discount > span:first-child {
    width: 42px !important;
    height: 42px !important;
    font-size: 9px !important;
  }
  
  #scaled_discount > span[data-bought-units] {
    width: 28px !important;
    height: 28px !important;
    font-size: 9px !important;
    margin-top: 8px !important;
  }
  
  #scaled_discount > span[data-bought-units] > span:last-child {
    font-size: 8px !important;
    bottom: -20px !important;
  }
  
  #scaled_discount .discount_quantity {
    width: 100%;
    padding-top: 0 !important;
    margin-top: 10px;
  }
  
  #scaled_discount .discount_quantity .discount {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    width: 100% !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    height: auto !important;
  }
}

/* Botón "Avísame / Te avisaremos" (notificación de stock): hover y active en ficha y listado */
.notice_request.selected {
  border: 1px solid #007AC2 !important;
  background-color: #FFFFFF !important;
  color: #007AC2 !important;
}
.notice_request.selected i {
  color: inherit !important;
}
.notice_request.selected:hover {
  border-color: #007AC2 !important;
  background-color: #E8F4FC !important;
  color: #007AC2 !important;
}
.notice_request.selected:hover i {
  color: inherit !important;
}
.notice_request.selected:active {
  border-color: #007AC2 !important;
  background-color: #D0EBF9 !important;
  color: #007AC2 !important;
}
.notice_request.selected:active i {
  color: inherit !important;
}
/* Solo anillo de foco con teclado, no tras clic con ratón (evita que se quede "clavado") */
.notice_request.selected:focus-visible {
  border-color: #007AC2 !important;
  background-color: #E8F4FC !important;
  color: #007AC2 !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 122, 194, 0.25) !important;
  outline: none !important;
}
.notice_request.selected:focus-visible i {
  color: inherit !important;
}
.notice_request:focus {
  outline: none !important;
}

/* -------- User Favorite Set ------------------ */

/* #products_list     .user_favorites_set_button */
/* .products_list     .user_favorites_set_button {
    position:absolute;
    z-index:2;
    top:5px;
    right:10px;
    width:40px;
    height:40px;
    display:block;
    background-repeat: no-repeat;
    -webkit-transition: background-color 250ms;
    transition: background-color 250ms;
    cursor:pointer;
} */
/* .product_container .user_favorites_set_button{
    top: 35px;
    right: 35px;
    position: absolute;
    z-index:2;
} */
/* #products_list  .user_favorites_set_button.on:before ,*/
/* .products_list .user_favorites_set_button.on:before ,
.product_container .user_favorites_set_button.on:before  {
    
    background-image: url(../_img/star-full_v1.png?v=103);
    content:"";
    position:absolute;
    width:40px;
    height:40px;
    top:0px;
    left:0px;
    background-repeat:no-repeat;
} */
/* #products_list  .user_favorites_set_button.off:before ,*/
/* .products_list  .user_favorites_set_button.off:before ,
.product_container .user_favorites_set_button.off:before {   
    
    background-image: url(../_img/star-empty_v1.png?v=103);
    content:"";
    position:absolute;
    width:40px;
    height:40px;
    top:0px;
    left:0px;
    background-repeat:no-repeat;
} */
/*#products_list  .user_favorites_set_button:hover  .favorite_tooltip {
      display: block;
      z-index: 1;
}*/
/*#products_list     .user_favorites_set_button  .user_favorites_set_tooltip ,*/
 .user_favorites_set_tooltip {
  border-radius:4px;
  display: none;
  margin:  0px;
  z-index:3;
  position: absolute;
  left: -37px;
  top : 45px;
  transform: translateX(-50%);
  z-index: -1;
  background-color: #fff;
  border:1px solid #ccc;
  color: #000;
  box-sizing: border-box;
  min-width: 150px;
  min-height: 180px;
  /* padding:15px 0px; */
}

.user_favorites_set_tooltip * {
  transition: opacity 0.6s;    
}
/* #products_list     .user_favorites_set_button  .user_favorites_set_tooltip:before ,*/
 .user_favorites_set_tooltip:before  {
    
    display: block;
    content: " ";
    position: absolute;
    z-index: 1;
    top: -10px;
    box-sizing: border-box;
    left: 86%;
    transform: translateX(-50%) rotate(45deg);
    width: 17px;
    height: 17px;
    background-color: inherit;
    border-right: none;
    border-left: 1px solid #ccc;
    border-bottom: none;
    border-top: 1px solid #ccc;
  }

/* #products_list     .user_favorites_set_button  .user_favorites_set_tooltip ul , */
 .user_favorites_set_tooltip ul {
    list-style: none;
    padding-top: 0px;
    margin:5px  5px 10px; 
    padding:0px 0px;
}
  
/* #products_list     .user_favorites_set_button  .user_favorites_set_tooltip .loading ,*/
 .user_favorites_set_tooltip .loading {
      display   :block;
      margin    :10px auto;
      width     :30%;
      float     :none;
  }
/*#products_list     .user_favorites_set_button  .user_favorites_set_tooltip li ,*/
 .user_favorites_set_tooltip li {
      /* padding   :5px 10px 5px 10px; */
      position  :relative;
      cursor    :pointer;
      width:100%;
      background: #FBFAF9;
      /* margin: 5px 0px; */
      line-height: 13px;
      margin:0px; 
      padding:5px 0px;
      
  }
/* #products_list     .user_favorites_set_button  .user_favorites_set_tooltip li.selected ,*/
 .user_favorites_set_tooltip li.selected {
      background:#eeeadf; 
  }
/* #products_list     .user_favorites_set_button  .user_favorites_set_tooltip li.selected:before , */
 .user_favorites_set_tooltip li.selected:before {
    content: '';
    background-image: url(../../_img/heart.png?v=200);
    background-size: cover;
    background-repeat: no-repeat;
    content: "";
    width: 20px;
    height: 20px;
    position: absolute;
    top: 1px;
    left: 5px;
  }
/*#products_list     .user_favorites_set_button  .user_favorites_set_tooltip div.link , */
  .user_favorites_set_tooltip div.link {
    padding: 10px;
    text-align: center;
    position: relative;
    cursor: pointer;
    width: 100%;
    background: #ffffff;
  }
/* #products_list     .user_favorites_set_button  .user_favorites_set_tooltip div.link a , */
 .user_favorites_set_tooltip div.link a {
    font-size: 14px;
    color: #484848 ;
    background:none!important;
    width: 100%;
    text-decoration:underline;
    font-family: 'Font2', Arial, Helvetica, sans-serif;
  }
  
/* #products_list     .user_favorites_set_button  .user_favorites_set_tooltip .user_favorites_set_tooltip_close , */  
  .user_favorites_set_tooltip .user_favorites_set_tooltip_close  {
    font-size: 0.8em;
    color: #484848 ; 
    float:right;
    padding:0px 6px;
    display: block;
    position: relative;
    right:-10px;
    top:-10px;
    float: right;
    border: 1px solid #484848 ;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    -webkit-transition: background-color 250ms;
    transition: background-color 250ms;
  }
  
/* -------- /User Favorite Set ----------------- */

/* -------- Breadcrumb mobile - compact, single line, horizontal scroll -------- */
@media (max-width: 991.98px) {
    .content-wrapper nav[aria-label="breadcrumb"] {
        padding-top: 0.5rem !important;
        margin-top: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    .content-wrapper nav[aria-label="breadcrumb"] .d-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .content-wrapper nav[aria-label="breadcrumb"] .d-flex .breadcrumb {
        width: 100%;
    }
    .content-wrapper nav[aria-label="breadcrumb"] .d-flex .nav {
        width: 100%;
        flex-shrink: 0;
        display: flex;
        justify-content: flex-end;
    }
    .content-wrapper nav[aria-label="breadcrumb"] .breadcrumb {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        font-size: 0.8125rem;
        padding-bottom: 2px;
        flex: 1 1 auto;
        min-width: 0;
    }
    .content-wrapper nav[aria-label="breadcrumb"] .breadcrumb::-webkit-scrollbar {
        display: none;
    }
    .content-wrapper nav[aria-label="breadcrumb"] .breadcrumb-item {
        flex-shrink: 0;
        white-space: nowrap;
    }
    .content-wrapper nav[aria-label="breadcrumb"] .breadcrumb-item + .breadcrumb-item::before {
        flex-shrink: 0;
    }
}

/* -------- Checkout sticky confirm (mobile) - same element sticks on scroll -------- */
@media (max-width: 991.98px) {
    .checkout-sticky-confirm {
        position: sticky;
        bottom: 0;
        z-index: 10;
        background: var(--bs-body-bg, #fff);
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
    }
}

/* Camera scanner: limit viewfinder height on mobile so instruction text and "Parar cámara" stay visible */
.camera-scanner-section {
    overflow: hidden;
}
.camera-viewfinder,
.camera-viewfinder video {
    max-height: 100%;
    object-fit: cover;
}
@media (max-width: 991.98px) {
    .camera-scanner-section {
        max-height: 52vh;
        min-height: 280px;
    }
    .camera-viewfinder {
        height: 100% !important;
        overflow: hidden;
    }
    .camera-viewfinder video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }
}
