body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: #f0f0f0;
    color: #333;
}
.top-bar {
    background-color: #f7f7f7;
    padding: 5px 20px;
    text-align: center;
    font-size: 0.8em;
    color: #666;
    border-bottom: 1px solid #eee;
}
.header {
    background-color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}
.header .logo {
    display: flex;
    align-items: center;
}
.header .logo img {
    height: 40px; /* Adjust logo size as needed */
    margin-right: 10px;
}
.header .logo span {
    font-size: 1.8em;
    font-weight: 700;
    color: #d84315; /* Garroset's reddish-orange */
}
.search-bar {
    flex-grow: 1;
    margin: 0 30px;
    position: relative;
}
.search-bar input {
    width: calc(100% - 60px); /* Adjust for padding and button */
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    outline: none;
}
.search-bar button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 15px;
    background-color: #B02005; /* Garroset's reddish-orange */
    color: #fff;
    border: none;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
}
.header-icons {
    display: flex;
    align-items: center;
}
.header-icons .icon-item {
    margin-left: 20px;
    text-align: center;
    color: #555;
    text-decoration: none;
    font-size: 0.9em;
}
.header-icons .icon-item i {
    font-size: 1.5em;
    display: block;
    margin-bottom: 3px;
}
.nav-bar {
    background-color: #B02005; /* Garroset's reddish-orange */
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.nav-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
}
.nav-bar ul li {
    margin-right: 25px;
    position: relative;
}
.nav-bar ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
}
.nav-bar ul li a:hover {
    color: #ffccbc; /* Lighter shade for hover */
}
.nav-bar ul li.has-submenu::after {
    content: '▼';
    font-size: 0.6em;
    margin-left: 5px;
    color: #fff;
}
/* Dropdown menu styles (simplified for this example) */
.submenu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    padding: 10px 0;
    left: 0;
    top: 100%;
    border-radius: 0 0 5px 5px;
}
.submenu a {
    color: #333;
    padding: 8px 15px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-weight: normal;
}
.submenu a:hover {
    background-color: #B02005;
    color: #B02005;
}
.nav-bar ul li:hover .submenu {
    display: block;
}

/* Hero section - inspired by Home Depot's rotating banner */
.hero-section {
    background-color: #eee;
    margin-top: 20px;
    padding: 40px 20px;
    text-align: center;
    background-image: url('https://via.placeholder.com/1200x400/d84315/ffffff?text=Descubre+nuestro+catálogo+de+Aceros'); /* Placeholder image, you can replace */
    background-size: cover;
    background-position: center;
    color: #fff;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    border-radius: 8px;
    margin: 20px;
}
.hero-section h1 {
    font-size: 3em;
    margin-bottom: 15px;
}
.hero-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
}
.hero-section .button {
    background-color: #fff;
    color: #d84315;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.hero-section .button:hover {
    background-color: #B02005;
    color: #B02005;
}

/* Placeholder for main content/product display */
.main-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px;
}
.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}
.product-card:hover {
    transform: translateY(-5px);
}
.product-card img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 10px;
}
.product-card h3 {
    font-size: 1.3em;
    color: #d84315;
    margin-bottom: 5px;
}
.product-card p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}
.product-card .price {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}
.product-card .button {
    background-color: #d84315;
    color: #fff;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    display: inline-block;
}
.product-card .button:hover {
    background-color: #e65100;
}

/* Footer */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 20px;
    text-align: center;
    margin-top: 40px;
}
.footer p {
    margin: 0;
    font-size: 0.9em;
}

/* Font Awesome for icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');

/* --- ESTILOS PARA EL CARRUSEL DE BANNERS (Swiper.js) --- */

.hero-carousel {
    width: 100%;
    height: 500px; /* Ajusta la altura a tu gusto */
    margin-bottom: 30px; /* Espacio debajo del carrusel */
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    /* Centra la imagen perfectamente */
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Clave para que la imagen llene el espacio sin deformarse */
}

/* Personaliza los colores de las flechas y los puntos con el color de tu marca */
.swiper-button-next,
.swiper-button-prev {
    color: #d84315; /* Naranja Garroset */
}

.swiper-pagination-bullet-active {
    background-color: #d84315; /* Naranja Garroset para el punto activo */
}

/*
================================================
ESTILOS PARA LA PÁGINA DE LOGIN (login.html)
================================================
*/

