:root {
    --brand-teal: #00A887;
    --brand-teal-dark: #0d5c4d;
    --brand-teal-light: #e6f6f3;
    --brand-dark: #121816;
    --brand-gold: #c5a059;
    --bg-cream: #faf9f5;
    --bg-white: #ffffff;
    --text-main: #2c3330;
    --text-muted: #6e7874;
    --border-color: #e5e2d9;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-cream);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--brand-dark);
}

/* Top Banner */
.top-bar {
    background: var(--brand-dark);
    color: #d1d8d5;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    text-transform: uppercase;
}

/* Header & Nav */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 24px; /* Mantiene la barra delgada y elegante */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand-logo {
    display: flex;
    align-items: center;
    /* Los márgenes negativos arriba y abajo recortan el aire transparente sin deformar la foto */
    margin-top: -30px; 
    margin-bottom: -30px;
    overflow: hidden; 
}

.logo-img {
    height: auto;
    max-height: 120px; /* Ajusta la altura real de la imagen para que se vea grande y nítida */
    width: auto;
    display: block;
    /* Evita que los bordes se suavicen en exceso o se vean borrosos */
    image-rendering: -webkit-optimize-contrast;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--brand-teal);
}

/* Buttons */
.btn-primary, .btn-outline, .btn-outline-dark, button {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 24px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    border: 1px solid transparent;
}

.btn-primary, button {
    background: var(--brand-teal);
    color: white;
    border-color: var(--brand-teal);
}

.btn-primary:hover, button:hover {
    background: var(--brand-teal-dark);
    border-color: var(--brand-teal-dark);
}

.btn-outline {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
}

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

.btn-outline-dark {
    background: transparent;
    color: var(--brand-dark);
    border-color: var(--brand-dark);
}

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

/* Hero Section */
.hero {
    position: relative;
    background: url('https://images.unsplash.com/photo-1555244162-803834f70033?q=80&w=1600&auto=format&fit=crop') center/cover no-repeat;
    color: white;
    padding: 120px 24px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(18, 24, 22, 0.85) 0%, rgba(18, 24, 22, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin-left: max(0px, calc((100vw - 1200px) / 2));
}

.subtitle-tag {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--brand-gold);
    margin-bottom: 12px;
}

.hero h1 {
    color: white;
    font-size: 48px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 16px;
    color: #e0e5e3;
    margin-bottom: 32px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Features */
.features {
    max-width: 1200px;
    margin: -40px auto 60px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 0 24px;
}

.feature-card {
    background: var(--bg-white);
    padding: 28px 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    text-align: center;
}

.feature-icon {
    color: var(--brand-gold);
    font-size: 18px;
    margin-bottom: 8px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Catalog */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.catalog-section section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

.catalog-section h2 {
    font-size: 32px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
}

.catalog-section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 1px;
    background: var(--brand-gold);
    margin: 12px auto 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Product Cards */
.producto {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.producto:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.foto-wrapper {
    height: 180px;
    width: 100%;
    overflow: hidden;
    background: #eae8e1;
}

.foto-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.producto:hover .foto-wrapper img {
    transform: scale(1.05);
}

.producto-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.producto h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.detalle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.precio {
    margin-top: auto;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-teal-dark);
}

/* Quote Section */
.quote-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-top: 60px;
}

.quote-header {
    text-align: center;
    margin-bottom: 30px;
}

.quote-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 20px 0;
}

.quote-list {
    list-style: none;
    margin-bottom: 30px;
}

.quote-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

.quote-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quote-controls button {
    padding: 4px 10px;
    font-size: 12px;
}

.quote-summary {
    border-top: 2px solid var(--brand-dark);
    padding-top: 20px;
    text-align: right;
}

.total-label {
    font-size: 22px;
    font-family: var(--font-heading);
    color: var(--brand-dark);
    margin-bottom: 6px;
}

.iva-info {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.quote-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Modal Dialog */
.custom-dialog {
    border: none;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    max-width: 600px;
    width: 90%;
    margin: auto;
    padding: 0;
    background: var(--bg-white);
}

.custom-dialog::backdrop {
    background: rgba(18, 24, 22, 0.65);
    backdrop-filter: blur(4px);
}

.modal-cab {
    padding: 20px 24px;
    background: var(--brand-dark);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-cab h3 {
    color: white;
    font-size: 22px;
}

#modal-cerrar {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body .fila {
    display: block;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.modal-body h4 {
    margin: 16px 0 8px;
    color: var(--brand-teal-dark);
}

.modal-body ul {
    padding-left: 20px;
    font-size: 14px;
    color: var(--text-main);
}

.modal-pie {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Footer */
.footer {
    background: var(--brand-dark);
    color: #b0b8b5;
    padding: 60px 24px 20px;
    border-top: 1px solid var(--brand-teal-dark);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-logo {
    height: 80px; /* Cambia 40px por un valor mayor (ej. 70px, 80px, 100px) */
    width: auto;  /* Mantiene la proporción original para que no se deforme */
    filter: brightness(0) invert(1);
    margin-bottom: 16px;

    transform: scale(3.6); /* Ajusta este valor (1.3, 1.6, 2.0) para la cantidad de zoom */
    transform-origin: center center; /* Asegura que el zoom sea hacia el centro */
    display: block;
    margin-left: auto;
    margin-right: auto; /* Centra la imagen horizontalmente */
}

.footer-col {
    max-width: 400px;
}

.footer-col h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 12px;
}

.footer-bottom {
    text-align: center;
    font-size: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    color: #707875;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero h1 {
        font-size: 34px;
    }
    .features {
        margin-top: 20px;
    }
    .quote-actions {
        flex-direction: column;
    }
}
/* Ícono + botón en el header */
.header-actions { display: flex; align-items: center; gap: 16px; }

.icono-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--brand-dark);
    transition: all 0.25s ease;
}
.icono-social:hover {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: white;
}

