/* ============================================
   DON INACIO — SALES GOURMET STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ============ VARIABLES ============ */
:root {
    --color-crema:        #faf6f0;
    --color-arena:        #f0e8d8;
    --color-tierra:       #8b6a3a;
    --color-acento:       #c9963a;
    --color-acento-claro: #e8b86d;
    --color-acento-oscuro:#8b6420;
    --color-oscuro:       #1a1000;
    --color-texto:        #3d2800;
    --color-texto-suave:  #7a5820;
    --color-blanco:       #ffffff;
    --color-verde-wa:     #25D366;
    --color-verde-wa2:    #128C7E;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Lora', Georgia, serif;

    --sombra-suave:  0 2px 12px rgba(201,150,58,0.10);
    --sombra-media:  0 8px 30px rgba(201,150,58,0.18);
    --sombra-fuerte: 0 20px 60px rgba(26,16,0,0.30);

    --radio-sm: 8px;
    --radio-md: 14px;
    --radio-lg: 20px;

    --trans-rapida: 0.2s ease;
    --trans-normal: 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ============ RESET & BASE ============ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--color-crema);
    color: var(--color-texto);
    min-height: 100vh;
    overflow-x: hidden;
}
body.modal-open { overflow: hidden; }

/* ============ NAVBAR ============ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 4vw, 48px);
    background: transparent;
    transition: background var(--trans-normal), box-shadow var(--trans-normal);
}
.navbar.scrolled {
    background: rgba(26,16,0,0.93);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav-logo img {
    height: 42px; width: auto; display: block;
    transition: opacity var(--trans-rapida);
}
.nav-logo img:hover { opacity: 0.85; }
.nav-back-group { 
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display:flex; 
    align-items:center; 
    gap:8px; }
.nav-back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px;
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    color: var(--color-blanco);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.82rem; font-weight: 500;
    letter-spacing: 0.03em;
    transition: all var(--trans-rapida);
    background: rgba(255,255,255,0.08);
}
.nav-back-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.8);
    transform: translateY(-1px);
}
.nav-icon { width:15px; height:15px; flex-shrink:0; }
.nav-btn-text { display: inline; }
.nav-reservar {
    padding: 9px 22px;
    background: var(--color-acento);
    color: var(--color-blanco);
    text-decoration: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.85rem; font-weight: 600;
    letter-spacing: 0.04em;
    transition: all var(--trans-rapida);
    box-shadow: 0 3px 12px rgba(201,150,58,0.4);
}
.nav-reservar:hover {
    background: var(--color-acento-claro);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201,150,58,0.5);
}

/* ---- Nav right group ---- */
.nav-right-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---- Language Switcher ---- */
.lang-switcher { position: relative; }
.lang-current {
    display: flex; align-items: center; gap: 5px;
    color: rgba(255,255,255,0.85); font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    padding: 7px 11px; border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.25s ease; background: none;
    cursor: pointer; font-family: inherit; white-space: nowrap;
}
.lang-current:hover, .lang-switcher.open .lang-current {
    background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); color: #fff;
}
.lang-flag { font-size: 1rem; line-height: 1; }
.lang-code { font-size: 0.7rem; }
.lang-arrow { font-size: 0.95rem !important; transition: transform 0.25s ease; }
.lang-switcher.open .lang-arrow { transform: rotate(180deg); }
.lang-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: rgba(20,14,3,0.97); backdrop-filter: blur(20px);
    border: 1px solid rgba(201,150,58,0.25); border-radius: 12px;
    padding: 6px; min-width: 140px;
    display: flex; flex-direction: column; gap: 2px;
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease; z-index: 1100;
}
.lang-switcher.open .lang-dropdown { opacity: 1; pointer-events: all; transform: translateY(0); }
.lang-option {
    display: flex; align-items: center; gap: 9px; padding: 9px 14px;
    border-radius: 8px; color: rgba(255,255,255,0.75); font-size: 0.8rem;
    font-weight: 500; transition: all 0.18s ease; cursor: pointer;
    border: none; background: none; font-family: inherit; width: 100%; text-align: left;
}
.lang-option:hover { background: rgba(255,255,255,0.08); color: #fff; }
.lang-option.active { background: rgba(201,150,58,0.15); color: #e8b84b; }

/* ============ HERO ============ */
.hero-section {
    position: relative;
    height: 100svh; min-height: 580px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 25% 60%, rgba(201,150,58,0.22) 0%, transparent 52%),
        radial-gradient(ellipse at 78% 28%, rgba(139,100,32,0.18) 0%, transparent 48%),
        radial-gradient(ellipse at 55% 85%, rgba(232,184,109,0.10) 0%, transparent 45%),
        linear-gradient(160deg, #2a1a00 0%, #1a1000 50%, #0f0800 100%);
    z-index: 0;
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(201,150,58,0.14) 1px, transparent 1px);
    background-size: 38px 38px; z-index: 1;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom,
        rgba(26,16,0,0.2) 0%,
        rgba(26,16,0,0.0) 40%,
        rgba(26,16,0,0.65) 100%);
    z-index: 2;
}
.hero-content {
    position: relative; z-index: 3;
    padding: 0 clamp(20px, 6vw, 80px);
    max-width: 760px;
}
.section-label {
    display: inline-block;
    padding: 5px 18px;
    border: 1px solid rgba(201,150,58,0.65);
    border-radius: 50px;
    color: var(--color-acento-claro);
    font-family: var(--font-body);
    font-size: 0.78rem; font-weight: 500;
    letter-spacing: 0.15em; text-transform: uppercase;
    margin-bottom: 24px;
    background: rgba(201,150,58,0.10);
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 700; color: var(--color-blanco);
    line-height: 1.05; letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.hero-title em { font-style: italic; color: var(--color-acento-claro); }
.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.08em; text-transform: uppercase;
    margin-bottom: 28px;
}
.hero-divider {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin: 0 auto 28px; max-width: 260px;
}
.divider-line {
    flex: 1; height: 1px;
    background: linear-gradient(to right, transparent, rgba(201,150,58,0.7));
}
.divider-line:last-child {
    background: linear-gradient(to left, transparent, rgba(201,150,58,0.7));
}
.divider-ornament { color: var(--color-acento); font-size: 0.9rem; }
.hero-description {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    color: rgba(255,255,255,0.78);
    line-height: 1.85; max-width: 620px; margin: 0 auto;
}
.hero-description strong { color: var(--color-acento-claro); font-weight: 600; }
.hero-scroll {
    position: absolute; bottom: 32px; left: 50%;
    transform: translateX(-50%); z-index: 3;
    animation: heroScroll 2s ease-in-out infinite;
}
.hero-scroll svg { width:26px; height:26px; stroke:rgba(255,255,255,0.5); }
@keyframes heroScroll {
    0%,100% { transform:translateX(-50%) translateY(0);   opacity:0.5; }
    50%      { transform:translateX(-50%) translateY(6px); opacity:1; }
}

