/* Estilos específicos para la página de chat conversacional */

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configuración global para evitar desbordamiento */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    max-width: 100%;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #F9FAFB;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header del Chat */
.chat-page-header {
    background: white;
    border-bottom: 1px solid #E5E7EB;
    padding: 12px 0;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1007; /* Mayor que el buscador expandido (1006) */
    height: 80px;
    display: flex;
    align-items: center;
}

/* Botón del sidebar móvil */
.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.mobile-sidebar-toggle:hover {
    background: #F3F4F6;
}

.mobile-menu-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Botón de volver desktop */
.desktop-back-button {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.desktop-back-button:hover {
    background: #F3F4F6;
}

.desktop-back-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.6);
}

/* Botón de búsqueda móvil */
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.mobile-search-toggle:hover {
    background: #F3F4F6;
}

.mobile-search-toggle svg {
    width: 20px;
    height: 20px;
}

/* Logo solo visible en desktop */
.desktop-only {
    display: block;
}

.chat-header-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 20px;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6B7280;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 8px;
}

.back-button:hover {
    color: #374151;
    transform: scale(1.05);
}

.back-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(42%) sepia(8%) saturate(1200%) hue-rotate(200deg) brightness(95%) contrast(90%);
    transition: filter 0.2s ease;
}

.back-button:hover .back-icon {
    filter: brightness(0) saturate(100%) invert(18%) sepia(8%) saturate(1200%) hue-rotate(200deg) brightness(95%) contrast(90%);
}

.chat-logo {
    display: flex;
    align-items: center;
}

.chat-logo-image {
    height: 32px;
    width: auto;
}

/* Buscador en el header */
.chat-header-search {
    flex: 1;
    max-width: 800px; /* Aumentado de 600px a 800px */
    margin: 0 0 0 0px;
}

.header-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.2s ease;
}

.header-search-wrapper:focus-within {
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(0, 181, 106, 0.1);
}

.header-search-wrapper svg {
    margin-right: 14px;
    flex-shrink: 0;
}

.header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #374151;
    outline: none;
}

.header-search-input::placeholder {
    color: #9CA3AF;
}


/* Botón de carrito en el header */
.chat-header-right {
    display: flex;
    align-items: center;
    gap: 48px;
    flex-shrink: 0;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.delivery-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(27%) sepia(100%) saturate(2000%) hue-rotate(120deg) brightness(90%) contrast(90%);
}

.delivery-text {
    font-size: 1rem;
    font-weight: 600;
    color: #00B56B;
    white-space: nowrap;
}

.header-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 60px;
    height: 48px;
    padding: 0 12px;
    border: none;
    border-radius: 12px;
    background: #DDDFE8;
    color: #2B2845;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-cart-btn:hover {
    background: #C5C7D0;
    color: #2B2845;
}

/* Estado filled (con productos) */
.header-cart-btn.filled {
    background: #00B56B;
    color: #FFFFFF;
}

.header-cart-btn.filled:hover {
    background: #00A55A;
    color: #FFFFFF;
}

.cart-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(18%) sepia(8%) saturate(2000%) hue-rotate(200deg) brightness(95%) contrast(90%);
    transition: filter 0.2s ease;
}

/* Icono en estado filled */
.header-cart-btn.filled .cart-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.cart-count {
    background: transparent;
    color: #2B2845;
    font-size: 14px;
    font-weight: 600;
    min-width: auto;
    height: auto;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

/* Contador cuando el carrito tiene productos */
.header-cart-btn.filled .cart-count {
    color: #FFFFFF;
}


.chat-avatar {
    width: 48px;
    height: 48px;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-avatar-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(20%) sepia(100%) saturate(7500%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2B2845;
    margin: 0;
    line-height: 1.2;
}

.chat-subtitle {
    font-size: 0.875rem;
    color: #6B7280;
    margin: 0;
    line-height: 1.2;
}

/* Cuerpo del Chat */
.chat-page-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    margin-top: 80px; /* Espacio para el header fijo */
}

/* Estado Enable del Asistente */
.chat-enable-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: #F9FAFB;
    margin-left: 312px; /* Empieza desde el sidebar */
}

.enable-container {
    width: 100%;
    text-align: center;
}

.enable-content {
    padding: 0;
}

.enable-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    text-align: center;
}

.enable-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2B2845;
    margin: 0;
    line-height: 1.2;
}

.enable-subtitle {
    font-size: 1.125rem;
    color: #6B7280;
    margin: 0;
    line-height: 1.4;
}

.enable-search-container {
    margin-bottom: 32px;
}

.enable-search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.enable-search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 24px;
    padding: 16px 20px;
    gap: 12px;
    transition: all 0.3s ease;
}

.enable-search-input-wrapper:focus-within {
    border-color: #00B56B;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}


.enable-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: #374151;
    line-height: 1.4;
}

.enable-search-input::placeholder {
    color: #9CA3AF;
}

.enable-send-btn {
    width: 48px;
    height: 48px;
    background: #00B56B;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.enable-send-btn:hover {
    background: #00B56B;
    transform: scale(1.05);
}

.enable-send-btn:active {
    transform: scale(0.95);
}

.enable-send-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.enable-suggestions {
    margin-top: 24px;
}

.enable-suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.enable-suggestion-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
}

.enable-suggestion-chip:hover {
    background: #F3F4F6;
    border-color: #00B56B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.enable-chip-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) saturate(100%) invert(40%) sepia(8%) saturate(1000%) hue-rotate(200deg) brightness(95%) contrast(85%);
}

.chat-container {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-left: 312px; /* Empieza desde el sidebar */
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

/* Mensajes */
.message {
    display: flex;
    flex-direction: column;
    max-width: 90%;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    align-self: flex-end;
    align-items: flex-end;
}

.bot-message {
    align-self: flex-start;
    align-items: flex-start;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-left: 24px; /* 24px del sidebar */
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
}

.user-message .message-content {
    background: #00B56B;
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-message .message-content {
    background: white;
    color: #374151;
    border-bottom-left-radius: 4px;
    border: 1px solid #E5E7EB;
}

.message-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 4px;
    padding: 0 4px;
}

.message-avatar {
    width: 24px;
    height: 24px;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
}

.bot-avatar-icon {
    width: 12px;
    height: 12px;
    filter: brightness(0) saturate(100%) invert(20%) sepia(100%) saturate(7500%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

/* Typing Indicator */
.typing-indicator .message-content {
    background: #F3F4F6;
    padding: 12px 16px;
    display: inline-block;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: #9CA3AF;
    border-radius: 50%;
    animation: typing-bounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    } 40% {
        transform: scale(1.0);
    }
}
/* Sugerencias */
.chat-suggestions {
    padding: 0 20px 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.chat-suggestions.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    margin-bottom: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.suggestion-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
}

.suggestion-chip:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chip-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(40%) sepia(8%) saturate(1000%) hue-rotate(200deg) brightness(95%) contrast(85%);
}

/* Footer del Chat */
.chat-page-footer {
    background: white;
    border-top: 1px solid #E5E7EB;
    padding: 20px 20px 20px 0;
    flex-shrink: 0;
    margin-left: 312px; /* Empieza desde el sidebar */
}

.chat-input-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    padding: 12px 16px;
    gap: 8px;
    transition: all 0.2s ease;
}

.chat-input-wrapper:focus-within {
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.chat-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.4;
}

