:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #f97316;
    --primary-hover: #ea580c;
    --accent: #fb923c;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --gradient-text: var(--primary);
    --font-main: 'Outfit', -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background animated glow */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.05) 0%, transparent 40%);
    z-index: -1;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Glass Header */
.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-accent {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a:hover {
    color: var(--primary);
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
}

.cart-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.cart-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
}

.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
    animation: fadeIn 1s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layouts */
.store-grid, .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-text);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}

.glass-card:hover::before {
    opacity: 1;
}

.card-image {
    width: calc(100% + 4rem);
    height: 180px;
    object-fit: cover;
    margin: -2rem -2rem 1.5rem -2rem;
    display: block;
    background: rgba(255,255,255,0.05);
}

.card-logo {
    width: calc(100% + 4rem);
    height: 220px; /* logos de 800 px: mas area para verse nitidos y completos (object-fit: contain) */
    object-fit: contain;
    margin: -2rem -2rem 1.5rem -2rem;
    display: block;
    background: #fff;
    padding: 1rem;
    box-sizing: border-box;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-text);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Store Specific Header */
.store-header {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.store-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Product Meta */
.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 1rem;
}

.market-promo-badge {
    display: inline-block;
    width: fit-content;
    margin: .15rem 0 .35rem;
    padding: .38rem .7rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow: 0 4px 12px rgba(220, 38, 38, .22);
}

.market-price-promo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .05rem;
    margin: 0 0 1rem;
}

.market-price-promo del {
    color: var(--text-muted);
    font-size: .95rem;
    font-weight: 500;
}

.market-price-promo strong {
    color: #dc2626;
    font-size: 1.8rem;
    line-height: 1.15;
}

.market-price-promo-search strong {
    font-size: 1.3rem;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

/* Footer */
.glass-footer {
    background: rgba(13, 15, 26, 0.8);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 2rem 1rem;
    margin-top: auto;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .header-container { flex-direction: column; gap: 1rem; }
    .store-grid, .product-grid { grid-template-columns: 1fr; }
}

/* Datos de la empresa en la pagina de tienda (includes/info-empresa.php) */
.empresa-info {
    max-width: 1100px;
    margin: 0 auto 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}
.empresa-info-head { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.empresa-info-logo { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 12px; padding: 6px; }
.empresa-info-datos h2 { font-size: 1.4rem; margin-bottom: .25rem; }
.empresa-info-datos p { color: var(--text-muted); margin: 0; }
.empresa-info-detalle { margin-top: 1rem; border-top: 1px solid var(--glass-border); padding-top: .75rem; }
.empresa-info-detalle summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.empresa-info-contenido { margin-top: .75rem; color: var(--text-color); line-height: 1.6; }
.empresa-info-contenido h1, .empresa-info-contenido h2, .empresa-info-contenido h3, .empresa-info-contenido h4 { margin: .75rem 0 .35rem; }
.empresa-info-contenido p, .empresa-info-contenido ul, .empresa-info-contenido ol { margin-bottom: .75rem; }
.empresa-info-contenido ul, .empresa-info-contenido ol { padding-left: 1.25rem; }
.empresa-info-contenido a { color: var(--accent); }
.empresa-info-contenido img { max-width: 100%; height: auto; border-radius: 8px; }
.empresa-info-mapa { width: 100%; height: 320px; border: 0; border-radius: 12px; }

/* Pagina de tienda: datos de la empresa a la izquierda, categorias a la derecha */
.store-top { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 1.5rem; align-items: start; max-width: 1200px; margin: 0 auto 2rem; }
.store-top .empresa-info { margin: 0; max-width: none; }
.store-categorias { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .75rem; }
.store-top > .store-categorias:only-child { grid-column: 1 / -1; justify-content: center; }
@media (max-width: 900px) { .store-top { grid-template-columns: 1fr; } }

/* Buscador de la tienda: separado del bloque de categorias y mas grande */
.store-busqueda { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; max-width: 1200px; margin: 2.5rem auto 2rem; padding: 1.5rem 0; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
.store-busqueda-form { display: flex; align-items: center; flex: 1; min-width: 260px; max-width: 640px; border: 1px solid #fff; border-radius: 99px; padding: .8rem 1.4rem; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .28); }
.store-busqueda-form input { background: transparent; border: none; color: #172033; outline: none; width: 100%; font-family: inherit; font-size: 1.1rem; }
.store-busqueda-form button { background: transparent; border: none; color: #172033; cursor: pointer; display: flex; align-items: center; }

/* Panel flotante con el contenido del pie (esquina inferior izquierda) */
.info-flotante-wrap { position: fixed; left: .75rem; bottom: .75rem; z-index: 1001; }
.info-flotante { position: absolute; left: 0; bottom: calc(100% + .5rem); }
.info-flotante-boton { cursor: pointer; display: flex; align-items: center; gap: .6rem; background: rgba(15, 23, 42, .92); border: none; color: var(--text-muted); padding: 0; border-radius: 999px; box-shadow: 0 4px 18px rgba(0, 0, 0, .4); font-family: inherit; }
/* El PNG del logo trae margen transparente (parte visible 749x227 dentro de 826x593): se recorta con overflow. */
.info-flotante-texto { font-size: .75rem; padding-left: .9rem; color: var(--text-muted); white-space: nowrap; }
.info-flotante-logo { display: block; width: 75px; height: 23px; overflow: hidden; }
.info-flotante-boton img { display: block; width: 82.5px; height: auto; max-width: none; margin: -16.6px 0 0 -4.2px; }
.info-flotante-flecha { font-size: .7rem; padding-right: .35rem; transition: transform .2s; }
.info-flotante-wrap.abierto .info-flotante-flecha { transform: rotate(180deg); }
.info-flotante[hidden] { display: none; }
.info-flotante-panel { width: min(380px, 92vw); max-height: calc(100vh - 90px); overflow-y: auto; background: rgba(13, 15, 26, .97); border: 1px solid var(--glass-border); border-radius: 14px; padding: 1.1rem 1.25rem; box-shadow: 0 8px 32px rgba(0, 0, 0, .55); }
.info-flotante-panel section { margin-bottom: 1rem; }
.info-flotante-panel h4 { margin-bottom: .4rem; font-size: 1rem; }
.info-flotante-panel p, .info-flotante-panel li { color: var(--text-muted); font-size: .9rem; line-height: 1.7; }
.info-flotante-panel ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 1rem; }
.info-flotante-panel a { color: var(--text-color); text-decoration: none; }
.info-flotante-panel a:hover { color: var(--accent); text-decoration: underline; }
.info-flotante-contacto { margin-top: .6rem; }
.info-flotante-pie { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .25rem; padding-top: .6rem; border-top: 1px solid var(--glass-border); }
.info-flotante-sistema { font-size: .8rem; text-align: right; }
.info-flotante-subir { cursor: pointer; width: 2rem; height: 2rem; line-height: 1; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .08); border: 1px solid var(--glass-border); color: var(--text-color); border-radius: 50%; padding: 0; font-size: .8rem; font-family: inherit; }
.info-flotante-subir:hover, .info-flotante-subir:focus { background: rgba(255, 255, 255, .16); }
.info-flotante-sistema a { color: var(--text-muted); opacity: .8; }
@media print { .info-flotante-wrap { display: none; } }
@media (max-width: 600px) { .info-flotante-panel { width: calc(100vw - 24px); } }