/* ============ PRODUCTS SECTION ============ */
.products-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(40px,6vw,80px) clamp(16px,4vw,48px) 80px;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex; align-items: center;
    gap: 8px; margin-bottom: 52px; flex-wrap: wrap;
}
.breadcrumb a {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--color-texto-suave); text-decoration: none;
    font-size: 0.82rem; font-family: var(--font-body);
    transition: color var(--trans-rapida);
}
.breadcrumb a:hover { color: var(--color-acento); }
.bc-icon { width:13px; height:13px; }
.bc-sep { width:14px; height:14px; stroke:rgba(122,88,32,0.4); flex-shrink:0; }
.breadcrumb span {
    font-size: 0.82rem; color: var(--color-acento);
    font-family: var(--font-body); font-style: italic;
}

/* ---- Section header ---- */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    font-weight: 700; color: var(--color-oscuro);
    line-height: 1.2; margin-bottom: 14px;
}
.section-header h2 em { font-style: italic; color: var(--color-acento); }
.section-header p {
    font-family: var(--font-body);
    font-size: 1rem; color: var(--color-texto-suave); font-style: italic;
}

/* ============ PRODUCTS GRID — 4 columnas ============ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

/* ============ PRODUCT CARD — compacta, vertical ============ */
.product-card {
    background: var(--color-blanco);
    border-radius: var(--radio-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: var(--sombra-suave);
    border: 1px solid rgba(201,150,58,0.12);
    cursor: pointer;
    transition: transform var(--trans-normal), box-shadow var(--trans-normal);
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sombra-media);
}
.product-card.out-of-stock { opacity: 0.65; cursor: default; }
.product-card.out-of-stock .product-image { filter: grayscale(0.45); }