/* --- El Fondo con "Desvanecido" --- */
.body-login {
    /* 1. Tus propiedades de fondo (¡perfectas!) */
    background-image:
            linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8)),
            url('images/clavos.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* El fondo se queda fijo al hacer scroll */

    /* 2. Propiedades de tamaño y margen (las corregidas) */
    margin: 0;
    min-height: 100vh; /* Asegura que el fondo cubra al menos 1 pantalla */
    box-sizing: border-box;
    padding: 40px 0; /* Le damos 40px de espacio arriba y abajo */

    /* ¡¡HEMOS BORRADO!!
       - display: flex
       - align-items: center
       - justify-content: center
       - height: 100vh (reemplazado por min-height)
    */
}

/* --- La Caja de Login --- */
.login-container {
    background-color: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px; /* Ancho máximo de la caja */
    text-align: center;
    box-sizing: border-box; /* Importante para que el padding no afecte el ancho */
    margin: 40px auto;
}

.login-logo img {
    max-width: 80px; /* Ajusta el tamaño de tu logo */
    margin-bottom: 1rem;
}

.login-container h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.8rem;
}

.login-container p {
    margin-bottom: 2rem;
    font-size: 1rem;
    color: #666;
}

/* --- El Formulario --- */
.login-form .form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box; /* Importante */
}

.login-button {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 5px;
    background-color: #d84315; /* Naranja de Garroset */
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background-color: #e65100; /* Naranja más oscuro */
}

/* --- Enlaces de ayuda --- */
.login-helpers {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.login-helpers a {
    color: #d84315;
    text-decoration: none;
}

.login-helpers a:hover {
    text-decoration: underline;
}

.back-to-home {
    margin-top: 2rem;
    font-size: 0.9rem;
}

.back-to-home a {
    color: #777;
    text-decoration: none;
}

.back-to-home a:hover {
    color: #333;
    text-decoration: underline;
}

/*
================================================
AJUSTE PARA LA PÁGINA DE REGISTRO
================================================
*/

/* Esto es para centrar el enlace "Ya tienes cuenta"
  ya que solo hay uno, a diferencia del login.
*/
.register-helper {
    justify-content: center;
}
/*
=================================================
ESTILOS PARA EL CATÁLOGO (catalogo.php)
=================================================
*/

/* --- Contenedor de Categorías --- */
.container.categorias-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.main-title {
    text-align: center;
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 30px;
    margin-top: 0;
}

.categorias-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.categoria-card {
    background-color: #f4f4f4;
    color: #555;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.categoria-card:hover {
    background-color: #e0e0e0;
    color: #000;
    transform: translateY(-2px);
}

/* Estilo para la categoría que está seleccionada */
.categoria-card.activo {
    background-color: #d84315; /* Naranja Garroset */
    color: #fff;
    border-color: #d84315;
}

/* --- Contenedor de Productos --- */

/* Ajustamos el main-content que ya tenías */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Un grid para los productos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Ajustes a la tarjeta de producto que ya tenías */
.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0; /* Quitamos padding para que la imagen pegue arriba */
    text-align: left; /* Alineamos a la izquierda */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column; /* Hacemos que sea una columna */
    overflow: hidden; /* Para que la imagen se ajuste a los bordes */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px; /* Altura fija para la imagen */
    object-fit: cover; /* La imagen se recorta para ajustar */
    margin-bottom: 0;
}

.product-card h3 {
    font-size: 1.3em;
    color: #d84315;
    margin: 15px 20px 10px 20px;
    /* Evitar que el título sea muy largo */
    height: 40px;
    overflow: hidden;
}

.product-card .product-description {
    font-size: 0.9em;
    color: #666;
    margin: 0 20px 15px 20px;
    flex-grow: 1; /* Esto empuja el precio hacia abajo */
    /* Limitar texto */
    height: 40px;
    overflow: hidden;
}

.product-card .product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 15px 20px;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    margin-top: auto;
}

.product-presentacion {
    font-size: 0.8em;
    color: #777;
    background-color: #f5f5f5;
    padding: 3px 8px;
    border-radius: 5px;
}

