/* Estilos del overlay del popup de compra */
.purchase-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    /* Fondo semi-transparente */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
    /* Transición suave */
}

/* Contenido del popup de compra */
.purchase-popup-content {
    background: #ffffff;
    /* Fondo blanco */
    border-radius: 15px;
    /* Tamaño máximo del popup */
    min-height: 27rem;
    max-height: 80vh;
    /* Altura máxima del popup */
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Sombra suave */
    display: grid;    
    grid-template-columns: 2fr;
    overflow: hidden;
    /* Ocultar contenido adicional */
    align-items: center;
    text-align: center;
}

/* Título del popup */
.purchase-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

/* Imagen en el encabezado del popup */
.purchase-image-header {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

/* Contenedor de la lista de opciones de compra */
.purchase-list-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: center;
    padding: 1rem;
    /* Centrar los elementos horizontalmente */
    /* Ajusta según tus necesidades */
    overflow-y: auto;
    /* Permitir el desplazamiento vertical */
    width: 100%;
    height: 53vh;
    max-height: 45rem;
    /* Asegura que el contenedor ocupe todo el ancho */
}

/* Lista de opciones de compra */
.purchase-list {
    display: grid;    
    grid-template-rows: auto auto;
    gap: 20px;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
}


/* Opción de compra individual */
.purchase-item {
    display: grid;    
    grid-template-columns: 1fr;
    /* Centrar contenido verticalmente */
    
    /* Centrar contenido horizontalmente */
    width: 75%;
    /* Asegura que los elementos no ocupen todo el ancho */
    max-width: 350px;
    /* Ajusta el tamaño máximo según tus necesidades */
    margin: auto;
    /* Espaciado entre los elementos */
    /* Espaciado interno */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Sombra suave */
    border-radius: 10px;
    /* Bordes redondeados */
    cursor: pointer;
    /* Cambio de cursor al pasar sobre el elemento */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Transiciones suaves */
    opacity: 0;
    overflow: hidden;
    transition: height 0.3s ease, opacity 0.3s ease;
    transform: scale(0.8);
}


@keyframes expand {
    from {
        opacity: 0;
        height: 0;
    }
    to {
        opacity: 1;
        height: var(--target-height); /* Usaremos una variable CSS para la altura final */
    }
}
.purchase-item.animate {
    animation: expand 0.5s ease forwards;
}

.purchase-item.selected {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    /* Sombra más pronunciada */
    transform: scale(1.05);
    transition: all 0.3s ease; /* Suavizar la transición */
    /* Aumentar ligeramente el tamaño */
}

.purchase-item:not(.selected) {
    filter: opacity(0.6) ;
    transition: all 0.3s ease; /* Suavizar la transición */
}

/* Imagen de la opción de compra */
.purchase-item-image2 {
    width: 100%;
    grid-column: 1; /* Primera columna */
        grid-row: 1;    /* Primera fila */
}

.purchase-item-text {
    color: #ffffff; /* Color del texto principal */
    font-weight: bold;
    text-shadow: 
    -3px -3px 0 #6600d5, 
    -2px -2px 0 #6600d5, 
    -1px -1px 0 #6600d5, 

    -3px 0px 0 #6600d5,
    -2px 0px 0 #6600d5,
    -1px 0px 0 #6600d5,

    -3px 3px 0 #6600d5,
    -2px 2px 0 #6600d5,
    -1px 1px 0 #6600d5,
    
    0px -3px 0 #6600d5,
    0px -2px 0 #6600d5,
    0px -1px 0 #6600d5,

    0px 3px 0 #6600d5,
    0px 2px 0 #6600d5,
    0px 1px 0 #6600d5,

    3px -3px 0 #6600d5,
    2px -2px 0 #6600d5,
    1px -1px 0 #6600d5,

    3px 0px 0 #6600d5,
    2px 0px 0 #6600d5,
    1px 0px 0 #6600d5,

    3px 3px 0 #6600d5;
}
/* Información de la opción de compra */
.purchase-item-info {
    grid-column: 1; /* Primera columna */
    grid-row: 1;    /* Primera fila */
    padding: 10px;
    display: grid;    
    grid-template-rows: 1fr auto;
}