.chat-input::placeholder {
    color: #9CA3AF;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: #00B56B;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #00B56B;
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-send-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-page-header {
        padding: 8px 0;
        height: 80px;
    }
    
    .chat-header-container {
        padding: 0 12px;
        width: 100%;
        gap: 12px;
    }
    
    .chat-header-left {
        gap: 12px;
    }
    
    .header-cart-btn {
        min-width: 56px;
        height: 44px;
        padding: 0 10px;
    }
    
    .delivery-text {
        font-size: 0.875rem;
    }
    
    .delivery-icon {
        width: 18px;
        height: 18px;
    }
    
    /* Buscador en header responsive */
    .chat-header-search {
        margin: 0 0 0 0px;
        max-width: none;
    }
    
    .header-search-wrapper {
        padding: 12px 14px;
    }
    
    .header-search-input {
        font-size: 14px;
    }
    
    .back-button {
        padding: 6px;
    }
    
    .chat-logo-image {
        height: 28px;
    }
    
    .chat-avatar-icon {
        width: 20px;
        height: 20px;
    }
    
    .chat-title {
        font-size: 1.125rem;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .chat-suggestions {
        padding: 0 16px 16px;
    }
    
    .chat-page-footer {
        padding: 16px 16px 16px 0;
    }
    
    .suggestion-chips {
        gap: 6px;
    }
    
    .suggestion-chip {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .chip-icon {
        width: 14px;
        height: 14px;
    }
    
    .message {
        max-width: 85%;
    }
    
    /* Responsive para estado Enable */
    .chat-enable-state {
        padding: 40px 20px;
    }
    
    .enable-content {
        padding: 0;
    }
    
    .enable-header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 24px;
        text-align: center;
    }
    
    .enable-title {
        font-size: 1.5rem;
    }
    
    .enable-subtitle {
        font-size: 1rem;
    }
    
    .enable-search-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    
    .enable-search-input-wrapper {
        padding: 14px 18px;
    }
    
    .enable-send-btn {
        width: 44px;
        height: 44px;
    }
    
    .enable-suggestion-chips {
        gap: 8px;
    }
    
    .enable-suggestion-chip {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .chat-page-header {
        padding: 6px 0;
        height: 80px;
    }
    
    .chat-header-container {
        padding: 0 8px;
        width: 100%;
        gap: 8px;
    }
    
    .chat-header-left {
        gap: 10px;
    }
    
    .header-cart-btn {
        min-width: 52px;
        height: 40px;
        padding: 0 8px;
    }
    
    .delivery-text {
        font-size: 0.8rem;
    }
    
    .delivery-icon {
        width: 16px;
        height: 16px;
    }
    
    .chat-header-right {
        gap: 36px;
    }
    
    .cart-count {
        font-size: 12px;
        min-width: auto;
        height: auto;
        border-radius: 0;
    }
    
    /* Buscador en header responsive para móviles pequeños */
    .chat-header-search {
        margin: 0 0 0 0px;
    }
    
    .header-search-wrapper {
        padding: 10px 12px;
    }
    
    .header-search-input {
        font-size: 13px;
    }
    
    .header-search-wrapper svg {
        width: 16px;
        height: 16px;
        margin-right: 10px;
    }
    
    .back-button {
        padding: 4px;
    }
    
    .chat-logo-image {
        height: 24px;
    }
    
    .chat-avatar-icon {
        width: 18px;
        height: 18px;
    }
    
    .chat-title {
        font-size: 1rem;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .chat-suggestions {
        padding: 0 12px 12px;
    }
    
    .chat-page-footer {
        padding: 12px 12px 12px 0;
    }
    
    .suggestion-chips {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .suggestion-chip {
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.875rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    /* Responsive para estado Enable en móvil */
    .chat-enable-state {
        padding: 30px 16px;
    }
    
    .enable-content {
        padding: 0;
    }
    
    .enable-header {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .enable-title {
        font-size: 1.25rem;
    }
    
    .enable-subtitle {
        font-size: 0.875rem;
    }
    
    .enable-search-input-wrapper {
        padding: 12px 16px;
    }
    
    .enable-send-btn {
        width: 40px;
        height: 40px;
    }
    
    .enable-suggestion-chips {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .enable-suggestion-chip {
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.875rem;
    }
}

/* Scrollbar personalizado */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Sidebar */
.chat-sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #DDDDE8;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh; /* Altura total de la pantalla */
    position: fixed; /* Cambiar a fixed para que llegue hasta abajo */
    top: 0; /* Desde la parte superior */
    left: 0; /* Desde la parte izquierda */
    z-index: 100; /* Asegurar que esté por encima del contenido */
}

.sidebar-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Espacio para el header principal */
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #F0F0F3;
    flex-shrink: 0;
}

/* Botón de volver móvil */
.mobile-back-button {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.mobile-back-button:hover {
    background: #E5E7EB;
    color: #1F2937;
}

.mobile-back-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.sidebar-new-chat-btn {
    width: 100%;
    height: 60px;
    background: #E5F8F0;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 16px;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #00B56B;
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-new-chat-btn:hover {
    background: #D1F2E8;
    transform: translateY(-1px);
}

.sidebar-new-chat-btn:active {
    transform: translateY(0);
}

.sidebar-new-chat-btn.selected {
    background: #00B56B;
    color: white;
}

.sidebar-new-chat-btn.selected .btn-title,
.sidebar-new-chat-btn.selected .btn-subtitle {
    color: white;
}

.sidebar-new-chat-btn.selected .sidebar-robot-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.sidebar-robot-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1352%) hue-rotate(87deg) brightness(119%) contrast(119%);
    flex-shrink: 0;
}

.btn-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.btn-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: #00B56B;
    line-height: 1.2;
}

.btn-subtitle {
    font-weight: 400;
    font-size: 0.75rem;
    color: #00B56B;
    line-height: 1.2;
    opacity: 0.8;
}

.sidebar-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2B2845;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.sidebar-search {
    margin-bottom: 16px;
}

.sidebar-search .search-input-wrapper {
    width: 100%;
    height: 40px;
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    transition: all 0.2s ease;
}

.sidebar-search .search-input-wrapper:focus-within {
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.sidebar-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: #374151;
}

.sidebar-search-input::placeholder {
    color: #9CA3AF;
}

.sidebar-categories {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    width: 100%;
    height: 63px;
    background: transparent;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.category-item:hover {
    background: #F8F9FA;
    transform: translateY(-1px);
}

.category-item:active {
    transform: translateY(0);
}

.category-item.selected {
    background: #E5E7EB;
}

.category-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    font-size: inherit !important;
    color: inherit !important;
}

.category-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.category-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.category-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #666A8F;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-description {
    font-size: 0.75rem;
    color: #666B8A;
    line-height: 1.2;
    margin: 0;
    opacity: 0.8;
}

.category-arrow {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Formulario de información del usuario */
.user-info-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1008; /* Mayor que el header (1007) para que quede por encima */
    padding: 20px;
}

.user-info-form {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2B2845;
    margin: 0 0 8px 0;
}

.form-header p {
    font-size: 16px;
    color: #6B7280;
    margin: 0;
}

.user-info-form .form-group {
    margin-bottom: 24px;
}

.user-info-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.user-info-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 16px;
    color: #374151;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.user-info-form input:focus {
    outline: none;
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(0, 181, 107, 0.1);
}

.user-info-form input:invalid {
    border-color: #EF4444;
}

.user-info-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 16px;
    color: #374151;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.user-info-form select:focus {
    outline: none;
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(0, 181, 107, 0.1);
}

.user-info-form select:invalid {
    border-color: #EF4444;
}

.user-info-form select option {
    padding: 8px 12px;
    color: #374151;
    background: white;
}

.user-info-form select option:hover {
    background: #F3F4F6;
}

.form-actions {
    margin-top: 32px;
    text-align: center;
}

.user-info-form .btn {
    background: #00B56B;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info-form .btn:hover {
    background: #00A55A;
    transform: translateY(-1px);
}

.user-info-form .btn:active {
    transform: translateY(0);
}

/* Responsive para el formulario */
@media (max-width: 768px) {
    .user-info-form {
        padding: 24px;
        margin: 20px;
    }
    
    .user-info-form .btn {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-header h3 {
        font-size: 20px;
    }
    
    .form-header p {
        font-size: 14px;
    }
}

/* Responsive para el sidebar */
@media (max-width: 1024px) {
    .chat-sidebar {
        width: 240px;
    }
    
    .sidebar-header {
        padding: 16px;
    }
    
    .sidebar-content {
        padding: 16px;
    }
}

/* Desktop - mostrar botón de volver */
@media (min-width: 769px) {
    .desktop-back-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .sidebar-new-chat-btn {
        height: 50px;
        font-size: 0.8rem;
        padding: 0 12px;
    }
    
    .btn-title {
        font-size: 0.8rem;
    }
    
    .btn-subtitle {
        font-size: 0.7rem;
    }
    
    .category-item {
        height: 56px;
        padding: 0 12px;
        gap: 10px;
    }
    
    .category-name {
        font-size: 0.8rem;
    }
    
    .category-description {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    /* Mostrar botón del sidebar móvil */
    .mobile-sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    /* Ocultar logo en móvil */
    .desktop-only {
        display: none !important;
    }
    
    /* Mostrar botón de volver en sidebar móvil */
    .mobile-back-button {
        display: flex !important;
    }
    
    .chat-sidebar {
        position: fixed;
        top: 0;
        right: 24px; /* 24px del margen derecho */
        bottom: 0;
        width: calc(100% - 24px); /* Ancho total menos 24px del margen derecho */
        max-width: 300px; /* Ancho máximo más amplio */
        background: white;
        box-shadow: -4px 0 18px rgba(47, 43, 61, 0.16);
        z-index: 1020; /* Mayor que todo (header, modal, cart) para estar por encima de todo */
        transform: translateX(100%); /* Empieza fuera de la pantalla a la derecha */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        overflow-y: auto;
    }
    
    .chat-sidebar.open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    /* Estilos del menú móvil como en index.html */
    .sidebar-container {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar-header {
        padding: 0 16px 12px 16px; /* Sin padding superior para que el contenido ocupe todo el espacio */
        border-bottom: 1px solid #E5E7EB;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .mobile-back-button {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #2B2845;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        padding: 8px 0 0 0; /* 8px de padding superior para el espaciado */
        margin: 0; /* Sin margen */
        transition: color 0.2s ease;
        background: none; /* Quitar cualquier fondo */
        border: none; /* Quitar cualquier borde */
    }
    
    .mobile-back-button:hover {
        color: var(--primary-color);
    }
    
    .mobile-back-icon {
        width: 20px;
        height: 20px;
    }
    
    .sidebar-new-chat-btn {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        background: #F9FAFB;
        border: 1px solid #E5E7EB;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        width: 100%;
    }
    
    .sidebar-new-chat-btn:hover {
        background: #F3F4F6;
        border-color: #D1D5DB;
    }
    
    .sidebar-robot-icon {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }
    
    .btn-text-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .btn-title {
        font-size: 14px;
        font-weight: 600;
        color: #2B2845;
    }
    
    .btn-subtitle {
        font-size: 12px;
        color: #6B7280;
    }
    
    .sidebar-content {
        flex: 1;
        padding: 16px;
        overflow-y: auto;
    }
    
    .sidebar-title {
        font-size: 18px;
        font-weight: 600;
        color: #2B2845;
        margin-bottom: 16px;
    }
    
    .sidebar-categories {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .category-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        background: none;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: left;
        width: 100%;
    }
    
    .category-item:hover {
        background: #F3F4F6;
    }
    
    .category-item.selected {
        background: #E5F8F0;
        border: 1px solid #00B56B;
    }
    
    .category-icon {
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .category-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .category-name {
        font-size: 14px;
        font-weight: 500;
        color: #2B2845;
    }
    
    .category-description {
        font-size: 12px;
        color: #6B7280;
    }
    
    .chat-page-body {
        flex-direction: column;
        margin-top: 80px; /* Mantener espacio para header */
    }
    
    /* Header móvil - ocultar logo y mostrar solo sidebar */
    .chat-logo {
        display: none !important;
    }
    
    .mobile-sidebar-toggle {
        display: flex !important;
    }
    
    /* Buscador móvil - solo mostrar botón de lupa */
    .header-search-wrapper {
        display: none !important;
    }
    
    .mobile-search-toggle {
        display: flex !important;
    }
    
    /* Ocultar información de entrega */
    .delivery-info {
        display: none !important;
    }
    
    /* Buscador expandido en móvil */
    .chat-header-search.expanded .header-search-wrapper {
        display: flex !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #E5E7EB;
        border-radius: 8px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 1006; /* Mayor que el cart drawer (1005) para estar por encima de todo */
        margin: 8px;
        padding: 12px;
    }
    
    .chat-header-search.expanded .mobile-search-toggle {
        display: none !important;
    }
    
    .chat-header-search.expanded .header-search-input {
        width: 100%;
        border: none;
        outline: none;
        font-size: 16px;
        padding: 8px 12px;
        background: #F9FAFB;
        border-radius: 6px;
        margin-right: 8px;
    }
    
    .chat-header-search.expanded .search-send-btn {
        background: #00B56B;
        border: none;
        border-radius: 6px;
        padding: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s ease;
    }
    
    .chat-header-search.expanded .search-send-btn:hover {
        background: #00A05A;
    }
    
    .chat-header-search.expanded .search-send-btn svg {
        width: 16px;
        height: 16px;
        stroke: white;
    }
    
    .chat-container {
        max-width: none;
        margin: 0; /* Reset margin en móvil */
    }
    
    .chat-enable-state {
        margin-left: 0; /* Reset margin en móvil */
    }
    
    .chat-page-footer {
        margin-left: 0; /* Reset margin en móvil */
    }
    
    .bot-message {
        margin-left: 0; /* Reset margin en móvil */
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6); /* Opacidad del 60% como en index.html */
        z-index: 1002; /* Mayor que el catálogo (1002) pero menor que el sidebar (1003) */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 480px) {
    .chat-sidebar {
        right: 24px; /* 24px del margen derecho */
        width: calc(100% - 24px); /* Mantener 24px del margen derecho */
        max-width: 300px; /* Ancho máximo consistente */
    }
    
    .sidebar-header {
        padding: 0 12px 12px 12px; /* Sin padding superior para que el contenido ocupe todo el espacio */
    }
    
    .sidebar-content {
        padding: 12px;
    }
    
    .sidebar-new-chat-btn {
        height: 45px;
        font-size: 0.75rem;
        padding: 0 10px;
    }
    
    .btn-title {
        font-size: 0.75rem;
    }
    
    .btn-subtitle {
        font-size: 0.65rem;
    }
    
    .category-item {
        height: 50px;
        padding: 0 10px;
        gap: 8px;
    }
    
    .category-name {
        font-size: 0.75rem;
    }
    
    .category-description {
        font-size: 0.65rem;
    }
}

/* Sección de Catálogo - Actualizado 2024-12-20 12:34:56 */
.catalog-section {
    flex: 1;
    background: white;
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-left: 312px;
    width: calc(100% - 312px); /* Asegurar ancho correcto */
    height: calc(100vh - 80px); /* Altura completa menos header */
}

.catalog-section.active {
    display: flex;
}

/* Ocultar el chat cuando el catálogo está activo */
.catalog-section.active ~ .chat-enable-state,
.catalog-section.active ~ .chat-container {
    display: none !important;
}

/* Ocultar el footer del chat cuando el catálogo está activo */
.catalog-section.active ~ .chat-page-footer {
    display: none !important;
}


.catalog-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Título de la página del catálogo */
.catalog-page-title {
    margin-bottom: 24px;
}

.catalog-page-title h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2B2845;
    margin: 0;
    line-height: 1.2;
}

/* Buscador del catálogo */
.catalog-search {
    margin-bottom: 24px;
}

.search-container {
    max-width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-input-wrapper svg {
    margin-right: 12px;
    flex-shrink: 0;
}

.catalog-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #374151;
    background: transparent;
}

.catalog-search-input::placeholder {
    color: #9CA3AF;
}

/* Tab bar de categorías */
.catalog-tabs {
    margin-bottom: 24px;
}

.tabs-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab-item {
    flex-shrink: 0;
    padding: 8px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 20px;
    background: white;
    color: #6B7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-item:hover {
    border-color: #00B56B;
    color: #00B56B;
}

.tab-item.active {
    background: #00B56B;
    border-color: #00B56B;
    color: white;
}

/* Título de la categoría actual */
.catalog-category-title {
    margin-bottom: 24px;
}

.catalog-category-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2B2845;
    margin: 0;
}

.catalog-filters {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background: white;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* Estructura de subcategorías */
.catalog-sections {
    display: flex;
    flex-direction: column;
    gap: 48px;
    width: 100%;
    box-sizing: border-box;
}

.catalog-subsection {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

.subsection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2B2845;
    margin: 0;
}

.view-all-btn {
    background: none;
    color: #00B56B;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all-btn:hover {
    color: #00A55A;
    transform: none;
}

.view-all-arrow {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(27%) sepia(100%) saturate(2000%) hue-rotate(120deg) brightness(90%) contrast(90%);
    transition: all 0.2s ease;
}

.view-all-btn:hover .view-all-arrow {
    filter: brightness(0) saturate(100%) invert(30%) sepia(100%) saturate(2000%) hue-rotate(120deg) brightness(90%) contrast(90%);
}

.subsection-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* Cards de Productos - Estilo Instacart */
.product-card.instacart-style {
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: none;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.product-card.instacart-style:hover {
    transform: none;
    box-shadow: none;
}

/* Estilos adicionales para product-card.instacart-style */
.product-card.instacart-style .product-info {
    padding: 12px;
}

.product-card.instacart-style .product-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2B2845;
    margin: 0 0 4px 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card.instacart-style .product-description {
    font-size: 0.75rem;
    color: #6A6A8A;
    line-height: 1.3;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card.instacart-style .product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.product-card.instacart-style .current-price {
    font-size: 1.25rem; /* 20px - aumentado 3 puntos desde 1rem (16px) */
    font-weight: 700;
    color: #00B56B;
}

.product-card.instacart-style .original-price {
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    color: #999;
    text-decoration: line-through;
}

.product-card.instacart-style .product-current-price {
    font-size: 1rem;
    font-weight: 700;
    color: #00B56B;
}

.product-card.instacart-style .product-original-price {
    font-size: 0.875rem;
    color: #9CA3AF;
    text-decoration: line-through;
}

.product-card.instacart-style .product-discount {
    background: #FF0036;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-card.instacart-style .product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #FF0036;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 5;
}

.product-card.instacart-style .product-image {
    position: relative;
    width: 100%;
    height: 120px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.product-card.instacart-style .product-placeholder {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.6;
}

.product-card.instacart-style .product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding: 12px;
}

.product-card.instacart-style .product-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-card.instacart-style .product-btn-primary {
    background: #00B56B;
    color: white;
}

.product-card.instacart-style .product-btn-primary:hover {
    background: #00A55A;
}

.product-card.instacart-style .product-btn-secondary {
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #E5E7EB;
}

.product-card.instacart-style .product-btn-secondary:hover {
    background: #E5E7EB;
}

/* Contenedor de imagen con botón superpuesto */
.product-image-container {
    position: relative;
    width: 100%;
    height: 160px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    box-sizing: border-box;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    box-sizing: border-box;
}

/* Quantity Selector */
.quantity-selector {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    box-sizing: border-box;
}

/* Botón inicial Add */
.quantity-btn.initial-btn {
    background: #00B56B;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 181, 106, 0.3);
    transition: all 0.3s ease;
    min-width: 80px;
    justify-content: center;
}

.quantity-btn.initial-btn:hover {
    background: #00A55A;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 181, 106, 0.4);
    min-width: 120px;
}

/* El texto del botón se cambiará con JavaScript en el hover */

.add-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.add-text {
    font-size: 0.75rem;
}

/* Controles de cantidad */
.quantity-controls {
    background: #00B56B;
    border: 2px solid #00B56B;
    border-radius: 20px;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 181, 106, 0.3);
    animation: expandQuantity 0.3s ease-out;
    min-width: 120px;
    justify-content: space-between;
}

.quantity-control-btn {
    background: transparent;
    border: none;
    border-radius: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.quantity-control-btn:hover {
    background: transparent;
    transform: scale(1.1);
}

.quantity-number {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 20px;
    text-align: center;
}

.trash-icon, .minus-icon, .plus-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.hover-state {
    min-width: 120px !important;
}

.hover-state .add-text::after {
    content: " a carrito";
}

@keyframes expandQuantity {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Botones de acción */
.quantity-btn.action-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.quantity-btn.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.quantity-btn.delete-btn {
    color: white;
}

.quantity-btn.decrease-btn {
    color: white;
}

.quantity-btn.add-btn {
    color: white;
}

/* Display de cantidad */
.quantity-display {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    min-width: 20px;
    text-align: center;
}

/* Íconos del quantity selector */
.quantity-btn .icon {
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
}

/* Estado "filled" del botón inicial */
.quantity-btn.initial-btn.filled-state {
    background: #00B56B;
    color: white;
}

.quantity-btn.initial-btn.filled-state:hover {
    background: #00A55A;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 181, 106, 0.4);
}

/* Badge de producto */
.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #FF0036;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 5;
}

/* Precio estilo Instacart */
.product-price {
    margin: 12px 0 8px 0;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.price-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2B2845;
    line-height: 1;
}

.price-cents {
    font-size: 1rem;
    font-weight: 600;
    color: #2B2845;
    vertical-align: top;
}

/* Nombre del producto */
.product-name {
    font-size: 0.8rem;
    font-weight: 400;
    color: #374151;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

/* Rating con estrellas */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.stars {
    display: flex;
    gap: 1px;
}

.star {
    font-size: 0.875rem;
    color: #D1D5DB;
}

.star.filled {
    color: #FCD34D;
}

.star.half {
    color: #FCD34D;
    opacity: 0.5;
}

.rating-count {
    font-size: 0.75rem;
    color: #6B7280;
}

/* Tamaño del producto */
.product-size {
    font-size: 0.75rem;
    color: #6B7280;
    margin: 0;
}

/* Responsive para cards estilo Instacart */
@media (max-width: 1200px) {
    .subsection-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 14px;
    }
}

@media (max-width: 992px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .subsection-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .subsection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-image-container {
        height: 140px;
    }
    
    .product-image {
        padding: 10px;
    }
    
    .quantity-btn.initial-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .add-text {
        font-size: 0.7rem;
    }
    
    .quantity-btn.action-btn {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .quantity-display {
        font-size: 0.8rem;
    }
    
    .price-main {
        font-size: 1.25rem;
    }
    
    .price-cents {
        font-size: 0.875rem;
    }
    
    .product-name {
        font-size: 0.75rem;
        min-height: 2.4em;
    }
    
    .star {
        font-size: 0.8rem;
    }
    
    .rating-count {
        font-size: 0.7rem;
    }
    
    .product-size {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .product-image-container {
        height: 160px;
    }
    
    .product-image {
        padding: 10px;
    }
    
    .quantity-btn.initial-btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    .add-icon {
        width: 14px;
        height: 14px;
    }
    
    .add-text {
        font-size: 0.65rem;
    }
    
    .quantity-btn.action-btn {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .quantity-display {
        font-size: 0.75rem;
    }
    
    .price-main {
        font-size: 1.125rem;
    }
    
    .price-cents {
        font-size: 0.8rem;
    }
}

/* Cards de Productos en Chat */
.chat-product-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 12px 0;
}

/* Estilos para las cards de productos del catálogo */
.product-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    position: relative;
    border: 1px solid #E5E7EB;
    transition: all 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 160px;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.6;
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #FF0036;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 5;
}

.product-info {
    padding: 0;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2B2845;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.product-description {
    font-size: 0.875rem;
    color: #6A6A8A;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.product-current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00B56B;
}

.product-original-price {
    font-size: 1rem;
    color: #9CA3AF;
    text-decoration: line-through;
}

.product-discount {
    background: #FF0036;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.product-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-btn-primary {
    background: #00B56B;
    color: white;
}

.product-btn-primary:hover {
    background: #00A55A;
}

.product-btn-secondary {
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #E5E7EB;
}

.product-btn-secondary:hover {
    background: #E5E7EB;
}

.chat-product-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.chat-product-card:hover {
    border-color: #00B56B;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
}

.chat-product-image {
    width: 100%;
    height: 100px;
    background: #F3F4F6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-size: 0.75rem;
    margin-bottom: 8px;
    overflow: hidden;
}

.chat-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.chat-product-placeholder {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.6;
    border-radius: 6px;
}

.chat-product-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2B2845;
    margin: 0 0 4px 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-product-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: #00B56B;
    margin: 0;
}

.chat-product-price-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-product-original-price {
    font-size: 0.7rem;
    color: #9CA3AF;
    text-decoration: line-through;
    margin: 0;
}

.chat-product-discount {
    font-size: 0.65rem;
    color: #FF0036;
    font-weight: 600;
    margin: 0;
}

.product-badge-mini {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #FF0036;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 500;
    z-index: 1;
}

.chat-product-image {
    position: relative;
}

/* Responsive para catálogo */
@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 14px;
    }
    
    .catalog-content {
        padding: 20px;
    }
    
    .catalog-filters {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .catalog-section {
        position: fixed;
        top: 80px; /* Dejar espacio para el header */
        left: 0;
        width: 100%;
        height: calc(100vh - 80px); /* Altura total menos el header */
        z-index: 1001; /* Menor que el overlay (1002) para que la opacidad cubra el catálogo */
        background: white;
        margin-left: 0 !important;
    }
    
    .catalog-section.active {
        display: flex !important;
    }
    
    /* Ocultar completamente el chat en móvil cuando el catálogo está activo */
    .catalog-section.active ~ .chat-enable-state,
    .catalog-section.active ~ .chat-container {
        display: none !important;
    }
    
    /* Ocultar el footer del chat cuando el catálogo está activo */
    .catalog-section.active ~ .chat-page-footer {
        display: none !important;
    }
    
    
    .catalog-content {
        padding: 16px !important;
        margin-left: 0;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }
    
    .chat-header-container {
        padding: 0 12px !important;
        gap: 12px !important;
    }
    
    .header-search-wrapper {
        min-width: 0 !important;
        flex: 1 !important;
    }
    
    .header-search-input {
        min-width: 0 !important;
        width: 100% !important;
    }
    
    .catalog-page-title {
        margin-bottom: 16px;
        margin-left: 0;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .catalog-page-title h1 {
        font-size: 1.5rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    .catalog-search {
        margin-bottom: 16px;
        margin-left: 0;
    }
    
    .search-input-wrapper {
        padding: 10px 14px;
    }
    
    .catalog-search-input {
        font-size: 14px;
    }
    
    .catalog-tabs {
        margin-bottom: 16px;
        margin-left: 0;
    }
    
    .tabs-container {
        gap: 6px;
    }
    
    .tab-item {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .catalog-category-title {
        margin-bottom: 16px;
    }

    .catalog-category-title h2 {
        font-size: 1.5rem;
    }

    .catalog-filters {
        flex-direction: column;
        gap: 16px;
        margin-left: 0;
    }

    .catalog-sections {
        gap: 40px;
    }

    .subsection-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 20px;
    }

    .subsection-title {
        font-size: 1.25rem;
    }

    .subsection-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .chat-product-cards {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Responsive para cards de productos del catálogo */
    .product-card {
        min-width: auto !important;
        padding: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-image {
        height: 120px;
        margin-bottom: 8px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-name {
        font-size: 0.875rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-description {
        font-size: 0.8rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-current-price {
        font-size: 1.125rem;
    }
    
    .product-original-price {
        font-size: 0.875rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .product-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    /* Responsive para product-card.instacart-style */
    .product-card.instacart-style {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        flex-shrink: 1 !important;
    }
    
    .product-card.instacart-style .product-info {
        padding: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        flex-shrink: 1 !important;
    }
    
    .product-card.instacart-style .product-image-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .product-card.instacart-style .product-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        object-fit: cover !important;
    }
    
    .product-card.instacart-style .product-name {
        font-size: 0.8rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-card.instacart-style .product-description {
        font-size: 0.7rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-card.instacart-style .product-current-price {
        font-size: 0.9rem !important;
    }
    
    .product-card.instacart-style .product-original-price {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .subsection-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .catalog-content {
        padding: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .catalog-page-title {
        margin-bottom: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .catalog-page-title h1 {
        font-size: 1.25rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 0.875rem;
    }
    
    .product-description {
        font-size: 0.8rem;
    }
    
    /* Responsive para cards de productos en móviles pequeños */
    .product-card {
        padding: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-image {
        height: 100px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-name {
        font-size: 0.8rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-description {
        font-size: 0.75rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-current-price {
        font-size: 1rem;
    }
    
    .product-original-price {
        font-size: 0.8rem;
    }
    
    .product-btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    /* Responsive para product-card.instacart-style en móviles pequeños */
    .product-card.instacart-style {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        flex-shrink: 1 !important;
    }
    
    .product-card.instacart-style .product-info {
        padding: 4px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        flex-shrink: 1 !important;
    }
    
    .product-card.instacart-style .product-image-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .product-card.instacart-style .product-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        object-fit: cover !important;
    }
    
    .product-card.instacart-style .product-name {
        font-size: 0.75rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-card.instacart-style .product-description {
        font-size: 0.65rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-card.instacart-style .product-current-price {
        font-size: 0.85rem !important;
    }
    
    .product-card.instacart-style .product-original-price {
        font-size: 0.75rem !important;
    }
}

/* Product Detail Modal */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1008; /* Mayor que el header (1007) para que quede por encima */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1007; /* Por debajo del modal pero por encima del header */
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1009; /* Por encima de la opacidad (1007) */
}

/* Estilos específicos para desktop */
@media (min-width: 769px) {
    .product-modal {
        z-index: 1008; /* Asegurar que esté por encima del header */
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px 20px; /* Más padding en desktop */
    }
    
    .modal-content {
        max-width: 1200px;
        width: 100%;
        max-height: 85vh; /* Altura máxima en desktop */
        margin: 0 auto; /* Centrado horizontal */
        position: relative;
        top: 0; /* Centrado vertical */
        transform: none; /* Sin transformaciones adicionales */
    }
    
    .modal-overlay {
        z-index: 1007; /* Por debajo del modal pero por encima del header */
    }
    
    .modal-content {
        z-index: 1009; /* Por encima de la opacidad */
    }
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 16px 20px;
    border-bottom: 1px solid #E5E7EB;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-close-btn {
    background: #F3F4F6;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6B7280;
}

.modal-close-btn:hover {
    background: #E5E7EB;
    color: #374151;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Modal Product Detail Styles */
.modal-product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 20px;
    min-height: 500px;
}

.modal-product-images {
    display: flex;
    gap: 16px;
}

.modal-image-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 60px;
}

.modal-thumbnail {
    width: 60px;
    height: 60px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-thumbnail:hover {
    border-color: #00B56B;
}

.modal-thumbnail.active {
    border-color: #00B56B;
    box-shadow: 0 0 0 2px rgba(0, 181, 107, 0.2);
}

.modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block !important;
    visibility: visible !important;
}

.modal-main-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 12px;
    min-height: 400px;
    padding: 20px;
}

.modal-main-product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: block !important;
    visibility: visible !important;
}

.modal-product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-product-title {
    font-size: 24px;
    font-weight: 600;
    color: #2B2845;
    line-height: 1.3;
    margin: 0;
}

.modal-current-price {
    font-size: 32px;
    font-weight: 700;
    color: #00B56B;
    margin: 0 0 24px 0;
}

.modal-purchase-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.modal-quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    margin-bottom: 20px;
}

.modal-quantity-btn {
    background: #f8f9fa;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid #e9ecef;
}

.modal-quantity-btn:last-child {
    border-right: none;
    border-left: 1px solid #e9ecef;
}

.modal-quantity-btn:hover {
    background: #e9ecef;
    color: #00B56B;
}

.modal-quantity-btn:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
}

.modal-quantity-input {
    border: none;
    width: 60px;
    height: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    background: white;
    outline: none;
}

.modal-quantity-input:focus {
    background: #f8f9fa;
}

.modal-quantity-input::-webkit-outer-spin-button,
.modal-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.modal-quantity-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.modal-quantity-dropdown {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    background: white;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.modal-quantity-dropdown:focus {
    border-color: #00B56B;
}

.modal-quantity-dropdown:hover {
    border-color: #00B56B;
}

.modal-btn-add-cart {
    background: #00B56B;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

.modal-btn-add-cart:hover {
    background: #008a52;
}

.modal-btn-add-cart:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.modal-btn-continue-shopping {
    background: transparent;
    color: #00B56B;
    border: 2px solid #00B56B;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 12px;
}

.modal-btn-continue-shopping:hover {
    background: #00B56B;
    color: white;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .product-modal {
        z-index: 1004; /* Asegurar que esté por encima del catálogo (1001) */
        padding: 0; /* Eliminar padding para usar toda la pantalla */
    }
    
    .modal-content {
        max-height: 100vh; /* Usar toda la altura de la pantalla */
        margin: 0; /* Sin márgenes para pantalla completa */
        border-radius: 0; /* Sin bordes redondeados en móvil */
        width: 100%;
        height: 100%;
    }
    
    .modal-product-detail-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
        min-height: calc(100vh - 80px); /* Altura total menos el header del modal */
    }
    
    .modal-product-images {
        flex-direction: column;
    }
    
    .modal-image-thumbnails {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }
    
    .modal-main-image-container {
        min-height: 300px; /* Reducir altura en móvil */
    }
    
    .modal-product-title {
        font-size: 20px; /* Reducir tamaño del título en móvil */
    }
    
    .modal-current-price {
        font-size: 28px; /* Reducir tamaño del precio en móvil */
    }
    
    /* Asegurar que el botón de cerrar sea visible en móvil */
    .modal-header {
        padding: 12px 16px;
        background: white;
        border-bottom: 1px solid #E5E7EB;
        position: sticky;
        top: 0;
        z-index: 10;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        min-height: 60px;
    }
    
    .modal-close-btn {
        background: #F3F4F6;
        border: none;
        border-radius: 8px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        color: #6B7280;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 11;
        opacity: 1;
        visibility: visible;
    }
    
    .modal-close-btn:hover {
        background: #E5E7EB;
        color: #374151;
        transform: scale(1.05);
    }
    
    .modal-close-btn svg {
        width: 24px;
        height: 24px;
        stroke: #6B7280;
        display: block;
    }
}

/* Modal para pantallas muy pequeñas */
@media (max-width: 480px) {
    .modal-product-detail-container {
        padding: 12px;
        gap: 16px;
    }
    
    .modal-main-image-container {
        min-height: 250px; /* Altura aún más reducida */
    }
    
    .modal-product-title {
        font-size: 18px; /* Título más pequeño */
    }
    
    .modal-current-price {
        font-size: 24px; /* Precio más pequeño */
    }
    
    .modal-image-thumbnails {
        gap: 6px; /* Menos espacio entre thumbnails */
    }
    
    .modal-thumbnail {
        width: 50px;
        height: 50px; /* Thumbnails más pequeños */
    }
}

/* ===== CART DRAWER STYLES ===== */
.cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1008; /* Mayor que el header (1007) para que quede por encima */
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.cart-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2B2845;
}

.cart-close-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    color: #6B7280;
    transition: all 0.2s ease;
}

.cart-close-btn:hover {
    background: #F3F4F6;
    color: #374151;
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

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

.item-title {
    margin: 0 0 4px 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2B2845;
    line-height: 1.3;
}

.item-price {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #00B56B;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #D1D5DB;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    border-color: #00B56B;
    color: #00B56B;
}

.qty-display {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    color: #2B2845;
}

.cart-empty {
    text-align: center;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.empty-cart-icon {
    margin-bottom: 16px;
    color: #9CA3AF;
}

.cart-empty h3 {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.cart-empty p {
    margin: 0;
    font-size: 0.875rem;
    color: #6B7280;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid #E5E7EB;
    flex-shrink: 0;
    background: white;
}

.cart-total {
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #6B7280;
}

.total-row.total-final {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2B2845;
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid #E5E7EB;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-primary {
    background: #00B56B;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover:not(:disabled) {
    background: #00A05A;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: #00B56B;
    border: 2px solid #00B56B;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    background: #00B56B;
    color: white;
    transform: translateY(-1px);
}

.btn-secondary:hover {
    background: #00B56B;
    color: white;
    transform: translateY(-1px);
}

.cart-clear-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0 0 0;
    border-top: 1px solid #E5E7EB;
    margin-top: 24px;
    width: 100%;
}

.btn-clear {
    background: none;
    color: #00B56B;
    border: none;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
}

.btn-clear:hover {
    background: #F0FDF4;
    color: #00A05A;
}

.clear-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1352%) hue-rotate(87deg) brightness(119%) contrast(119%);
}

/* Estilos duplicados eliminados - se usan los estilos principales arriba */

/* Responsive cart drawer */
@media (max-width: 768px) {
    .cart-drawer {
        z-index: 1008; /* Mayor que el header (1007) para que quede por encima */
    }
    
    .cart-overlay {
        background: rgba(0, 0, 0, 0.6); /* Opacidad del 60% */
    }
    
    .cart-panel {
        width: calc(100% - 48px);
        max-width: calc(100vw - 48px);
        left: 48px; /* Margen izquierdo de 48px */
        right: auto; /* Quitar el right: 0 */
    }
    
    .cart-header {
        padding: 20px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }
    
    .cart-content {
        padding: 20px;
        padding-bottom: 0; /* El footer ya tiene su padding */
    }
    
    .cart-footer {
        padding: 20px;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid #E5E7EB;
    }
    
    .cart-item {
        padding: 12px;
        gap: 10px;
    }
    
    .item-image {
        width: 50px;
        height: 50px;
    }
    
    .item-title {
        font-size: 0.8rem;
    }
    
    .item-price {
        font-size: 0.8rem;
    }
    
    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .cart-actions {
        gap: 10px;
    }
    
    .btn-primary,
    .btn-outline {
        padding: 14px 20px;
        font-size: 0.9rem;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cart-header {
        padding: 16px;
    }
    
    .cart-content {
        padding: 16px;
    }
    
    .cart-footer {
        padding: 16px;
    }
    
    .cart-item {
        padding: 10px;
        gap: 8px;
    }
    
    .item-image {
        width: 45px;
        height: 45px;
    }
    
    .item-title {
        font-size: 0.75rem;
    }
    
    .item-price {
        font-size: 0.75rem;
    }
    
    .qty-btn {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }
    
    .btn-primary,
    .btn-outline {
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===== REGISTRATION MODAL STYLES ===== */
.registration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1010; /* Mayor que todos los otros modales */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.registration-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1011;
}

.registration-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 1000px;
    max-width: 1000px;
    max-height: 550px;
    height: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: row;
    z-index: 1012;
}

.registration-left {
    flex: 0 0 50%; /* Ancho fijo del 50% */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    max-width: none;
    box-sizing: border-box;
}

.registration-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.registration-title {
    font-size: 24px;
    font-weight: 600;
    color: #2B2844;
    line-height: 1.2;
    margin: 0;
}

.registration-subtitle {
    font-size: 16px;
    color: #666A8F;
    line-height: 1.4;
    margin: 0;
}

.phone-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phone-label {
    font-size: 14px;
    font-weight: 500;
    color: #2B2844;
    margin: 0;
}

.phone-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.country-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #DDDFE8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100px;
    height: 46px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.country-selector:hover {
    border-color: #00B56B;
}

.country-flag {
    width: 16px;
    height: 11px;
    object-fit: cover;
    border-radius: 2px;
}

.country-code {
    font-size: 14px;
    font-weight: 500;
    color: #2B2844;
}

.dropdown-arrow {
    margin-left: auto;
    flex-shrink: 0;
}

.phone-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #DDDFE8;
    border-radius: 8px;
    font-size: 16px;
    color: #2B2844;
    background: white;
    transition: all 0.2s ease;
    height: 46px;
    box-sizing: border-box;
    min-width: 0;
}

.phone-input:focus {
    outline: none;
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(0, 181, 107, 0.1);
}

.phone-input::placeholder {
    color: #666A8F;
}

.registration-actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.btn-register {
    width: 100%;
    height: 40px;
    background: #DDDFE8;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.btn-register:hover {
    background: #C5C7D0;
}


.btn-login {
    width: 100%;
    height: 20px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #00B56B;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

.btn-login:hover {
    color: #00A55A;
}


.registration-right {
    flex: 0 0 50%; /* Ancho fijo del 50% */
    background: #F9FAFB;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.registration-placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-width: 100%;
    box-sizing: border-box;
}

.registration-image {
    width: 900px;
    height: 900px;
    object-fit: contain;
    border-radius: 8px;
}

/* Responsive para el modal de registro */
@media (max-width: 768px) {
    .registration-modal {
        padding: 48px 0 0 0;
    }
    
    .registration-overlay {
        background: rgba(0, 0, 0, 0.5);
    }
    
    .registration-content {
        max-height: calc(100vh - 48px);
        border-radius: 0;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    
    .registration-left {
        padding: 48px 24px 24px 24px;
        max-width: none;
        gap: 24px;
    }
    
    .registration-back-button {
        top: 24px;
        left: 24px;
    }
    
    .registration-title {
        font-size: 20px;
        margin-top: 0;
    }
    
    .registration-subtitle {
        font-size: 14px;
    }
    
    .registration-right {
        display: none; /* Ocultar el rectángulo gris en móvil */
    }
    
    .phone-input-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .country-selector {
        width: 100%;
        justify-content: center;
    }
    
    .phone-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .registration-left {
        padding: 20px;
        gap: 20px;
    }
    
    .registration-title {
        font-size: 18px;
    }
    
    .registration-subtitle {
        font-size: 13px;
    }
    
    .phone-input-wrapper {
        gap: 10px;
    }
    
    .country-selector,
    .phone-input {
        height: 44px;
        font-size: 14px;
    }
    
    .btn-register {
        height: 44px;
        font-size: 14px;
    }
}

/* ===== PIN MODAL STYLES ===== */
.pin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1013; /* Mayor que el modal de registro */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1014;
}

.pin-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 1000px;
    max-width: 1000px;
    max-height: 550px;
    height: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: row;
    z-index: 1015;
}

.pin-back-button {
    position: absolute;
    top: 16px;
    left: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    z-index: 1016;
}

.pin-back-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.pin-back-icon {
    width: 25px;
    height: 25px;
    display: block;
}

.pin-left {
    flex: 0 0 50%; /* Ancho fijo del 50% */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    max-width: none;
    box-sizing: border-box;
}

.pin-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pin-title {
    font-size: 24px;
    font-weight: 600;
    color: #2B2844;
    line-height: 1.2;
    margin: 0;
}

.pin-subtitle {
    font-size: 16px;
    color: #666A8F;
    line-height: 1.4;
    margin: 0;
}

.pin-input-container,
.pin-confirm-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pin-label {
    font-size: 14px;
    font-weight: 500;
    color: #2B2844;
    margin: 0;
}

.pin-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pin-digit,
.pin-digit-confirm {
    width: 46px;
    height: 46px;
    border: 1px solid #DDDFE8;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #2B2844;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.pin-digit:focus,
.pin-digit-confirm:focus {
    outline: none;
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(0, 181, 107, 0.1);
}

.pin-toggle {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2B2844;
    transition: color 0.2s ease;
}

.pin-toggle:hover {
    color: #00B56B;
}

.pin-actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.btn-pin-create {
    width: 100%;
    height: 40px;
    background: #DDDFE8;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.btn-pin-create:hover {
    background: #C5C7D0;
}

.btn-pin-create.enabled {
    background: #00B56B;
    cursor: pointer;
}

.btn-pin-create.enabled:hover {
    background: #00A55A;
}

.pin-right {
    flex: 0 0 50%; /* Ancho fijo del 50% */
    background: #F9FAFB;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.pin-placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-width: 100%;
    box-sizing: border-box;
}

.pin-image {
    width: 900px;
    height: 900px;
    object-fit: contain;
    border-radius: 8px;
}

/* Responsive para el modal de PIN */
@media (max-width: 768px) {
    .pin-modal {
        padding: 48px 0 0 0;
    }
    
    .pin-overlay {
        background: rgba(0, 0, 0, 0.5);
    }
    
    .pin-content {
        max-height: calc(100vh - 48px);
        border-radius: 0;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    
    .pin-left {
        padding: 48px 24px 24px 24px;
        max-width: none;
        gap: 24px;
    }
    
    .pin-back-button {
        top: 24px;
        left: 16px;
    }
    
    .pin-title {
        font-size: 20px;
        margin-top: 48px;
        margin-left: 0px;
    }
    
    .pin-subtitle {
        font-size: 14px;
    }
    
    .pin-right {
        display: none; /* Ocultar el rectángulo gris en móvil */
    }
    
    .pin-inputs {
        gap: 8px;
    }
    
    .pin-digit,
    .pin-digit-confirm {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .pin-left {
        padding: 20px;
        gap: 20px;
    }
    
    .pin-back-button {
        top: 24px;
        left: 16px;
    }
    
    .pin-title {
        font-size: 18px;
        margin-top: 48px;
        margin-left: 0px;
    }
    
    .pin-subtitle {
        font-size: 13px;
    }
    
    .pin-inputs {
        gap: 8px;
    }
    
    .pin-digit,
    .pin-digit-confirm {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }
    
    .btn-pin-create {
        height: 44px;
        font-size: 14px;
    }
}

/* ===== INFORMATION MODAL STYLES ===== */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
}

.info-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 1000px;
    max-width: 1000px;
    max-height: 550px;
    height: 100%;
    display: flex;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10001;
}

.info-back-button {
    position: absolute;
    top: 16px;
    left: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    z-index: 10002;
    display: block !important;
    visibility: visible !important;
}

.info-back-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.info-left {
    flex: 0 0 50%; /* Ancho fijo del 50% */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    max-width: none;
    box-sizing: border-box;
}

.info-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-title {
    font-size: 24px;
    font-weight: 600;
    color: #2B2844;
    margin: 0;
    line-height: 1.2;
}

.info-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-row {
    display: flex;
    gap: 16px;
}

.info-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.info-label {
    font-size: 14px;
    font-weight: 500;
    color: #2B2844;
    margin: 0;
}

.info-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #DDDFE8;
    border-radius: 8px;
    font-size: 16px;
    color: #2B2844;
    background: white;
    transition: all 0.2s ease;
    height: 46px;
    box-sizing: border-box;
}

.info-input:focus {
    outline: none;
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(0, 181, 107, 0.1);
}

.info-input::placeholder {
    color: #666A8F;
}

.info-actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.btn-info-continue {
    width: 100%;
    height: 40px;
    background: #DDDFE8;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.btn-info-continue:hover {
    background: #C5C7D0;
}

.btn-info-continue.enabled {
    background: #00B56B;
    color: white;
    cursor: pointer;
}

.btn-info-continue.enabled:hover {
    background: #00A55A;
}

.info-right {
    flex: 0 0 50%; /* Ancho fijo del 50% */
    background: #F9FAFB;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.info-placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-width: 100%;
    box-sizing: border-box;
}

.info-image {
    width: 900px;
    height: 900px;
    object-fit: contain;
    border-radius: 8px;
}

/* Responsive adjustments for info modal */
@media (max-width: 768px) {
    .info-modal {
        padding: 48px 0 0 0;
    }
    
    .info-overlay {
        background: rgba(0, 0, 0, 0.5);
    }
    
    .info-content {
        max-height: calc(100vh - 48px);
        border-radius: 0;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    
    .info-left {
        padding: 72px 24px 24px 24px !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    
    .info-header {
        margin-top: 0 !important;
    }
    
    .info-back-button {
        top: 24px;
        left: 24px;
        z-index: 10003;
        display: block !important;
        visibility: visible !important;
    }
    
    .info-title {
        margin-top: 0 !important;
        margin-bottom: 16px !important;
        padding-top: 0 !important;
    }
    
    .info-right {
        display: none; /* Ocultar el rectángulo gris en móvil */
    }
    
    .info-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .info-field {
        width: 100%;
    }
    
    .btn-info-continue {
        height: 44px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .info-left {
        padding: 20px;
        gap: 20px;
    }
    
    .info-title {
        font-size: 18px;
    }
    
    .info-form {
        gap: 20px;
    }
    
    .info-input {
        height: 44px;
        font-size: 14px;
    }
    
    .btn-info-continue {
        height: 44px;
        font-size: 14px;
    }
}

/* ===== CONFIRMATION MODAL STYLES ===== */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10020;
}

.confirmation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10021;
}

.confirmation-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 500px;
    max-width: 500px;
    max-height: 550px;
    height: auto;
    display: flex;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10022;
}

.confirmation-left {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    max-width: none;
    box-sizing: border-box;
}

.confirmation-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.confirmation-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-title {
    font-size: 28px;
    font-weight: 700;
    color: #2B2844;
    margin: 0;
    line-height: 1.2;
}

.confirmation-subtitle {
    font-size: 18px;
    font-weight: 500;
    color: #00B56B;
    margin: 0;
    line-height: 1.3;
}

.confirmation-message {
    text-align: center;
}

.confirmation-text {
    font-size: 16px;
    color: #666A8F;
    margin: 0;
    line-height: 1.5;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-confirmation-primary {
    width: 100%;
    height: 48px;
    background: #00B56B;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.btn-confirmation-primary:hover {
    background: #00A55A;
    transform: translateY(-1px);
}

.btn-confirmation-secondary {
    width: 100%;
    height: 48px;
    background: transparent;
    border: 2px solid #00B56B;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 600;
    color: #00B56B;
}

.btn-confirmation-secondary:hover {
    background: #00B56B;
    color: white;
    transform: translateY(-1px);
}


/* Responsive para el modal de confirmación */
@media (max-width: 768px) {
    .confirmation-modal {
        padding: 48px 0 0 0 !important;
    }
    
    .confirmation-overlay {
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .confirmation-content {
        max-height: calc(100vh - 48px) !important;
        height: calc(100vh - 48px) !important;
        border-radius: 0 !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        background: white !important;
        display: flex !important;
        overflow: hidden !important;
        box-shadow: none !important;
    }
    
    .confirmation-left {
        padding: 48px 24px 24px 24px !important;
        max-width: none !important;
        width: 100% !important;
        flex: 1 !important;
        gap: 24px !important;
        box-sizing: border-box !important;
        background: white !important;
        overflow-y: auto !important;
        max-height: calc(100vh - 48px) !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .confirmation-title {
        font-size: 24px;
    }
    
    .confirmation-subtitle {
        font-size: 16px;
    }
    
    .confirmation-text {
        font-size: 14px;
    }
    
    
    .btn-confirmation-primary,
    .btn-confirmation-secondary {
        height: 44px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .confirmation-left {
        padding: 20px !important;
        gap: 20px !important;
    }
    
    .confirmation-title {
        font-size: 22px;
    }
    
    .confirmation-subtitle {
        font-size: 15px;
    }
    
    .confirmation-text {
        font-size: 13px;
    }
    
    .btn-confirmation-primary,
    .btn-confirmation-secondary {
        height: 44px;
        font-size: 14px;
    }
}

/* ===== DELIVERY MODAL STYLES - FORCE UPDATE 2024 ===== */
.delivery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10010;
}

.delivery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10011;
}

.delivery-content {
    position: relative;
    background: white;
    border-radius: 8px !important;
    width: 1000px !important;
    max-width: 1000px !important;
    max-height: 550px !important;
    height: 100%;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10012;
}

.delivery-back-button {
    position: absolute;
    top: 32px;
    left: 32px;
    width: 40px;
    height: 40px;
    background: #F3F4F6;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10013;
}

.delivery-back-button:hover {
    background: #E5E7EB;
}

.delivery-left {
    flex: 0 0 50%;
    padding: 80px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    overflow-y: auto;
    max-height: 100%;
    max-width: 50%;
    min-height: 0;
}

.delivery-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.delivery-title {
    font-size: 24px;
    font-weight: 600;
    color: #2B2844;
    line-height: 1.2;
    margin: 0;
}

.delivery-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.delivery-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.delivery-label {
    font-size: 14px;
    font-weight: 500;
    color: #2B2844;
    margin: 0;
}

.delivery-input {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #DDDFE8;
    border-radius: 8px;
    font-size: 16px;
    color: #2B2844;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.delivery-input:focus {
    outline: none;
    border-color: #00B56B;
    box-shadow: 0 0 0 3px rgba(0, 181, 107, 0.1);
}

.delivery-input::placeholder {
    color: #666A8F;
}

.delivery-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-delivery-continue {
    width: 100%;
    height: 40px;
    background: #DDDFE8;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.btn-delivery-continue:hover {
    background: #C5C7D0;
}

.btn-delivery-continue.enabled {
    background: #00B56B;
    color: white;
    cursor: pointer;
}

.btn-delivery-continue.enabled:hover {
    background: #00A55A;
}

.delivery-right {
    flex: 0 0 50% !important;
    background: #F9FAFB !important;
    border-radius: 0 8px 8px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px !important;
}

.delivery-placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-width: 100%;
    box-sizing: border-box;
}

.delivery-image {
    width: 900px;
    height: 900px;
    object-fit: contain;
    border-radius: 8px;
}

/* Responsive para el modal de delivery */
@media (max-width: 768px) {
    .delivery-modal {
        padding: 48px 0 0 0 !important;
    }
    
    .delivery-overlay {
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .delivery-content {
        max-height: calc(100vh - 48px) !important;
        height: calc(100vh - 48px) !important;
        border-radius: 0 !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        background: white !important;
        display: flex !important;
        overflow: hidden !important;
        box-shadow: none !important;
    }
    
    .delivery-left {
        padding: 72px 24px 24px 24px !important;
        max-width: none !important;
        width: 100% !important;
        flex: 1 !important;
        gap: 24px !important;
        box-sizing: border-box !important;
        background: white !important;
        overflow-y: auto !important;
        max-height: calc(100vh - 48px) !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .delivery-back-button {
        top: 24px !important;
        left: 24px !important;
        z-index: 10013 !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .delivery-title {
        font-size: 20px !important;
        margin-top: 0 !important;
        margin-bottom: 16px !important;
        padding-top: 0 !important;
    }
    
    .delivery-right {
        display: none !important;
    }
    
    .delivery-content {
        background: white !important;
    }
    
    .delivery-input {
        height: 44px;
        font-size: 16px;
    }
    
    .btn-delivery-continue {
        height: 44px;
        font-size: 14px;
        margin-top: 24px;
    }
    
    .delivery-form {
        min-height: calc(100% + 50px);
    }
}

@media (max-width: 480px) {
    .delivery-left {
        padding: 20px;
        gap: 20px;
    }
    
    .delivery-title {
        font-size: 18px;
    }
    
    .delivery-input {
        height: 42px;
        font-size: 14px;
    }
    
    .btn-delivery-continue {
        height: 44px;
        font-size: 14px;
        margin-top: 24px;
    }
    
    .address-dropdown {
        max-height: 180px;
    }
    
    .delivery-form {
        min-height: calc(100% + 50px);
    }
}

/* Login Modal Styles */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1011; /* Mayor que el modal de registro */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

.login-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 1000px;
    max-width: 1000px;
    max-height: 550px;
    height: 100%;
    display: flex;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10012;
}

.login-left {
    flex: 0 0 50%; /* Ancho fijo del 50% */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    max-width: 50%;
    box-sizing: border-box;
}

.login-header {
    text-align: left;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #2B2844;
    line-height: 1.2;
    margin: 0;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 16px;
    color: #666A8F;
    line-height: 1.4;
    margin: 0;
}

.login-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-login-submit {
    width: 100%;
    height: 48px;
    background: #E31E24;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login-submit:hover:not(:disabled) {
    background: #C41E3A;
    transform: translateY(-1px);
}

.btn-login-submit:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
}

.btn-register-link {
    width: 100%;
    height: 48px;
    background: transparent;
    color: #666A8F;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-register-link:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.login-right {
    flex: 0 0 50%; /* Ancho fijo del 50% */
    background: #F9FAFB;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-width: 100%;
    box-sizing: border-box;
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Responsive para el modal de login */
@media (max-width: 768px) {
    .login-modal {
        padding: 48px 0 0 0;
    }
    
    .login-overlay {
        background: rgba(0, 0, 0, 0.5);
    }
    
    .login-content {
        max-height: calc(100vh - 48px);
        border-radius: 0;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    
    .login-left {
        padding: 48px 24px 24px 24px;
        max-width: none;
        gap: 24px;
    }
    
    .login-title {
        font-size: 20px;
        margin-top: 0;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .login-right {
        display: none; /* Ocultar el rectángulo gris en móvil */
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 20px;
        gap: 20px;
    }
    
    .login-title {
        font-size: 18px;
    }
    
    .login-subtitle {
        font-size: 13px;
    }
}

/* Estilos para el autocompletado de direcciones */
.address-autocomplete-container {
    position: relative;
    width: 100%;
}

.address-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
}

.address-option {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.address-option:hover {
    background-color: #F9FAFB;
}

.address-option:last-child {
    border-bottom: none;
}

.address-option-icon {
    width: 16px;
    height: 16px;
    color: #6B7280;
    flex-shrink: 0;
}

.address-option-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.address-option-secondary {
    font-size: 12px;
    color: #6B7280;
    margin-top: 2px;
}

/* Estilos para la confirmación de dirección */
.address-confirmation {
    margin-top: 24px;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.confirmation-header {
    margin-bottom: 16px;
}

.confirmation-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2B2844;
    margin: 0 0 8px 0;
}

.confirmation-header p {
    font-size: 14px;
    color: #666A8F;
    margin: 0;
}

.map-container {
    margin: 16px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
}

.map-placeholder {
    height: 160px;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.map-marker {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.map-address {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.confirmation-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-confirm-address {
    flex: 1;
    height: 52px;
    background: #00B56B;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
}

.btn-confirm-address:hover {
    background: #009A5A;
    transform: translateY(-1px);
}

.btn-modify-address {
    flex: 1;
    height: 52px;
    background: transparent;
    color: #00B56B;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
}

.btn-modify-address:hover {
    color: #009A5A;
    background: rgba(0, 181, 107, 0.1);
}

/* Responsive para el autocompletado y confirmación */
@media (max-width: 768px) {
    .address-dropdown {
        max-height: 200px;
    }
    
    .address-option {
        padding: 10px 12px;
    }
    
    .address-confirmation {
        margin-top: 16px;
        padding: 16px;
    }
    
    .map-placeholder {
        height: 120px;
    }
    
    .confirmation-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-confirm-address,
    .btn-modify-address {
        height: 48px;
        font-size: 15px;
        padding: 4px;
    }
}

/* Estilos para la sección del usuario en el sidebar */
.sidebar-user-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

/* ===== ESTILOS PARA LA SECCIÓN MIS PEDIDOS ===== */
.orders-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    overflow-y: auto;
}

.orders-container {
    padding: 80px 20px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E5E7EB;
}

.orders-title {
    font-size: 24px;
    font-weight: 700;
    color: #2B2844;
    margin: 0;
}

.orders-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #666A8F;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.orders-back-btn:hover {
    background-color: #F3F4F6;
}

.orders-back-icon {
    width: 16px;
    height: 16px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.order-number {
    font-size: 16px;
    font-weight: 600;
    color: #2B2844;
    margin: 0;
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status.en-preparacion {
    background: #FEF3C7;
    color: #D97706;
}

.order-status.en-camino {
    background: #DBEAFE;
    color: #2563EB;
}

.order-status.entregado {
    background: #D1FAE5;
    color: #059669;
}

.order-card-body {
    margin-bottom: 16px;
}

.order-summary {
    font-size: 14px;
    color: #666A8F;
    margin-bottom: 8px;
}

.order-total {
    font-size: 18px;
    font-weight: 600;
    color: #2B2844;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-date {
    font-size: 12px;
    color: #9CA3AF;
}

.btn-view-detail {
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    color: #374151;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-detail:hover {
    background: #E5E7EB;
    border-color: #9CA3AF;
}

.orders-empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    margin-bottom: 24px;
}

.empty-icon-img {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #2B2844;
    margin: 0 0 8px 0;
}

.empty-subtitle {
    font-size: 14px;
    color: #666A8F;
    margin: 0 0 24px 0;
}

.empty-action-btn {
    background: #00B56B;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.empty-action-btn:hover {
    background: #00A55A;
}

/* ===== ESTILOS PARA EL MODAL DE DETALLE DEL PEDIDO ===== */
.order-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10020;
}

.order-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10021;
}

.order-detail-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10022;
}

.order-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.order-detail-back-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.order-detail-back-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.order-detail-back-icon {
    width: 24px;
    height: 24px;
}

.order-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: #2B2844;
    margin: 0;
}

.order-detail-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.order-info-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
}

.order-number-info,
.order-status-info,
.order-date-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-number-info:last-child,
.order-status-info:last-child,
.order-date-info:last-child {
    margin-bottom: 0;
}

.order-number-label,
.order-status-label,
.order-date-label {
    font-size: 14px;
    color: #666A8F;
    font-weight: 500;
}

.order-number-value {
    font-size: 16px;
    font-weight: 600;
    color: #2B2844;
}

.order-status-value {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status-value.en-preparacion {
    background: #FEF3C7;
    color: #D97706;
}

.order-status-value.en-camino {
    background: #DBEAFE;
    color: #2563EB;
}

.order-status-value.entregado {
    background: #D1FAE5;
    color: #059669;
}

.order-date-value {
    font-size: 14px;
    color: #2B2844;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2B2844;
    margin: 0 0 16px 0;
}

.order-products-section {
    margin-bottom: 24px;
}

.order-products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #F9FAFB;
    border-radius: 8px;
}

.order-product-image {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
}

.order-product-info {
    flex: 1;
}

.order-product-name {
    font-size: 14px;
    font-weight: 500;
    color: #2B2844;
    margin: 0 0 4px 0;
}

.order-product-details {
    font-size: 12px;
    color: #666A8F;
    margin: 0;
}

.order-product-price {
    font-size: 14px;
    font-weight: 600;
    color: #2B2844;
}

.order-payment-section {
    margin-bottom: 24px;
}

.payment-method-info {
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-method-icon {
    width: 24px;
    height: 24px;
}

.payment-method-text {
    font-size: 14px;
    color: #2B2844;
    font-weight: 500;
}

.order-total-section {
    border-top: 1px solid #E5E7EB;
    padding-top: 16px;
}

.order-total-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-total-label {
    font-size: 16px;
    font-weight: 600;
    color: #2B2844;
}

.order-total-value {
    font-size: 20px;
    font-weight: 700;
    color: #00B56B;
}

/* ===== MEDIA QUERIES PARA MIS PEDIDOS ===== */
@media (max-width: 768px) {
    .orders-container {
        padding: 60px 16px 16px 16px;
    }
    
    .orders-title {
        font-size: 20px;
    }
    
    .order-card {
        padding: 16px;
    }
    
    .order-detail-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .order-detail-header {
        padding: 16px 20px;
    }
    
    .order-detail-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .orders-container {
        padding: 50px 12px 12px 12px;
    }
    
    .orders-title {
        font-size: 18px;
    }
    
    .order-card {
        padding: 12px;
    }
    
    .order-detail-header {
        padding: 12px 16px;
    }
    
    .order-detail-body {
        padding: 16px;
    }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #F9FAFB;
    border-radius: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #E31E24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

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

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #2B2844;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-phone {
    font-size: 12px;
    color: #666A8F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-orders-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: transparent;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.my-orders-btn:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.my-orders-icon {
    width: 20px;
    height: 20px;
    color: #666A8F;
    flex-shrink: 0;
}

.my-orders-content {
    flex: 1;
    min-width: 0;
}

.my-orders-title {
    font-size: 14px;
    font-weight: 500;
    color: #2B2844;
    margin-bottom: 2px;
}

.my-orders-subtitle {
    font-size: 12px;
    color: #666A8F;
}

/* Estilos para el modal de Mis Pedidos */
.my-orders-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.my-orders-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.my-orders-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 800px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1021;
}

.my-orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 24px;
}

.my-orders-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #2B2844;
    margin: 0;
}

.my-orders-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    color: #666A8F;
    transition: all 0.2s ease;
}

.my-orders-close:hover {
    background: #F3F4F6;
    color: #374151;
}

.my-orders-body {
    flex: 1;
    padding: 0 24px 24px 24px;
    overflow-y: auto;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-item {
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    background: white;
    transition: all 0.2s ease;
}

.order-item:hover {
    border-color: #D1D5DB;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.order-number {
    font-size: 14px;
    font-weight: 600;
    color: #2B2844;
}

.order-date {
    font-size: 12px;
    color: #666A8F;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.pending {
    background: #FEF3C7;
    color: #92400E;
}

.order-status.confirmed {
    background: #DBEAFE;
    color: #1E40AF;
}

.order-status.shipped {
    background: #D1FAE5;
    color: #065F46;
}

.order-status.delivered {
    background: #D1FAE5;
    color: #065F46;
}

.order-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.order-total {
    font-size: 16px;
    font-weight: 600;
    color: #2B2844;
}

.order-tracking {
    font-size: 12px;
    color: #666A8F;
}

.orders-empty {
    text-align: center;
    padding: 40px 20px;
}

.empty-orders-icon {
    margin-bottom: 16px;
}

.orders-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2B2844;
    margin: 0 0 8px 0;
}

.orders-empty p {
    font-size: 14px;
    color: #666A8F;
    margin: 0;
}

/* Responsive para Mis Pedidos */
@media (max-width: 768px) {
    .my-orders-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .my-orders-header {
        padding: 16px 16px 0 16px;
        margin-bottom: 16px;
    }
    
    .my-orders-body {
        padding: 0 16px 16px 16px;
    }
    
    .order-item {
        padding: 12px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .order-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
