/* ==========================================================================
   PLANTILLA MINIMALISTA PREMIUM - STORE TECH AMBATO
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #000000;
}

/* --- BARRA SUPERIOR DE ANUNCIOS --- */
.barra-anuncios {
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    font-size: 0.75rem;
    color: #555555;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e5e5;
}

@media (max-width: 600px) {
    .barra-anuncios span:not(:first-child) { display: none; }
}

/* --- CABECERA (NAV) --- */
header {
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 5%;
    border-bottom: 1px solid #f0f0f0;
}

header nav a {
    color: #000000;
    text-decoration: none;
    font-size: 0.85rem;
    margin-right: 25px;
    font-weight: 400;
}

header nav a.active {
    border-bottom: 1px solid #000000;
    padding-bottom: 4px;
}

header .logo h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.menu-der {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-buscar {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
}

.carrito-icono {
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
}

#contador-carrito {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: #000000;
    color: #ffffff;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 50%;
    font-weight: bold;
}

/* --- HERO BANNER ACTUALIZADO --- */
.hero-banner {
    background-color: #f3f3f3;
    background-image: url('https://i.pinimg.com/originals/e2/c2/75/e2c275b6b2d338be77d08a4ef72c665f.jpg'); 
    background-size: cover;          
    background-position: center;     
    background-repeat: no-repeat;
    height: 520px; /* Le damos un poquito más de altura total para jugar mejor */
    display: flex;
    align-items: flex-start; /* 1. Cambiamos 'center' por 'flex-start' para mandar todo arriba */
    justify-content: center;
    text-align: center;
    margin-bottom: 60px;
}

/* --- BLOQUE DE CONTENIDO TEXTO --- */
.hero-contenido {
    margin-top: 50px; /* 2. Controla qué tan arriba lo quieres (bájalo o súbelo cambiando este número) */
    background-color: rgba(255, 255, 255, 0.4); /* Fondo translúcido sutil para asegurar contraste */
    padding: 20px 40px;
    border-radius: 8px;
    backdrop-filter: blur(4px); /* Difumina un poquito el fondo para que la letra resalte limpia */
}

/* --- NUEVA TIPOGRAFÍA Y ESTILO PARA EL TÍTULO --- */
.hero-contenido h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* Letra moderna */
    font-size: 2.5rem;
    font-weight: 800; /* Más gruesa e imponente */
    letter-spacing: 2px;
    color: #000000;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* --- SUBTÍTULO DEL BANNER --- */
.hero-contenido p {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #222222;
    margin-bottom: 20px;
}

