* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* CSS Variables */
:root {
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-color: #2c3e50;
    --text-primary: #333333;
    --input-bg: #ffffff;
    --input-border: #ddd;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
    --header-bg: #34495e;
}

/* ==================== LOADING SCREEN ==================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    background: linear-gradient(to bottom, #46b725, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-logo-container {
    position: relative;
    width: 165px;
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-logo-outline {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: logoEntrance 0.6s ease-out;
    position: relative;
    z-index: 2;
}

.loading-logo-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    clip-path: inset(100% 0 0 0);
    animation: logoFill 1s ease-in-out 1.2s forwards;
    z-index: 1;
}

.loading-text {
    font-family: 'Rubik', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.2em;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    animation: textReveal 0.6s ease-out 0.6s forwards;
}

/* Logo entrance animation: grow and bounce */
@keyframes logoEntrance {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    65% {
        transform: scale(0.85);
    }
    80% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Logo fill animation: fills from top to bottom */
@keyframes logoFill {
    0% {
        clip-path: inset(100% 0 0 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* Text reveal animation - smooth horizontal reveal like typing */
@keyframes textReveal {
    0% {
        opacity: 1;
        max-width: 0;
        letter-spacing: 0.5em;
    }
    100% {
        opacity: 1;
        max-width: 100%;
        letter-spacing: 0.2em;
    }
}

/* Text pulse animation (after reveal is complete) */
@keyframes textPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.loading-text.typing-complete {
    animation: textReveal 0.6s ease-out 0.6s forwards, textPulse 1.5s ease-in-out 1.2s infinite;
}

/* Glow effect animation (applied after entrance) */
@keyframes glowSweep {
    0% {
        filter: drop-shadow(0 -30px 20px rgba(255, 255, 255, 0));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 1)) 
                drop-shadow(0 0 40px rgba(255, 255, 255, 0.9))
                drop-shadow(0 0 60px rgba(255, 255, 255, 0.7));
    }
    100% {
        filter: drop-shadow(0 30px 20px rgba(255, 255, 255, 0));
    }
}

.loading-logo-outline.glow {
    animation: logoEntrance 0.6s ease-out, glowSweep 0.6s ease-in-out 0s;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .loading-content {
        gap: 0.8rem;
        padding: 0 1rem;
    }
    
    .loading-logo-container {
        width: 132px;
        height: 132px;
    }
    
    .loading-text {
        font-size: 1.2rem;
    }
}

/* ==================== END LOADING SCREEN ==================== */

/* Analytics Dashboard Styles */
.analytics-section {
    margin-bottom: 30px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.analytics-card {
    background: white;
    border: 2px solid #45a049;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.analytics-card h4 {
    color: #45a049;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: bold;
}

.analytics-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.analytics-tab {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.analytics-tab.active {
    background: #45a049;
    color: white;
    border-color: #45a049;
}

.analytics-tab:hover:not(.active) {
    background: #e9ecef;
}

.analytics-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.analytics-subtitle {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.analytics-unit {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.analytics-searches {
    background: white;
    border: 2px solid #45a049;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.analytics-searches h4 {
    color: #45a049;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.search-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.search-list h5 {
    color: #333;
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

.analytics-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.analytics-list li {
    padding: 8px 12px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #45a049;
    font-size: 14px;
}

.analytics-list li:nth-child(1) { border-left-color: #45a049; }
.analytics-list li:nth-child(2) { border-left-color: #388E3C; }
.analytics-list li:nth-child(3) { border-left-color: #2E7D32; }
.analytics-list li:nth-child(4) { border-left-color: #1B5E20; }
.analytics-list li:nth-child(5) { border-left-color: #0D4D0D; }

.analytics-chart {
    background: white;
    border: 2px solid #45a049;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.analytics-chart h4 {
    color: #45a049;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.chart-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.chart-period {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chart-period.active {
    background: #45a049;
    color: white;
    border-color: #45a049;
}

.chart-period:hover:not(.active) {
    background: #e9ecef;
}

.chart-container {
    position: relative;
    height: 300px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
}

.analytics-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.analytics-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    background: #45a049;
    color: white;
}

.analytics-btn:hover {
    background: #388E3C;
    transform: translateY(-2px);
}

.analytics-btn.danger {
    background: #dc3545;
}

.analytics-btn.danger:hover {
    background: #c82333;
}

/* Botones de reset individuales */
.card-header-with-reset {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-header-with-reset h4 {
    margin: 0;
}

.reset-analytics-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.reset-analytics-btn:hover {
    background: #c82333;
    transform: rotate(180deg) scale(1.1);
}

/* Botón de ver lista completa */
.search-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.search-list-header h5 {
    margin: 0;
}

.view-all-btn {
    background: #45a049;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #388E3C;
    transform: translateY(-1px);
}

/* Modal de lista completa */
.analytics-list-modal-content {
    max-width: 600px;
    max-height: 80vh;
}

.analytics-full-list {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.analytics-full-list ol {
    list-style: decimal;
    padding-left: 30px;
    margin: 0;
}

.analytics-full-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.analytics-full-list li:last-child {
    border-bottom: none;
}

.analytics-full-list .search-count {
    color: #45a049;
    font-weight: bold;
    margin-left: 10px;
}

/* Responsive Analytics */
@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .search-lists {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .analytics-tabs {
        flex-direction: column;
    }
    
    .chart-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .analytics-controls {
        flex-direction: column;
        align-items: center;
    }
}

/* Screen reader only labels */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Progressive Image Loading Styles */
.progressive-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    margin: 0.75rem;
    width: calc(100% - 1.5rem);
    overflow: hidden;
}

.progressive-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    filter: blur(8px);
    transform: scale(1.1); /* Slightly larger to hide blur edges */
    transition: opacity 0.3s ease;
}

.progressive-catalog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Loading indicator for lazy loading */
.loading-indicator {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #666;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.loading-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #45a049;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product card animations for lazy loading */
.product-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.product-card.lazy-loaded {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple products */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }
.product-card:nth-child(9) { animation-delay: 0.9s; }
.product-card:nth-child(10) { animation-delay: 1.0s; }
.product-card:nth-child(11) { animation-delay: 1.1s; }
.product-card:nth-child(12) { animation-delay: 1.2s; }

.end-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #888;
    font-style: italic;
    border-top: 1px solid #eee;
    margin-top: 1rem;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.end-message p {
    margin: 0;
    font-size: 0.9rem;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.3;
    color: #333;
    background-color: #f4f4f4;
    overflow-y: scroll; /* Force scrollbar to always be visible */
}

/* Prevenir overscroll bounce en móviles y cambiar fondo a blanco */
@media (max-width: 768px) {
    html {
        overscroll-behavior-y: auto;
        background-color: #ffffff;
    }
    
    body {
        overscroll-behavior-y: auto;
        -webkit-overflow-scrolling: touch;
        background-color: #ffffff;
        position: relative;
        min-height: 100vh;
    }
}

/* Hide mobile cart elements on desktop only */
@media (min-width: 769px) {
    .mobile-cart-bar,
    .mobile-cart-overlay {
        display: none !important;
    }
}

header {
    background: #45a049;
    color: white;
    padding: 1.2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 85px;
}

.header-spacer {
    width: 50px; /* Adjust to match the icon button width */
}

.company-logo {
    height: 60px;
    max-width: 293px;
    object-fit: contain;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.admin-icon-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.admin-icon-btn:hover {
    background: white;
    color: #45a049;
    transform: scale(1.05);
}

.admin-icon-btn svg {
    width: 19.2px; /* 24px - 20% = 19.2px */
    height: 19.2px;
    display: block;
    margin: auto;
}

/* ==================== NEWS BAR STYLES ==================== */

.news-bar {
    background: #45a049;
    color: black;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-bottom: 1px solid #388E3C;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-bar.hidden {
    display: none;
}

.news-content {
    width: 100%;
    position: relative;
    overflow: hidden;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.news-text {
    display: inline-block;
    padding: 0 1rem;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.765rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 0;
    animation: fadeInOut 5s ease-in-out infinite;
    line-height: 1.3;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.news-text:hover {
    animation-play-state: paused;
}

/* Multiple news items spacing */
.news-item {
    display: inline-block;
    margin-right: 4rem;
}

/* ==================== NEWS MANAGEMENT STYLES ==================== */

.news-section {
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.news-list {
    margin-top: 1rem;
}

.admin-news-item {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    gap: 1rem;
}

.admin-news-info {
    flex: 1;
}

.admin-news-content {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.admin-news-meta {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-news-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.news-status-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.news-status-badge.active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.news-status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* News Form Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
    line-height: 1.2;
}

.checkbox-container {
    align-items: center;
    justify-content: flex-start;
    min-height: 2.5rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    vertical-align: middle;
    transform: translateY(-3%);
}

.checkbox-label .checkmark {
    font-weight: normal;
    margin: 0;
    line-height: 1.2;
    vertical-align: middle;
}

/* Loading Counter Animation */
.loading-counter {
    color: #45a049;
    font-weight: 500;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* News Modal Textarea */
#newsContent {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

#newsContent:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Navigation Bar */
.navigation-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.5rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.nav-btn:hover {
    color: #45a049;
    background: rgba(76, 175, 80, 0.1);
}

.nav-btn.active {
    color: #45a049;
    background: rgb(0 255 7 / 15%);
    border-bottom: 2px solid #45a049;
}

/* Content Sections */
.content-section {
    min-height: calc(100vh - 230px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.content-section.hidden {
    display: none;
}

.maintenance-message {
    text-align: center;
    color: #666;
    max-width: 400px;
}

.maintenance-message svg {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.maintenance-message h2 {
    color: #45a049;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.maintenance-message p {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Old admin button styles removed - now using admin-icon-btn */

.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    transition: margin-left 0.3s ease;
}

/* List View Styles */
.catalog.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1000px;
}

.catalog.list-view .product-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1.5rem;
    min-height: 120px;
}

.catalog.list-view .product-image {
    width: 15%;
    height: 15%;
    flex-shrink: 0;
    margin: 0;
    border-radius: 8px;
}

.catalog.list-view .product-info {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.catalog.list-view .product-name {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.catalog.list-view .product-brand {
    font-size: 1rem;
    font-weight: 300;
    color: #666;
    margin-bottom: 0.75rem;
    margin-top: -0.15rem;
    font-style: italic;
}

.catalog.list-view .price-info {
    margin: 0.1rem 0;
}

.catalog.list-view .bcv-price {
    margin-bottom: 0.3rem;
    display: block;
    text-align: left;
}

/* List view description box positioning */
.catalog.list-view .description-box-container {
    margin: 0;
}

/* Mobile adjustments for list view */
@media (max-width: 768px) {
    .catalog.list-view {
        display: flex !important;  /* Forzar flex sobre grid */
        flex-direction: column !important;
        gap: 0.8rem;
        max-width: 100%;
        grid-template-columns: none !important;  /* Anular grid */
    }
    
    .catalog.list-view .product-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;  /* Cambio para alinear imagen con texto */
        gap: 0.8rem;
        min-height: auto;  /* Permitir altura automática */
        width: 100%;
    }
    
    .catalog.list-view .product-image,
    .catalog.list-view .progressive-image-container.product-image {
        width: 104px !important;  /* Tamaño base fijo */
        height: 104px !important;
        min-width: 104px !important;  /* Tamaño mínimo garantizado */
        min-height: 104px !important;
        flex-shrink: 0;
        margin: 0 !important;
        aspect-ratio: 1 / 1;  /* Mantener proporción 1:1 */
    }
    
    .catalog.list-view .product-info {
        flex: 1;
        min-width: 0; /* Permite que el texto se ajuste */
        padding: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;  /* Alinear al inicio */
    }
    
    .catalog.list-view .product-name {
        font-size: 0.9rem !important;  /* Match con vista cuadrícula */
        margin-bottom: 0.2rem;
        line-height: 1.3;
    }
    
    .catalog.list-view .product-brand {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem;
        margin-top: -0.1rem;
    }
    
    .catalog.list-view .price-info {
        margin: 0.05rem 0;
    }
    
    .catalog.list-view .bcv-price {
        font-size: 1.125rem !important;  /* 50% más grande que el original 0.75rem */
        margin-bottom: 0.2rem;
    }
    
    .catalog.list-view .promo-price {
        font-size: 0.8rem !important;
    }
    
    .catalog.list-view .add-to-cart-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: auto;
        white-space: nowrap;
        min-height: auto !important;
    }
}

/* Filter toggle - desktop version (fixed position on left) */
.filter-toggle {
    position: fixed;
    top: 205px; /* Adjusted for new header height (85px) + nav (40px) + spacing (80px) */
    left: 20px;
    background: #45a049;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 100;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.filter-toggle-text {
    display: inline;
}

.filter-toggle-icon {
    display: none;
}

.filter-toggle.scrolled {
    top: 20px;
}

.filter-toggle:hover {
    background: #e6720a;
}

/* Cart Toggle Button */
.cart-toggle {
    position: fixed;
    top: 205px; /* Adjusted for new header height (85px) + nav (40px) + spacing (80px) */
    right: 20px;
    background: #45a049;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 100;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.cart-toggle.scrolled {
    top: 20px;
}

.cart-toggle:hover {
    background: #e6720a;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 190px;
    right: -350px;
    width: 350px;
    height: calc(100vh - 190px);
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 200;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-header h3 {
    margin: 0;
    color: var(--text-primary, #2c3e50);
}

.cart-header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.clear-cart {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.clear-cart:hover {
    background: #7f8c8d;
}

.hide-cart {
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.hide-cart:hover {
    background: #c0392b;
}

.cart-items {
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    position: relative;
    min-height: 80px;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
    margin-right: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 60px;
}

.cart-item-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    line-height: 1.2;
    color: var(--text-primary, #333);
}

.cart-item-size {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0.3rem;
    padding: 0.2rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    display: inline-block;
}

.cart-item-size-container {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-size-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    margin: 0;
}

.cart-size-selector {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    cursor: pointer;
    min-width: 60px;
}

.cart-size-selector:focus {
    outline: none;
    border-color: #45a049;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.cart-item-price {
    color: #000;
    font-weight: bold;
    background: #45a049;
    border-radius: 10px;
    padding: 0.085rem 0.34rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.595rem;
    height: 24px;
    box-sizing: border-box;
    width: fit-content;
    margin-top: auto;
}

.cart-item-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: flex-end;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.425rem;
    background: var(--input-bg, white);
    border: 1px solid var(--input-border, #ddd);
    border-radius: 4px;
    padding: 0.17rem;
    height: 24px;
    box-sizing: border-box;
}

.quantity-btn {
    background: #45a049;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.quantity-btn:hover {
    background: #e6720a;
}

.quantity-display {
    min-width: 26px;
    text-align: center;
    font-weight: bold;
    font-size: 0.765rem;
    color: var(--text-primary, #333);
}

.remove-item-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    color: #e74c3c;
    border: none;
    width: 23px;
    height: 23px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.remove-item-btn:hover {
    color: #c0392b;
}

.cart-empty {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.cart-empty p {
    margin: 0.5rem 0;
}

.cart-totals {
    border-top: 2px solid #45a049;
    padding-top: 1rem;
    margin-top: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.cart-total-section h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    text-align: center;
}

.cart-total-item {
    margin: 0.5rem 0;
    text-align: center;
}

.cart-total-bcv {
    color: #000;
    font-weight: bold;
    background: #45a049;
    border-radius: 10px;
    padding: 0.2rem 0.8rem;
    display: inline-block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cart-total-bs, .cart-total-promo {
    color: #2c3e50;
    font-weight: bold;
    font-size: 0.9rem;
    display: block;
    margin: 0.3rem 0;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background: #45a049;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.add-to-cart-btn:hover {
    background: #e6720a;
    transform: scale(1.1);
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

.add-to-cart-btn.added {
    background: #27ae60;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.add-to-cart-btn.added:hover {
    background: #219a52;
    transform: scale(1.1);
}

.add-to-cart-btn.added:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #c0392b;
    border-radius: 50%;
    animation: pulse-remove 0.6s infinite;
}

@keyframes pulse-remove {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.7; transform: scale(1); }
}

/* Adjust catalog when cart is open */
.catalog.cart-open {
    margin-right: 350px;
    transition: margin-right 0.3s ease;
}

/* Product card positioning for add to cart button */
.product-card {
    position: relative;
}

/* Filter Sidebar */
.filter-sidebar {
    position: fixed;
    top: 125px; /* Adjust to match new header height (85px) + nav bar (40px) */
    left: -300px;
    width: 300px;
    height: calc(100vh - 125px); /* Adjust height to account for new header height + nav bar */
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 200;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
}

.filter-sidebar.open {
    left: 0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.filter-header h3 {
    margin: 0;
    color: #2c3e50;
}

.filter-header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.clear-filters {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.clear-filters:hover {
    background: #7f8c8d;
}

.hide-filters {
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.hide-filters:hover {
    background: #c0392b;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section h4 {
    margin-bottom: 0.5rem;
    color: #34495e;
    font-size: 1rem;
}

.filter-section select,
.filter-section input:not(.filter-checkbox) {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Checkbox Filter Styles */
.checkbox-filter {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    background: #fafafa;
}

.filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-section-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
}

.filter-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.filter-toggle-btn .chevron-icon {
    transition: transform 0.2s ease;
}

.filter-toggle-btn.expanded .chevron-icon {
    transform: rotate(180deg);
}

.filter-options {
    margin-top: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.filter-option:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-right: 0.6rem;
    cursor: pointer;
    accent-color: #4CAF50;
    flex-shrink: 0;
}

.filter-option label {
    cursor: pointer;
    font-size: 0.875rem;
    color: #555;
    margin: 0;
    text-align: left;
    word-wrap: break-word;
    line-height: 1.3;
}

.price-range {
    display: flex;
    gap: 0.5rem;
}

.price-range input {
    flex: 1;
}

/* Adjust catalog when filters are open */
.catalog.filtered {
    margin-left: 300px;
    transition: margin-left 0.3s ease;
}

/* Overlay for mobile */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    display: none;
}

.filter-overlay.show {
    display: block;
}

.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    margin: 0.75rem;
    width: calc(100% - 1.5rem);
}

/* When product-image is used as a class for the progressive container */
.progressive-image-container.product-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    margin: 0.75rem;
    width: calc(100% - 1.5rem);
    overflow: hidden;
    position: relative;
}

.product-info {
    padding: 0 0.75rem 0.75rem 0.75rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.2rem;
    color: #2c3e50;
}

.product-brand {
    font-size: 0.9rem;
    font-weight: 300;
    color: #666;
    margin-bottom: 0.5rem;
    margin-top: -0.3rem;
    font-style: italic;
}

.price-info {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.bcv-price {
    color: #F57C00;
    font-weight: bold;
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
    font-size: 1.35rem; /* 50% más grande que el original 0.9rem para compensar la falta de cápsula */
}

.total-bs {
    font-size: 0.9rem;
    font-weight: 300;
    color: #666;
    font-style: italic;
}

.promo-price {
    font-size: 0.9rem;
    font-weight: 300;
    color: #666;
    font-style: italic;
}

.product-tag {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin: 0.2rem 0;
    padding: 0.2rem 0.5rem;
    background: #ecf0f1;
    border-radius: 3px;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000; /* Por encima del admin panel (9999) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: white;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-sizing: border-box;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: black;
}

/* Product Modal Grid Layout */
.product-modal-grid {
    max-width: 1200px;
    width: 95%;
}

/* Center Column Action Buttons */
.center-column-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-save-product {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s;
    flex: 1;
}

.btn-save-product:hover {
    background: #229954;
}

.btn-cancel-product {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s;
    flex: 1;
}

.btn-cancel-product:hover {
    background: #7f8c8d;
}

.product-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-form-left,
.product-form-center,
.product-form-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Left column - Image and Description */
.product-form-left .image-upload-container {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 1rem;
}

.product-form-left .image-preview {
    margin-top: 1rem;
}

.product-form-left .image-preview img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.product-form-left textarea {
    min-height: 200px;
    resize: vertical;
}

/* Center column - Main info and buttons */
.product-form-center {
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    padding: 0 1.5rem;
}

.product-form-center .form-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.product-form-center .form-actions button {
    flex: 1;
}

/* Right column - Tags */
.product-form-right {
    overflow-y: auto;
    max-height: 600px;
}

.product-form-right .add-option-btn {
    width: 100%;
    margin-bottom: 1rem;
}

.product-form-right .product-tags-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Full width sections below grid */
.product-form-full-width {
    border-top: 2px solid #e0e0e0;
    padding-top: 2rem;
    margin-top: 2rem;
}

.product-form-full-width .form-group {
    margin-bottom: 1.5rem;
}

/* Responsive - Mobile */
@media (max-width: 1024px) {
    .product-form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-form-center {
        border-left: none;
        border-right: none;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
        padding: 1.5rem 0;
    }
    
    .product-form-right {
        max-height: none;
    }
}

/* Bulk Edit Modal Styles */
.bulk-edit-modal {
    max-width: 800px;
    width: 95%;
}

.bulk-edit-step {
    margin-bottom: 1rem;
}

.bulk-select-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    flex-wrap: wrap;
}

/* Bulk Edit View Toggle Styles */
.bulk-view-toggle-container {
    margin-left: auto;
}

.bulk-view-toggle {
    display: flex;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bulk-view-toggle-btn {
    background: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
}

.bulk-view-toggle-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.bulk-view-toggle-btn.active {
    background: #45a049;
    color: white;
}

.bulk-view-toggle-btn svg {
    width: 16px;
    height: 16px;
}

.bulk-control-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.bulk-control-btn:hover {
    background: #2980b9;
}

.selected-count {
    font-weight: bold;
    color: #2c3e50;
    margin-left: auto;
}

.bulk-products-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

/* Grid View for Bulk Edit */
.bulk-products-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    padding: 1rem;
    max-height: 400px;
}

.bulk-product-item.grid-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
}

.bulk-product-item.grid-view:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.bulk-product-item.grid-view.selected {
    border-color: #45a049;
    background: #e8f5e9;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Hidden products styling */
.bulk-product-item.hidden-product {
    opacity: 0.4;
}

.bulk-product-item.hidden-product::after {
    content: '👁️‍🗨️';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 1;
}

.bulk-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.bulk-product-name-grid {
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    color: #333;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Hide checkbox in grid view */
.bulk-products-list.grid-view .bulk-product-checkbox {
    display: none;
}

/* List view styles (existing) */
.bulk-products-list:not(.grid-view) .bulk-product-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
    position: relative;
}

.bulk-products-list:not(.grid-view) .bulk-product-item:hover {
    background: #f8f9fa;
}

.bulk-products-list:not(.grid-view) .bulk-product-item:last-child {
    border-bottom: none;
}

/* Hidden products in list view */
.bulk-products-list:not(.grid-view) .bulk-product-item.hidden-product {
    opacity: 0.4;
}

.bulk-products-list:not(.grid-view) .bulk-product-item.hidden-product::before {
    content: '👁️‍🗨️';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    z-index: 1;
}

.bulk-products-list:not(.grid-view) .bulk-product-item.hidden-product .bulk-product-checkbox {
    margin-left: 1.5rem;
}

.bulk-product-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.bulk-product-item:hover {
    background: #f8f9fa;
}

.bulk-product-item:last-child {
    border-bottom: none;
}

.bulk-product-checkbox {
    margin-right: 1rem;
    transform: scale(1.2);
}

.bulk-product-info {
    flex: 1;
}

.bulk-product-name {
    font-weight: bold;
    color: #2c3e50;
}

.bulk-product-details {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.bulk-step-actions, .bulk-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.bulk-cancel-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.bulk-cancel-btn:hover {
    background: #7f8c8d;
}

.bulk-proceed-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.bulk-proceed-btn:hover:not(:disabled) {
    background: #229954;
}

.bulk-proceed-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.bulk-save-btn {
    background: #e67e22;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.bulk-save-btn:hover {
    background: #d35400;
}

.bulk-delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.bulk-delete-btn:hover {
    background: #c0392b;
}

.bulk-delete-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.bulk-visibility-btn {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.bulk-visibility-btn:hover {
    background: #8e44ad;
}

.bulk-visibility-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.bulk-back-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.bulk-back-btn:hover {
    background: #2980b9;
}

.selected-products-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.bulk-field-group {
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.bulk-field-checkbox {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.bulk-field-checkbox:hover {
    background: #e9ecef;
}

.bulk-field-checkbox input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
}

.bulk-field-content {
    padding: 1rem;
    background: white;
    border-top: 1px solid #ddd;
}

.bulk-field-content input, .bulk-field-content select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.bulk-tags-container {
    margin-bottom: 1rem;
}

.bulk-tag-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.bulk-tag-select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bulk-tag-value {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-bulk-tag {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.remove-bulk-tag:hover {
    background: #c0392b;
}

.add-bulk-tag-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-bulk-tag-btn:hover {
    background: #229954;
}

/* Bulk Upload Modal Styles */
.bulk-upload-modal {
    max-width: 1200px; /* Increased width */
    width: 95%;
}

/* Image zoom overlay for bulk upload */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.image-zoom-overlay.show {
    opacity: 1;
    visibility: visible;
}

.image-zoom-container {
    max-width: 70%;
    max-height: 70vh;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-zoom-overlay.show .image-zoom-container {
    transform: scale(1);
}

.image-zoom-container img {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-zoom-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #45a049;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 1;
}

.image-zoom-close:hover {
    background: #388E3C;
}

/* Bulk product image hover effect */
.bulk-product-image {
    flex-shrink: 0;
    width: 120px; /* Slightly larger image */
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bulk-product-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.bulk-product-image::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.bulk-product-image:hover::after {
    opacity: 1;
}

.bulk-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: filter 0.3s ease;
}

.bulk-product-image:hover img {
    filter: brightness(0.8);
}

.bulk-upload-step {
    margin-bottom: 1rem;
}

.bulk-upload-zone {
    margin-bottom: 1.5rem;
}

.upload-drop-zone {
    border: 2px dashed #3498db;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-drop-zone:hover {
    border-color: #2980b9;
    background: #e3f2fd;
}

.upload-drop-zone.dragover {
    border-color: #27ae60;
    background: #e8f5e8;
}

.upload-icon {
    margin-bottom: 1rem;
    color: #3498db;
}

.upload-drop-zone p {
    margin: 0.5rem 0;
    color: #2c3e50;
}

.select-images-btn {
    background: none;
    border: none;
    color: #3498db;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

.select-images-btn:hover {
    color: #2980b9;
}

.upload-hint {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.selected-images-preview {
    margin-top: 1.5rem;
}

.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.image-preview-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.image-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.image-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.image-preview-remove:hover {
    background: #c0392b;
}

.image-preview-name {
    padding: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    word-break: break-word;
}

.bulk-upload-actions, .bulk-upload-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.products-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.global-settings {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.global-settings h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.global-field-group {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.global-field-checkbox {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.global-field-checkbox:hover {
    background: #f8f9fa;
}

.global-field-checkbox input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
}

.global-field-content {
    padding: 1rem;
    background: white;
    border-top: 1px solid #ddd;
}

.global-field-content input, .global-field-content select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.global-field-content small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-style: italic;
}

.global-tags-container {
    margin-bottom: 1rem;
}

.global-tag-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.global-tag-select, .global-tag-value {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-global-tag {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.remove-global-tag:hover {
    background: #c0392b;
}

.add-global-tag-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-global-tag-btn:hover {
    background: #229954;
}

.apply-global-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}

.apply-global-btn:hover {
    background: #2980b9;
}

.products-data-container {
    margin-top: 2rem;
}

.products-data-container h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.bulk-products-data-list {
    max-height: 600px; /* Increased height */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.bulk-product-data-item {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.bulk-product-data-item:last-child {
    border-bottom: none;
}

.bulk-product-image {
    flex-shrink: 0;
    width: 120px; /* Slightly larger image */
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.bulk-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bulk-product-form {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 1.5rem;
    align-items: start;
}

.bulk-form-field {
    display: flex;
    flex-direction: column;
}

.bulk-form-field.full-width {
    grid-column: 1 / -1;
}

.bulk-form-field label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.9rem;
}

.bulk-form-field input, .bulk-form-field textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.bulk-form-field input:focus, .bulk-form-field textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.bulk-form-field.required label::after {
    content: " *";
    color: #e74c3c;
}

.bulk-product-tags {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.bulk-product-tags-container {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.75rem;
}

.bulk-product-tag-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.bulk-product-tag-select, .bulk-product-tag-value {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 120px;
}

.remove-product-tag {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
    flex-shrink: 0;
}

.remove-product-tag:hover {
    background: #c0392b;
}

.add-product-tag-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    margin-top: 0.5rem;
    align-self: start;
}

.add-product-tag-btn:hover {
    background: #229954;
}

/* Admin Panel Styles */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999; /* Lower than loading screen (10000) */
}

.admin-header {
    background: #45a049;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.switch-user-btn {
    background: #000000;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.switch-user-btn:hover {
    background: #333333;
}

.logout-btn {
    background: #970e00;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #7a0b00;
}

.admin-content {
    padding: 2rem;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.settings-section, .products-section, .tags-section {
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.settings-section-global {
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: fit-content;
}

/* Admin Top Sections - Side by Side Layout */
.admin-top-sections {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.admin-top-sections > div {
    flex: 1;
    min-width: 300px;
}

/* Discounts Section */
.discounts-section-global {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.discounts-section-global h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.add-discount-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    margin-bottom: 1rem;
}

.add-discount-btn:hover {
    background: #229954;
}

.discounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.discount-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s;
}

.discount-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.discount-info {
    flex: 1;
}

.discount-dates {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.25rem;
}

.discount-details {
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 500;
}

.discount-percentage {
    color: #27ae60;
    font-weight: 600;
}

.delete-discount-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.delete-discount-btn:hover {
    background: #c0392b;
}

/* Discount Modal Styles */
.discount-products-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.discount-product-filter {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.discount-product-filter select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.remove-filter-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    flex-shrink: 0;
}

.remove-filter-btn:hover {
    background: #c0392b;
}

.add-filter-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.add-filter-btn:hover {
    background: #2980b9;
}

/* Discount Badge */
/* DISCOUNT BADGE - Green themed badge for products with active discounts */
.discount-badge {
    position: absolute;
    bottom: 1.2rem;
    right: 0.75rem;
    background: linear-gradient(45deg, #1e8449, #27ae60, #229954, #1e8449);
    background-size: 300% 300%;
    color: white;
    font-weight: bold;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Mobile adjustments for DISCOUNT badge */
@media (max-width: 768px) {
    .discount-badge {
        font-size: 0.6rem;
        padding: 3px 6px;
        top: 0.5rem;
        left: 0.5rem;
        right: auto;
        bottom: auto;
    }
}

/* Old Price (Strikethrough) */
.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 1.125rem;
}

.section-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.section-header h3 {
    margin: 0;
    color: #2c3e50;
    user-select: none;
}

.section-toggle {
    background: #3498db;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

.section-toggle:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.section-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.toggle-icon {
    transition: transform 0.3s ease;
    pointer-events: none;
}

.section-content {
    overflow: hidden;
    transition: all 0.3s ease;
}

.section-content.expanded {
    display: block !important;
}

.tags-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tags-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sync-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sync-btn:hover {
    background: #2980b9;
}

.sync-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.setting-item input {
    width: 200px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.settings-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.settings-buttons button {
    flex: 1;
    min-width: 200px;
}

.cleanup-btn {
    background: #e74c3c !important;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.cleanup-btn:hover {
    background: #c0392b !important;
}

.cleanup-btn:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed;
}

.thumbnail-btn {
    background: #3498db !important;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.thumbnail-btn:hover {
    background: #2980b9 !important;
}

.thumbnail-btn:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed;
}

.regenerate-btn {
    background: #f39c12 !important;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.regenerate-btn:hover {
    background: #e67e22 !important;
}

.regenerate-btn:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed;
}

.check-btn {
    background: #9b59b6 !important;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.check-btn:hover {
    background: #8e44ad !important;
}

.check-btn:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed;
}

.fix-btn {
    background: #e67e22 !important;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.fix-btn:hover {
    background: #d35400 !important;
}

.fix-btn:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed;
}

.add-btn, #saveSettings {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 1rem;
    transition: background 0.3s;
}

.add-btn:hover, #saveSettings:hover {
    background: #219a52;
}

/* AI Analysis Button */
.analyze-btn {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 1rem;
    transition: background 0.3s;
}

.analyze-btn:hover {
    background: #8e44ad;
}

.products-list {
    margin-top: 1rem;
}

/* Admin product item styles */
.admin-product-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
}

.admin-product-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Hidden products in admin list */
.admin-product-item.hidden-product {
    opacity: 0.4;
}

.admin-product-item.hidden-product::before {
    content: '👁️‍🗨️';
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 1;
}

.admin-product-item.hidden-product .admin-product-thumbnail {
    margin-left: 1.5rem;
}

.tags-list {
    margin-top: 1rem;
}

.admin-product-item {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    gap: 1rem;
}

.admin-product-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.admin-product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.admin-product-info {
    flex: 1;
}

.admin-product-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.edit-btn {
    background: #3498db;
    color: white;
}

.edit-btn:hover {
    background: #2980b9;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* Section headers in forms */
.form-group h4 {
    display: block;
    margin: 0 0 0.5rem 0;
    font-weight: bold;
    font-size: 1rem;
    color: inherit;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Brand Input Styling */
.brand-input-container {
    position: relative;
}

.brand-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.brand-suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.brand-suggestion-item:hover {
    background: #f8f9fa;
}

.brand-suggestion-item:last-child {
    border-bottom: none;
}

.brand-suggestion-item.highlighted {
    background: #e3f2fd;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.form-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.form-actions button[type="submit"] {
    background: #27ae60;
    color: white;
}

.form-actions button[type="submit"]:hover {
    background: #219a52;
}

.form-actions button[type="button"] {
    background: #95a5a6;
    color: white;
}

.form-actions button[type="button"]:hover {
    background: #7f8c8d;
}

/* Variable Price by Size Styles */
.price-mode-selector {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.price-mode-selector label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
}

.price-mode-selector input[type="radio"] {
    width: auto;
    margin: 0;
}

.price-mode-content {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.variable-prices-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-entry {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    position: relative;
}

.price-entry-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.price-entry-input {
    flex: 1;
}

.price-entry-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.price-entry-input input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-price-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.remove-price-btn:hover {
    background: #c0392b;
}

.price-entry-sizes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.price-entry-sizes label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.sizes-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.size-button {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.size-button:hover {
    border-color: #45a049;
}

.size-button.selected {
    background: #45a049;
    color: white;
    border-color: #45a049;
}

.size-button.disabled {
    background: #e0e0e0;
    color: #999;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.size-button.disabled:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

/* Enable Variable Pricing Button */
.enable-variable-pricing-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.enable-variable-pricing-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.enable-variable-pricing-btn:active {
    transform: translateY(0);
}

/* Price Blocked Overlay */
.price-blocked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
    z-index: 10;
}

.form-group {
    position: relative;
}

.hidden {
    display: none !important;
}

/* Login Form */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#loginForm input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#loginForm button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

#loginForm button:hover {
    background: #2980b9;
}
/* Tag Management Styles */
.admin-tag-item {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-tag-info {
    flex: 1;
}

.admin-tag-actions {
    display: flex;
    gap: 0.5rem;
}

.tag-options {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    min-height: 100px;
    background: #f9f9f9;
}

.tag-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
}

.tag-option-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.25rem;
    font-size: 0.9rem;
}

.tag-option-input:focus {
    outline: none;
    background: #f0f0f0;
}

.remove-option-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.remove-option-btn:hover {
    background: #c0392b;
}

.add-option-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.add-option-btn:hover {
    background: #219a52;
}

.tag-options-display {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.tag-option-badge {
    display: inline-block;
    background: #ecf0f1;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Special Tag Styling */
.special-tag {
    border: 2px solid #f39c12;
    background: #fef9e7;
}

.special-indicator {
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.special-tag-label {
    background: #f39c12;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Dynamic product fields */
.dynamic-field {
    margin-bottom: 1rem;
}

.dynamic-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.dynamic-field select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Perfume Decant Options */
.decant-options {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.decant-option {
    flex: 1;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.decant-option label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.decant-option input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Bulk Edit Decant Options */
.bulk-decant-options {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.bulk-decant-option {
    flex: 1;
}

.bulk-decant-option label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.bulk-decant-option input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Bulk Edit Bajo Encargo Options */
.bulk-bajo-encargo-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.radio-option:hover {
    background-color: #f8f9fa;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

.radio-checkmark {
    font-weight: normal;
    margin: 0;
    line-height: 1.2;
}

/* Global Decant Options for Bulk Upload */
.global-decant-options {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.global-decant-option {
    flex: 1;
}

.global-decant-option label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.global-decant-option input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Decant Display in Description */
.decant-prices-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.5rem auto;
    max-width: 90%;
    padding: 1rem;
    background: rgb(0 255 7 / 5%);
    border-radius: 12px;
    border: 1px solid rgb(0 255 7 / 15%);
}

.decant-prices-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #45a049;
    color: #45a049;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    width: 100%;
    text-align: center;
}

.decant-prices-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.decant-price-box {
    flex: 1;
    min-width: 160px;
    max-width: 200px;
    text-align: center;
    background: var(--card-bg, white);
    line-height: 0.2rem;
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.decant-size-title {
    color: #45a049;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.decant-bottle-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.decant-bottle-icon svg {
    fill: #45a049;
    opacity: 0.8;
    margin-top: 0.4rem;
    width: 53px;
    height: 58px;
}

.decant-price-item {
    text-align: center;
}

.decant-bcv-price {
    color: #F57C00 !important;
    font-weight: bold !important;
    display: block !important;
    text-align: center !important;
    font-size: 1.275rem !important; /* 50% más grande que el original 0.85rem */
    margin-bottom: 0.5rem !important;
}

.decant-total-bs {
    color: #000 !important;
    font-weight: bold !important;
    font-size: 0.75rem !important;
    margin: 0.65rem 0 !important;
}

.decant-promo-price {
    color: #000000 !important;
    font-weight: bold !important;
    font-size: 0.75rem !important;
    margin: 0.15rem 0 !important;
}

/* ==================== PERFUME ANALYSIS SECTIONS ==================== */

.perfume-sections {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    max-width: 90%;
    padding: 1.5rem;
    background: rgb(0 255 7 / 5%);
    border-radius: 12px;
    border: 1px solid rgb(0 255 7 / 15%);
    min-height: 200px;
}

.perfume-section {
    text-align: center;
    background: var(--card-bg, white);
    border-radius: 10px;
    padding: 0rem 1rem 0rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.section-header {
    display: flex;
    margin-top: -1rem;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #45a049;
    padding-bottom: 0.5rem;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #45a049;
    letter-spacing: 0.5px;
    text-align: center;
}

/* When to Use Section */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem;
}

.usage-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.usage-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    margin-top: -1.6rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #45a049;
}

.usage-icon img {
    filter: brightness(0) saturate(100%) invert(50%) sepia(98%) saturate(2476%) hue-rotate(0deg) brightness(98%) contrast(101%);
}

.usage-label {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--text-secondary, #666);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.usage-bar {
    width: 80px;
    height: 10px;
    background-color: rgb(0 255 7 / 15%);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.usage-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
    width: 0%;
}

/* Ensure inline styles take precedence */
.usage-fill[style*="width"] {
    width: var(--bar-width, 0%) !important;
}

/* Ensure bars are visible even with small percentages */
.usage-fill:not([style*="width: 0%"]) {
    min-width: 2px;
}

/* Force specific width values for testing */
.usage-fill[style*="width: 1"],
.usage-fill[style*="width: 2"],
.usage-fill[style*="width: 3"],
.usage-fill[style*="width: 4"],
.usage-fill[style*="width: 5"] {
    min-width: 4px !important;
}

/* Colors for usage bars using the main green palette */
.cold-fill {
    background: linear-gradient(90deg, #4A90E2, #6BB6FF) !important;
}

.heat-fill {
    background: linear-gradient(90deg, #45a049, #81C784) !important;
}

.day-fill {
    background: linear-gradient(90deg, #81C784, #66BB6A) !important;
}

.night-fill {
    background: linear-gradient(90deg, #2C3E50, #34495E) !important;
}

/* Performance Section */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
    justify-items: center;
}

.performance-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.performance-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    margin-top: -1.6rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #45a049;
}

.performance-label {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--text-secondary, #666);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.performance-bar {
    width: 80px;
    height: 10px;
    background-color: rgb(0 255 7 / 15%);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.performance-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease;
    width: 0%;
}

/* Ensure inline styles take precedence for performance bars */
.performance-fill[style*="width"] {
    width: var(--bar-width, 0%) !important;
}

/* Ensure performance bars are visible even with small percentages */
.performance-fill:not([style*="width: 0%"]) {
    min-width: 2px;
}

/* Force specific width values for testing */
.performance-fill[style*="width: 1"],
.performance-fill[style*="width: 2"],
.performance-fill[style*="width: 3"],
.performance-fill[style*="width: 4"],
.performance-fill[style*="width: 5"] {
    min-width: 4px !important;
}

.duration-fill,
.projection-fill {
    background: #8B0000 !important; /* Default: rojo vinotinto oscuro para 0% */
}

/* Colores dinámicos basados en porcentaje para barras de rendimiento */
/* 0-20%: Rojo vinotinto oscuro */
.duration-fill[data-percentage^="0"],
.duration-fill[data-percentage^="1"],
.projection-fill[data-percentage^="0"],
.projection-fill[data-percentage^="1"] {
    background: linear-gradient(90deg, #8B0000, #B22222) !important;
}

/* 20-40%: Rojo a naranja */
.duration-fill[data-percentage^="2"],
.duration-fill[data-percentage^="3"],
.projection-fill[data-percentage^="2"],
.projection-fill[data-percentage^="3"] {
    background: linear-gradient(90deg, #B22222, #388E3C) !important;
}

/* 40-60%: Naranja a amarillo */
.duration-fill[data-percentage^="4"],
.duration-fill[data-percentage^="5"],
.projection-fill[data-percentage^="4"],
.projection-fill[data-percentage^="5"] {
    background: linear-gradient(90deg, #66BB6A, #81C784) !important;
}

/* 60-80%: Amarillo a verde claro */
.duration-fill[data-percentage^="6"],
.duration-fill[data-percentage^="7"],
.projection-fill[data-percentage^="6"],
.projection-fill[data-percentage^="7"] {
    background: linear-gradient(90deg, #81C784, #9ACD32) !important;
}

/* 80-100%: Verde claro a verde fuerte */
.duration-fill[data-percentage^="8"],
.duration-fill[data-percentage^="9"],
.duration-fill[data-percentage="100"],
.projection-fill[data-percentage^="8"],
.projection-fill[data-percentage^="9"],
.projection-fill[data-percentage="100"] {
    background: linear-gradient(90deg, #9ACD32, #03ac13) !important;
}

/* Specific width classes for reliable bar filling */
.bar-width-0 { width: 0% !important; }
.bar-width-5 { width: 5% !important; }
.bar-width-10 { width: 10% !important; }
.bar-width-15 { width: 15% !important; }
.bar-width-20 { width: 20% !important; }
.bar-width-25 { width: 25% !important; }
.bar-width-30 { width: 30% !important; }
.bar-width-35 { width: 35% !important; }
.bar-width-40 { width: 40% !important; }
.bar-width-45 { width: 45% !important; }
.bar-width-50 { width: 50% !important; }
.bar-width-55 { width: 55% !important; }
.bar-width-60 { width: 60% !important; }
.bar-width-65 { width: 65% !important; }
.bar-width-70 { width: 70% !important; }
.bar-width-75 { width: 75% !important; }
.bar-width-80 { width: 80% !important; }
.bar-width-85 { width: 85% !important; }
.bar-width-90 { width: 90% !important; }
.bar-width-95 { width: 95% !important; }
.bar-width-100 { width: 100% !important; }

/* Mobile responsiveness */
@media (max-width: 768px) {
    .perfume-sections {
        flex-direction: column;
        gap: 1rem;
        margin: 1.5rem auto;
        padding: 1rem;
        align-items: stretch;
        min-height: auto;
    }
    
    .perfume-section {
        width: 100%;
    }
    
    .usage-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }
    
    .performance-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        width: 60%;
        margin: 0 auto;
    }
    
    .usage-icon {
        font-size: 1rem;
        height: 1.2rem;
        margin-top: -1rem;
    }
    
    .usage-icon img {
        width: 16px;
        height: 16px;
    }
    
    .usage-label {
        font-size: 0.7rem;
    }
    
    .performance-icon {
        font-size: 1.2rem;
        height: 1.5rem;
    }
    
    .usage-bar {
        width: 55px;
        height: 10px;
    }
    
    .performance-bar {
        width: 55px;
        height: 10px;
    }
    
    .section-title {
        font-size: 0.8rem;
        margin-top: -5px;
    }
    
    .section-header {
        padding: 0.2rem 1rem 0.2rem 1rem;
    }
    
    /* Decant mobile responsiveness */
    .decant-prices-container {
        margin: 1rem auto;
        margin-top: -1.4rem;
        padding: 0.75rem;
    }
    
    .decant-prices-title {
        margin-bottom: 0.75rem;
        padding-bottom: 0.4rem;
        font-size: 0.85rem;
    }
    
    .decant-prices-grid {
        flex-direction: row;
        gap: 0.75rem;
        justify-content: center;
    }
    
    .decant-price-box {
        min-width: auto;
        flex: 1;
        padding: 0.75rem 0.5rem;
    }
    
    .decant-size-title {
        margin-bottom: 0.3rem;
        font-size: 0.8rem;
    }
    
    .decant-bottle-icon {
        margin-bottom: 0.3rem;
    }
    
    .decant-bottle-icon svg {
        width: 35px;
        height: 45px;
    }
    
    .decant-price-item {
        margin: 0.15rem 0;
    }
    
    .decant-bcv-price {
        font-size: 1.2rem !important; /* 50% más grande que el original 0.8rem */
        margin-bottom: 0.2rem !important;
    }
}

/* Product Tags Container */
.product-tags-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    min-height: 60px;
    background: #f9f9f9;
}

.product-tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
}

.product-tag-selects {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.product-tag-selects select {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.25rem;
    font-size: 0.9rem;
}

.product-tag-selects select:focus {
    outline: none;
    background: #f0f0f0;
}

.remove-product-tag-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.remove-product-tag-btn:hover {
    background: #c0392b;
}
/* Visibility Toggle Switch */
.visibility-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 0.5rem;
}

.visibility-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.visibility-switch input:checked + .switch-slider {
    background-color: #27ae60;
}

.visibility-switch input:checked + .switch-slider:before {
    transform: translateX(26px);
}

.switch-slider:hover {
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* Visibility Badge */
.visibility-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.visibility-badge.visible {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.visibility-badge.hidden {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Admin Product Actions Layout */
.admin-product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
/* Image Source Selection Buttons */
.image-source-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-source-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    gap: 0.5rem;
}

.image-source-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.image-source-btn.active {
    border-color: #3498db;
    background: #e3f2fd;
    color: #3498db;
}

.image-source-btn svg {
    width: 32px;
    height: 32px;
}

.image-source-btn span {
    font-weight: 500;
    font-size: 0.9rem;
}

.image-input-container {
    margin-bottom: 1rem;
}

.image-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    display: none;
}

.image-input.active {
    display: block;
}

.image-input[type="file"] {
    cursor: pointer;
}

.image-input[type="file"]::-webkit-file-upload-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
}

.image-input[type="file"]::-webkit-file-upload-button:hover {
    background: #2980b9;
}
/* Image Upload Button */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.upload-image-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-height: 60px;
}

.upload-image-btn:hover {
    border-color: #3498db;
    background: #f0f8ff;
    color: #3498db;
}

.upload-image-btn svg {
    width: 24px;
    height: 24px;
}

.selected-file-name {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-left: 0.5rem;
}

.selected-file-name:not(:empty) {
    color: #27ae60;
    font-weight: 500;
}

/* Image Preview Styles */
.image-preview {
    margin-top: 1rem;
    text-align: center;
    position: relative;
}

.image-preview img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.delete-image-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-image-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.delete-image-btn svg {
    width: 16px;
    height: 16px;
}
/* Product Search Styles */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.products-header .add-btn {
    white-space: nowrap;
}

.products-header .add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Dropdown para agregar productos */
.add-product-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: white;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* View toggle controls */
.admin-view-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle-container {
    display: flex;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.view-toggle-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    min-height: 38px;
}

.view-toggle-btn:hover {
    background: rgba(0,0,0,0.05);
}

.view-toggle-btn.active {
    background: white;
    color: #2c3e50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 38px;
}

/* Vista de cuadrícula */
.products-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.products-list.grid-view .admin-product-item {
    display: block;
    padding: 0;
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.products-list.grid-view .admin-product-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.admin-product-grid-card {
    position: relative;
    cursor: pointer;
    aspect-ratio: 1;
    width: 100%;
}

.admin-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-grid-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.delete-icon-btn {
    background: rgba(231, 76, 60, 0.95);
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: white;
    flex-shrink: 0;
}

.delete-icon-btn:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

.delete-icon-btn svg {
    display: block;
}

/* Ajustar el switch de visibilidad en la vista de cuadrícula */
.admin-grid-actions .visibility-switch {
    margin: 0;
}

.admin-grid-actions .visibility-switch .switch-slider {
    background-color: rgba(255, 255, 255, 0.3);
}

.admin-grid-actions .visibility-switch input:checked + .switch-slider {
    background-color: #4CAF50;
}



/* NEW PRODUCT BADGE - Distinctive visual element for products added in last 72 hours */
.new-product-badge {
    position: absolute;
    bottom: 1.2rem;
    right: 0.75rem;
    background: linear-gradient(45deg, #45a049, #388E3C, #4CAF50, #45a049);
    background-size: 300% 300%;
    color: white;
    font-weight: bold;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Ensure product cards have relative positioning for absolute badge */
.product-card {
    position: relative;
}

/* Mobile adjustments for NEW badge */
@media (max-width: 768px) {
    .new-product-badge {
        font-size: 0.6rem;
        padding: 3px 6px;
        bottom: 1.1rem;
        right: 0.75rem;
    }
}

/* BAJO ENCARGO BADGE - Blue themed badge for products available on order */
.bajo-encargo-badge {
    position: absolute;
    bottom: 1.2rem;
    right: 0.75rem;
    background: linear-gradient(45deg, #1E90FF, #4169E1, #0066CC, #1E90FF);
    background-size: 300% 300%;
    color: white;
    font-weight: bold;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Mobile adjustments for BAJO ENCARGO badge */
@media (max-width: 768px) {
    .bajo-encargo-badge {
        font-size: 0.6rem;
        padding: 3px 6px;
        top: 0.5rem;
        left: 0.5rem;  /* Cambiado de right a left */
        right: auto;   /* Resetear right */
        bottom: auto;
    }
}

/* AGOTADO BADGE - Red themed badge for hidden products in favorites */
.agotado-badge {
    position: absolute;
    bottom: 1.2rem;
    right: 0.75rem;
    background: linear-gradient(45deg, #DC143C, #B22222, #8B0000, #DC143C);
    background-size: 300% 300%;
    color: white;
    font-weight: bold;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Mobile adjustments for AGOTADO badge */
@media (max-width: 768px) {
    .agotado-badge {
        font-size: 0.6rem;
        padding: 3px 6px;
        top: 0.5rem;
        left: 0.5rem;
        right: auto;
        bottom: auto;
    }
}

/* Grayed out product card for hidden products in favorites */
.product-card.out-of-stock {
    opacity: 0.6;
    filter: grayscale(100%);
    pointer-events: none;
}

/* Allow favorite button interaction on out-of-stock products */
.product-card.out-of-stock .favorite-btn {
    pointer-events: auto;
    opacity: 1;
    filter: none;
}

/* Tag Search Bar - Same design as Product Search */
.tag-search-bar {
    position: relative;
    flex: 1;
    max-width: 400px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tag-search-bar:focus-within {
    border-color: #45a049;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.tag-search-input {
    width: 100%;
    padding: 12px 50px 12px 50px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    background: transparent;
    outline: none;
    color: #333;
}

.tag-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.tag-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    z-index: 1;
}

.tag-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e74c3c;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.2s ease;
    line-height: 1;
}

.tag-clear-btn:hover {
    background: #c0392b;
    transform: translateY(-50%);
}

.tag-clear-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* News Search Bar - Same design as Product Search */
.news-search-bar {
    position: relative;
    flex: 1;
    max-width: 400px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.news-search-bar:focus-within {
    border-color: #45a049;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.news-search-input {
    width: 100%;
    padding: 12px 50px 12px 50px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    background: transparent;
    outline: none;
    color: #333;
}

.news-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.news-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    z-index: 1;
}

.news-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e74c3c;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.2s ease;
    line-height: 1;
}

.news-clear-btn:hover {
    background: #c0392b;
    transform: translateY(-50%);
}

.news-clear-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Product Search Bar - Admin Panel */
.product-search-bar {
    position: relative;
    flex: 1;
    max-width: 400px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-search-bar:focus-within {
    border-color: #45a049;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.product-search-input {
    width: 100%;
    padding: 12px 50px 12px 50px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    background: transparent;
    outline: none;
    color: #333;
}

.product-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.product-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    z-index: 1;
}

.product-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e74c3c;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.2s ease;
    line-height: 1;
}

.product-clear-btn:hover {
    background: #c0392b;
    transform: translateY(-50%);
}

.product-clear-btn:active {
    transform: translateY(-50%) scale(0.95);
}
.no-products-found {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.search-results-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .products-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .products-header .add-btn {
        margin-bottom: 0.5rem;
    }
    
    .search-container {
        max-width: none;
    }
}
/* Product Description Textarea */
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Product Card Interactions */
.product-card {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border 0.3s;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.product-card.selected {
    border-color: #45a049;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Description Box */
.description-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin: 1rem 0;
    overflow: hidden;
    opacity: 0;
    max-height: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e0e0e0;
}

.description-box.open {
    opacity: 1;
    max-height: fit-content;
}

.description-header {
    background: #45a049;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* Admin Quick Edit Button */
.admin-quick-edit-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.admin-quick-edit-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.admin-quick-edit-btn:active {
    transform: scale(0.95);
}

.admin-quick-edit-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Recently edited product highlight */
.product-card.recently-edited {
    animation: recentlyEditedPulse 2s ease-in-out;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    border: 2px solid #45a049;
}

/* Preloading image indicator */
.product-card.preloading-image {
    opacity: 0.7;
    position: relative;
}

.product-card.preloading-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #45a049;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
}

@keyframes recentlyEditedPulse {
    0% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(76, 175, 80, 0.8);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
        transform: scale(1);
    }
}

.description-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0;
    background: #000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-align: left;
    display: inline-block;
    width: auto;
}

.description-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.description-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.description-content {
    padding: 1.5rem;
    line-height: 1.3;
    white-space: pre-line;
    word-wrap: break-word;
    text-indent: 0;
    margin-top: -1.8rem;
    text-align: justify; /* Justificar el texto */
}

.description-content > * {
    margin-top: 0;
}

.description-content > *:first-child {
    margin-top: 20px;
    padding: 1rem;
}

.description-content p {
    text-align: justify; /* Justificar párrafos */
    margin-bottom: 1em; /* Espaciado entre párrafos */
}

/* Remove any leading whitespace from text nodes */
.description-content::first-line {
    text-indent: 0;
}

/* No Description Message */
.no-description {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    margin: 0;
}

/* Catalog Grid Adjustments */
.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    transition: margin-left 0.3s ease;
}

/* Description Box Positioning */
.description-box-container {
    grid-column: 1 / -1;
    margin: 0 -1rem;
}
/* USER CONTROLS CONTAINER - Centered Layout */
.user-controls-container {
    background: var(--bg-secondary, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 10; /* Z-index menor que el category header */
}

/* Catalog Search Bar - User Interface */
.catalog-search-bar {
    position: relative;
    width: 400px; /* 33% wider than original 300px */
    background: var(--input-bg, white);
    border: 2px solid var(--input-border, #e0e0e0);
    border-radius: 22px;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 44px;
    display: flex;
    align-items: center;
}

.catalog-search-bar:focus-within {
    border-color: #45a049;
    box-shadow: 0 3px 10px rgb(0 255 7 / 15%);
}

.catalog-search-input {
    width: 100%;
    height: 100%;
    padding: 0 45px 0 45px;
    border: none;
    border-radius: 22px;
    font-size: 15px;
    background: transparent;
    outline: none;
    color: #333;
}

.catalog-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.catalog-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    z-index: 1;
}

.catalog-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e74c3c;
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.2s ease;
    line-height: 1;
}

.catalog-clear-btn:hover {
    background: #c0392b;
    transform: translateY(-50%);
}

.catalog-clear-btn:active {
    transform: translateY(-50%) scale(0.9);
}

/* Semantic Search Indicator */
.semantic-search-indicator {
    background: linear-gradient(135deg, #e8f5e9 0%, #e8f5e9 100%);
    border: 2px solid #45a049;
    border-radius: 12px;
    padding: 12px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 3px 10px rgb(0 255 7 / 15%);
    animation: slideDown 0.4s ease-out;
}

/* Advanced Semantic Search Indicator */
.semantic-search-indicator.advanced {
    background: linear-gradient(135deg, #e6f3ff 0%, #cce6ff 100%);
    border: 2px solid #0066cc;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.semantic-search-indicator.advanced .semantic-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.semantic-search-indicator.advanced .semantic-icon {
    font-size: 28px;
}

.semantic-search-indicator.advanced .context-info {
    font-size: 13px;
    color: #555;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    width: 100%;
    border-left: 3px solid #0066cc;
}

.semantic-icon {
    font-size: 24px;
    animation: sparkle 2s ease-in-out infinite;
}

.semantic-text {
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

.semantic-text strong {
    color: #45a049;
    font-weight: 600;
}

.semantic-search-indicator.advanced .semantic-text strong {
    color: #0066cc;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Mobile User Controls */
@media (max-width: 768px) {
    .user-controls-container {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    /* First row: Search bar (full width) */
    .catalog-search-bar {
        height: 46px;
        order: 1;
        flex: 1 1 100%; /* Full width on first row */
        min-width: 0;
    }
    
    .catalog-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0 48px 0 48px;
    }
    
    .catalog-search-icon {
        left: 16px;
    }
    
    .catalog-clear-btn {
        width: 28px;
        height: 28px;
        right: 10px;
        min-height: unset;
        padding: 0;
    }
    
    /* Second row: Filter button + View toggle + Sort selector */
    /* Filter button - square shape, same height as other buttons */
    .filter-toggle {
        display: flex !important;
        position: static;
        width: 37px;
        height: 37px;
        min-width: 37px;
        background: #45a049;
        color: white;
        border: 2px solid var(--input-border, #ddd);
        border-radius: 8px; /* Square with rounded corners like other buttons */
        cursor: pointer;
        font-size: 1.2rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        transition: all 0.3s ease;
        align-items: center;
        justify-content: center;
        padding: 0;
        z-index: 100;
        order: 2;
        flex: 0 0 37px; /* Fixed width, 1:1 ratio */
    }
    
    .filter-toggle-text {
        display: none;
    }
    
    .filter-toggle-icon {
        display: block;
        width: 20px;
        height: 20px;
    }
    
    .filter-toggle:hover {
        background: #e6720a;
        transform: scale(1.05);
    }
    
    /* View toggle - same row as filter button */
    .view-toggle {
        height: 37px;
        order: 3;
        flex: 0 0 auto;
        width: auto;
        max-width: fit-content;
    }
    
    .view-toggle-btn {
        height: 37px;
        width: 37px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .view-toggle-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .sort-container {
        order: 4;
        flex: 1 1 auto; /* Take remaining space to match search bar width */
        min-width: 0;
        max-width: none; /* Remove max-width to allow full expansion */
    }
    
    .sort-select {
        width: 100%;
        min-width: auto;
        height: 37px; /* Override general height */
        font-size: 0.85rem; /* Slightly larger font for better readability */
        padding: 0 0.4rem 0 0.4rem; /* Balanced padding */
        text-align: left; /* Left align text */
        background-position: calc(100% - 8px) center; /* Position arrow closer to edge */
    }
    
    /* Override general .view-toggle height for mobile */
    .view-toggle {
        height: 37px !important;
    }
    
    /* Override general .sort-select height for mobile */
    .sort-select {
        height: 37px !important;
    }
    
    /* Hide filter overlay on mobile - will be replaced with full screen */
    .filter-overlay {
        display: none !important;
    }
    
    /* Filter sidebar becomes full screen overlay like mobile cart */
    .filter-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 1rem !important;
        right: auto !important;
        width: fit-content !important;
        max-width: calc(100vw - 2rem) !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: white !important;
        z-index: 2000 !important;
        display: none !important;
        flex-direction: column;
        transform: none !important;
        box-shadow: none !important;
        padding: 1rem !important;
        transition: none !important;
        overflow-y: auto !important;
    }
    
    .filter-sidebar.open {
        display: flex !important;
    }
    
    /* Remove the white background animation */
    .filter-sidebar.open::before {
        display: none;
    }
    
    /* Reset content positioning */
    .filter-sidebar.open > * {
        position: static;
        z-index: auto;
        margin-top: 0;
    }
    
    .filter-sidebar.open > *:first-child {
        margin-top: 0;
    }
    
    /* Filter header styling for mobile */
    .filter-sidebar .filter-header {
        background: white;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #eee;
    }
    
    /* Filter sections styling for mobile */
    .filter-sidebar .filter-section {
        background: white;
        margin-bottom: 1.5rem;
    }
    
    .filter-sidebar #dynamicFilters {
        background: white;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    /* Prevent catalog from shifting */
    .catalog.filtered {
        margin-left: 0 !important;
    }
    
    /* Semantic Search Indicator - Mobile */
    .semantic-search-indicator {
        padding: 10px 15px;
        margin: 15px 0;
        font-size: 14px;
        order: 5;
        width: 100%;
    }
    
    .semantic-icon {
        font-size: 20px;
    }
    
    .semantic-text {
        font-size: 14px;
    }
}

/* View Toggle Styles - Standalone */

.view-toggle {
    display: flex;
    background: var(--input-bg, white);
    border: 2px solid var(--input-border, #ddd);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 44px; /* Match search bar height */
}

.view-toggle-btn {
    background: var(--input-bg, white);
    border: none;
    padding: 0 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-secondary, #666);
    height: 100%;
}

.view-toggle-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.view-toggle-btn.active {
    background: #45a049;
    color: white;
}

.view-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Sort Container Styles */
.sort-container {
    display: flex;
    align-items: center;
}

.sort-select {
    padding: 0 0.5rem 0 0.5rem; /* Reduced right padding to make more compact */
    border: 2px solid var(--input-border, #ddd);
    border-radius: 8px;
    background: var(--input-bg, white);
    font-size: 0.9rem;
    color: var(--text-primary, #333);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: auto; /* Remove min-width constraint */
    height: 44px; /* Match search bar height */
    text-align: center; /* Center only the selected text in closed state */
    background-position: calc(100% - 12px) center; /* Position arrow 12px from right edge */
}

/* Reset text alignment for dropdown options */
.sort-select option {
    text-align: left; /* Left-align dropdown options */
    padding: 0.5rem;
}

.sort-select:hover {
    border-color: #45a049;
}

.sort-select:focus {
    outline: none;
    border-color: #45a049;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Estilos para selector deshabilitado con candado */
.sort-select:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #666;
    position: relative;
}

.sort-select:disabled:hover {
    border-color: #ccc;
}

/* Contenedor para el candado */
.sort-select-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Sort selector locked styles - SIMPLIFIED */
.sort-select-container.locked {
    position: relative;
    opacity: 0.7 !important;
    pointer-events: none !important;
    background: linear-gradient(45deg, transparent 25%, rgba(255, 140, 66, 0.15) 25%, rgba(255, 140, 66, 0.15) 50%, transparent 50%, transparent 75%, rgba(255, 140, 66, 0.15) 75%) !important;
    background-size: 8px 8px !important;
}

.sort-select-container.locked .sort-select {
    cursor: not-allowed !important;
    background-color: #f8f8f8 !important;
    color: #999 !important;
}

.dark-mode .sort-select-container.locked .sort-select {
    background-color: #2a2a2a !important;
    color: #666 !important;
}

/* USER SEARCH INPUT REMOVED */

/* Mobile Search Bars - Admin Panel */
@media (max-width: 768px) {
    .product-search-bar,
    .tag-search-bar,
    .news-search-bar {
        max-width: none;
        margin: 0;
    }
    
    .product-search-input,
    .tag-search-input,
    .news-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 50px 14px 50px;
    }
    
    .product-clear-btn,
    .tag-clear-btn,
    .news-clear-btn {
        width: 32px;
        height: 32px;
        right: 10px;
    }
}

/* Search Results Info */
.search-results-info {
    text-align: center;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
}

.search-results-count {
    background: #45a049;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: -1rem;
    margin-top: -1rem;
    font-size: 0.9rem;
}

/* Adjust filter sidebar position */
.filter-sidebar {
    position: fixed;
    top: 190px; /* Adjust for search bar + nav bar */
    left: -300px;
    width: 300px;
    height: calc(100vh - 190px); /* Adjust height for search bar + nav bar */
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 200;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-search-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-search-wrapper {
        padding: 0.6rem;
        max-width: none;
        width: 100%;
    }
}

/* ==================== LOCATION SECTION STYLES ==================== */

.location-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.location-header {
    text-align: center;
    margin-bottom: 3rem;
}

.location-header h2 {
    color: #45a049;
    font-size: 2.0rem;
    margin-bottom: 0.5rem;
}

.location-header p {
    color: #666;
    font-size: 1.1rem;
    margin-top: -0.7rem;
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.address-card, .hours-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.address-icon, .hours-icon {
    background: #e8f5e9;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.address-details h3, .hours-details h3 {
    color: var(--text-primary, #333);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.address-details p, .hours-details p {
    color: var(--text-primary, #333);
    margin-bottom: 0.3rem;
    line-height: 1.1
    ;
}

.closed-day {
    color: #e74c3c !important;
    font-style: italic;
}

.map-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.map-header {
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-header h3 {
    color: #333;
    margin: 0;
}

.open-maps-btn {
    background: #45a049;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.open-maps-btn:hover {
    background: #388E3C;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.map-footer p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* ==================== LOCATION GALLERY STYLES ==================== */

.location-gallery {
    margin: 3rem 0 0 0;
}

.gallery-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-header h3 {
    color: #45a049;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.gallery-header p {
    color: #666;
    font-size: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.gallery-info p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Responsive Gallery */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item.exterior,
    .gallery-item.interior {
        grid-column: 1;
    }
    
    .gallery-item img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .gallery-item img {
        height: 180px;
    }
    
    .gallery-overlay {
        padding: 1.5rem 1rem 1rem;
    }
}

/* ==================== CONTACT SECTION STYLES ==================== */

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h2 {
    color: #45a049;
    font-size: 2.0rem;
    margin-bottom: 0.5rem;
}

.contact-header p {
    color: #666;
    font-size: 1.1rem;
    margin-top: -0.7rem;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.social-button-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.social-button-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Hand click animation for WhatsApp button */
.social-button-card[data-platform="whatsapp"] .whatsapp-btn {
    position: relative;
}

.social-button-card[data-platform="whatsapp"] .whatsapp-btn::after {
    content: '👆';
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    opacity: 0;
    bottom: 0.5rem;
    left: 0.5rem;
    transform: rotate(45deg);
}

.social-button-card[data-platform="whatsapp"].show-hand .whatsapp-btn::after {
    animation: handClick 1s ease-in-out;
}

@keyframes handClick {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: rotate(45deg) scale(1.2);
    }
    40% {
        transform: rotate(45deg) scale(1);
    }
    50% {
        transform: rotate(45deg) scale(0.95);
    }
    60% {
        transform: rotate(45deg) scale(1);
    }
    80% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) scale(0.8);
    }
}

.social-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.facebook-btn {
    background: #1877f2;
    color: white;
}

.facebook-btn:hover {
    background: #166fe5;
    transform: scale(1.05);
}

.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.instagram-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(188, 24, 136, 0.3);
}

.whatsapp-btn {
    background: #25d366;
    color: white;
}

.whatsapp-btn:hover {
    background: #22c55e;
    transform: scale(1.05);
}

.ai-chatbot-btn {
    background: linear-gradient(135deg, #45a049 0%, #46b725 100%);
    color: white;
}

.ai-chatbot-btn:hover {
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.email-btn {
    background: #ea4335;
    color: white;
}

.email-btn:hover {
    background: #d93025;
    transform: scale(1.05);
}

.social-info {
    text-align: center;
}

.social-handle {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.social-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.0;
}

.contact-footer {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.contact-cta h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.contact-cta p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

/* ==================== LAZY LOADING STYLES ==================== */

/* Placeholder images with loading animation */
img[data-placeholder="true"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Smooth transition when image loads */
img.loaded {
    transition: opacity 0.3s ease-in-out;
}

/* Admin thumbnail loading states */
.admin-thumbnail-img[data-placeholder="true"] {
    opacity: 0.7;
}

.admin-thumbnail-img.loaded {
    opacity: 1;
}

/* Cart item image loading states */
.cart-item-image[data-placeholder="true"] {
    opacity: 0.7;
}

.cart-item-image.loaded {
    opacity: 1;
}

/* Bulk product image loading states */
.bulk-product-image[data-placeholder="true"] {
    opacity: 0.7;
}

.bulk-product-image.loaded {
    opacity: 1;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
    /* News bar visible on mobile */
    .news-bar {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    /* Mobile Header Adjustments - Adjusted for new logo */
    header {
        padding: 0.8rem 1rem;
        min-height: 55px;
    }
    
    .company-logo {
        height: 38px;
        max-width: 180px;
    }
    
    .admin-icon-btn {
        width: 36px; /* Reduced proportionally */
        height: 36px; /* Reduced proportionally */
    }
    
    .admin-icon-btn svg {
        width: 18.4px; /* 23px - 20% = 18.4px */
        height: 18.4px;
    }
    
    .header-spacer {
        width: 36px; /* Match admin button size */
    }
    
    /* Adjust fixed positioned elements for optimized mobile layout */
    /* Filter toggle is now inside user-controls, not fixed */
    
    /* Hide desktop cart toggle on mobile - use mobile cart bar instead */
    .cart-toggle {
        display: none !important;
    }
    
    /* When scrolled, move filter toggle to top */
    .filter-toggle.scrolled {
        top: 15px;
    }
    
    .cart-sidebar {
        top: 95px; /* Adjusted for smaller header (55px) + nav bar (40px) */
        height: calc(100vh - 95px);
    }
    
    .filter-sidebar {
        top: 95px; /* Adjusted for smaller header (55px) + nav bar (40px) */
        height: calc(100vh - 95px);
    }
    
    /* Mobile Navigation Bar Adjustments - Made even thinner */
    .navigation-bar {
        padding: 0.08rem 0; /* Minimal vertical padding */
        gap: 1rem; /* Further reduced gap */
    }
    
    .nav-btn {
        font-size: 0.8rem; /* Further reduced from 0.68rem */
        padding: 0.25rem 1rem; /* Adjusted as requested */
        letter-spacing: 0.2px; /* Further reduced letter spacing */
        font-weight: 700; /* Slightly bolder to maintain readability */
        line-height: 1.2; /* Tighter line height */
        min-height: 30px;
    }
    
    /* Slightly center the "catalogo" and "contacto" buttons more */
    .navigation-bar {
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Mobile News Bar Adjustments */
    .news-bar {
        min-height: 28px;
    }
    
    .news-text {
        font-size: 0.65rem;
        padding: 0 0.8rem;
        letter-spacing: 0.3px;
    }
    
    .location-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .address-card, .hours-card {
        padding: 1.5rem;
    }
    
    .location-header h2, .contact-header h2 {
        font-size: 2rem;
    }
    
    .map-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .social-button-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .location-container, .contact-container {
        padding: 1rem;
    }
    
    .location-header h2, .contact-header h2 {
        font-size: 1.8rem;
    }
    
    .address-card, .hours-card {
        flex-direction: row;
        text-align: left;
        padding: 1rem;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .address-icon, .hours-icon {
        width: 40px;
        height: 40px;
        margin-top: 0.25rem;
    }
    
    .address-details, .hours-details {
        flex: 1;
    }
    
    .address-details h3, .hours-details h3 {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }
    
    .address-details p, .hours-details p {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .map-wrapper {
        height: 250px;
    }
}
/* ==================== IMAGE MODAL STYLES ==================== */

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.image-modal-close:hover {
    opacity: 0.7;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* ==================== DEVICE DETECTION STYLES ==================== */

/* ==================== RESPONSIVE DESIGN ==================== */

/* Base responsive styles - layout adaptation only */

/* Mobile-first responsive design */
@media (max-width: 768px) {
    /* Catalog responsive layout */
    .catalog {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 3.2rem 1rem 1rem 1rem;
    }
    
    .product-card .product-image,
    .product-card .progressive-image-container.product-image {
        height: 140px;
    }
    
    .product-card .progressive-image-container.product-image .progressive-thumbnail,
    .product-card .progressive-image-container.product-image .progressive-catalog {
        object-fit: cover;
    }
    
    .product-card .product-info {
        padding: 0.75rem;
    }
    
    .product-card .product-name {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .product-card .product-price {
        font-size: 0.85rem;
    }
    
    .product-card .product-tags {
        font-size: 0.7rem;
        margin-top: 0.5rem;
    }
    
    .product-card .product-tag {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
    
    /* Button and input improvements for touch */
    button, .btn {
        min-height: 30px; /* iOS recommended touch target */
        padding: 0.75rem 1rem;
    }
    
    /* Exception for chatbot bubble close button */
    button.ai-bubble-close {
        min-height: unset;
        padding: 0;
    }
    
    input, textarea, select {
        min-height: 37px;
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }
    
    /* Filter and cart toggles */
    .filter-toggle,
    .cart-toggle {
        font-size: 1.1rem;
    }
    
    /* Gallery items */
    .gallery-item img {
        height: 220px;
    }
    
    /* News text */
    .news-text {
        font-size: 0.65rem;
    }
    
    /* Admin button adjustments */
    .admin-icon-btn svg {
        width: 22px;
        height: 22px;
    }
    
    /* View toggle button */
    .view-toggle-btn {
        padding: 0.5rem;
    }
    
    .view-toggle-btn svg {
        width: 18px;
        height: 18px;
    }
}

.touch-device .gallery-overlay {
    transform: translateY(0) !important; /* Always show overlay on touch devices */
    opacity: 0.9;
}

.no-touch .gallery-overlay {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.no-touch .gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ==================== RESPONSIVE MEDIA QUERIES ==================== */

/* Mobile Portrait */
@media (max-width: 480px) and (orientation: portrait) {
    /* Extra small mobile screens - 2 columns, more compact */
    .catalog {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    }
    
    /* Imágenes 1:1 sin márgenes excesivos */
    .product-card .product-image,
    .product-card .progressive-image-container.product-image {
        aspect-ratio: 1;
        height: auto;
        width: calc(100% - 0.5rem);
        margin: 0.25rem;
        border-radius: 8px;
    }
    
    .product-card .progressive-image-container.product-image .progressive-thumbnail,
    .product-card .progressive-image-container.product-image .progressive-catalog {
        object-fit: cover;
        aspect-ratio: 1;
    }
    
    /* Reducir padding del contenedor de info */
    .product-card .product-info {
        padding: 0.25rem 0.5rem 0.5rem 0.5rem;
    }
    
    /* Ajustar tamaño de nombre */
    .product-card .product-name {
        font-size: 0.85rem;
        line-height: 1.2;
        margin-bottom: 0.1rem;
    }
    
    /* Ajustar tamaño de marca */
    .product-card .product-brand {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
        margin-top: -0.1rem;
    }
    
    /* Reducir tamaño de precios */
    .product-card .bcv-price {
        font-size: 1.125rem; /* 50% más grande que el original 0.75rem */
        margin-bottom: 0.3rem;
    }
    
    .product-card .total-bs,
    .product-card .promo-price {
        font-size: 0.75rem;
        font-weight: 300;
        color: #666;
        font-style: italic;
    }
    
    .product-card .price-info {
        font-size: 0.75rem;
        margin: 0.15rem 0;
    }
    
    /* Botón de añadir al carrito más pequeño y perfectamente circular */
    .add-to-cart-btn {
        width: 25px !important;
        height: 25px !important;
        min-width: 25px;
        min-height: 25px;
        max-width: 25px;
        max-height: 25px;
        border-radius: 50% !important;
        font-size: 0.75rem;
        padding: 0;
        flex-shrink: 0;
        position: relative;
        top: auto;
        right: auto;
    }
    
    /* Botón de favoritos en móvil - mismo tamaño que add-to-cart */
    .favorite-btn {
        width: 25px !important;
        height: 25px !important;
        min-width: 25px;
        min-height: 25px;
        max-width: 25px;
        max-height: 25px;
        border-radius: 50% !important;
        font-size: 14px !important;
        padding: 0;
        flex-shrink: 0;
    }
    
    /* Posicionamiento del contenedor de acciones en móvil */
    .product-actions-container {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    /* Posicionamiento cuando hay favoritos (sesión iniciada) en móvil */
    .product-actions-container.with-favorites {
        top: 0.25rem;
        right: 0.25rem;
    }
    
    /* Badge NUEVO más pequeño y en esquina superior izquierda */
    .new-product-badge {
        font-size: 0.5rem;
        padding: 0.2rem 0.35rem;
        bottom: auto;
        top: 0.5rem;
        left: 0.5rem;
        right: auto;
    }
    
    /* Badge BAJO ENCARGO - Solo corregir posición en móvil */
    .bajo-encargo-badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.4rem;
        top: 0.5rem;
        left: 0.5rem;  /* Cambiado de right a left */
        right: auto;   /* Resetear right */
        bottom: auto;
    }
    
    /* Mobile Cart Bar (Bottom Sticky) - OCULTO, usamos solo overlay */
    .mobile-cart-bar {
        display: none !important; /* No se usa, el overlay hace de footer */
    }
    
    @keyframes slideUpFromBottom {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .mobile-cart-bar:not(.hidden) {
        animation: slideUpFromBottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .mobile-cart-bar-button {
        background: white;
        color: #45a049;
        border: none;
        border-radius: 18px;
        font-size: 0.935rem;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
        padding: 0.4rem 1.2rem;
        height: 32px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
    .mobile-cart-bar-button:active {
        transform: scale(0.98);
    }
    
    .mobile-cart-bar-close {
        background: white;
        color: #e74c3c;
        border: none;
        width: 32px;
        height: 32px;
        min-width: 32px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
        margin-left: 0.5rem;
        font-weight: bold;
        line-height: 1;
    }
    
    .mobile-cart-bar-close:active {
        background: #f0f0f0;
        transform: scale(0.95);
    }
    
    /* Mobile Cart Overlay (Full Screen) */
    .mobile-cart-overlay {
        display: flex !important; /* Siempre visible en móvil */
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto; /* Cambiar de 0 a auto para que no cubra toda la pantalla */
        height: 100vh;
        background: white;
        z-index: 9999;
        flex-direction: column;
        /* Estado inicial: completamente oculto hasta que haya productos */
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }
    
    /* Estado: carrito con productos pero cerrado (solo header visible como footer) */
    .mobile-cart-overlay:not(.empty):not(.show) {
        transform: translateY(calc(100% - 54px));
        pointer-events: auto;
    }
    
    /* Estado: carrito abierto (ventana completa) - cambiar anclaje a top */
    .mobile-cart-overlay.show {
        top: 0;
        bottom: auto;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    /* Estado: carrito vacío (completamente oculto) */
    .mobile-cart-overlay.empty {
        transform: translateY(100%);
        pointer-events: none;
    }
    
    /* Cart bar header inside overlay */
    .mobile-cart-bar-header {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.7rem 1rem;
        background: #45a049;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        flex-shrink: 0;
        position: relative;
        z-index: 9997; /* Carrito de compras - nivel base */
    }
    
    /* Header sticky falso - ELIMINADO, no se usa */
    .mobile-cart-sticky-header {
        display: none !important; /* Siempre oculto */
    }
    
    .mobile-cart-bar-header .mobile-cart-bar-button {
        flex: 0 0 auto;
    }
    
    .mobile-cart-bar-header .mobile-cart-bar-close {
        position: absolute;
        right: 1rem;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    /* Mostrar botón de cerrar solo cuando el carrito está abierto */
    .mobile-cart-overlay.show .mobile-cart-bar-header .mobile-cart-bar-close {
        opacity: 1;
        pointer-events: auto;
    }
    
    .mobile-cart-content {
        background: white;
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    @keyframes slideUpEntireCart {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    @keyframes slideDownEntireCart {
        from {
            transform: translateY(0);
        }
        to {
            transform: translateY(100%);
        }
    }
    
    .mobile-cart-header {
        display: none;
    }
    
    .mobile-cart-header h3 {
        margin: 0;
        color: #2c3e50;
        font-size: 1.2rem;
    }
    
    .mobile-cart-close {
        background: #e74c3c;
        color: white;
        border: none;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
    }
    
    .mobile-cart-close:active {
        background: #c0392b;
    }
    
    .mobile-cart-items {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem;
        /* Asegurar dirección de scroll normal */
        direction: ltr;
        /* Asegurar que el scroll funcione correctamente */
        -webkit-overflow-scrolling: touch;
        /* Prevenir comportamiento invertido */
        transform: none;
    }
    
    .mobile-cart-item {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
        margin-bottom: 1rem;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e0e0e0;
        position: relative;
    }
    
    .mobile-cart-item-image {
        width: 70px;
        height: 70px;
        object-fit: cover;
        border-radius: 4px;
        flex-shrink: 0;
    }
    
    .mobile-cart-item-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 70px;
    }
    
    .mobile-cart-item-name {
        font-weight: bold;
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
        word-wrap: break-word;
        line-height: 1.2;
        color: var(--text-primary, #333);
    }
    
    .mobile-cart-item-size {
        font-size: 0.8rem;
        color: #666;
        font-style: italic;
        margin-bottom: 0.3rem;
        padding: 0.2rem 0.5rem;
        background: #f8f9fa;
        border-radius: 4px;
        display: inline-block;
        max-width: fit-content;
    }
    
    .mobile-cart-item-size-container {
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .mobile-cart-size-label {
        font-size: 0.8rem;
        color: #666;
        font-weight: 500;
        margin: 0;
    }
    
    .mobile-cart-size-selector {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: white;
        color: #333;
        cursor: pointer;
        min-width: 60px;
    }
    
    .mobile-cart-size-selector:focus {
        outline: none;
        border-color: #45a049;
        box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    }
    
    .mobile-cart-item-price {
        color: #000;
        font-weight: bold;
        background: #45a049;
        border-radius: 10px;
        padding: 0.2rem 0.6rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
        width: fit-content;
    }
    
    .mobile-cart-item-controls {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        margin-top: 0.4rem;
    }
    
    .mobile-quantity-controls {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        background: var(--input-bg, white);
        border: 1px solid var(--input-border, #ddd);
        border-radius: 3px;
        padding: 0.1rem;
    }
    
    .mobile-quantity-btn {
        background: #45a049;
        color: white;
        border: none;
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
        border-radius: 3px;
        cursor: pointer;
        font-size: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
        line-height: 1;
        padding: 0;
        flex-shrink: 0;
    }
    
    .mobile-quantity-btn:active {
        background: #e6720a;
    }
    
    .mobile-quantity-display {
        min-width: 22px;
        text-align: center;
        font-weight: bold;
        font-size: 0.75rem;
        color: var(--text-primary, #333);
    }
    
    .mobile-remove-item-btn {
        background: #e74c3c;
        color: white;
        border: none;
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
        border-radius: 3px;
        cursor: pointer;
        font-size: 0.8rem;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
        line-height: 1;
        padding: 0;
        flex-shrink: 0;
    }
    
    .mobile-remove-item-btn:active {
        background: #c0392b;
    }
    
    .mobile-cart-empty {
        text-align: center;
        color: #666;
        padding: 3rem 2rem;
    }
    
    .mobile-cart-empty p {
        margin: 0.5rem 0;
        font-size: 1rem;
    }
    
    .mobile-cart-totals {
        border-top: 2px solid #45a049;
        padding: 1rem;
        background: #f8f9fa;
        flex-shrink: 0;
    }
    
    /* Spacer para llenar el espacio vacío en el carrito */
    .mobile-cart-spacer {
        flex: 1;
        min-height: 200px;
        background: white;
    }
    
    /* Wrapper independiente para los totales (fuera del carrito) */
    .mobile-cart-totals-wrapper {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10000; /* Por encima del carrito */
        background: #f8f9fa;
        /* Estado inicial: oculto debajo de la pantalla */
        transform: translateY(100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Animación más rápida sin delay al cerrar */
        pointer-events: none;
    }
    
    /* SOLO mostrar wrapper cuando el carrito está completamente abierto (clase .show) */
    .mobile-cart-totals-wrapper.show {
        transform: translateY(0);
        pointer-events: auto;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s; /* Delay de 0.1s solo al abrir */
    }
    
    /* Ocultar wrapper cuando el carrito está vacío */
    .mobile-cart-totals-wrapper.empty {
        transform: translateY(100%);
        pointer-events: none;
    }
    
    .mobile-cart-total-section h4 {
        margin: 0 0 1rem 0;
        color: #2c3e50;
        text-align: center;
        font-size: 1.1rem;
    }
    
    .mobile-cart-total-item {
        margin: 0.75rem 0;
        text-align: center;
    }
    
    .mobile-cart-total-bcv {
        color: #000;
        font-weight: bold;
        background: #45a049;
        border-radius: 10px;
        padding: 0.4rem 1.2rem;
        display: inline-block;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .mobile-cart-total-bs,
    .mobile-cart-total-promo {
        color: #2c3e50;
        font-weight: bold;
        font-size: 1rem;
        display: block;
        margin: 0.5rem 0;
    }
    
    .mobile-checkout-btn {
        width: 100%;
        padding: 15px;
        background: linear-gradient(135deg, #45a049 0%, #46b725 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 18px;
        font-weight: bold;
        cursor: pointer;
        margin-top: 15px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
        min-height: 48px;
    }
    
    .mobile-checkout-btn:active {
        background: linear-gradient(135deg, #46b725 0%, #388E3C 100%);
        transform: scale(0.98);
    }
    
    .mobile-clear-cart-btn {
        background: #95a5a6;
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        font-weight: bold;
        width: 100%;
        margin-top: 1rem;
        transition: background 0.3s;
    }
    
    .mobile-clear-cart-btn:active {
        background: #7f8c8d;
    }
    
    /* Hide desktop cart sidebar only on very small screens (mobile phones) */
    @media (max-width: 480px) {
        .cart-sidebar {
            display: none !important;
        }
    }
    
    /* Add padding to catalog to account for mobile cart bar */
    .catalog {
        padding-bottom: 5rem !important;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    /* Mobile landscape - 3 products per row for better use of horizontal space */
    .catalog {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 3.2rem 1rem 1rem 1rem;
    }
    
    .product-card .product-image,
    .product-card .progressive-image-container.product-image {
        height: 100px;
    }
    
    .product-card .progressive-image-container.product-image .progressive-thumbnail,
    .product-card .progressive-image-container.product-image .progressive-catalog {
        object-fit: cover;
    }
    
    .product-card .product-name {
        font-size: 0.8rem;
    }
    
    .product-card .product-price {
        font-size: 0.75rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet responsive layout */
    .catalog {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-toggle,
    .cart-toggle {
        padding: 0.9rem 1.1rem;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    /* Add hover effects on larger screens */
    button:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}



/* ==================== MANUAL ANALYSIS EDITING ==================== */

.analysis-manual-edit {
    background: var(--card-bg, #ffffff);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color, #e0e0e0);
    margin-top: 0.5rem;
}

.analysis-category {
    margin-bottom: 1.5rem;
}

.analysis-category:last-child {
    margin-bottom: 0;
}

.analysis-category h5 {
    color: #333333;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.analysis-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.analysis-input label {
    color: #ccc;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-input input {
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.analysis-input input:focus {
    outline: none;
    border-color: #45a049;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.analysis-input input::-webkit-outer-spin-button,
.analysis-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.analysis-input input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.analysis-note {
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 0.75rem;
    margin-top: 1rem;
}

.analysis-note small {
    color: #aaa;
    font-size: 0.8rem;
    line-height: 1.4;
}

.analysis-note strong {
    color: #81C784;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .analysis-inputs {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .analysis-input {
        gap: 0.25rem;
    }
    
    .analysis-input label {
        font-size: 0.8rem;
    }
    
    .analysis-input input {
        padding: 0.4rem;
        font-size: 0.85rem;
    }
}

/* Additional button styling for regenerate button */
.regenerate-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.regenerate-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.regenerate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

/* ==================== ZOOM DEL CATÁLOGO ELIMINADO ==================== */
/* Los estilos del zoom del catálogo han sido removidos */

/* ==================== CHECKOUT STYLES ==================== */

/* Checkout Button in Cart - Force full width green style */
.checkout-btn {
    width: 100% !important;
    padding: 12px !important;
    background: linear-gradient(135deg, #45a049 0%, #46b725 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    margin-top: 15px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3) !important;
    display: block !important;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #46b725 0%, #388E3C 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4) !important;
}

.checkout-btn:active {
    transform: translateY(0) !important;
}

/* Extra specific targeting for the checkout button by ID */
#checkoutBtn {
    width: 100% !important;
    padding: 12px !important;
    background: linear-gradient(135deg, #45a049 0%, #46b725 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    margin-top: 15px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3) !important;
    display: block !important;
    text-align: center !important;
    text-decoration: none !important;
    line-height: normal !important;
    min-height: auto !important;
    max-height: none !important;
}

#checkoutBtn:hover {
    background: linear-gradient(135deg, #46b725 0%, #388E3C 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4) !important;
}

#checkoutBtn:active {
    transform: translateY(0) !important;
}

/* ==================== CHECKOUT FORM STYLES ==================== */

/* Checkout Modal */
.checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10001; /* Por encima del mobile-cart-totals-wrapper (10000) */
    overflow-y: auto;
}

.checkout-modal.active {
    display: flex;
    flex-direction: column; /* Stack header and content vertically */
}

.checkout-modal-content {
    background: white;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.checkout-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #45a049 0%, #46b725 100%);
    color: white;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10001; /* Restaurado al valor original */
}

.checkout-modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.close-checkout {
    background: none;
    border: none;
    font-size: 32px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-checkout:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Checkout Form */
.checkout-form {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #45a049;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #45a049;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkout Summary */
.checkout-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.checkout-summary h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
}

/* REMOVED - Old checkout summary styles - now defined at line 12150 */

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 2px solid #45a049;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.checkout-total span {
    color: #45a049;
}

/* Checkout Actions */
.checkout-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #1e3a5f; /* Azul marino oscuro */
    color: white;
}

.btn-cancel:hover {
    background: #152d47; /* Azul marino más oscuro al hover */
    transform: translateY(-2px);
}

.btn-submit {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Checkout Success */
.checkout-success {
    padding: 40px 25px;
    text-align: center;
    position: relative;
    z-index: 9999; /* Ventana de pedido enviado - por encima del checkout (9998) */
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.checkout-success h2 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 28px;
}

.checkout-success p {
    color: #666;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.6;
}

.checkout-success strong {
    color: #45a049;
    font-size: 18px;
}

.btn-close-success {
    margin-top: 30px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #45a049 0%, #46b725 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-success:hover {
    background: linear-gradient(135deg, #46b725 0%, #388E3C 100%);
    transform: translateY(-2px);
}

/* Hide header when success is shown */
#checkoutSuccess:not([style*="display: none"]) ~ * .checkout-modal-header,
.checkout-modal:has(#checkoutSuccess:not([style*="display: none"])) .checkout-modal-header {
    display: none !important;
}

/* New styles for success modal */
.btn-copy-small {
    padding: 1px 4px 5px 4px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-small:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.order-number-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.order-number-container p {
    margin: 0;
    font-size: 16px;
}

.contact-instructions {
    margin: 20px 0 10px 0 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

.whatsapp-hint {
    margin: 10px 0 25px 0 !important;
    font-size: 14px !important;
    color: #888 !important;
    font-style: italic;
    font-weight: 700 !important;
}

.success-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
}

.success-buttons .whatsapp-success-btn {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.success-buttons .btn-close-success {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.whatsapp-success-btn {
    padding: 15px 18px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    position: relative !important;
    white-space: nowrap !important;
    min-height: 50px !important;
}

.whatsapp-success-btn:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
}

.whatsapp-success-btn svg {
    width: 20px;
    height: 20px;
}

.btn-close-success {
    padding: 15px 40px;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .checkout-modal {
        padding: 0;
    }
    
    .checkout-modal-content {
        max-height: 100vh;
        margin: 0;
        padding: 0;
    }
    
    .checkout-modal-header {
        padding: 15px 20px;
    }
    
    .checkout-modal-header h2 {
        font-size: 20px;
    }
    
    .checkout-form {
        padding: 20px;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}

/* ==================== ENHANCED CHECKOUT FORM STYLES ==================== */

/* Required Field Indicator */
.required-indicator {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
    font-weight: 500;
}

/* Warning Messages (for payment and delivery methods) */
.warning-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #fff5f5;
    border-left: 3px solid #dc3545;
    border-radius: 4px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-message .info-button {
    background: #dc3545;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    vertical-align: middle;
    margin-left: 4px;
}

.warning-message .info-button:hover {
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.warning-message .info-button:active {
    transform: scale(0.95);
}

.warning-message .info-button svg {
    width: 16px;
    height: 16px;
}

/* Conditional Fields */
.conditional-field {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Datos Section Styling */
.datos-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.datos-section h3 {
    color: #45a049;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #45a049;
    font-weight: 600;
}

/* Order Summary Section Styling */
.order-summary-section {
    background: #ffffff;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 25px;
}

.order-summary-section h3 {
    color: #45a049;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #45a049;
    font-weight: 600;
}

/* Enhanced Form Group Styling */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background-color: white;
    /* Ensure minimum touch target size */
    min-height: 48px;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #46b725;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #45a049;
    box-shadow: 0 0 0 3px rgb(0 255 7 / 15%);
}

.form-group input[required]:invalid:not(:placeholder-shown),
.form-group select[required]:invalid,
.form-group textarea[required]:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Select Dropdown Styling */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* REMOVED - Old checkout summary styles - now defined at line 12150 */

/* Checkout Total */
.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    background: #45a049;
    border-radius: 8px;
    font-size: 22px;
    font-weight: bold;
    color: white;
    margin-top: 15px;
}

.checkout-total span {
    color: white;
    font-size: 24px;
}

/* Enhanced Action Buttons */
.checkout-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Ensure minimum touch target size */
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel {
    background: #1e3a5f; /* Azul marino oscuro */
    color: white;
}

.btn-cancel:hover {
    background: #152d47; /* Azul marino más oscuro al hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-cancel:active {
    transform: translateY(0);
}

.btn-submit {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Confirmation Window Styles */
.checkout-success {
    padding: 40px 30px;
    text-align: center;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.checkout-success h2 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
}

.checkout-success p {
    color: #666;
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.6;
}

.checkout-success strong {
    color: #45a049;
    font-size: 20px;
    font-weight: 700;
}

/* Order Number Container */
.order-number-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #45a049;
}

.order-number-container p {
    margin: 0;
    font-size: 18px;
}

.btn-copy {
    background: #45a049;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Ensure minimum touch target size */
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy:hover {
    background: #388E3C;
    transform: scale(1.1);
}

.btn-copy:active {
    transform: scale(0.95);
}

/* Contact Instructions */
.contact-instructions {
    margin: 25px 0;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-weight: 500;
}

/* WhatsApp Button */
.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    /* Ensure minimum touch target size */
    min-height: 48px;
}

.btn-whatsapp:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.whatsapp-icon {
    font-size: 24px;
    animation: handClick 1s ease-in-out infinite;
}

@keyframes handClick {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.btn-close-success {
    margin-top: 20px;
    padding: 14px 40px;
    background: linear-gradient(135deg, #45a049 0%, #46b725 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Ensure minimum touch target size */
    min-height: 48px;
}

.btn-close-success:hover {
    background: linear-gradient(135deg, #46b725 0%, #388E3C 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-close-success:active {
    transform: translateY(0);
}

/* Info Modal Styles */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.info-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.info-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #45a049 0%, #46b725 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.info-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.close-info-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    /* Ensure minimum touch target size */
    min-width: 44px;
    min-height: 44px;
}

.close-info-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.info-modal-body {
    padding: 25px;
}

.info-modal-body ol {
    padding-left: 20px;
    margin: 0;
}

.info-modal-body li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #333;
    font-size: 15px;
}

.info-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
}

.btn-close-info {
    padding: 12px 32px;
    background: #45a049;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Ensure minimum touch target size */
    min-height: 48px;
}

.btn-close-info:hover {
    background: #388E3C;
    transform: translateY(-2px);
}

.btn-close-info:active {
    transform: translateY(0);
}

/* ==================== RESPONSIVE DESIGN - MOBILE ENHANCEMENTS ==================== */

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .checkout-modal-content {
        max-width: 90%;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    .checkout-modal {
        padding: 0;
        align-items: stretch;
    }
    
    .checkout-modal-content {
        max-height: 100vh;
        margin: 0;
        padding: 0;
    }
    
    .checkout-modal-header {
        padding: 15px 20px;
    }
    
    .checkout-modal-header h2 {
        font-size: 20px;
    }
    
    .checkout-form {
        padding: 20px;
    }
    
    .datos-section,
    .order-summary-section {
        padding: 15px;
    }
    
    .datos-section h3,
    .order-summary-section h3 {
        font-size: 18px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px; /* Ensure touch target size */
    }
    
    .checkout-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
        min-height: 48px;
    }
    
    /* REMOVED - Mobile checkout item styles - using desktop layout on all screens */
    
    .checkout-total {
        font-size: 18px;
        padding: 15px;
    }
    
    .checkout-total span {
        font-size: 20px;
    }
    
    .checkout-success {
        padding: 30px 20px;
    }
    
    .success-icon {
        font-size: 60px;
        margin-bottom: -4px;
    }
    
    .success-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .whatsapp-success-btn,
    .btn-close-success {
        width: 100%;
        justify-content: center;
    }
    
    .checkout-success h2 {
        font-size: 24px;
    }
    
    .order-number-container {
        flex-direction: column;
    }
    
    .btn-whatsapp {
        width: 100%;
        justify-content: center;
    }
    
    .info-modal-content {
        max-width: 95%;
    }
    
    .info-modal-header {
        padding: 15px 20px;
    }
    
    .info-modal-body {
        padding: 20px;
    }
}

/* Small Mobile Styles (max-width: 480px) */
@media (max-width: 480px) {
    .checkout-modal-header h2 {
        font-size: 18px;
    }
    
    .close-checkout {
        width: 36px;
        height: 36px;
        font-size: 28px;
    }
    
    .datos-section h3,
    .order-summary-section h3 {
        font-size: 16px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .checkout-total {
        font-size: 16px;
        padding: 12px;
    }
    
    .checkout-total span {
        font-size: 18px;
    }
    
    .btn-cancel,
    .btn-submit {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .checkout-success h2 {
        font-size: 22px;
    }
    
    .checkout-success p {
        font-size: 14px;
    }
    
    .btn-whatsapp {
        font-size: 16px;
        padding: 14px 24px;
    }
}

/* ==================== END CHECKOUT STYLES ==================== */

/* ==================== SEMANTIC ENGINE CALIBRATOR STYLES ==================== */

.semantic-engine-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.semantic-engine-section h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.semantic-calibrator {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calibrator-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.current-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.current-score label {
    color: #6c757d;
    margin: 0;
}

#currentMinScore {
    font-size: 1.2rem;
    font-weight: 700;
    color: #495057;
}

.score-hint {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-hint.score-very-permissive {
    background: #f8d7da;
    color: #721c24;
}

.score-hint.score-permissive {
    background: #fff3cd;
    color: #856404;
}

.score-hint.score-balanced {
    background: #d1ecf1;
    color: #0c5460;
}

.score-hint.score-strict {
    background: #d4edda;
    color: #155724;
}

.score-hint.score-very-strict {
    background: #e2e3e5;
    color: #383d41;
}

.calibrator-stats {
    color: #6c757d;
    font-size: 0.9rem;
}

.calibrator-controls {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.score-slider-container {
    margin-bottom: 1.5rem;
}

.score-slider-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.slider-with-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.score-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.score-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #45a049;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.score-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #45a049;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.score-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.slider-label-left {
    text-align: left;
}

.slider-label-center {
    text-align: center;
    font-weight: 600;
    color: #495057;
}

.slider-label-right {
    text-align: right;
}

.calibrator-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.apply-score-btn,
.test-score-btn,
.reset-score-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.apply-score-btn {
    background: #28a745;
    color: white;
}

.apply-score-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.test-score-btn {
    background: #17a2b8;
    color: white;
}

.test-score-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

.reset-score-btn {
    background: #6c757d;
    color: white;
}

.reset-score-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.calibrator-test-results {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.calibrator-test-results h4 {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1.1rem;
}

.loading-test {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

.test-error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    font-weight: 500;
}

.test-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.test-summary h5 {
    margin-bottom: 0.75rem;
    color: #495057;
}

.test-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.test-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: #495057;
}

.test-details h5 {
    margin-bottom: 0.75rem;
    color: #495057;
}

.test-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.test-result-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    border-left: 3px solid #45a049;
}

.test-prompt {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.test-metrics {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.metric {
    font-size: 0.85rem;
    color: #6c757d;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    border: 1px solid #e9ecef;
}

.test-recommendation {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 4px;
    border-left: 3px solid #007bff;
    margin-top: 1rem;
}

.test-recommendation h5 {
    margin-bottom: 0.5rem;
    color: #0056b3;
}

.test-recommendation p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calibrator-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .slider-with-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .score-input {
        width: 100%;
    }
    
    .calibrator-buttons {
        flex-direction: column;
    }
    
    .apply-score-btn,
    .test-score-btn,
    .reset-score-btn {
        width: 100%;
        text-align: center;
    }
    
    .test-stats {
        grid-template-columns: 1fr;
    }
    
    .test-metrics {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Admin Products Lazy Loading Styles */
.admin-loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-height: 200px;
}

.admin-loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.admin-loading-placeholder .loading-shimmer {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Enhanced shimmer animation */
@keyframes shimmer {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.6; transform: scale(1); }
}

/* Improved products list scrolling */
.products-list {
    max-height: 600px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Dark mode support for lazy loading elements */
body.dark-mode .admin-loading-placeholder {
    color: #ccc;
}

/* Bulk edit external actions (outside form) */
.bulk-external-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.bulk-external-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bulk-external-actions .bulk-visibility-btn {
    background-color: #2196F3;
    color: white;
}

.bulk-external-actions .bulk-visibility-btn:hover {
    background-color: #1976D2;
}

.bulk-external-actions .bulk-delete-btn {
    background-color: #f44336;
    color: white;
}

.bulk-external-actions .bulk-delete-btn:hover {
    background-color: #d32f2f;
}

/* ==================== SISTEMA DE TALLAS DINÁMICO ==================== */

/* Sección de tallas en el modal de productos */
.product-sizes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Botones de tallas */
.size-button {
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    background-color: #ffffff;
    color: #495057;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
    user-select: none;
}

.size-button:hover {
    border-color: #007bff;
    background-color: #e7f3ff;
    color: #0056b3;
    transform: translateY(-1px);
}

.size-button.selected {
    border-color: #007bff;
    background-color: #007bff;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.size-button.selected:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Información de tipo de tallas */
.sizes-info {
    margin-bottom: 10px;
}

.sizes-info small {
    color: #6c757d;
    font-style: italic;
}

/* Indicador de tipo de talla */
.size-type-indicator {
    display: inline-block;
    padding: 4px 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-left: 8px;
}

.size-type-indicator.numeric {
    background-color: #d4edda;
    color: #155724;
}

.size-type-indicator.letter {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Contenedor de tallas en el catálogo */
.product-sizes-display {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.product-sizes-display h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.available-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.available-size {
    padding: 4px 8px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.available-size:hover {
    border-color: #007bff;
    background-color: #e7f3ff;
    color: #0056b3;
}

.available-size.selected {
    border-color: #28a745;
    background-color: #28a745;
    color: #ffffff;
}

/* Selector de tallas en el carrito */
.cart-size-selector {
    margin-top: 8px;
}

.cart-size-selector select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    background-color: #ffffff;
}

/* Mensaje de validación de tallas */
.size-validation-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.size-validation-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.size-validation-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive para tallas */
@media (max-width: 768px) {
    .product-sizes-container {
        gap: 6px;
        padding: 12px;
    }
    
    .size-button {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 36px;
    }
    
    .available-sizes {
        gap: 4px;
    }
    
    .available-size {
        padding: 3px 6px;
        font-size: 11px;
    }
}

/* Dark mode para sistema de tallas */
.dark-mode .product-sizes-container {
    background-color: #2d3748;
    border-color: #4a5568;
}

.dark-mode .size-button {
    background-color: #4a5568;
    color: #e2e8f0;
    border-color: #718096;
}

.dark-mode .size-button:hover {
    border-color: #63b3ed;
    background-color: #2c5282;
    color: #bee3f8;
}

.dark-mode .size-button.selected {
    background-color: #3182ce;
    border-color: #3182ce;
    color: #ffffff;
}

.dark-mode .product-sizes-display {
    background-color: #2d3748;
    border-color: #4a5568;
}

.dark-mode .available-size {
    background-color: #4a5568;
    color: #e2e8f0;
    border-color: #718096;
}

.dark-mode .available-size:hover {
    border-color: #63b3ed;
    background-color: #2c5282;
    color: #bee3f8;
}

.dark-mode .available-size.selected {
    background-color: #38a169;
    border-color: #38a169;
    color: #ffffff;
}

/* Dark mode para análisis de perfume */
.dark-mode .analysis-manual-edit {
    background: #2a2a2a;
    border-color: #444;
}

.dark-mode .analysis-category h5 {
    color: #81C784;
}

/* ==================== ERROR HANDLING AND VALIDATION STYLES ==================== */

/* Toast Messages */
.error-toast,
.success-toast,
.warning-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.error-toast.show,
.success-toast.show,
.warning-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.error-toast {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.success-toast {
    background: #efe;
    border: 1px solid #cfc;
    color: #363;
}

.warning-toast {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.toast-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.toast-message {
    flex: 1;
    word-wrap: break-word;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.toast-close svg {
    display: block;
    width: 16px;
    height: 16px;
}

.error-toast .toast-close {
    color: #c33;
}

.error-toast .toast-close:hover {
    background-color: rgba(204, 51, 51, 0.1);
}

.success-toast .toast-close {
    color: #363;
}

.success-toast .toast-close:hover {
    background-color: rgba(51, 102, 51, 0.1);
}

.warning-toast .toast-close {
    color: #856404;
}

.warning-toast .toast-close:hover {
    background-color: rgba(133, 100, 4, 0.1);
}

/* Size Validation Error Styles */
.size-validation-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin-top: 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c33;
    font-size: 14px;
    animation: slideInError 0.3s ease;
}

.size-validation-error .error-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.size-validation-error .error-message {
    flex: 1;
    line-height: 1.4;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Size Selector Validation Styles */
.product-size-selector.has-validation-error {
    border: 2px solid #fcc;
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 238, 238, 0.5);
}

.product-size-selector .size-validation-message {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 13px;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.product-size-selector .size-validation-message.show {
    opacity: 1;
    transform: translateY(0);
}

.product-size-selector .size-validation-message.error {
    background: #fee;
    border-color: #fcc;
    color: #c33;
}

/* Admin Size Selector Validation Styles */
#productSizesSection.has-validation-error {
    border: 2px solid #fcc;
    border-radius: 8px;
    padding: 16px;
    background: rgba(255, 238, 238, 0.3);
}

#productSizesSection .size-validation-error {
    margin-top: 12px;
}

/* Size Button States */
.size-button {
    padding: 8px 12px;
    margin: 4px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.size-button:hover {
    border-color: #45a049;
    background: rgba(76, 175, 80, 0.1);
}

.size-button.selected {
    background: #45a049;
    color: white;
    border-color: #45a049;
}

.size-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ccc;
    color: #999;
}

.user-size-button {
    padding: 6px 12px;
    margin: 3px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 35px;
    text-align: center;
}

.user-size-button:hover {
    border-color: #45a049;
    background: rgba(76, 175, 80, 0.1);
}

.user-size-button.selected {
    background: #45a049;
    color: white;
    border-color: #45a049;
}

.user-size-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ccc;
    color: #999;
}

/* Size Type Indicators */
.size-type-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 8px;
}

.size-type-indicator.numeric {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.size-type-indicator.letter {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* Size Selector Labels */
.size-selector-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.size-label {
    font-size: 14px;
}

.size-required-indicator {
    color: #c33;
    font-weight: bold;
    margin-left: 4px;
}

.size-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

/* Mobile Responsive Toast Messages */
@media (max-width: 768px) {
    .error-toast,
    .success-toast,
    .warning-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        width: calc(100% - 20px);
        font-size: 13px;
        padding: 14px;
    }
    
    .toast-icon {
        font-size: 16px;
    }
    
    .toast-close {
        width: 20px;
        height: 20px;
        font-size: 16px;
    }
}

/* ==================== END ERROR HANDLING STYLES ==================== */

/* ==================== TALLAS EN MODAL DE DESCRIPCIÓN ==================== */

/* Contenedor de tallas en el modal */
.product-sizes-modal {
    margin: 0; /* Sin margen */
    padding: 8px 12px; /* Padding mínimo */
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.product-sizes-modal .sizes-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px; /* Reducir espacio */
    display: block;
}

.product-sizes-modal .sizes-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Contenedor de tallas en línea (para productos con precio único) */
.product-sizes-modal .sizes-container-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0; /* Eliminar margen superior innecesario */
}

/* Indicadores de tallas - 40% más pequeños */
.product-sizes-modal .size-indicator {
    padding: 5px 8px;
    border: 1px solid #dee2e6;
    background-color: #ffffff;
    color: #495057;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
    user-select: none;
    transition: all 0.2s ease;
}

.product-sizes-modal .size-indicator:hover {
    border-color: #007bff;
    background-color: #e7f3ff;
    color: #0056b3;
    transform: translateY(-1px);
}

/* Estilos específicos por tipo de talla */
.product-sizes-modal .size-indicator.size-numeric {
    background-color: #e8f5e8;
    border-color: #c3e6cb;
    color: #155724;
}

.product-sizes-modal .size-indicator.size-letter {
    background-color: #e1f5fe;
    border-color: #b3e5fc;
    color: #0277bd;
}

/* Responsive para tallas en modal */
@media (max-width: 768px) {
    .product-sizes-modal {
        margin: 0; /* Sin margen en móvil */
        padding: 6px 10px; /* Padding aún más reducido */
    }
    
    .product-sizes-modal .sizes-label {
        margin-bottom: 4px; /* Reducir espacio */
    }
    
    .product-sizes-modal .sizes-container {
        gap: 4px;
    }
    
    .product-sizes-modal .size-indicator {
        padding: 4px 6px;
        font-size: 10px;
        min-width: 20px;
    }
    
    .product-sizes-modal .sizes-label {
        font-size: 12px;
    }
}

/* Dark mode para tallas en modal */
.dark-mode .product-sizes-modal {
    background-color: #2d3748;
    border-color: #4a5568;
}

.dark-mode .product-sizes-modal .sizes-label {
    color: #e2e8f0;
}

.dark-mode .product-sizes-modal .size-indicator {
    background-color: #4a5568;
    color: #e2e8f0;
    border-color: #718096;
}

.dark-mode .product-sizes-modal .size-indicator:hover {
    border-color: #63b3ed;
    background-color: #2c5282;
    color: #bee3f8;
}

.dark-mode .product-sizes-modal .size-indicator.size-numeric {
    background-color: #2f855a;
    border-color: #38a169;
    color: #c6f6d5;
}

.dark-mode .product-sizes-modal .size-indicator.size-letter {
    background-color: #2c5282;
    border-color: #3182ce;
    color: #bee3f8;
}

/* ==================== SIZE SELECTION MODAL ==================== */

.size-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.size-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.size-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: sizeModalSlideIn 0.3s ease-out;
}

@keyframes sizeModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.size-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #66BB6A;
    color: white;
    border-radius: 12px 12px 0 0;
}

.size-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.size-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.size-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.size-modal-body {
    padding: 25px;
}

.size-modal-product-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #66BB6A;
}

.size-modal-sizes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.size-option-button {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-option-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.size-option-button.selected {
    background: #66BB6A;
    border-color: #66BB6A;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.size-option-button.unsure-option {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    font-style: italic;
    grid-column: 1 / -1;
    margin-top: 10px;
}

.size-option-button.unsure-option:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.size-option-button.unsure-option.selected {
    background: #495057;
    border-color: #495057;
    box-shadow: 0 4px 12px rgba(73, 80, 87, 0.3);
}

.size-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.size-modal-confirm {
    width: 100%;
    background: #66BB6A;
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-modal-confirm:hover:not(:disabled) {
    background: #e67c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.size-modal-confirm:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .size-modal-overlay {
        padding: 10px;
    }
    
    .size-modal-content {
        max-height: 95vh;
    }
    
    .size-modal-header {
        padding: 15px 20px;
    }
    
    .size-modal-title {
        font-size: 16px;
    }
    
    .size-modal-body {
        padding: 20px;
    }
    
    .size-modal-sizes-container {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 10px;
    }
    
    .size-option-button {
        padding: 10px 6px;
        font-size: 13px;
        min-height: 44px;
    }
    
    .size-modal-footer {
        padding: 15px 20px;
    }
    
    .size-modal-confirm {
        padding: 10px 16px;
        font-size: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .size-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .size-modal-header {
        border-bottom-color: #4a5568;
    }
    
    .size-modal-product-name {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .size-option-button {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .size-option-button:hover {
        background: #718096;
        border-color: #a0aec0;
    }
    
    .size-modal-footer {
        background: #4a5568;
        border-top-color: #718096;
    }
}

/* ==================== END SIZE SELECTION MODAL ==================== */

/* ==================== CATEGORIES VIEW STYLES ==================== */

.categories-view {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.categories-header {
    text-align: center;
    margin-bottom: 16px;
}

.categories-header h2 {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-color);
    margin: 0;
    letter-spacing: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 25px;
    }
    
    /* Ocultar elementos móviles en PC */
    .mobile-cart-bar,
    .mobile-cart-bar-header,
    .mobile-cart-overlay {
        display: none !important;
    }
}

.category-card {
    /* Color naranja sólido original */
    background: #45a049;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Border eliminado */
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.2);
    color: white;
    min-height: 140px; /* Aumentado para acomodar imágenes más grandes */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo sutil */
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 140, 66, 0.4);
    /* Color naranja más oscuro sólido en hover */
    background: #e67c3a;
}

.category-image {
    width: 120px; /* 50% más grande que 80px */
    height: 120px; /* 50% más grande que 80px */
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    display: block;
    border: 4px solid rgba(255, 255, 255);
    /* Sombra sutil para las imágenes */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin: 0;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Category Header Styles - Solo para móvil */
.category-header {
    display: none; /* Oculto por defecto */
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px; /* Padding aún más delgado */
    background: #4CAF50; /* Color naranja sólido */
    color: white;
    position: fixed; /* Cambiar a fixed para estar siempre arriba */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999; /* Z-index muy alto para estar por encima de todo */
    min-height: 40px; /* Altura más delgada */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Sombra sutil */
    box-sizing: border-box;
    height: 40px; /* Altura fija para mejor control */
}

@media (max-width: 767px) {
    .category-header {
        display: flex; /* Solo mostrar en móvil */
    }
    
    /* Cuando el category header está visible, agregar padding top al contenido */
    .user-controls-container {
        padding-top: 50px; /* Espacio para el header fijo */
    }
}

.back-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px; /* Padding más pequeño */
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 31px; /* 10% más grande (28px * 1.1 = 30.8px ≈ 31px) */
    min-height: 31px; /* 10% más grande */
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.back-btn svg {
    width: 20px; /* 10% más grande (18px * 1.1 = 19.8px ≈ 20px) */
    height: 20px; /* 10% más grande */
}

.category-header h1 {
    font-size: 14px; /* Tamaño más pequeño */
    font-weight: 600; /* Peso medio */
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    text-align: center;
    text-shadow: none;
    line-height: 1; /* Línea de altura exacta para mejor centrado */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; /* Ocupar toda la altura del contenedor */
}

.category-logo {
    width: 22px; /* 10% más pequeño (24px * 0.9 = 21.6px ≈ 22px) */
    height: 22px; /* 10% más pequeño */
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

/* View All Button */
.view-all-btn {
    background: #45a049;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
    width: fit-content;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.view-all-btn:hover {
    background: #e67c3a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

/* Dark mode adjustments for categories */
.dark-mode .category-card {
    /* Color naranja sólido en modo oscuro */
    background: #4CAF50;
    color: white;
}

.dark-mode .category-card:hover {
    background: #e67c3a;
}

.dark-mode .categories-header h2 {
    color: var(--text-primary);
}

.dark-mode .category-name {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dark-mode .view-all-btn {
    background: #4CAF50;
    color: white;
}

.dark-mode .view-all-btn:hover {
    background: #e67c3a;
}

/* Mobile specific adjustments */
@media (max-width: 767px) {
    .categories-view {
        padding: 15px;
    }
    
    .categories-grid {
        gap: 15px;
    }
    
    .category-card {
        min-height: 120px; /* Ajustado para móvil */
        padding: 12px;
    }
    
    .category-image {
        width: 90px; /* Más grande en móvil también, pero proporcionalmente */
        height: 90px;
        margin-bottom: 10px;
    }
    
    .category-name {
        font-size: 12px;
    }
}/* Mobile specific adjustments */
@media (max-width: 767px) {
    .categories-view {
        padding: 15px;
    }
    
    .categories-header h2 {
        font-size: 20px;
    }
    
    .category-image {
        width: 90px;
        height: 90px;
    }
    
    .category-name {
        font-size: 12px;
    }
    
    .category-header h1 {
        font-size: 18px;
    }
}


/* Variable Price Breakdown in Description */
.variable-price-breakdown-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem auto;
    padding: 1rem;
    background: rgb(0 255 7 / 5%);
    border-left: 4px solid #45a049;
    border-radius: 8px;
}

.variable-price-breakdown-title {
    color: #45a049;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.variable-price-breakdown-title::before {
    content: "💰";
    font-size: 1.1rem;
}

.variable-price-entry {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.variable-price-sizes {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.variable-price-details {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .variable-price-breakdown-container {
        margin: 1rem auto;
        padding: 0.75rem;
    }
    
    .variable-price-breakdown-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .variable-price-entry {
        padding: 0.6rem;
    }
    
    .variable-price-sizes {
        font-size: 0.85rem;
    }
    
    .variable-price-details {
        font-size: 0.8rem;
    }
}


/* Estilos para entrada de precio por talla */
.product-sizes-modal .size-price-entry {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem;
    background: rgb(0 255 7 / 5%);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    width: 100%;
}

.product-sizes-modal .size-labels {
    display: flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
}

.product-sizes-modal .size-labels .size-indicator {
    padding: 4px 8px;
    font-size: 0.8rem;
    margin: 0;
    white-space: nowrap;
}

.product-sizes-modal .size-price-details {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.3;
    white-space: nowrap;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .product-sizes-modal .size-price-entry {
        padding: 0.5rem;
        margin-bottom: 0.4rem;
    }
    
    .product-sizes-modal .size-price-details {
        font-size: 0.8rem;
    }
}

.dark-mode .product-sizes-modal .size-price-entry {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.dark-mode .product-sizes-modal .size-price-details {
    color: #b0b0b0;
}


/* ==================== PRODUCT PAGE (MOBILE) ==================== */
.product-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff !important;
    z-index: 9000;
    overflow-y: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-page.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.product-page-header {
    position: sticky;
    top: 0;
    background: #4CAF50; /* Color naranja sólido igual que category-header */
    padding: 6px 16px; /* Padding delgado igual que category-header */
    display: flex;
    align-items: center;
    justify-content: space-between; /* Cambiar a space-between para tener botón a la izquierda y logo a la derecha */
    z-index: 9999; /* Z-index alto igual que category-header */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 40px; /* Altura delgada igual que category-header */
    height: 40px; /* Altura fija */
}

.product-page-back {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px; /* Padding más pequeño igual que back-btn */
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 31px; /* 10% más grande igual que back-btn */
    min-height: 31px; /* 10% más grande */
}

.product-page-back:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.product-page-back svg {
    width: 20px; /* 10% más grande igual que back-btn */
    height: 20px; /* 10% más grande */
}

.product-page-logo {
    width: 22px; /* Igual que category-logo */
    height: 22px; /* Igual que category-logo */
    filter: brightness(0) invert(1); /* Hacer el logo blanco */
}

.product-page-content {
    padding-bottom: 80px;
}

.product-page-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
}

/* Progressive image loading for product page */
.product-page-progressive {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.progressive-catalog-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: blur(10px);
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 0 !important;
}

.progressive-expanded {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease;
    z-index: 2;
    border-radius: 0 !important;
}

.product-page-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-page-image-blur {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-page-zoom-btn {
    position: absolute;
    bottom: 80px; /* Mover más arriba para dejar espacio al botón de agregar */
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    z-index: 10; /* BUGFIX: Asegurar que esté sobre la imagen progresiva */
    -webkit-touch-callout: none; /* Prevenir menú contextual en iOS */
    -webkit-user-select: none; /* Prevenir selección en iOS */
    user-select: none; /* Prevenir selección */
}

.product-page-zoom-btn:active {
    transform: scale(0.95);
}

.product-page-add-to-cart-btn {
    position: absolute;
    bottom: 16px; /* Debajo de la lupa, en la esquina inferior derecha */
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #45a049;
    border: none;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    z-index: 10; /* BUGFIX: Asegurar que esté sobre la imagen progresiva */
}

.product-page-add-to-cart-btn:active {
    transform: scale(0.95);
}

/* Botón de copiar enlace - debajo del botón de agregar al carrito */
.product-page-copy-link-btn {
    position: absolute;
    bottom: -56px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #808080;
    border: none;
    box-shadow: 0 4px 12px rgba(128, 128, 128, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    z-index: 10; /* BUGFIX: Asegurar que esté sobre la imagen progresiva */
    transition: all 0.3s ease;
}

.product-page-copy-link-btn:active {
    transform: scale(0.95);
}

.product-page-copy-link-btn:hover {
    background: #666666;
    box-shadow: 0 6px 16px rgba(128, 128, 128, 0.5);
}

.product-page-copy-link-btn svg {
    min-width: 26px;
    height: 39px;
}

.product-page-info {
    padding: 10px 16px;
}

.product-page-title-container {
    margin-bottom: 3px; /* Espacio después del título y marca */
    margin-right: 2rem;
}

.product-page-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
    display: inline; /* Hacer que sea inline para que el brand pueda estar en la misma línea */
}

.product-page-brand {
    font-size: 1.5rem; /* Proporcional al nombre */
    font-weight: 300;
    color: #666;
    margin: 0; /* Sin margin */
    display: inline; /* Hacer que sea inline para estar en la misma línea */
}

.product-page-prices {
    margin-bottom: 20px;
}

.product-page-divider {
    height: 1px;
    background: #ddd;
    margin: 20px 0;
}

/* Resetear estilos para product-sizes-modal en la página de producto */
.product-page-info .product-sizes-modal {
    line-height: normal; /* Resetear line-height heredado */
    margin-bottom: 20px; /* Espacio antes de la descripción - aumentado */
}

.product-page-description {
    color: #555;
    line-height: 1.6;
    text-align: justify; /* Justificar el texto */
    white-space: pre-line; /* Preservar saltos de línea y espacios */
    transform: translateY(-26px); /* Reducir el desplazamiento hacia arriba */
}

.product-page-description p {
    margin-bottom: 1em; /* Espaciado entre párrafos */
    text-align: justify; /* Justificar párrafos */
}

/* Product Zoom Overlay */
.product-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: none;
    touch-action: none;
    -webkit-touch-callout: none; /* Prevenir menú contextual en iOS */
    -webkit-user-select: none; /* Prevenir selección en iOS */
    user-select: none; /* Prevenir selección */
}

.product-zoom-overlay.active {
    display: block;
}

.product-zoom-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(2);
    transform-origin: center center;
    transition: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-zoom-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
    -webkit-touch-callout: none; /* Prevenir menú contextual en iOS */
    -webkit-user-select: none; /* Prevenir selección en iOS */
}


/* Hide product page on desktop */
@media (min-width: 768px) {
    .product-page:not(.active) {
        display: none !important;
    }
}


/* ==================== AUTH & USER SYSTEM ==================== */

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000; /* Por encima del admin panel (9999) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--bg-color, #ffffff);
    margin: 50px auto;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.dark-mode .close-modal {
    color: #666;
}

.dark-mode .close-modal:hover {
    color: #ccc;
}

.modal-body {
    padding: 20px;
}

/* Auth Modal */
.auth-modal-content {
    max-width: 400px;
    margin: 50px auto;
    background: white;
}

.auth-modal-content .form-group {
    margin-bottom: 15px;
}

.auth-modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

.auth-modal-content input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.auth-error {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-link {
    background: none;
    border: none;
    color: #45a049;
    cursor: pointer;
    font-weight: 500;
    text-decoration: underline;
    padding: 0;
    margin-left: 5px;
}

.btn-link:hover {
    color: #66BB6A;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #45a049;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #66BB6A;
}

.btn-danger {
    width: 100%;
    padding: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

/* User Menu Modal */
.user-menu-content {
    max-width: 350px;
    margin: 50px auto;
    background: white;
}

.user-info {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
}

.user-info p {
    margin: 10px 0;
    color: var(--text-color);
}

/* Product Actions Container (for favorite and cart buttons) */
/* Product Actions Container (for favorite and cart buttons) */
.product-actions-container {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    display: flex;
    gap: 5px;
    align-items: center;
    z-index: 10;
}

/* Ajuste cuando hay sesión iniciada (con botón de favoritos) */
.product-actions-container.with-favorites {
    top: 0.25rem;
    right: 0.25rem;
}

/* Ajuste de gap para móvil */
@media (max-width: 768px) {
    .product-actions-container {
        gap: 3px;
    }
}

/* Favorite Button on Product Cards */
.favorite-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 18px;
}

.favorite-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.favorite-btn svg {
    width: 20px;
    height: 20px;
    stroke: #45a049;
    fill: none;
    transition: fill 0.3s;
}

.favorite-btn.active svg {
    fill: #45a049;
}

.dark-mode .favorite-btn {
    background: rgba(40, 40, 40, 0.95);
}

.dark-mode .favorite-btn svg {
    stroke: #45a049;
}

/* Favorites View (Desktop) */
#favoritesView {
    display: none;
}

#favoritesView.active {
    display: block;
}

/* Mobile Favorites Page */
.favorites-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    z-index: 1000;
    overflow-y: auto;
}

.favorites-page.active {
    display: block;
}

.favorites-header {
    position: sticky;
    top: 0;
    background: var(--header-bg);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.favorites-header .back-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
}

.favorites-header h1 {
    font-size: 20px;
    margin: 0;
    color: var(--text-color);
}

.favorites-content {
    padding: 20px;
}

.favorites-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.favorites-empty svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.favorites-empty h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.favorites-empty p {
    font-size: 16px;
}


/* ==================== PRODUCT REVIEWS SYSTEM ==================== */

.product-reviews-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

/* Reviews Summary */
.reviews-summary {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    line-height: 0.5rem;
}

.reviews-summary-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.average-rating {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.rating-stars {
    margin: 0.5rem 0;
}

.reviews-count {
    color: #666;
    font-size: 0.95rem;
}

/* Stars */
.stars {
    display: inline-flex;
    gap: 0.25rem;
    font-size: 1.5rem;
}

.star {
    color: #ddd;
    transition: color 0.2s ease;
}

.star.filled {
    color: #FDD835;
}

.star.half {
    background: linear-gradient(90deg, #FDD835 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star.empty {
    color: #ddd;
}

/* Add Review Form */
.add-review-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    line-height: 0.5rem;
}

.add-review-form h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #333;
}

.optional-label {
    font-weight: normal;
    color: #999;
    font-size: 0.9rem;
}

.rating-input {
    margin-bottom: 1.5rem;
}

.rating-input .stars {
    gap: 0.5rem;
}

.rating-input .star {
    cursor: pointer;
    font-size: 2rem;
    transition: all 0.2s ease;
}

.rating-input .star:hover {
    transform: scale(1.2);
}

.review-text-input {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.review-text-input:focus {
    outline: none;
    border-color: #45a049;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.inappropriate-words-warning {
    color: #dc3545;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: #ffe6e6;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.publish-review-btn {
    background: #45a049;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 120px;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.publish-review-btn:hover:not(:disabled) {
    background: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.publish-review-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Reviews List */
.reviews-list-title {
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    color: #333;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.4rem 1rem 1rem 1rem;
    position: relative;
    transition: box-shadow 0.3s ease;
    line-height: 0.3;
}

.review-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.delete-review-btn {
    position: absolute;
    top: 0.4rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
    padding: 0.25rem;
    line-height: 1;
    color: #dc3545;
}

.delete-review-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.delete-review-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

.review-header {
    margin-bottom: 0.3rem;
}

.review-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.review-user-line {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    line-height: 1.2;
}

.review-username {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    line-height: 1.2;
}

.review-date {
    color: #999;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.2;
}

.review-rating {
    line-height: 1;
}

.review-rating .stars {
    font-size: 1.2rem;
    line-height: 1;
}

.review-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.review-text {
    color: #555;
    line-height: 1.5;
    margin: 0;
    font-size: 0.95rem;
    flex: 1;
}

.review-footer {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    flex-shrink: 0;
}

.review-like-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid #ddd;
    padding: 0.35rem 0.65rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: #666;
    line-height: 1;
}

.review-like-btn:hover {
    border-color: #45a049;
    background: rgb(0 255 7 / 5%);
}

.review-like-btn.liked {
    border-color: #45a049;
    background: rgba(76, 175, 80, 0.1);
    color: #45a049;
}

.like-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
    transition: all 0.2s ease;
}

.review-like-btn.liked .like-icon {
    fill: #45a049;
    stroke: #45a049;
}

.like-count {
    font-weight: 500;
    line-height: 1;
}

.load-more-reviews {
    display: block;
    margin: 2rem auto 0;
    padding: 0.75rem 2rem;
    background: white;
    border: 2px solid #45a049;
    color: #45a049;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-reviews:hover:not(:disabled) {
    background: #45a049;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.load-more-reviews:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .product-reviews-section {
        padding-top: 1.5rem;
        margin-top: -1.3rem;
    }
    
    .average-rating {
        font-size: 2.5rem;
    }
    
    .stars {
        font-size: 1.3rem;
    }
    
    .add-review-form {
        padding: 1rem;
    }
    
    .rating-input .star {
        font-size: 1.8rem;
    }
    
    .review-card {
        padding: 0rem 1rem 0.6rem 1rem;
    }
    
    .review-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .review-rating {
        align-self: flex-start;
    }
    
    .delete-review-btn {
        top: 0.5rem;
        right: 0.5rem;
    }
}


/* ==================== VISTA LISTA - POSICIONAMIENTO ESPECIAL ==================== */
/* Estilos específicos SOLO para la vista tipo lista */
/* Los botones se posicionan fuera de la imagen */

/* ===== PC - VISTA LISTA ===== */
@media (min-width: 769px) {
    /* VISTA LISTA PC: Botones en esquina superior derecha del CARD (fuera de la imagen) */
    .catalog.list-view .product-card .product-actions-container {
        position: absolute !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 10 !important;
    }
    
    /* VISTA LISTA PC: Con favoritos (sesión iniciada) - MISMA POSICIÓN */
    .catalog.list-view .product-card .product-actions-container.with-favorites {
        top: 0.5rem !important;
        right: 0.5rem !important;
    }
    
    /* VISTA LISTA PC: Badges en esquina inferior derecha del CARD (fuera de la imagen) */
    .catalog.list-view .new-product-badge,
    .catalog.list-view .bajo-encargo-badge,
    .catalog.list-view .discount-badge,
    .catalog.list-view .agotado-badge {
        position: absolute !important;
        bottom: 0.5rem !important;
        right: 0.5rem !important;
        top: auto !important;
        left: auto !important;
    }
    
    /* Apilar badges verticalmente si hay múltiples */
    .catalog.list-view .product-card:has(.new-product-badge):has(.bajo-encargo-badge) .bajo-encargo-badge {
        bottom: 2.8rem !important;
    }
    
    .catalog.list-view .product-card:has(.agotado-badge):has(.new-product-badge) .new-product-badge,
    .catalog.list-view .product-card:has(.agotado-badge):has(.bajo-encargo-badge) .bajo-encargo-badge {
        bottom: 2.8rem !important;
    }
}

/* ===== MÓVIL - VISTA LISTA ===== */
@media (max-width: 768px) {
    /* VISTA LISTA MÓVIL: Botones en esquina superior derecha del CARD (fuera de la imagen) */
    .catalog.list-view .product-card .product-actions-container {
        position: absolute !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 10 !important;
    }
    
    /* VISTA LISTA MÓVIL: Con favoritos (sesión iniciada) - MISMA POSICIÓN */
    .catalog.list-view .product-card .product-actions-container.with-favorites {
        top: 0.5rem !important;
        right: 0.5rem !important;
    }
    
    /* VISTA LISTA MÓVIL: Badges en esquina inferior derecha del CARD (fuera de la imagen) */
    .catalog.list-view .new-product-badge,
    .catalog.list-view .bajo-encargo-badge,
    .catalog.list-view .discount-badge,
    .catalog.list-view .agotado-badge {
        position: absolute !important;
        bottom: 0.5rem !important;
        right: 0.5rem !important;
        top: auto !important;
        left: auto !important;
    }
    
    /* Apilar badges verticalmente si hay múltiples */
    .catalog.list-view .product-card:has(.new-product-badge):has(.bajo-encargo-badge) .bajo-encargo-badge {
        bottom: 2.3rem !important;
    }
    
    .catalog.list-view .product-card:has(.agotado-badge):has(.new-product-badge) .new-product-badge,
    .catalog.list-view .product-card:has(.agotado-badge):has(.bajo-encargo-badge) .bajo-encargo-badge {
        bottom: 2.3rem !important;
    }
}

/* ==================== FIN VISTA LISTA - POSICIONAMIENTO ESPECIAL ==================== */

/* ==================== MOBILE PRICE FILTER STYLES ==================== */
.price-range-inputs {
    display: flex;
    flex-direction: column;
}

.price-mode-switch-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.price-mode-switch-container label {
    font-size: 14px;
    font-weight: 600;
}

.price-mode-switch {
    display: flex;
    gap: 0;
    background: var(--bg-secondary, #f0f0f0);
    border-radius: 8px;
    padding: 4px;
    width: fit-content;
}

.price-mode-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-primary, #333);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 50px;
}

.price-mode-btn.active {
    background: #45a049;
    color: white;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.price-input-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.price-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 0;
    padding: 0;
    min-width: 120px;
    width: fit-content;
    height: 41px;
    background: transparent;
}

.price-input-wrapper .price-prefix,
.price-input-wrapper .price-suffix {
    color: #666;
    font-size: 14px;
}

.price-input-wrapper .price-prefix.hidden,
.price-input-wrapper .price-suffix.hidden {
    display: none;
}

.price-input {
    border: none;
    outline: none;
    padding: 0;
    width: 80px;
    font-size: 14px;
    background: transparent;
}

/* ==================== WELCOME MODAL ==================== */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.welcome-modal {
    background: var(--bg-primary, #fff);
    border-radius: 16px;
    padding: 32px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: scale(0.9);
    animation: scaleIn 0.3s ease forwards;
}

.welcome-modal-greeting {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 8px;
}

.welcome-modal-title {
    font-size: 28px;
    font-weight: 800;
    color: #45a049;
    margin-bottom: 20px;
}

.welcome-modal-message {
    font-size: 16px;
    color: var(--text-secondary, #666);
    margin-bottom: 28px;
    line-height: 1.5;
}

.welcome-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.welcome-modal-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.welcome-modal-btn-yes {
    background: #45a049;
    color: white;
}

.welcome-modal-btn-yes:hover {
    background: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.welcome-modal-btn-no {
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-primary, #333);
}

.welcome-modal-btn-no:hover {
    background: var(--border-color, #ddd);
    transform: translateY(-2px);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 767px) {
    .welcome-modal {
        padding: 24px;
        max-width: 340px;
    }
    
    .welcome-modal-greeting {
        font-size: 20px;
    }
    
    .welcome-modal-title {
        font-size: 24px;
    }
    
    .welcome-modal-message {
        font-size: 14px;
    }
    
    .welcome-modal-buttons {
        flex-direction: column;
    }
    
    .welcome-modal-btn {
        width: 100%;
    }
}


/* ==================== CHECKOUT SUMMARY ITEMS ==================== */
.checkout-summary-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
}

.checkout-summary-item {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.checkout-summary-item:last-child {
    border-bottom: none;
}

.checkout-summary-item-image {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.checkout-summary-item-info {
    flex: 1;
    min-width: 0;
}

.checkout-summary-item-name {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.checkout-summary-item-details {
    font-size: 0.875rem;
    color: #757575;
    line-height: 1.4;
}

.checkout-summary-item-subtotal {
    font-weight: 700;
    font-size: 1.125rem;
    color: #333;
    flex-shrink: 0;
    text-align: right;
}



/* ==================== RECOMMENDATIONS SECTION ==================== */
.recommendations-section {
    margin-top: -16px;
    padding: 0 16px 32px 16px;
}

.recommendations-header {
    text-align: center;
    margin-bottom: 20px;
}

.recommendations-header h2 {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0;
}

.recommendations-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recommendations-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    position: relative;
    scroll-snap-type: x mandatory;
}

.recommendations-row::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.recommendation-card {
    position: relative;
    flex: 0 0 calc((100% - 24px) / 3);
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.recommendation-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.recommendation-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
    pointer-events: none;
}

.recommendation-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}

.recommendation-img.loading {
    filter: blur(10px);
}

/* Gradient overlay from bottom to top (35% to 0%) */
.recommendation-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
    pointer-events: none;
    z-index: 1;
    display: none; /* Disabled because we use .recommendation-gradient instead */
}

.recommendation-price {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    padding: 8px 16px;
    border-radius: 8px 8px 0px 0px;
    z-index: 2;
    font-weight: bold;
    color: #45a049;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Animation classes */
.recommendations-row.animating .recommendation-card {
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
.dark-mode .recommendations-header h2 {
    color: var(--text-primary);
}

.dark-mode .recommendation-price {
    background: #FFFFFF;
    color: #4CAF50;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .recommendations-section {
        padding: 0 12px 24px 12px;
    }
    
    .recommendations-header h2 {
        font-size: 20px;
    }
    
    .recommendations-row {
        gap: 8px;
    }
    
    .recommendation-card {
        flex: 0 0 calc((100% - 16px) / 3);
    }
    
    .recommendation-price {
        font-size: 13px;
        padding: 4px 12px;
    }
}

/* ===================================
   PRODUCT VARIATIONS SYSTEM
   =================================== */

/* Botón Vincular Productos en modal agregar/editar */
.link-variations-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.link-variations-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.link-variations-btn svg {
    width: 20px;
    height: 20px;
}

/* Contenedor de variaciones vinculadas en modal agregar/editar */
.linked-variations-container {
    margin-top: 1rem;
}

.linked-variations-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.linked-variations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.linked-variation-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    aspect-ratio: 1;
    border: 2px solid var(--border-color);
}

.linked-variation-card:hover {
    transform: scale(1.05);
}

.linked-variation-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.linked-variation-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    z-index: 2;
}

.linked-variation-remove:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Modal de selección de productos para vincular */
.variations-selection-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.variations-selection-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.variations-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
    flex-shrink: 0;
}

.variations-selection-header h3 {
    margin: 0;
    color: var(--text-color);
}

.variations-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.variations-close-btn:hover {
    background: var(--hover-bg);
}

.variations-controls {
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--border-color);
    flex-shrink: 0;
}

.variations-search-container {
    margin-bottom: 1rem;
}

.variations-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

.variations-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.variations-view-toggle {
    display: flex;
    gap: 0.5rem;
}

.variations-view-btn {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
}

.variations-view-btn.active {
    background: #45a049;
    color: white;
    border-color: #45a049;
}

.variations-products-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    min-height: 300px;
    max-height: calc(85vh - 250px);
}

.variations-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.variations-products-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.variation-product-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.variation-product-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.variation-product-card.selected {
    border-color: var(--primary-color);
    background: rgba(255, 215, 0, 0.1);
}

.variation-product-card-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.variation-product-card-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.variation-product-card-grid .product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.variation-product-card-grid .product-price {
    font-size: 0.8rem;
    color: var(--primary-color);
}

.variation-product-card-list {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.variation-product-card-list img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.variation-product-card-list .product-info {
    flex: 1;
}

.variation-product-card-list .product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.variation-product-card-list .product-price {
    font-size: 0.85rem;
    color: var(--primary-color);
}

.variations-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem;
    border-top: 2px solid var(--border-color);
    flex-shrink: 0;
    background: var(--modal-bg);
}

.variations-link-btn {
    padding: 0.75rem 2rem;
    background: green;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variations-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.variations-link-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sección de variaciones en modal de descripción de producto */
.product-variations-section {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.product-variations-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-variations-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.product-variation-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    aspect-ratio: 1;
    border: 2px solid var(--border-color);
}

.product-variation-card:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.product-variation-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .linked-variations-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-variations-section {
        margin: -0.25rem 0rem 0.5rem 0rem;
        padding: 0.4rem 0rem 1.4rem 0rem;
        border: none;
    }
    
    .product-variations-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .product-variations-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .variations-selection-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .variations-selection-header {
        padding: 1rem;
    }
    
    .variations-controls {
        padding: 1rem;
    }
    
    .variations-products-scroll-container {
        padding: 1rem;
    }
    
    .variations-actions {
        padding: 1rem;
    }
    
    .variations-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}






