:root {
    /* Colores principales refinados */
    --wine: #7a0a0a;        /* Rojo vino más sofisticado */
    --gold: #c5a245;        /* Dorado más suave */
    --light-gold: #f0e6cc;  /* Dorado claro más neutro */
    --cream: #fffaf5;       /* Crema suave */
    --dark-text: #2a2a2a;   /* Texto oscuro más profundo */
    --light-text: #666666;  /* Texto claro */
    --border-color: #e8e8e8; /* Color de bordes */
}

/* Estilos base mejorados */
body {
    font-family: 'Cormorant Garamond', 'Playfair Display', serif;
    background-color: white;
    color: var(--dark-text);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Contenedor principal más elegante */
.menu-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
}

/* Encabezado refinado */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.menu-title h1 {
    font-family: 'Playfair Display', serif;
    color: var(--wine);
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.menu-title p {
    color: var(--light-text);
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin: 0.5rem 0 0;
    font-style: italic;
}

/* Botón de regresar más elegante */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background-color: transparent;
    color: var(--wine);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid var(--wine);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.back-button:hover {
    background-color: var(--wine);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 10, 10, 0.15);
}

.back-button i {
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(-3px);
}

/* Selector de categorías premium */
.category-selector {
    text-align: center;
    margin: 3rem 0;
    position: relative;
}

.category-select {
    width: 100%;
    max-width: 450px;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    color: var(--dark-text);
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 500;
    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='%237a0a0a'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.5rem center;
    background-size: 1rem;
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-family: 'Montserrat', sans-serif;
}

.category-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(122, 10, 10, 0.2);
    border-color: var(--wine);
}

/* Mensaje instructivo más claro */
.instruction {
    text-align: center;
    color: var(--light-text);
    font-weight: 400;
    margin: 1rem 0 2rem;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    position: relative;
    display: inline-block;
    padding: 0 1rem;
}

.instruction:before, .instruction:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: var(--border-color);
}

.instruction:before {
    left: -30px;
}

.instruction:after {
    right: -30px;
}

/* Grid de categorías premium */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    color: var(--dark-text);
    border: 1px solid var(--border-color);
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(122, 10, 10, 0.2);
}

.category-card:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.4s ease;
}

.category-card:hover:after {
    border-color: var(--wine);
}

.category-icon {
    background: linear-gradient(135deg, var(--wine), #8a2a2a);
    color: white;
    padding: 1.5rem;
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.category-card:hover .category-icon {
    background: linear-gradient(135deg, #8a2a2a, var(--wine));
}

.category-content {
    padding: 1.2rem;
    text-align: center;
    background: white;
    z-index: 1;
}

.category-content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--wine);
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin: 0.3rem 0;
    font-weight: 600;
}

.category-content p {
    color: var(--light-text);
    font-size: 0.85rem;
    margin: 0.3rem 0 0;
    display: none; /* Oculto por defecto */
}

.category-card:hover .category-content p {
    display: block; /* Mostrar al hacer hover */
    animation: fadeIn 0.4s ease;
}

/* Animaciones refinadas */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardRise {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.category-card {
    animation: cardRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
.category-card:nth-child(7) { animation-delay: 0.7s; }
.category-card:nth-child(8) { animation-delay: 0.8s; }
.category-card:nth-child(n+9) { animation-delay: 0.9s; }

/* Efecto de hover para móviles */
@media (hover: none) {
    .category-card {
        transform: none !important;
    }
}

/* Responsive mejorado */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
    
    .menu-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .back-button {
        margin-top: 1rem;
        align-self: center;
    }
    
    .instruction:before, .instruction:after {
        display: none;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .menu-container {
        padding: 1.5rem 1rem;
    }
    
    .category-selector {
        margin: 2rem 0;
    }
}

/* Indicador de categoría actual */
.current-category {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--wine);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
    font-family: 'Montserrat', sans-serif;
}

/* Tooltip para iconos */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--wine);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    font-family: 'Montserrat', sans-serif;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}