/* Custom Properties / Variables */
:root {
    --color-bg-wood-light: #f5f0e1; /* Base wood background color */
    --color-text-dark: #331a0e; /* Dark brown for main text */
    --color-header-bg: #8b4513; /* SaddleBrown for header */
    --color-accent-orange: #f39c12; /* Bright orange for category buttons */
    --color-accent-red: #e74c3c; /* Red for prices/highlights */
    --color-accent-green: #6b8e23; /* Olive green for category text/details */
    --color-button-bg-primary: #f39c12; /* Primary button color (orange) */
    --color-button-bg-secondary: #c0392b; /* Secondary button color (red) */
    --color-plus-button: #27ae60; /* Green for plus button */
    --color-light-gray: #f9f9f9; /* For item backgrounds */
    --color-border-dark: #4a2c0f; /* Dark brown border */
    --color-white: #ffffff; /* Explicit white */
    --color-olive: #becb9b;
    --color-wine: #6a0000;
}

/* Base Styles */
.logo{
    max-width: 300px; /* Limit logo size */
    height: auto;
    display: block;
    align-items: left;
}


body {
    font-family: 'Roboto', sans-serif; /* A clean sans-serif for general text */
    margin: 0;
    padding: 0;
    background-image: url('/img/fondo_maderas.png'); /* Your provided background image */
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center center;
    color: var(--color-text-dark);
    display: block;
        
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Header */
header {
    background-color: var(--color-header-bg);
    color: var(--color-light-gray);
    text-align: center;
    padding: 15px 0;
    border-bottom: 2px solid var(--color-border-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10; /* Above other content */
}
.header-inner{max-width:980px;margin:0 auto;display:flex;align-items:center;gap:16px}
.logo{font-family:Lobster, cursive;font-size:34px;color:var(--wine);padding:8px 12px;border-radius:10px;background:rgba(255,255,255,0.12);box-shadow:0 4px 12px rgba(0,0,0,0.08)}
.header-text .welcome-text{margin:0;font-family:Italianno, cursive;font-size:28px;color:var(--brown)}
.header-text .phone{font-size:13px;color:var(--dark)}

.menu-categories {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}
.welcome-text {
    font-family: 'Italianno'; /* Elegant script font */
    font-size: 5em;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.menu-title {
    font-family: 'Lobster', cursive; /* Bold, rounded font for "Menú" */
    font-size: .5em;
    margin: -10px 0 0; /* Adjust vertical position */
    color: var(--color-text-dark); /* Dark text for "Menú" */
    text-shadow: 
        -1px -1px 0px var(--color-light-gray),  /* Outline */
        1px -1px 0px var(--color-light-gray),
        -1px 1px 0px var(--color-light-gray),
        1px 1px 0px var(--color-light-gray);
    display: inline-block; /* Allows transformation */
    position: relative;
}

.menu-title::after {
    content: '';
    position: absolute;
    left: 10%; /* Adjust to start where the text begins */
    right: 10%; /* Adjust to end where the text ends */
    bottom: -5px;
    height: 3px;
    background-color: var(--color-accent-orange);
    border-radius: 5px;
}


/* Main Content */
main {
    flex-grow: 1;
    padding: 20px 15px;
    max-width: 600px; /* Constrain width for mobile-like feel */
    margin: 20px auto;
}

/* Category Toggle Buttons */
.category-toggle {
    background-color: var(--color-button-bg-primary); /* Default orange */
    color: var(--color-text-dark);
    border-radius: 30px; /* Fully rounded corners */
    padding: 12px 20px;
    margin-bottom: 15px;
    display: flex;
    flex-direction:row;
    align-items: 10PX;
    justify-content: flex-end;;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 2px solid var(--color-border-dark);
    max-width: 100%; /* Ensure it doesn't overflow */
}
#desplegable{
    width: 20%;
    height: 10%;
    margin-left: 1px;
}
/* Specific category colors */
.category-toggle[data-category="sandwiches"] {
    background-color: var(--color-accent-orange);
}
.category-toggle[data-category="choriperro"] {
    background-color: var(--color-accent-orange);
}


.category-toggle.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0; /* No margin when active, as content follows directly */
}

.category-icon-wrapper {
    background-color: var(--color-light-gray);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    border: 2px solid var(--color-border-dark);
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.logo-products {
    width: 70%; /* Adjust as needed */
    height: auto;
    margin: 0 auto; /* Center the logo */
}
.text_products {
    filter: hue-rotate(180deg); 
    margin: auto;
    -webkit-text-stroke: 2px black; /* Ancho de 2px, color negro */
  color: rgb(255, 0, 0); /* Color del texto */

}


.category-icon {
    size: 1px;
    color: var(--color-text-dark);
}


.category-name {
    font-family: 'Italianno', cursive; /* Same as Menu title for consistency */
    font-size: 200%;
    flex-grow: 1; /* Allows name to take available space */
    text-align: left;
    border-radius: 10%;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    padding-right: 1px; /* Space before arrow */;
    transition: color 0.3s ease;   
    max-width: 100%;
  -webkit-text-stroke: 2px black; /* Ancho de 2px, color negro */
  color: rgb(0, 0, 0); /* Color del texto */

}

.dropdown-arrow {
    size: 100%;
    direction: right;
    transition: transform 0.3s ease;
}

.category-toggle.active .dropdown-arrow {
    transform: rotate(180deg); /* Rotate arrow up when active */
}

/* Collapsible Content */

/* Categoria (toggle) */

/* Contenido colapsable */
.category-content{
  background: rgba(148,76,62,0.06);
  border-radius:0 0 18px 18px;
  margin-bottom:14px;
  padding:0;
  max-height:0;overflow:hidden;transition:max-height .42s ease,padding .3s ease;
}
.category-content.active{padding:14px;max-height:1000px}

/* Item */
.menu-item{display:flex;justify-content:space-between;align-items:center;padding:10px 6px;border-bottom:1px dashed rgba(0,0,0,0.06)}
.item-name{font-weight:700;color:var(--wine)}
.item-description{font-size:13px;color:#5a4a4a;margin-top:6px}
.item-actions{display:flex;align-items:center;gap:10px}
.item-price{font-weight:800;color:var(--wine);min-width:80px;text-align:right}

.category-content.active {
    max-height: 500px; /* Max height to allow content to show. Adjust if content is longer */
    padding-top: 15px;
    padding-bottom: 15px;
}

.menu-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
}

.menu-item:last-child {
    border-bottom: none; /* No border for the last item */
}

.item-name {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--color-wine);
    flex-basis: 60%; /* Take more space */
}

.item-price {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--color-wine); /* Red for prices */
    margin-left: auto; /* Push price to the right */
    white-space: nowrap; /* Prevent price from wrapping */
}

