/* Estilo del contenedor del carrito */
.carrito-container {
    margin: 20px auto;
    max-width: 1200px; /* Tamaño máximo para el carrito */
    padding: 20px;
}

h1.carrito-h1 {
    text-align: left;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: #1c3b69;
}

/* Estilo de la tabla del carrito */
table.carrito-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

table.carrito-table, th.carrito-th, td.carrito-td {
    border: 1px solid #dee2e6;
}

th.carrito-th, td.carrito-td {
    padding: 10px;
    text-align: center;
}

th.carrito-th {
    background-color: #1c3b69;
    color: white;
}

/* Imagen de productos */
img.carrito-img {
    max-width: 200px; /* Ajuste al tamaño de imagen */
    border: 5px solid yellow;
    position: relative;
    top: -5px;
    border-radius: 20px;
}

/* Contenedor total */
div.carrito-total-container {
    text-align: right;
    margin-top: 20px;
}

div.carrito-total-container p.carrito-total-text {
    font-size: 1.2em;
    margin: 10px 0;
}

span.carrito-total {
    font-weight: bold;
}

div.carrito-button-container {
    text-align: right;
    margin-top: 20px;
}

div.carrito-button-container a.carrito-button {
    background-color: #1c3b69;
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

div.carrito-button-container a.carrito-button:hover {
    background-color: #ffcc00; 
    color: #1c3b69;
    font-weight: bold;
    transform: scale(1.1) rotate(-1deg); 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
    text-decoration: none; 
}

div.carrito-button-container a.carrito-button:active {
    transform: scale(0.95); 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); 
}


button.carrito-delete-button {
    background-color: #FF3F5B;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

button.carrito-delete-button i {
    font-size: 18px;
}

.carrito-total-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
    top: -28px;
    width: 100%;
}

.carrito-total-table {
    border: 1px solid #ddd;
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 15px;
    background-color: #fff;
}

.carrito-total-table td {
    padding: 10px 15px;
    font-size: 16px;
}

.carrito-total-label {
    font-weight: bold;
    color: #000000;
    text-align: right;
    width: 34%;
    border-right: 1px solid #ddd;
    
}

.carrito-total-value {
    color: #000000;
    text-align: left;
    font-weight: bold;
    width: 4.5%;
}

.swal2-confirm-button-yellow {
    background-color: #ffcc00 !important;
    color: #1c3b69 !important;    
    font-weight: bold;
}

.swal2-confirm-button-yellow:hover {
    background-color: #1c3b69 !important;
    color: white !important;    
    font-weight: bold;
}

.carrito-button-container {
    text-align: center;
    margin-top: 20px;
}

.carrito-button {
    background-color: #ffcc00; /* Amarillo */
    color: #1c3b69; /* Color de texto blanco */
    font-size: 16px;
    font-weight: bold;
    padding: 12px 12px; /* Espaciado interno */
    border: none;
    border-radius: 5px; /* Bordes redondeados */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.carrito-button:hover {
    background-color: #1c3b69; /* Color al pasar el ratón */
    color: white;
    transform: scale(1.05); /* Le da un efecto de agrandamiento */
}

.carrito-button:focus {
    outline: none; /* Quitar el borde de enfoque */
}

.carrito-button:active {
    background-color: #FF8C00; /* Color al hacer clic */
    transform: scale(1); /* El botón vuelve a su tamaño original */
}

.finalizar-compra-button-container {
    text-align: center;
    margin-top: 20px;
}

.finalizar-compra-button {
    background-color: #ffcc00; /* Color verde */
    color: #1c3b69; /* Color de texto blanco */
    font-size: 16px;
    font-weight: bold;
    padding: 12px 24px; /* Espaciado interno */
    border: none;
    border-radius: 5px; /* Bordes redondeados */
    text-decoration: none; /* Eliminar subrayado */
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.finalizar-compra-button:hover {
    background-color: #1c3b69; /* Color verde oscuro al pasar el ratón */
    transform: scale(1.05); /* Efecto de agrandamiento */
    color: white;
}

.finalizar-compra-button:focus {
    outline: none; /* Quitar el borde de enfoque */
}

/* Media Queries para dispositivos más pequeños (pantallas móviles y tabletas) */
@media (max-width: 768px) {
    /* Estilo de la tabla solo en pantallas pequeñas */
    table.carrito-table {
        font-size: 0.7rem; /* Más pequeño tamaño de la fuente */
    }

    table.carrito-table, th.carrito-th, td.carrito-td {
        padding: 4px; /* Reducir aún más el padding */
    }

    /* Reducir el tamaño de la imagen en pantallas pequeñas */
    img.carrito-img {
        max-width: 120px; /* Imagen aún más pequeña */
    }

    .carrito-button-container a.carrito-button {
        font-size: 14px; /* Reducir tamaño del texto en los botones */
        padding: 8px 16px; /* Reducir padding de los botones */
    }

    /* Reducir el tamaño de los botones de eliminar */
    button.carrito-delete-button {
        width: 35px;
        height: 35px;
    }

    .finalizar-compra-button {
        font-size: 14px; /* Reducido tamaño de fuente */
        padding: 10px 20px; /* Reducir espaciado */
    }

    /* Ocultar el título en pantallas pequeñas */
    h1.carrito-h1 {
        display: none;
    }
}

/* Para pantallas más pequeñas (por debajo de 480px) */
@media (max-width: 480px) {
    /* Hacer la tabla aún más compacta */
    table.carrito-table {
        font-size: 0.6rem; /* Aún más pequeño */
    }

    table.carrito-table, th.carrito-th, td.carrito-td {
        padding: 3px; /* Aumentar la reducción del padding */
    }

    /* Ajustar la imagen a un tamaño aún menor */
    img.carrito-img {
        max-width: 90px; /* Imagen más pequeña */
    }

    .carrito-button-container a.carrito-button {
        font-size: 12px; /* Reducir aún más el tamaño de los botones */
        padding: 6px 12px; /* Reducir más el espaciado */
    }

    /* Reducir más el tamaño de los botones de eliminar */
    button.carrito-delete-button {
        width: 30px;
        height: 30px;
    }

    .finalizar-compra-button {
        font-size: 12px; /* Aún más pequeño */
        padding: 8px 16px; /* Reducir espaciado */
    }
}