.product-card .price {
    font-size: 1.4em;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.product-card .button {
    background-color: #d84315;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 0 0 5px 5px; /* Solo redondeo abajo */
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    margin: 0; /* Quitamos margen */
    transition: background-color 0.3s ease;
}

.product-card .button:hover {
    background-color: #e65100;
}

.no-products {
    text-align: center;
    font-size: 1.2rem;
    color: #777;
    padding: 40px;
    grid-column: 1 / -1; /* Ocupa todo el ancho del grid */
}

/*
=================================================
ESTILOS PARA EL CATÁLOGO (catalogo.php)
=================================================
*/

/* --- Contenedor de Categorías --- */
.container.categorias-container {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.main-title {
    text-align: center;
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 30px;
    margin-top: 0;
    grid-column: 1 / -1;
}

.categorias-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* ESTA ES LA REGLA QUE ARREGLA TUS CATEGORÍAS */
.categoria-card {
    background-color: #f4f4f4;
    color: #555;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.categoria-card:hover {
    background-color: #e0e0e0;
    color: #000;
    transform: translateY(-2px);
}

/* Estilo para la categoría que está seleccionada */
.categoria-card.activo {
    background-color: #d84315; /* Naranja Garroset */
    color: #fff;
    border-color: #d84315;
}

/* --- Contenedor de Productos --- */

.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ESTA ES LA REGLA QUE ARREGLA TUS PRODUCTOS */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    grid-column: 1 / -1;
}

/* ESTILOS PARA EL RECUADRO (LA TARJETA) */
.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0; /* Quitamos padding para que la imagen pegue arriba */
    text-align: left; /* Alineamos a la izquierda */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column; /* Hacemos que sea una columna */
    overflow: hidden; /* Para que la imagen se ajuste a los bordes */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px; /* Altura fija para la imagen */
    object-fit: cover; /* La imagen se recorta para ajustar */
    margin-bottom: 0;
}

.product-card h3 {
    font-size: 1.3em;
    color: #d84315;
    margin: 15px 20px 10px 20px;
    height: 40px;
    overflow: hidden;
}

.product-card .product-description {
    font-size: 0.9em;
    color: #666;
    margin: 0 20px 15px 20px;
    flex-grow: 1; /* Esto empuja el precio hacia abajo */
    height: 40px;
    overflow: hidden;
}

.product-card .product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 15px 20px;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    margin-top: auto;
}

.product-presentacion {
    font-size: 0.8em;
    color: #777;
    background-color: #f5f5f5;
    padding: 3px 8px;
    border-radius: 5px;
}

.product-card .price {
    font-size: 1.4em;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.product-card .button {
    background-color: #d84315;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 0 0 5px 5px;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    margin: 0;
    transition: background-color 0.3s ease;
}

.product-card .button:hover {
    background-color: #e65100;
}

.no-products {
    text-align: center;
    font-size: 1.2rem;
    color: #777;
    padding: 40px;
    grid-column: 1 / -1; /* Ocupa todo el ancho del grid */
}
/*
=================================================
ESTILOS PARA MENSAJES DE FORMULARIO (Register/Login)
=================================================
*/

.form-message {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
}

/* Estilo para errores (rojo) */
.error-message {
    background-color: #f8d7da; /* Rojo pálido */
    color: #721c24; /* Rojo oscuro */
    border: 1px solid #f5c6cb; /* Borde rojo */
}

/* Estilo para éxito (verde) */
.success-message {
    background-color: #d4edda; /* Verde pálido */
    color: #155724; /* Verde oscuro */
    border: 1px solid #c3e6cb; /* Borde verde */
}
/*
=================================================
ESTILOS PARA LA PÁGINA DE MI CUENTA (mi_cuenta.php)
=================================================
*/

/* ¡ASEGÚRATE DE BORRAR EL "/*" QUE ESTABA AQUÍ!
*/

.account-container {
    background-color: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    margin: 0 auto; /* Lo centramos horizontalmente */
}

.account-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.8rem;
}

.account-container p {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1rem;
    color: #666;
}