/* Banner */
.banner-instagram {
    background: var(--brand-teal-dark);
    padding: 28px 24px;
}
.banner-ig-contenido {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.banner-ig-contenido h3 { color: white; font-size: 22px; }
.banner-ig-contenido p { color: #d6ebe6; font-size: 14px; }

/* Enlaces del footer */
.footer-col a { color: #b0b8b5; }
.footer-col a:hover { color: var(--brand-gold); }

/* Aviso del abono, en rojo como en la propuesta original */
.aviso-abono {
    margin-top: 14px;
    color: #b3261e;
    font-weight: 600;
    font-size: 14px;
}

/* Stock bien visible */
.stock-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    font-size: 13px;
    font-weight: 700;
}

/* Selector de cantidad */
.modal-body .opciones { margin-top: 10px; }
.cantidad-caja {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cantidad-input {
    width: 80px;
    padding: 10px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}
.cantidad-input:focus { outline: 2px solid var(--brand-teal); }
.aviso-stock {
    display: block;
    margin-top: 4px;
    color: #b3261e;
    font-size: 12px;
}


/* Cajas armables */
.fila-armable {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.fila-armable .cantidad-input { flex-shrink: 0; }
.btn-mini { margin-top: 12px; padding: 8px 14px; font-size: 12px; }
.check-lista { display: grid; gap: 6px; margin: 8px 0 12px; }
.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
}
.check-item input { accent-color: var(--brand-teal); width: 16px; height: 16px; }
.check-item:has(input:checked) { background: var(--brand-teal-light); border-color: var(--brand-teal); }
.check-item.deshabilitado { opacity: 0.45; cursor: not-allowed; }
.contador-ok { color: var(--brand-teal-dark); font-weight: 700; }
.error-msg { color: #b3261e; font-size: 13px; font-weight: 600; margin-top: 10px; min-height: 1em; }


/* Botón en estado "✓ Agregado" */
button.agregado,
button.agregado:disabled {
    background: var(--brand-teal-dark);
    border-color: var(--brand-teal-dark);
    color: white;
    cursor: default;
}


/* Aviso de imágenes referenciales */
.aviso-imagenes {
    font-size: 12px;
    font-style: italic;
    color: #8f9794;
    margin-bottom: 8px;
}


/* Aviso de venta mínima */
.aviso-minimo {
    margin: 10px 0 8px;
    padding: 10px 14px;
    background: #fdf3e1;
    border-left: 4px solid var(--brand-gold);
    color: #7a4b00;
    font-size: 14px;
    font-weight: 700;
}


/* ===== Buscador (lupa) ===== */
.buscador {
    position: relative;
    max-width: 560px;
    margin: 0 auto 32px;
    scroll-margin-top: 110px;
}
.buscador input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 44px 14px 46px;
    border: 1.5px solid var(--border-color, #ddd);
    border-radius: 999px;
    font: inherit;
    font-size: 1rem;
    background: #fff;
}
.buscador input:focus {
    outline: none;
    border-color: #00A887;
    box-shadow: 0 0 0 3px rgba(0, 168, 135, 0.18);
}
.buscador-icono {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #00A887;
    pointer-events: none;
}
.buscador-limpiar {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
}
.buscador-limpiar:hover { background: #f0f0f0; }
[hidden] { display: none !important; }
.buscador input::-webkit-search-cancel-button { display: none; }

/* ===== Ajustes para celular ===== */
@media (max-width: 768px) {
    .header-container {
        align-items: stretch;
        padding: 10px 16px;
        gap: 10px;
    }
    .brand-logo {
        margin-top: -20px;
        margin-bottom: -20px;
        justify-content: center;
    }
    .logo-img { max-height: 90px; }

    /* Menú: una sola fila que se desliza con el dedo */
    .nav-links {
        gap: 18px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links a { white-space: nowrap; flex: 0 0 auto; }

    .header-actions { justify-content: center; }
    .hero-buttons { flex-wrap: wrap; }
}

/* Ninguna imagen puede ser más ancha que la pantalla */
img { max-width: 100%; }
.footer-logo { max-width: 180px; height: auto; }
.footer { overflow: hidden; }
@media (max-width: 768px) {
    .footer-logo { transform: scale(1.8); transform-origin: left center; margin-bottom: 28px; }
}