/* Image wrapper — cuadrada */
.product-image-wrapper {
    position: relative;
    width: 100%; aspect-ratio: 1 / 1;
    background: var(--color-arena);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.product-image {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.5s ease;
}
.product-card:hover .product-image { transform: scale(1.07); }

/* Badge agotado */
.out-of-stock-badge {
    position: absolute; top: 12px; left: 12px;
    background: linear-gradient(135deg, #777, #444);
    color: white; padding: 5px 12px; border-radius: 50px;
    font-size: 0.72rem; font-weight: 600;
    font-family: var(--font-body); z-index: 10;
    text-transform: uppercase; letter-spacing: 0.06em;
}

/* Product content — compacto */
.product-content {
    padding: 16px 16px 14px;
    display: flex; flex-direction: column; flex: 1;
}
.product-name {
    font-family: var(--font-display);
    font-size: 0.95rem; font-weight: 700;
    color: var(--color-oscuro);
    line-height: 1.3; margin-bottom: 12px;
    /* 2 líneas máximo */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

/* Footer */
.product-footer {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 8px; margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(201,150,58,0.15);
}
.product-price {
    font-family: var(--font-display);
    font-size: 1.4rem; font-weight: 700;
    color: var(--color-acento); line-height: 1;
}
.product-cta {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--color-tierra);
    font-family: var(--font-body);
    font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.02em;
    transition: gap var(--trans-rapida), color var(--trans-rapida);
    white-space: nowrap;
}
.product-cta svg { width:13px; height:13px; flex-shrink:0; transition: transform var(--trans-rapida); }
.product-card:hover .product-cta { color: var(--color-acento); gap: 7px; }
.product-card:hover .product-cta svg { transform: translateX(2px); }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(26,16,0,0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; pointer-events: none;
    transition: opacity var(--trans-normal);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-container {
    position: relative;
    background: var(--color-blanco);
    border-radius: 20px;
    width: 100%; max-width: 820px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--sombra-fuerte);
    transform: translateY(24px) scale(0.97);
    transition: transform var(--trans-normal);
}
.modal-overlay.active .modal-container { transform: translateY(0) scale(1); }

.modal-container::-webkit-scrollbar { width: 5px; }
.modal-container::-webkit-scrollbar-thumb { background: var(--color-arena); border-radius: 4px; }

.modal-close {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    width: 36px; height: 36px;
    border: none; border-radius: 50%;
    background: var(--color-arena); color: var(--color-tierra);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--trans-rapida);
}
.modal-close:hover {
    background: var(--color-acento); color: var(--color-blanco);
    transform: rotate(90deg);
}
.modal-close svg { width:16px; height:16px; }

/* Modal body: imagen izq + info der */
.modal-body {
    display: flex; flex-direction: row; min-height: 400px;
}
.modal-img-col {
    flex-shrink: 0; width: 300px;
    background: var(--color-arena);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 32px;
}
.modal-img-col img {
    width: 100%; height: 100%;
    object-fit: contain; display: block;
}
.modal-info-col {
    flex: 1; padding: 40px 36px 36px;
    display: flex; flex-direction: column;
}
.modal-label {
    font-family: var(--font-body);
    font-size: 0.75rem; font-weight: 500;
    color: var(--color-acento);
    letter-spacing: 0.14em; text-transform: uppercase;
    margin-bottom: 12px;
}
.modal-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.8vw, 1.8rem);
    font-weight: 700; color: var(--color-oscuro);
    line-height: 1.25; margin-bottom: 14px;
}
.modal-price {
    font-family: var(--font-display);
    font-size: 2.2rem; font-weight: 700;
    color: var(--color-acento); line-height: 1;
}
.modal-price-note {
    font-family: var(--font-body);
    font-size: 0.8rem; color: var(--color-texto-suave);
    margin-top: 4px; margin-bottom: 20px; font-style: italic;
}
.modal-divider {
    height: 1px;
    background: linear-gradient(to right, rgba(201,150,58,0.4), transparent);
    margin-bottom: 20px;
}
.modal-description {
    font-family: var(--font-body);
    font-size: 0.93rem; color: var(--color-texto-suave);
    line-height: 1.85; flex: 1; margin-bottom: 28px;
}
.modal-actions { margin-top: auto; }

