/**
 * ========================================
 * ESTILOS DE CORRECCIÓN
 * Velas Starlight - Bug Fixes Styles
 * ========================================
 */

/* Arreglar altura uniforme en productos relacionados */
#related-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.related-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px;
}

.related-product-card .p-6 {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

/* Mejorar el menú móvil */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    transform-origin: top;
}

#mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.95);
    pointer-events: none;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    pointer-events: auto;
}

/* Mejorar la visualización de precios */
.price-display {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Asegurar que las opciones de tamaño tengan altura uniforme */
.size-option {
    min-height: 60px;
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem !important;
}

/* Espaciado entre tamaño y precio */
.size-option .flex {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.size-option .font-medium {
    margin-right: 1rem !important;
    flex-shrink: 0;
}

.size-option .text-sage-green {
    margin-left: auto !important;
    white-space: nowrap;
}

/* Asegurar separación visual entre elementos */
#size-options {
    margin-bottom: 1.5rem !important;
}

#size-options > div:not(:last-child) {
    margin-bottom: 0.75rem !important;
}

/* Prevenir que el texto se junte */
.size-option span + span {
    margin-left: 1rem !important;
}

/* Forzar separación en el layout */
.size-option > div > span:first-child {
    display: inline-block;
    margin-right: auto;
}

.size-option > div > span:last-child {
    display: inline-block;
    margin-left: auto;
}

/* Mejorar la selección de fragancias */
#fragrance-select {
    min-height: 50px;
}

/* Estilos para notificaciones mejoradas */
.notification {
    animation: slideInRight 0.3s ease-out;
}

.notification.hide {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mejorar la responsividad del grid de productos relacionados */
@media (max-width: 640px) {
    #related-products {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    #related-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    #related-products {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Asegurar que el contenido del producto tenga altura mínima */
.product-info-card {
    min-height: 600px;
}

/* Mejorar la alineación de elementos en las tarjetas */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estilos para mejorar la accesibilidad */
.option-card:focus {
    outline: 2px solid #3A5A40;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #3A5A40;
    outline-offset: 2px;
}

/* Mejorar la visualización en dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover {
        transform: none;
    }
    
    .related-product-card:hover {
        transform: none;
    }
    
    .option-card:hover {
        transform: none;
    }
}