/**
 * Tema Custom: Omoi
 * Reescritura del diseño de 103_listado.css sobre el DOM de la suite.
 * NO es una copia del CSS legacy: aquel apunta a Materialize (.cart-item,
 * .cin-price, header#header) y acá se pintan las clases propias de la suite.
 *
 * Paleta real (tomada de los estilos computados de la carta viva):
 *   #BEA28C  tabaco  - nombres y precios
 *   #333333  caja de la cabecera de categoría
 *   #FFFFFF  descripciones
 *   fondo.jpg (seigaiha) sobre #f5f1e3, que nunca llega a verse
 *
 * Ojo con dos "defectos" del legacy que son parte de cómo se ve hoy:
 *   1. no hay separador entre productos (un border:none !important le gana
 *      al border-bottom del mismo bloque)
 *   2. la barra de categorías está muerta (body nav{display:none!important})
 * Se replican a propósito.
 */

/* =============================================
   FUENTE PROPIA
   La familia 'Omoi' es Trade Gothic LT Condensed No. 18 renombrada.
   Un solo corte (400). Los archivos viajan con el tema.
   ============================================= */
@font-face {
    font-family: 'Omoi';
    src: url('omoi.woff2') format('woff2'),
         url('omoi.woff') format('woff'),
         url('omoi.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =============================================
   VARIABLES
   ============================================= */
:root {
    --omoi-tabaco: #BEA28C;
    --omoi-caja: #333333;
    --omoi-texto: #ffffff;
    --omoi-fondo: #f5f1e3;
    --omoi-contorno: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
    --theme-font: 'Omoi', 'Oswald', 'Arial Narrow', sans-serif;
    --theme-bg: var(--omoi-fondo);
    --theme-text: var(--omoi-texto);
    --theme-primary: var(--omoi-tabaco);
    --theme-accent: var(--omoi-tabaco);
    --theme-card-radius: 0;
    --theme-shadow: none;
}

/* =============================================
   FONDO — mosaico seigaiha escalado al ancho y repetido hacia abajo
   ============================================= */
body {
    font-family: var(--theme-font);
    background-color: var(--omoi-fondo);
    background-image: url('fondo.jpg');
    background-size: contain;
    background-position: center top;
    background-repeat: repeat;
    color: var(--omoi-texto);
    min-height: 100vh;
}

/* =============================================
   HEADER — solo el logo, centrado, sin caja
   ============================================= */
.header {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding: 102px 20px;
    position: relative;
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    max-width: 800px;
    margin: 0 auto;
}

.header-logo-link { display: block; line-height: 0; }

.header-logo {
    width: 200px;
    max-width: 60vw;
    height: auto;
    filter: none;
}

.header-name {
    font-family: var(--theme-font);
    font-size: 30px;
    text-transform: uppercase;
    color: var(--omoi-tabaco);
    text-shadow: var(--omoi-contorno);
    letter-spacing: 1px;
}

/* Selector de idioma: discreto sobre el fondo negro */
.lang-selector { position: absolute; top: 16px; right: 16px; }

.lang-btn {
    background: rgba(0, 0, 0, .45);
    border: 1px solid var(--omoi-tabaco);
    color: var(--omoi-tabaco);
    font-family: var(--theme-font);
    font-size: 13px;
    letter-spacing: .5px;
    border-radius: 0;
    padding: 6px 10px;
}

.lang-dropdown {
    background: var(--omoi-caja);
    border: 1px solid var(--omoi-tabaco);
    border-radius: 0;
}

.lang-option {
    color: var(--omoi-texto);
    font-family: var(--theme-font);
    font-size: 13px;
}

.lang-option.active,
.lang-option:hover { color: var(--omoi-tabaco); background: rgba(190, 162, 140, .12); }

/* =============================================
   CONTENEDOR
   ============================================= */
.container,
main.container {
    width: 95%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================================
   BUSCADOR — el legacy no tiene, se oculta
   ============================================= */
.search-bar { display: none !important; }

.search-input {
    width: 100%;
    padding: 12px 18px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid var(--omoi-tabaco);
    border-radius: 0;
    color: var(--omoi-texto);
    font-family: var(--theme-font);
    font-size: 15px;
    text-align: center;
}

.search-input::placeholder { color: rgba(255, 255, 255, .55); }
.search-input:focus { outline: none; border-color: var(--omoi-texto); }

/* =============================================
   BARRA DE CATEGORÍAS — muerta en el legacy, se replica
   ============================================= */
.category-bar { display: none !important; }

/* =============================================
   CABECERA DE CATEGORÍA — caja gris con borde tabaco, pegajosa
   ============================================= */
.category-section {
    margin-bottom: 56px;
    scroll-margin-top: 60px;
}

.category-sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--omoi-caja);
    border: 2px solid var(--omoi-tabaco);
    border-radius: 0;
    box-shadow: none;
    padding: 42px 16px 34px;
    margin: 0 0 10px;
    text-align: center;
    font-family: var(--theme-font);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--omoi-texto);
    text-shadow: var(--omoi-contorno);
    letter-spacing: 0;
}