/* Botón WhatsApp */
.btn-whatsapp {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 9px; padding: 13px 28px;
    background: linear-gradient(135deg, var(--color-verde-wa), var(--color-verde-wa2));
    color: var(--color-blanco);
    border: none; border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: all var(--trans-normal);
    box-shadow: 0 5px 18px rgba(37,211,102,0.35);
    white-space: nowrap;
}
.btn-whatsapp svg { width:18px; height:18px; flex-shrink:0; }
.btn-whatsapp:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--color-verde-wa2), var(--color-verde-wa));
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.45);
}
.btn-whatsapp:disabled, .btn-whatsapp.disabled {
    background: linear-gradient(135deg, #aaa, #777);
    cursor: not-allowed; box-shadow: none; opacity: 0.6;
}

/* ============ SCROLL TO TOP ============ */
.scroll-top {
    position: fixed; bottom: 32px; right: 32px; z-index: 900;
    width: 46px; height: 46px;
    border: none; border-radius: 50%;
    background: var(--color-acento); color: var(--color-blanco);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(201,150,58,0.45);
    opacity: 0; pointer-events: none;
    transform: translateY(12px);
    transition: all var(--trans-normal);
}
.scroll-top svg { width:20px; height:20px; stroke:currentColor; }
.scroll-top.visible { opacity:1; pointer-events:auto; transform:translateY(0); }
.scroll-top:hover {
    background: var(--color-acento-claro);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(201,150,58,0.55);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from { opacity:0; transform:translateY(24px); }
    to   { opacity:1; transform:translateY(0); }
}

/* ============ RESPONSIVE ============ */

/* 3 columnas en tablet grande */
@media (max-width: 1100px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .modal-img-col { width: 260px; }
}

/* Modal vertical */
@media (max-width: 680px) {
    .modal-body { flex-direction: column; min-height: unset; }
    .modal-img-col { width: 100%; height: 320px; padding: 28px; flex-shrink: 0; }
    .modal-img-col img { object-fit: contain; }
    .modal-info-col { padding: 28px 24px 24px; }
    .modal-title { font-size: 1.35rem; }
    .modal-price { font-size: 1.8rem; }
    .btn-whatsapp { width: 100%; justify-content: center; }
}

/* 2 columnas en tablet */
@media (max-width: 768px) {
    /* FIX: nav-back-group position:absolute collides with logo+lang on narrow screens */
    .nav-back-group { position: static; transform: none; left: auto; }
    .nav-back-btn span:not(.material-symbols-outlined) { display: none; }
    .nav-back-btn { min-width: 44px; height: 44px; padding: 8px 10px; justify-content: center; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* Móviles: navbar */
@media (max-width: 600px) {
    .nav-reservar  { display: none; }
    .nav-btn-text  { display: inline; }
    .nav-back-btn  { padding: 7px 14px; font-size: 0.8rem; }
    .lang-code     { display: none; }
    .lang-current  { padding: 7px 9px; }
}

/* Móviles pequeños: 2 columnas pequeñas */
@media (max-width: 480px) {
    .products-section { padding-left: 12px; padding-right: 12px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .section-header h2 { font-size: 1.6rem; }
    .product-content { padding: 12px 12px 10px; }
    .product-name { font-size: 0.85rem; min-height: 2.4em; }
    .product-price { font-size: 1.2rem; }
    .product-cta { font-size: 0.7rem; }
    .modal-img-col { height: 260px; padding: 20px; }
    .modal-info-col { padding: 20px 16px 18px; }
    .modal-price { font-size: 1.6rem; }
    .modal-description { font-size: 0.88rem; }
    .scroll-top { bottom: 18px; right: 18px; width: 40px; height: 40px; }
}