/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    --primary: #1E4D3B;
    /* Verde Barro's */
    --primary-dark: #143629;
    --accent: #D35400;
    /* Naranja Horno */
    --accent-hover: #A04000;
    --text-dark: #2D2D2D;
    --text-muted: #666666;
    --bg-light: #F9F9F9;
    --bg-crema: #FFFDF7;
    /* Color masa/harina */
    --white: #FFFFFF;

    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --font-script: 'Yellowtail', cursive;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 15px 35px rgba(0, 0, 0, 0.2);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* =========================================
   2. TIPOGRAFÍA Y UTILIDADES
   ========================================= */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-accent {
    color: var(--accent);
}

.text-white {
    color: var(--white);
}

.text-center {
    text-align: center;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.subtitle {
    font-family: var(--font-script);
    color: var(--accent);
    font-size: 2.2rem;
    display: block;
    text-transform: none;
}

/* =========================================
   3. BOTONES
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(211, 84, 0, 0.3);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* =========================================
   4. NAVBAR
   ========================================= */
.navbar {
    background: var(--primary);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.logo-image {
    height: 75px;
    width: auto;
    transition: var(--transition);
}

.logo-img-container:hover .logo-image {
    transform: scale(1.05) rotate(-2deg);
}

.nav-menu {
    display: flex;
    gap: 15px;
}

.nav-link {
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: var(--font-heading);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: var(--transition);
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1590947132387-155cc02f3212?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Info Bar */
.info-bar {
    background-color: var(--accent);
    color: var(--white);
    padding: 15px 0;
    position: relative;
    z-index: 20;
}

.info-bar .container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* =========================================
   6. SECCIÓN ACERCA (Beige Artesanal)
   ========================================= */
#acerca {
    background: linear-gradient(135deg, #FFFBF2 0%, #FFF5E6 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.img-placeholder {
    height: 450px;
    border-radius: var(--radius);
    background: url('../img/horno.jpg') center/cover;
    border: 8px solid var(--white);
    box-shadow: 20px 20px 0 var(--accent), var(--shadow-strong);
    transform: rotate(-3deg);
    transition: var(--transition);
}

.img-placeholder:hover {
    transform: rotate(0deg) scale(1.02);
}

.feature-list li {
    background: var(--white);
    padding: 15px 25px;
    border-radius: 50px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* =========================================
   7. MENÚ (Imagen con Filtro Verde)
   ========================================= */
.menu-bg-section {
    background: url('../img/menu-bg.jpg') center/cover fixed;
}

.menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 77, 59, 0.88);
    z-index: 1;
}

.relative-z {
    position: relative;
    z-index: 2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-crema);
    border-top: 6px solid var(--accent);
    padding: 40px 30px;
    border-radius: 0 0 var(--radius) var(--radius);
    text-align: center;
    box-shadow: var(--shadow-strong);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.card h3 {
    color: var(--primary);
    font-size: 2rem;
    border-bottom: 2px dashed #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
    min-height: 50px;
}

.price {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--accent);
    font-weight: 700;
    margin: 15px 0;
    display: block;
}

/* =========================================
   8. FIDELIDAD (Tarjeta de Puntos)
   ========================================= */
#fidelidad {
    background: var(--white);
}

.loyalty-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--primary);
    color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-strong);
}

.form-group-inline {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-group-inline input {
    flex: 1;
    padding: 15px;
    border-radius: 5px;
    border: none;
    font-size: 1.1rem;
}

.puntos-card {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 2px dashed var(--accent);
}

.puntos-num {
    font-size: 4rem;
    font-family: var(--font-heading);
    color: var(--accent);
    line-height: 1;
    display: block;
}

/* =========================================
   9. GALERÍA (Marquee Infinito)
   ========================================= */
#trabajos {
    background: #111;
    padding: 80px 0;
}

.carousel-container {
    overflow: hidden;
    position: relative;
    padding: 40px 0;
}

.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-item {
    width: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.carousel-item img {
    height: 250px;
    width: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.carousel-item:hover img {
    transform: scale(1.1);
}

.carousel-caption {
    padding: 15px;
    background: #000;
    color: var(--white);
    text-align: center;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   10. CARRITO FLOTANTE Y WIDGET
   ========================================= */
.float-cart {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--accent);
    color: var(--white);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: var(--transition);
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-widget {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background: var(--white);
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-widget.active {
    right: 0;
}

.cart-header {
    background: var(--primary);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.cart-footer {
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
}

.total-line {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

/* WhatsApp Button */
.float-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* =========================================
   11. CONTACTO Y FOOTER
   ========================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-form-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

footer {
    background: var(--primary-dark);
    color: #999;
    padding: 60px 0 30px;
    font-size: 0.9rem;
}

.nexento-socials a {
    font-size: 1.2rem;
    color: var(--white);
    margin: 0 10px;
}

.credits strong {
    color: var(--accent);
    transition: 0.3s;
}

.credits a:hover strong {
    border-bottom: 1px solid var(--accent);
}

/* =========================================
   12. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 85px;
        width: 100%;
        background: var(--primary);
        flex-direction: column;
        padding: 40px;
        text-align: center;
        transition: 0.4s;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .img-placeholder {
        height: 300px;
        transform: rotate(0);
        box-shadow: 10px 10px 0 var(--accent);
    }

    .cart-widget {
        width: 100%;
    }
}

.hidden {
    display: none !important;
}

/* =========================================
   NUEVOS ESTILOS: CHECKOUT Y ADMIN
   ========================================= */

/* 1. Formulario de Checkout en el Carrito */
.checkout-form {
    padding: 15px;
    background: #fdfdfd;
    border-top: 2px solid #eee;
    margin-bottom: 15px;
    border-radius: 8px;
}

.checkout-form h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-form .form-group {
    margin-bottom: 12px;
}

.checkout-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.checkout-form select, 
.checkout-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: var(--font-body);
}

/* Botón de Ubicación GPS */
.btn-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    transition: var(--transition);
}

.btn-location:hover {
    background: #dee2e6;
    color: var(--accent);
}

.btn-location i {
    font-size: 1rem;
    color: var(--accent);
}

/* 2. Estilos para el Panel Admin (Detalle de Pedidos) */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Modal de Detalle de Pedido */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.order-detail-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--accent);
}

.order-detail-list div {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.order-detail-list div:last-child {
    border-bottom: none;
}

/* 3. Utilidades */
.hidden {
    display: none !important;
}

/* Ajuste responsive para el carrito con checkout */
@media (max-width: 768px) {
    .cart-widget {
        width: 100%;
    }
    
    .checkout-form {
        padding: 10px;
    }
}
/* =========================================
   ACCESO ADMIN BAJO PERFIL
   ========================================= */
/* Acceso Admin muy discreto */
.admin-backdoor {
    position: absolute;
    bottom: -10px;
    right: 0;
    opacity: 0.1; /* Casi invisible */
    transition: opacity 0.3s ease;
}

.admin-backdoor a {
    color: #fff;
    font-size: 0.7rem;
    cursor: default; /* No muestra la mano de link para no delatarse */
}

.admin-backdoor:hover {
    opacity: 1; /* Solo se ve al pasar el mouse por la esquina */
}

.admin-backdoor a:hover {
    color: var(--accent-color);
    cursor: pointer;
}