:root {
    /* Tu paleta corporativa cálida y propia */
    --brand-main: #ff7e5f;
    --brand-dark: #e85d34;
    --brand-light: #fff0eb;
    --bg-color: #fcf9f7;
    --card-bg: #ffffff;
    --text-main: #33211c;
    --text-muted: #8a736c;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }

body { 
    background-color: var(--bg-color); 
    color: var(--text-main); 
    padding-bottom: 50px; 
}

/* HEADER PROPIO */
header { 
    background: linear-gradient(135deg, var(--brand-main), #feb47b); 
    padding: 40px 20px 30px; 
    text-align: center; 
    color: white; 
    border-bottom-left-radius: 35px; 
    border-bottom-right-radius: 35px; 
    box-shadow: 0 10px 25px rgba(232, 93, 52, 0.2);
    position: relative;
}

.logo-container {
    margin-bottom: 15px;
}

/* Carga tu logo localmente */
.brand-logo {
    width: 110px;
    height: 110px;
    border: 4px solid white;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: white;
}

header h1 { 
    font-size: 24px; 
    font-weight: 700; 
    margin-top: 5px;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

header p {
    font-size: 13px;
    font-weight: 300;
    opacity: 0.95;
    margin-top: 5px;
}

/* BUSCADOR Y ORDENAMIENTO */
.search-container {
    max-width: 650px;
    margin: -25px auto 20px;
    padding: 0 15px;
    position: relative;
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    width: 100%;
    padding: 15px 20px;
    border-radius: 25px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-size: 16px;
    outline: none;
    color: var(--text-main);
    transition: box-shadow 0.3s;
}

.search-input:focus {
    box-shadow: 0 5px 20px rgba(232, 93, 52, 0.3);
}

.sort-wrapper {
    position: relative;
}

.btn-sort {
    background: linear-gradient(135deg, var(--brand-main), var(--brand-dark));
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(232, 93, 52, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-sort:active {
    transform: scale(0.95);
}

.sort-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 230px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 20;
}

.sort-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-option {
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    border-bottom: 1px solid #f0e6e3;
    transition: background 0.2s;
}

.sort-option:last-child {
    border-bottom: none;
}

.sort-option:hover {
    background: var(--brand-light);
    color: var(--brand-dark);
}

/* CONTENEDOR PRINCIPAL */
#menu-container {
    padding: 10px 15px 25px;
    max-width: 650px;
    margin: 0 auto;
}

/* ACORDEÓN (Libreta que se abre) */
.category-group {
    background: var(--card-bg);
    border-radius: 18px;
    margin-bottom: 18px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-header {
    padding: 20px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--brand-dark);
    cursor: pointer;
    background: white;
    border-radius: 18px;
    transition: background 0.3s;
}

.category-header:active {
    background: #fdfdfd;
}

.category-header .icon-toggle {
    font-size: 24px;
    font-weight: 300;
    color: var(--brand-main);
    transition: transform 0.3s;
}

.category-group.active .category-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid #f0e6e3;
}

.category-group.active .icon-toggle {
    transform: rotate(45deg); 
}

.category-content {
    max-height: 0;
    overflow: hidden;
    background: #fffafa;
    transition: max-height 0.4s ease-out;
}

/* TARJETAS DE PRODUCTOS */
.product-item { 
    padding: 16px 20px;
    display: flex; 
    align-items: center; 
    border-bottom: 1px solid #f0e6e3;
    position: relative;
    transition: all 0.3s;
}
.product-item:last-child { border-bottom: none; }

/* ESTADO AGOTADO */
.product-item.agotado {
    opacity: 0.55;
    filter: grayscale(0.8);
    background-color: #fdfdfd;
}

.product-item.agotado .product-img {
    filter: brightness(0.7);
}

.badge-agotado {
    display: inline-block;
    background: #dc3545;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.product-img { 
    width: 75px; height: 75px; 
    border-radius: 14px; 
    object-fit: cover; 
    margin-right: 18px; 
    background-color: #f0e6e3; 
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.product-info { flex-grow: 1; padding-right: 10px; }
.product-name { font-size: 14px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; line-height: 1.3;}

/* PRECIO */
.product-price { 
    font-size: 15px; 
    font-weight: 700; 
    color: var(--brand-dark); 
    background: var(--brand-light); 
    padding: 6px 14px; 
    border-radius: 20px; 
    white-space: nowrap; 
    box-shadow: 0 2px 5px rgba(232, 93, 52, 0.1);
}

/* ESTADOS DE BUSQUEDA */
.no-results {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-style: italic;
}