.add-to-cart-btn {
    background-color: var(--color-olive); /* Green plus button */
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease;
    margin-left: 10px; /* Space from price */
    flex-shrink: 0; /* Prevent button from shrinking */
}

.add-to-cart-btn:hover {
    background-color: #2196f3; /* Lighter green on hover */
}

.item-description {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    flex-basis: 100%; /* Full width for description */
    font-style: italic;
}


/* Floating Cart Button */
#floating-cart-btn {
    position: fixed;
    bottom: 80px; /* Above the bottom navigation bar */
    right: 80%;
    background-color: var(--color-accent-orange);
    color: var(--color-white);
    border: 2px solid var(--color-border-dark);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    z-index: 20; /* Ensure it's on top */
    transition: transform 0.2s ease;
}

#floating-cart-btn:hover {
    transform: scale(1.05);
}

#cart-item-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--color-accent-red);
    color: white;
    border-radius: 50%;
    padding: 3px 7px;
    font-size: 0.7em;
    font-weight: bold;
    min-width: 20px; /* Ensure circular shape for single digits */
    text-align: center;
    line-height: 1; /* Vertically center number */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 100; /* High z-index to be on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if content is too long */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

/* NEW MODAL STYLE */
.modal_2 {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 100; /* High z-index to be on top, same as .modal */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if content is too long */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}
.combo-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    font-size: 16px;
}
#direccion-confirmada {
    display: none;
    text-align: center;
    margin-top: 16px;
}

/* BOTÓN CORREGIR VISUAL */
#btn-corregir {
    display: inline-block;
    background-color: #35363a;
    color: white;
    border: none;
    padding: 10px 18px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}
#direccion-texto {
    font-size: 26px;
    font-weight: bold;
    color: #6a0000;
    animation: fadeIn 0.35s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#direccion-seleccionada-view h2 {
    color: #6a0000; /* puedes cambiar color si deseas */
}

.modal-btn.secondary {
    background-color: #bdbdbd;
    color: #35363a;
    border-radius: 6px;
    padding: 8px 12px;
    border: none;
    cursor: pointer;
}

.modal-btn.secondary:hover {
    background-color: #9b9b9b;
}


.modal-content {
    background-color: var(--color-light-gray);
    margin: auto;
    padding: 25px;
    border: 2px solid var(--color-border-dark);
    border-radius: 8px;
    width: 90%; /* Responsive width */
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    position: relative;
    animation-name: animatetop;
    animation-duration: 0.4s
}

/* Add Animation */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}
.close-button_1_2 {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}

/* New close button for modal_2 */
.close-button_2 {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}
.close-button_3 {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus,
.close-button_2:hover,
.close-button_2:focus,
.close-button_3:hover,
.close-button_3:focus,
.close-button_1_2:hover,
.close-button_1_2:focus {
    color: var(--color-accent-red);
    text-decoration: none;
    cursor: pointer;
}

.modal-title {
    font-family: 'Lobster', cursive;
    font-size: 2em;
    color: var(--color-text-dark);
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 10px;
}

#modal-cart-list {
    list-style: none;
    padding: 0;
    max-height: 300px; /* Limit height for scrollable cart */
    overflow-y: auto;
    margin-bottom: 20px;
}

