:root {
    --rojo-principal: #cc0000; --rojo-hover: #a30000;
    --fondo-sitio: #f8f9fa; --texto-oscuro: #222;
    --texto-gris: #666; --borde: #e0e0e0;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
.body-publico { background-color: var(--fondo-sitio); color: var(--texto-oscuro); overflow-x: hidden; }
.body-sistema { display: flex; height: 100vh; overflow: hidden; background: #f0f2f5; color: var(--texto-oscuro); }
.pantalla-oculta { display: none !important; }

/* CABECERA ROJA MULTIMAX */
.main-header { background-color: var(--rojo-principal); padding: 15px 40px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.1); flex-wrap: wrap; gap: 15px; }
.logo-container { display: flex; flex-direction: column; }
.logo-texto { color: white; font-weight: 900; letter-spacing: 1px; font-size: 28px; line-height: 1; margin:0;}
.search-container { display: flex; flex-grow: 1; max-width: 600px; border: 2px solid white; border-radius: 30px; overflow: hidden; background: white; }
.search-container input { flex-grow: 1; border: none; padding: 12px 20px; outline: none; font-size: 15px; color: var(--texto-oscuro); }
.btn-search { background-color: var(--rojo-hover); color: white; border: none; padding: 0 25px; cursor: pointer; font-size: 18px; }
.header-actions { display: flex; align-items: center; position: relative; }
.header-actions i { color: white !important; }

/* LAYOUT CATÁLOGO */
.store-layout { display: flex; padding: 30px 40px; gap: 30px; max-width: 1400px; margin: 0 auto; }
.catalogo-main { flex-grow: 1; }
.grid-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.grid-productos-lista { display: grid; grid-template-columns: 1fr; gap: 15px; }

/* TARJETAS */
.tarjeta-zapato { background: white; border: 1px solid var(--borde); border-radius: 12px; padding: 15px; position: relative; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; }
.tarjeta-zapato:hover { border-color: var(--rojo-principal); box-shadow: 0 5px 15px rgba(204,0,0,0.1); transform: translateY(-3px); }
.tarjeta-img { width: 100%; height: 200px; object-fit: contain; margin-bottom: 15px; background: #f9f9f9; border-radius: 8px; }
.marca-tag { font-size: 12px; color: var(--texto-gris); text-transform: uppercase; margin-bottom: 4px; font-weight: bold; }
.zapato-nombre { font-size: 16px; font-weight: bold; margin-bottom: 5px; color: var(--texto-oscuro); }
.zapato-color { font-size: 13px; color: var(--texto-gris); margin-bottom: 10px; }
.precio-venta { font-size: 22px; font-weight: 900; color: var(--texto-oscuro); margin-top: auto; }
.etiqueta-oferta { background: var(--rojo-principal); color: white; font-size: 11px; padding: 4px 8px; border-radius: 4px; font-weight: bold; position: absolute; top: 15px; left: 15px; }

/* MODALES */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; display: flex; justify-content: center; align-items: center; }
.modal-box { background: white; padding: 40px; border-radius: 12px; width: 90%; max-width: 400px; text-align: center; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-grande { max-width: 800px; padding: 30px; }
.cerrar-modal { position: absolute; top: 15px; right: 20px; font-size: 28px; cursor: pointer; color: #888; }
.detalle-layout { display: flex; gap: 30px; flex-wrap: wrap; }
.detalle-img-container { flex: 1; min-width: 300px; background: #f9f9f9; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 20px; }
.detalle-img-container img { width: 100%; max-height: 280px; object-fit: contain; }
.detalle-info-container { flex: 1; min-width: 300px; text-align: left; display: flex; flex-direction: column; }
.botones-tallas-detalle { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-talla { padding: 10px 15px; border: 2px solid var(--borde); border-radius: 6px; background: white; cursor: pointer; font-size: 15px; font-weight: bold; transition: 0.2s; }
.btn-talla:hover { border-color: var(--rojo-principal); color: var(--rojo-principal); }
.btn-talla.exhibicion-tag { border-color: #ff9900; background: #fffcf5; position: relative; }
.btn-talla.exhibicion-tag::after { content: "Vitrina"; position: absolute; top: -8px; right: -5px; background: #ff9900; color: white; font-size: 10px; padding: 2px 5px; border-radius: 4px; }

/* BOTONES */
.btn-rojo-full { width: 100%; padding: 14px; background: var(--rojo-principal); color: white; border: none; border-radius: 6px; font-size: 16px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-rojo-full:hover { background: var(--rojo-hover); }
.btn-secundario { padding: 12px 20px; background: white; color: var(--texto-oscuro); border: 1px solid var(--borde); border-radius: 6px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-secundario:hover { border-color: var(--texto-oscuro); }

/* SISTEMA E INTERNOS */
.pantalla-login-wrapper { display: flex; width: 100vw; height: 100vh; }
.login-mitad-roja { width: 40%; min-width: 400px; background-color: var(--rojo-principal); display: flex; justify-content: center; align-items: center; padding: 30px; box-shadow: 5px 0 15px rgba(0,0,0,0.2); z-index: 10; }
.login-mitad-catalogo { width: 60%; background: #fff; flex-grow: 1; }
.iframe-catalogo { width: 100%; height: 100%; border: none; }
.login-caja { background: white; padding: 40px; border-radius: 12px; width: 100%; max-width: 400px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.input-login { width: 100%; padding: 14px; margin-bottom: 15px; border: 1px solid var(--borde); border-radius: 6px; font-size: 15px; outline: none; }

.layout-sistema { display: flex; width: 100%; height: 100%; position: relative; }
.main-panel { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; width: 100%; }
.panel-header { background: white; padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); z-index: 10; flex-wrap: wrap; gap: 10px; }
.header-izquierda { display: flex; align-items: center; gap: 15px; }
.btn-menu-movil { background: transparent; border: none; font-size: 24px; color: var(--texto-oscuro); cursor: pointer; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; transition: 0.2s; }
.btn-menu-movil:hover { background: #f0f0f0; }

.btn-logout { background: transparent; border: 1px solid var(--rojo-principal); color: var(--rojo-principal); padding: 8px 15px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-logout:hover { background: var(--rojo-principal); color: white; }
.panel-content { padding: 30px; overflow-y: auto; flex-grow: 1; }
.modulo-activo { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.form-grid input, .form-grid select { padding: 12px; border: 1px solid var(--borde); border-radius: 6px; font-size: 14px; outline: none; width: 100%; }
.btn-subir-img { display: inline-block; padding: 12px; background: #eee; border: 1px solid var(--borde); border-radius: 6px; cursor: pointer; text-align: center; font-weight: bold; }
.btn-subir-img:hover { background: #e0e0e0; }

/* MENÚ OCULTO TIPO CAJÓN (PARAGUAS OFF-CANVAS) */
.sidebar { position: fixed; top: 0; left: -280px; height: 100vh; width: 260px; background-color: #1a1a1a; color: white; display: flex; flex-direction: column; z-index: 3000; transition: left 0.3s cubic-bezier(0.1, 0.8, 0.2, 1); box-shadow: 5px 0 15px rgba(0,0,0,0.3); }
.sidebar.activo { left: 0; }
.overlay-sidebar { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2999; display: none; opacity: 0; transition: opacity 0.3s; }
.overlay-sidebar.activo { display: block; opacity: 1; }
.sidebar-logo { padding: 25px 20px; font-size: 22px; font-weight: 900; color: var(--rojo-principal); border-bottom: 1px solid #333; text-align: center; line-height: 1.2; }
.sidebar-menu { list-style: none; flex-grow: 1; margin-top: 10px; overflow-y: auto; }
.sidebar-menu li { padding: 18px 25px; cursor: pointer; border-bottom: 1px solid #2a2a2a; transition: 0.2s; font-size: 15px; }
.sidebar-menu li:hover, .sidebar-menu li.activo { background-color: var(--rojo-principal); border-left: 4px solid white; }

/* ADMIN KPIs & TABLAS */
.buscador-admin-container { margin-bottom: 20px; }
.buscador-admin-container input { width: 100%; max-width: 600px; padding: 15px; border-radius: 8px; border: 1px solid var(--borde); font-size: 16px; outline:none;}
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.kpi-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); border: 1px solid var(--borde); text-align: center; }
.kpi-card h3 { font-size: 13px; color: var(--texto-gris); text-transform: uppercase; margin-bottom: 10px; }
.kpi-valor { font-size: 28px; font-weight: 900; color: var(--texto-oscuro); }
.admin-prod-card { display: flex; align-items: center; gap: 20px; background: white; padding: 15px; border-radius: 12px; border: 1px solid var(--borde); flex-wrap: wrap; }
.admin-prod-img { width: 80px; height: 80px; object-fit: contain; border-radius: 8px; background: #f9f9f9; }
.admin-panel-info { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.btn-accion-admin { background: #333; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.tabla-caja-header { display: grid; grid-template-columns: 1fr 2fr 1fr 1fr; background: #333; color: white; padding: 15px; border-radius: 8px 8px 0 0; font-weight: bold; font-size: 14px; }
.fila-standby, .fila-auditoria, .fila-venta { display: grid; grid-template-columns: 1fr 2fr 1fr 1fr; background: white; padding: 15px; border-bottom: 1px solid var(--borde); align-items: center; font-size:14px; }
.fila-auditoria { grid-template-columns: 2fr 1fr 1fr; border-left: 4px solid red; }
.fila-user { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; background: white; padding: 15px; border-bottom: 1px solid var(--borde); align-items: center; }
.btn-facturar { background: #00cc66; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-devolver { background: #ff4d4d; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.item-cuenta { display:flex; justify-content:space-between; align-items:center; background:#f9f9f9; padding:10px; border-radius:6px; border:1px solid var(--borde); }
.item-cuenta button { background:#ff4d4d; color:white; border:none; padding:5px 10px; border-radius:4px; cursor:pointer; font-weight:bold; }

/* DISEÑO MULTIMAX (MENÚS Y FILTROS) */
.top-dropdown { background: #fff; border-bottom: 1px solid var(--borde); position: sticky; top: 72px; z-index: 95; }
.dropbtn { width: 100%; background: transparent; border: none; padding: 15px 20px; font-size: 16px; font-weight: 600; text-align: left; display: flex; justify-content: space-between; align-items: center; cursor: pointer; color: var(--texto-oscuro); max-width: 1200px; margin: 0 auto; }
.dropdown-content { display: none; position: absolute; left: 0; width: 100%; background-color: #fff; box-shadow: 0px 8px 16px rgba(0,0,0,0.1); z-index: 96; max-height: 50vh; overflow-y: auto; }
.dropdown-content.show { display: block; }
.dropdown-content a { color: var(--texto-gris); padding: 15px 20px; text-decoration: none; display: block; border-bottom: 1px solid #f0f0f0; font-size: 15px; cursor: pointer; max-width: 1200px; margin: 0 auto;}
.dropdown-content a:active, .dropdown-content a.active { color: var(--rojo-principal); font-weight: bold; background-color: #fafafa; }
.filter-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: transparent; max-width: 1200px; margin: 0 auto; }
.btn-circle-filter { background: #fff; border: 1px solid var(--borde); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--texto-gris); font-size: 16px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.btn-sort { background: transparent; border: none; color: var(--texto-gris); font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* PANELES INFERIORES Y OVERLAY */
.bottom-sheet { position: fixed; bottom: -100%; left: 0; width: 100%; background: #fff; border-radius: 20px 20px 0 0; z-index: 2000; transition: bottom 0.3s cubic-bezier(0.1, 0.8, 0.2, 1); max-height: 85vh; display: flex; flex-direction: column; }
.bottom-sheet.active { bottom: 0; }
.bottom-sheet-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--borde); }
.bottom-sheet-header h3 { font-size: 18px; margin: 0; font-weight: 700; color: var(--texto-oscuro); }
.close-sheet { background: var(--fondo-sitio); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--texto-gris); }
.bottom-sheet-body { padding: 20px; overflow-y: auto; }
.brand-list { list-style: none; }
.brand-list li { margin-bottom: 15px; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--texto-oscuro); }
.brand-list input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--rojo-principal); }
.sort-options { list-style: none; }
.sort-options li { padding: 15px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; font-size: 16px; display: flex; justify-content: space-between; color: var(--texto-oscuro); }
.sort-options li.selected { color: var(--rojo-principal); font-weight: bold; }
.sort-options li.selected::after { content: '\f00c'; font-family: 'FontAwesome'; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; display: none; opacity: 0; transition: opacity 0.3s; }
.overlay.active { display: block; opacity: 1; }

/* CARRITO DE COMPRAS PÚBLICO */
.cart-badge { position: absolute; top: -8px; right: -12px; background: #ffcc00; color: var(--texto-oscuro); font-size: 11px; font-weight: bold; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--rojo-principal); }
.cart-sidebar { position: fixed; top: 0; right: -100%; width: 100%; max-width: 380px; height: 100%; background: white; box-shadow: -5px 0 15px rgba(0,0,0,0.2); z-index: 2005; transition: right 0.3s cubic-bezier(0.1, 0.8, 0.2, 1); display: flex; flex-direction: column; }
.cart-sidebar.active { right: 0; }
.cart-header { padding: 20px; background: var(--rojo-principal); color: white; display: flex; justify-content: space-between; align-items: center; }
.cart-body { flex-grow: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; background: #f8f9fa; }
.cart-footer { padding: 20px; border-top: 1px solid var(--borde); background: white; }
.cart-item-public { display: flex; align-items: center; gap: 12px; background: white; padding: 10px; border-radius: 8px; border: 1px solid var(--borde); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.cart-item-public img { width: 60px; height: 60px; object-fit: contain; border-radius: 6px; background: #f9f9f9; }
.cart-item-public-info { flex-grow: 1; }
.cart-item-public-title { font-size: 14px; font-weight: bold; color: var(--texto-oscuro); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.btn-borrar-item-public { background: transparent; border: none; color: #ff4d4d; font-size: 18px; cursor: pointer; padding: 5px; }

/* AJUSTES PARA PANTALLAS PEQUEÑAS */
@media (max-width: 768px) {
    .store-layout { padding: 15px; flex-direction: column; gap: 15px; }
    .grid-productos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .tarjeta-img { height: 130px; }
    .precio-venta { font-size: 18px; }
    .zapato-nombre { font-size: 14px; }
    .main-header { padding: 15px; }
    .search-container { order: 3; width: 100%; margin-top: 10px; }
    .top-dropdown { top: 122px; }
    
    .pantalla-login-wrapper { flex-direction: column; }
    .login-mitad-roja { width: 100%; height: 100vh; min-width: 100%; }
    .login-mitad-catalogo { display: none; }
    
    .panel-content { padding: 15px; }
    .admin-prod-card { flex-direction: column; text-align: center; }
    .admin-prod-img { width: 100%; height: 150px; }
}