/* =============================================
   PRODUCTO — fila nombre a la izquierda, precio a la derecha,
   descripción centrada debajo. Sin foto y sin separador.
   ============================================= */
.category-section .product-card {
    background: rgba(0, 0, 0, .02) !important;
    border: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 10px 16px !important;
    display: block;
    text-align: left;
}

.category-section .product-img,
.product-img { display: none !important; }

.category-section .product-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    column-gap: 16px;
    row-gap: 0;
    width: 100%;
    padding: 0;
    background: none;
}

.category-section .product-name {
    flex: 1 1 0;
    min-width: 0;
    order: 1;
    margin: 3px 0 0 !important;
    font-family: var(--theme-font) !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    max-width: 98%;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--omoi-tabaco) !important;
    text-shadow: var(--omoi-contorno);
    letter-spacing: 0;
    word-break: break-word;
}

.category-section .product-price {
    flex: 0 0 auto;
    order: 2;
    margin: 3px 0 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    white-space: nowrap;
    text-align: right !important;
    font-family: var(--theme-font) !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    line-height: 1.4;
    color: var(--omoi-tabaco) !important;
    text-shadow: var(--omoi-contorno);
}

.category-section .product-desc {
    order: 4;
    width: 100%;
    margin: 8px 0 30px !important;
    font-family: var(--theme-font) !important;
    font-size: 14px !important;
    font-weight: 400;
    line-height: 20px;
    text-transform: uppercase;
    text-align: left;
    color: var(--omoi-texto) !important;
}

.category-section .product-badges {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    margin: 6px 0 0;
}

/* Etiquetas discretas: en el legacy eran un ícono de 17px al lado del nombre */
.category-section .badge {
    background: transparent;
    border: 1px solid rgba(190, 162, 140, .5);
    border-radius: 0;
    color: var(--omoi-tabaco);
    font-family: var(--theme-font);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 2px 8px;
}

/* Variantes (Omoi hoy no tiene, queda coherente por si cargan alguna) */
.category-section .product-variants {
    order: 5;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.category-section .variant-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    font-family: var(--theme-font);
    font-size: 14px;
    text-transform: uppercase;
    color: var(--omoi-tabaco);
}

.category-section .product-price-neto {
    order: 6;
    width: 100%;
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
}

/* =============================================
   VACÍO
   ============================================= */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--omoi-texto);
    font-family: var(--theme-font);
    font-size: 15px;
}

/* =============================================
   BOTÓN FIJO DE VOLVER
   ============================================= */
.back-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--omoi-caja);
    border-top: 2px solid var(--omoi-tabaco);
    color: var(--omoi-tabaco);
    text-align: center;
    padding: 14px 20px;
    font-family: var(--theme-font);
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    z-index: 1000;
}

body:has(.back-fixed) { padding-bottom: 58px; }

/* =============================================
   BANNER
   ============================================= */
.banner-container,
.banner-slider {
    margin: 32px auto;
    max-width: 800px;
    padding: 0 16px;
    border-radius: 0;
    overflow: visible;
}

.banner-container img,
.banner-slider .banner-img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.banner-slider .banner-slide { border-radius: 12px; overflow: hidden; }

/* =============================================
   PIE
   ============================================= */
.footer,
.carta-footer,
.powered-by {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, .6);
    font-family: var(--theme-font);
    font-size: 13px;
}

.footer a,
.carta-footer a,
.powered-by a { color: rgba(255, 255, 255, .75); }

/* =============================================
   MÓVIL
   Ojo: en el legacy el 32px de la cabecera y el 16px del precio del bloque
   móvil NUNCA se aplican (les gana un !important más específico de arriba).
   Acá se replican los valores que de verdad se ven: 19px y 17px.
   ============================================= */
@media (max-width: 600px) {
    .header { padding: 98px 16px; }

    .container,
    main.container { padding: 0 5px; }

    .category-sticky-header {
        padding: 20px 12px;
        font-size: 19px;
        letter-spacing: .5px;
    }

    .category-section { margin-bottom: 44px; }

    .category-section .product-card { padding: 10px 12px !important; }

    .category-section .product-name { font-size: 17px !important; }
    .category-section .product-price { font-size: 17px !important; }
    .category-section .product-desc { font-size: 12.4px !important; }
}

@media (max-width: 400px) {
    .category-section .product-name { font-size: 17px !important; }
    .header-logo { width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