/* Botón de compra */
.purchase-btn-buy {
    background: #1e064a;
    /* Color de fondo del botón */
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.purchase-btn-buy:hover {
    background: #ff6347;
    /* Color de fondo en hover */
}

/* Estilos del contenedor de búsqueda */
.search-container {
    display: flex;
    align-items: center;
}

.search-icon {
    cursor: pointer;
}

/* Estilos similares para la lista de envíos */
.purchase-list-container::-webkit-scrollbar {
    width: 12px;
    /* Ancho de la barra de desplazamiento */
}

.purchase-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    /* Color del fondo del riel de la barra de desplazamiento */
    border-radius: 10px;
    /* Esquinas redondeadas del riel de la barra de desplazamiento */
}

.purchase-list-container::-webkit-scrollbar-thumb {
    background: #5512cf;
    /* Color del "pulgar" de la barra de desplazamiento */
    border-radius: 10px;
    /* Esquinas redondeadas del pulgar de la barra de desplazamiento */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    /* Sombra para darle profundidad */
}

.purchase-list-container::-webkit-scrollbar-thumb:hover {
    background: #ff6347;
    /* Color del pulgar cuando el ratón está sobre él */
}

.purchase-btn-loader {
    display: none;
    border: 2px solid #f3f3f3; /* Light grey */
    border-top: 2px solid #1e064a; /* Dark blue */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.purchase-btn-loading .purchase-btn-text {
    display: none;
}

.purchase-btn-loading .purchase-btn-loader {
    display: inline-block;
}

.purchase-popup-content h2.purchase-title {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    color: #1e064a;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(45deg, #1e064a, #5512cf);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

/* Estilos para el H3 */
.purchase-popup-content h3.purchase-title {
    font-size: 1.2rem;
    margin: 0 0 2rem 0;
    color: #666;
    font-weight: 400;
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* Media Queries */
@media (min-width: 100px) and (max-width: 319px){
    /* Tamaño: 100px - 319px */
}

@media (min-width: 320px) and (max-width: 374px){
    /* Tamaño: 320px - 374px */
}

@media (min-width: 375px) and (max-width: 413px){
    /* Tamaño: 375px - 413px */
}

@media (min-width: 414px) and (max-width: 479px){
    /* Tamaño: 414px - 479px */
}

@media (min-width: 480px) and (max-width: 599px){
    /* Tamaño: 480px - 599px */
}
@media (max-width: 480px) {
    .purchase-popup-content h2.purchase-title {
        font-size: 1.8rem;
    }
    
    .purchase-popup-content h3.purchase-title {
        font-size: 0.9rem;
    }
}
@media (min-width: 600px) and (max-width: 699px){
    /* Tamaño: 600px - 699px */
}

@media (min-width: 700px) and (max-width: 767px){
    /* Tamaño: 700px - 767px */
}

@media (min-width: 768px) and (max-width: 799px){
    /* Tamaño: 768px - 799px */
    .purchase-popup-content h2.purchase-title {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }
    
    .purchase-popup-content h3.purchase-title {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
}

@media (min-width: 800px) and (max-width: 1023px){
    /* Tamaño: 800px - 1023px */
}

@media (min-width: 1024px) and (max-width: 1279px){
    /* Tamaño: 1024px - 1279px */
}

@media (min-width: 1280px) and (max-width: 1299px){
    /* Tamaño: 1280px - 1299px */
}

@media (min-width: 1300px) and (max-width: 1450px){
    /* Tamaño: 1300px - 1450px */
}

@media (min-width: 1450px){
    /* Tamaño: 1450px en adelante */
}