.account-form .form-section {
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.account-form .form-section h3 {
    margin-top: 0;
    color: #d84315; /* Naranja Garroset */
}

/* Para poner campos lado a lado */
.form-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.account-form .login-button {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.1rem;
}

/* Sección para el botón de Pedidos */
.account-section {
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    text-align: center;
}

.account-section h3 {
    margin-top: 0;
    color: #d84315;
}

.button-secondary {
    display: inline-block;
    background-color: #6c757d; /* Un color secundario (gris) */
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.button-secondary:hover {
    background-color: #5a6268;
}
/* ... (después de .estado-label.cancelado) ... */

.estado-label.pendiente {
    background-color: #6c757d; /* Gris (mismo que el default) */
}
/*
=================================================
ESTILOS PARA LA PAGINACIÓN
=================================================
*/
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    grid-column: 1 / -1; /* Asegura que ocupe todo el ancho si está en un grid */
}

.pagination a,
.pagination span.disabled {
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #d84315;
    background-color: #fff;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Estilo para el botón deshabilitado (ej. "Anterior" en pág 1) */
.pagination span.disabled {
    color: #aaa;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Estilo para el hover */
.pagination a:hover {
    background-color: #f0f0f0;
}

/* Estilo para el número de página ACTIVA */
.pagination a.active {
    background-color: #d84315; /* Naranja Garroset */
    color: #fff;
    border-color: #d84315;
    cursor: default;
}
/*
=================================================
ESTILOS PARA PÁGINA DE DETALLE (detalle_producto.php)
=================================================
*/

.detalle-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columnas de igual tamaño */
    gap: 40px;
}

/* Columna Izquierda: Imagen */
.detalle-imagen {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f9f9f9;
}

.detalle-imagen img {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: contain; /* 'contain' para que se vea completo, 'cover' para llenar */
}

/* Columna Derecha: Información */
.detalle-info h1 {
    font-size: 2.5rem;
    color: #333;
    margin-top: 10px;
    margin-bottom: 10px;
}

.detalle-categoria {
    font-size: 0.9rem;
    font-weight: bold;
    color: #777;
    text-transform: uppercase;
}

.detalle-precio {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: #d84315; /* Naranja Garroset */
    margin: 15px 0;
}

.detalle-descripcion {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

/* Formulario de Cantidad y Compra */
.form-comprar {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.form-cantidad {
    display: flex;
    flex-direction: column;
}

.form-cantidad label {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.form-cantidad input[type="number"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.2rem;
    width: 80px;
    text-align: center;
}

/* Ajustamos el botón para que se vea bien */
.form-comprar .login-button {
    flex-grow: 1; /* Ocupa el espacio restante */
    padding: 14px;
    margin-top: 15px; /* Se alinea con el input */
}

/* Media query para pantallas pequeñas (móviles) */
@media (max-width: 768px) {
    .detalle-grid {
        grid-template-columns: 1fr; /* Una sola columna */
    }
    .detalle-info h1 {
        font-size: 2rem;
    }
    .form-comprar {
        flex-direction: column;
        align-items: stretch;
    }
    .form-cantidad input[type="number"] {
        width: 100%;
    }
    .form-comprar .login-button {
        margin-top: 10px;
    }
}
/*
=================================================
ESTILOS PARA LA PÁGINA DEL CARRITO (carrito.php)
=================================================
*/

.cart-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 50px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.cart-empty p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 30px;
}

/* Grid para items y resumen */
.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 para items, 1/3 para resumen */
    gap: 30px;
}

/* Columna izquierda: Lista de items */
.cart-items-list {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 10px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 2fr 1.5fr 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 5px;
}

.cart-item-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #333;
}
.cart-item-price {
    font-size: 0.9rem;
    color: #777;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cart-item-actions label {
    font-size: 0.9rem;
    font-weight: bold;
}
.cart-item-actions input[type="number"] {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.button-update {
    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
}
.button-update:hover {
    background: #e0e0e0;
}

.cart-item-subtotal {
    text-align: right;
}
.cart-item-subtotal span {
    display: block;
    font-size: 0.9rem;
    color: #777;
}
.cart-item-subtotal strong {
    font-size: 1.2rem;
    color: #000;
}

.button-remove {
    background: none;
    border: none;
    color: #dc3545; /* Rojo */
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 10px;
}
.button-remove:hover {
    color: #a71d2a;
}

/* Columna derecha: Resumen */
.cart-summary {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 30px;
    height: fit-content; /* Para que "flote" */
}
.cart-summary h3 {
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.summary-row, .summary-total {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-size: 1rem;
}
.summary-total {
    font-size: 1.3rem;
    font-weight: bold;
    color: #000;
    margin-top: 20px;
}

/* Responsive para móvil */
@media (max-width: 900px) {
    .cart-grid {
        grid-template-columns: 1fr; /* Apilamos las columnas */
    }
    .cart-item {
        grid-template-columns: 80px 1fr; /* Imagen y el resto */
        grid-template-rows: auto auto auto;
        row-gap: 10px;
    }
    .cart-item-img { grid-row: 1 / 4; grid-column: 1 / 2; }
    .cart-item-info { grid-row: 1 / 2; grid-column: 2 / 3; }
    .cart-item-actions { grid-row: 2 / 3; grid-column: 2 / 3; }
    .cart-item-subtotal { grid-row: 3 / 4; grid-column: 2 / 3; text-align: left;}
    .cart-item-remove { grid-row: 1 / 2; grid-column: 2 / 3; text-align: right;}
    .cart-summary {
        margin-top: 30px;
    }
}