#modal-cart-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    color: var(--color-text-dark);
    font-size: 1.1em;
}

#modal-cart-list li:last-child {
    border-bottom: none;
}

.remove-item-from-modal {
    background-color: var(--color-accent-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 0.8em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    margin-left: 10px;
}

.remove-item-from-modal:hover {
    background-color: #a03022;
}

.cart-summary {
    font-size: 1.3em;
    font-weight: bold;
    text-align: right;
    margin-top: 15px;
    color: var(--color-text-dark);
}

#modal-cart-total {
    color: var(--color-accent-red);
}

.modal-actions {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-top: 20px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-grow: 1;
}

.modal-btn.primary {
    background-color: #649e00;
    color: white;
}
.modal-btn.primary:hover {
    background-color: #365501;
    transform: translateY(-2px);
}
.modal-btn.daviplata{
    background-color: #ec1c24;
    color: white;
}

.modal-btn.daviplata:hover {
    background-color: #7d1e1e;
    transform: translateY(-2px);
}

.modal-btn.secondary{
    background-color: #ec1c24;
    color: white;
}

.modal-btn.secondary:hover {
    background-color: #7d1e1e;
    transform: translateY(-2px);
}

.modal-btn.nequi {
    background-color: #670444;
    color: white;
}

.modal-btn.nequi:hover {
    background-color: #1b0423;
    transform: translateY(-2px);
}

.modal-btn.tertiary { /* New style for the "EFECTIVO" button */
    background-color: #5a7d1e; /* A blue color, for example */
    color: white;
}

.modal-btn.tertiary:hover {
    background-color: #354911;
    
    transform: translateY(-2px);
}


/* Bottom Navigation Bar */
.bottom-nav-bar {
    background-color: rgba(0, 0, 0, 0.9); /* Dark translucent background */
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    z-index: 30; /* Higher than cart button if needed */
}

.nav-item {
    color: #888;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s ease;
}

.nav-item:hover {
    color: var(--color-light-gray);
}


/* Toast for messages */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 16px;
    position: fixed;
    z-index: 101; /* Above modal */
    left: 50%;
    bottom: 150px; /* Above cart button and nav bar */
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0s 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s;
}


/* Responsive Adjustments */
@media (min-width: 768px) {
    header {
        padding: 20px 0;
    }

    .welcome-text {
        font-size: 2.5em;
    }

    .menu-title {
        font-size: 4.5em;
    }

    main {
        padding: 30px 20px;
    }

    .category-toggle {
        padding: 15px 25px;
    }

    .category-icon-wrapper {
        width: 55px;
        height: 55px;
    }

    .category-icon {
        font-size: 2.2em;
    }

    .category-name {
        font-size: 2em;
    }

    .dropdown-arrow {
        font-size: 1.5em;
    }

    .menu-item {
        padding: 12px 0;
    }

    .item-name {
        font-size: 1.2em;
    }

    .item-price {
        font-size: 1.2em;
    }

    .add-to-cart-btn {
        width: 40px;
        height: 40px;
        font-size: 1.4em;
    }

    #floating-cart-btn {
        width: 70px;
        height: 70px;
        font-size: 2.2em;
        bottom: 90px;
        right: 30px;
    }

    #cart-item-count {
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .modal-content {
        padding: 30px;
    }

    .modal-title {
        font-size: 2.5em;
    }

    .modal-btn {
        padding: 12px 25px;
        font-size: 1.2em;
    }

    .bottom-nav-bar {
        padding: 15px 0;
    }

    .nav-item {
        font-size: 2em;
    }
}
/* NEW MODAL STYLE (Modal 3 for cash) */
.modal_3 {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 100; /* High z-index to be on top, same as .modal */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if content is too long */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}





.cash-input-group {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.cash-input-group label {
    display: block;
    font-size: 1.1em;
    margin-bottom: 8px;
    color: var(--color-text-dark);
    font-weight: bold;
}

.cash-input-group input[type="number"] {
    width: 80%;
    max-width: 200px;
    padding: 10px;
    font-size: 1.2em;
    border: 1px solid var(--color-border-dark);
    border-radius: 5px;
    text-align: center;
}

/* Botón Confirmar (desactivado) */
#whatsapp-checkout-btn_1_2 {
    background-color: #bdbdbd;
    color: #35363a;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 16px;
    cursor: not-allowed;
    transition: 0.25s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

/* Botón Confirmar (ACTIVADO) */
#whatsapp-checkout-btn_1_2.active {
    background-color: #3da33d; /* verde agradable */
    color: white;
    cursor: pointer;
}

/* Hover en activo */
#whatsapp-checkout-btn_1_2.active:hover {
    background-color: #2e7c2e;
}

/* Icono de pin */
.pin-icon {
    font-size: 18px;
}