.btn-shop-now {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 12px 35px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-shop-now:hover {
    background-color: #333333;
}

/* --- MAQUETACIÓN DEL CATÁLOGO --- */
main {
    max-width: 1200px;
    margin: 0 auto 80px auto;
    padding: 0 20px;
}

.seccion-titulo {
    font-size: 1.4rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 1.5px;
    margin-bottom: 40px;
}

/* --- RE-DISEÑO DE LAS TARJETAS (ESTILO IMAGEN) --- */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.producto-card {
    background-color: #ffffff;
    text-align: left; /* Alineado a la izquierda como el de la foto */
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Caja gris claro contenedora de la imagen */
.producto-card .img-contenedor {
    background-color: #f7f7f7;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    height: 280px;
}

.producto-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Etiqueta de "Sale" pequeña en color negro */
.tag-sale {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: #000000;
    color: #ffffff;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: bold;
}

.producto-card h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #000000;
    margin-bottom: 5px;
}

.producto-card p.descripcion-corta {
    font-size: 0.8rem;
    color: #777777;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.producto-card .precio-contenedor {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.producto-card .precio {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000000;
}

.producto-card .precio-antes {
    font-size: 0.85rem;
    color: #b5b5b5;
    text-decoration: line-through;
}

/* Botón discreto que reemplaza el anterior para añadir al carrito */
.producto-card button {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    padding: 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.producto-card button:hover {
    background-color: #000000;
    color: #ffffff;
}

/* ==========================================================================
   SECCIÓN SEPARADA: DISEÑO INTEGRADO DEL CARRITO PREMIUM
   ========================================================================== */

.carrito-main {
    max-width: 1100px;
    margin: 40px auto 80px auto;
    padding: 0 20px;
}

.carrito-titulo-pagina {
    font-size: 1.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 40px;
    text-align: left;
    border: none; /* Quitamos la barra azul de antes */
    padding: 0;
}

/* Distribución en dos columnas limpias */
.carrito-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: flex-start;
}

@media (max-width: 850px) {
    .carrito-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Tabla de productos */
.carrito-tabla-cabecera {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888888;
    letter-spacing: 1px;
    padding-bottom: 10px;
}

.linea-fina {
    border: 0;
    height: 1px;
    background-color: #e5e5e5;
    margin-bottom: 25px;
}

/* Tarjeta o fila de cada artículo en el carrito */
.item-carrito {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
    background-color: transparent; /* Quitamos el fondo gris anterior */
    border-left: none; /* Quitamos el borde fosforescente */
    margin-bottom: 0;
    box-shadow: none;
}

.item-info h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: #000000;
    margin-bottom: 4px;
}

.item-info p {
    color: #777777;
    font-size: 0.8rem;
}

/* Controles de cantidad (- 1 +) elegantes */
.item-controles {
    display: flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    width: fit-content;
    padding: 4px;
    background-color: #ffffff;
}

.item-controles button {
    background: none;
    border: none;
    color: #000000;
    font-size: 0.85rem;
    padding: 2px 10px;
    cursor: pointer;
    transition: color 0.2s;
}

.item-controles button:hover {
    color: #777777;
    background-color: transparent; /* Evitamos que se pinte de negro */
}

.item-controles span {
    font-size: 0.85rem;
    font-weight: 400;
    margin: 0 5px;
}

.item-subtotal {
    font-size: 0.95rem;
    font-weight: 600;
    color: #000000;
    text-align: right;
}

/* Columna del Resumen de la Orden */
.carrito-resumen-columna {
    background-color: #fafafa;
    padding: 35px;
    border: 1px solid #eeeeee;
}

.carrito-resumen-columna h3 {
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.resumen-linea {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #555555;
    margin-bottom: 15px;
}

.envio-gratis {
    color: #000000;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.total-fila {
    font-size: 1.1rem;
    color: #000000;
    font-weight: 600;
    margin-top: 20px;
}

#precio-total {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Botones del checkout en bloque negro sólido */
.btn-checkout-negro {
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #000000;
    padding: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

.btn-checkout-negro:hover {
    background-color: #333333;
    border-color: #333333;
    color: #ffffff;
}

.btn-vaciar-minimal {
    background: none;
    color: #999999;
    border: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-vaciar-minimal:hover {
    color: #ff3333;
    background: none;
}

.carrito-vacio {
    font-size: 0.9rem;
    color: #666666;
    padding: 40px 0;
}

/* ==========================================================================
   SECCIÓN SEPARADA: DISEÑO DEL PANEL DE ADMINISTRACIÓN MINIMALISTA
   ========================================================================== */

.admin-main {
    max-width: 700px;
    margin: 40px auto 80px auto;
    padding: 0 20px;
}

.admin-titulo {
    font-size: 1.6rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.form-admin {
    border: 1px solid #eeeeee;
    padding: 40px;
    background-color: #ffffff;
}

.campo {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
}

.campo label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #333333;
    margin-bottom: 8px;
}

.campo input, .campo textarea {
    border: 1px solid #e5e5e5;
    padding: 12px;
    font-size: 0.9rem;
    color: #000000;
    background-color: #ffffff;
    border-radius: 0; /* Estilo cuadrado minimalista */
}

.campo input:focus, .campo textarea:focus {
    border-color: #000000;
    outline: none;
}

.admin-grid-campos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 550px) {
    .admin-grid-campos { grid-template-columns: 1fr; gap: 0; }
}

/* ==========================================================================
   SECCIÓN SEPARADA: MODAL DE LOGIN MINIMALISTA
   ========================================================================== */

.modal-fondo-login {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fondo oscuro translúcido */
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 3000; /* Por encima de todo */
    backdrop-filter: blur(5px);
}

.modal-contenido-login {
    background: #ffffff;
    padding: 45px;
    width: 100%;
    max-width: 420px;
    border: 1px solid #e5e5e5;
    position: relative;
    text-align: left;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.modal-contenido-login h3 {
    font-size: 1.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000000;
    margin-bottom: 5px;
}

.btn-cerrar-login {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #999999;
    transition: color 0.2s;
}

.btn-cerrar-login:hover {
    color: #000000;
}

.campo-login {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.campo-login label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #333333;
    margin-bottom: 6px;
}

.campo-login input {
    border: 1px solid #e5e5e5;
    padding: 12px;
    font-size: 0.9rem;
    color: #000000;
    background-color: #ffffff;
    border-radius: 0; /* Totalmente cuadrado estilo premium */
    transition: border-color 0.2s;
}

.campo-login input:focus {
    border-color: #000000;
    outline: none;
}