/* estilos.css - Estilo Artisan & Login System */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Fraunces:opsz,wght@9..144,300;9..144,700&display=swap');

:root {
    /* NUEVO COLOR PRINCIPAL */
    --primary: #7A2514;       /* Tu nuevo color (Ladrillo) */
    
    /* Variación oscura para el hover (efecto al pasar el mouse) */
    --primary-dark: #5e1c0f;  
    
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-body: #f9f7f2;       
    --card-bg: #ffffff;
    --radius: 24px;
    --shadow: 0 12px 30px rgba(122, 37, 20, 0.08); /* Sombra ajustada al nuevo tono */
}

body {
    background-color: var(--bg-body);
    font-family: 'DM Sans', sans-serif;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, .brand-logo {
    color: var(--primary-brand) !important;
}

/* --- HEADER FLOTANTE --- */
.navbar-custom {
    background: #ffffff;
    box-shadow: 0 4px 25px rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.02);
    min-height: 160px; /* <--- ACTUALIZADO AQUÍ TAMBIÉN */
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    z-index: 1030;
}
/* AJUSTE PARA MÓVILES (Celular) */
/* Cuando la pantalla es pequeña, bajamos la altura para que no ocupe todo el teléfono */
/* Escritorio (por defecto) */
.logo-tartamiel { height: 120px; }

/* Móvil (pantallas menores a 768px) */
@media (max-width: 768px) {
    .navbar-custom { min-height: 80px !important; } /* Reducir altura barra */
    .logo-tartamiel { height: 60px !important; }   /* Logo a la mitad */
    /* Ocultar decoraciones laterales si estorban */
    .navbar img.opacity-75 { display: none !important; } 
}

.logo-effect { transition: transform 0.3s ease; }
.logo-effect:hover { transform: scale(1.05); }

.brand-logo {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary) !important;
}
.brand-logo-img {
    max-height: 50px;
    width: auto;
    display: block;
}

/* --- STEPPER MINIMALISTA --- */
/* --- STEPPER RESPONSIVO (CORREGIDO) --- */
.stepper-container {
    background: white;
    margin: 20px auto 30px; /* Centrado con margen */
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow);
    
    /* CAMBIO CLAVE: Ancho fluido en lugar de fijo */
    width: 95%; 
    max-width: 800px;
    display: block; /* Ya no inline-block */
    position: relative;
}

.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Línea conectora */
.stepper-wrapper::after {
    content: ''; 
    position: absolute; 
    top: 14px; /* Ajustado al centro del punto (dot) */
    left: 20px; 
    right: 20px;
    height: 2px; 
    background: #eee; 
    z-index: 0;
}

.stepper-item {
    position: relative; 
    z-index: 1;
    background: white; 
    padding: 0 10px;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    flex: 1; /* Distribuye el espacio equitativamente */
}

.step-dot {
    width: 30px; height: 30px; /* Punto un poco más grande */
    border-radius: 50%;
    background: #fff;
    border: 3px solid #ddd;
    transition: all 0.4s ease;
    /* Centrar contenido si quisieras poner números */
    display: flex; align-items: center; justify-content: center;
}

/* Estado Activo */
.stepper-item.active .step-dot {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.2);
    transform: scale(1.1);
}

/* Estado Completado */
.stepper-item.completed .step-dot {
    background: var(--primary);
    border-color: var(--primary);
}

.step-label {
    margin-top: 8px;
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase;
    color: #ccc; 
    transition: all 0.3s; 
    text-align: center;
    white-space: nowrap; /* Evita que el texto se parta en 2 líneas */
}

.stepper-item.active .step-label { color: var(--primary); }
.stepper-item.completed .step-label { color: var(--primary); }

/* AJUSTE MÓVIL: Ocultar textos en pantallas muy pequeñas para que no se amontone */
@media (max-width: 576px) {
    .step-label { display: none; } /* Solo muestra los puntos */
    .stepper-wrapper::after { top: 13px; } /* Ajuste fino de línea */
    .step-dot { width: 25px; height: 25px; }
}

/* --- CARDS GENERALES (Login, Perfil, Checkout) --- */
.custom-card {
    background: var(--card-bg);
    border: none;
    border-radius: 20px; /* Bordes más curvos */
    box-shadow: 0 10px 30px rgba(0,0,0,0.04); /* Sombra muy sutil */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    height: 100%;
}
.custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

/* --- IMAGEN DEL PRODUCTO --- */
.product-img-box {
    height: 200px; /* Altura fija */
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px; /* Más espacio alrededor de la imagen */
    position: relative;
    border-bottom: 1px solid #f9f9f9;
}
.product-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.05));
}
.custom-card:hover .product-img {
    transform: scale(1.08); /* Zoom suave al pasar mouse */
}

/* --- BADGE DE STOCK (Más discreto) --- */
.stock-pill {
    position: absolute; 
    top: 15px; 
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px; 
    border-radius: 30px;
    font-size: 0.7rem; 
    font-weight: 700; 
    color: var(--text-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* --- CUERPO DE LA TARJETA --- */
.card-body-custom {
    padding: 20px; /* Mucho aire interno */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.3;
    /* Truncar texto si es muy largo (2 líneas máx) */
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-code {
    font-size: 0.75rem;
    color: #b2bec3;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* --- PRECIO Y ACCIÓN --- */
.price-container {
    margin-top: auto; /* Empuja esto al fondo */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-tag {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}
.price-iva {
    font-size: 0.65rem;
    color: #b2bec3;
    display: block;
    margin-top: -4px;
    font-weight: 400;
}

/* Botón "Más" Minimalista */
.btn-add-mini {
    width: 42px; height: 42px;
    border-radius: 50%;
    background-color: var(--bg-body); /* Fondo claro */
    color: var(--primary);
    border: 2px solid transparent;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    font-size: 1.1rem;
}
.btn-add-mini:hover {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
}

/* AJUSTE PARA MÓVILES (Para que no se vean gigantes en 2 columnas) */
@media (max-width: 768px) {
    .product-img-box { height: 160px; padding: 15px; }
    .card-body-custom { padding: 15px; }
    .product-title { font-size: 0.95rem; }
    .price-tag { font-size: 1.1rem; }
    .btn-add-mini { width: 36px; height: 36px; font-size: 1rem; }
}

/* --- PERFIL DE USUARIO --- */
.avatar-circle {
    width: 80px; height: 80px;
    background: #fdfbf7;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-family: 'Fraunces', serif;
    margin: 0 auto 1rem;
}
.card-cliente {
    border-left: 5px solid var(--primary);
}

/* --- BOTONES Y CONTROLES --- */
.btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
    transition: all 0.3s;
}
.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 12px;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}
.btn-circle {
    width: 45px; height: 45px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.form-select-lg, .form-control-lg {
    border-radius: 16px;
    border: 2px solid #eee;
    padding: 15px 20px;
    font-size: 1rem;
}
.form-select-lg:focus, .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.1);
}

/* --- CARRITO IMAGEN --- */
.img-thumb-wrapper {
    width: 70px; height: 70px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 5px;
    display: flex; align-items: center; justify-content: center;
}
.img-thumb-wrapper img {
    max-width: 100%; max-height: 100%; object-fit: contain;
}

/* --- FOOTER --- */
footer {
    margin-top: auto;
    background: white;
    padding: 40px 0;
    border-top: 1px solid #eee;
}