:root {
    --nex-blue: #00B1FF;
    --nex-blue-dark: #003f86;
    --nex-black: #111827;
    --nex-muted: #6b7280;
    --nex-light: #ffffff;
    --radius: 20px;
}
* { box-sizing: border-box; }
body { font-family: Arial, Helvetica, sans-serif; color: var(--nex-black); background: #fff; overflow-x: hidden; }

.landing-topbar {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #00B1FF;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
    position: relative;
    z-index: 1041;
}

.store-topbar {
    background: #00B1FF;
    color: #111827;
}
.landing-topbar:hover .landing-topbar-track {
    animation-play-state: paused;
}
.landing-topbar-track {
    display: flex;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    animation: landingTopbarMarquee 28s linear infinite;
    will-change: transform;
}
.landing-topbar-track span {
    display: inline-flex;
    align-items: center;
    padding: 0 52px;
}
.landing-topbar-track span::before {
    content: '•';
    margin-right: 18px;
    color: var(--nex-blue);
    font-size: 20px;
    line-height: 1;
}
@keyframes landingTopbarMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-33.3333%); }
}
@media (max-width: 575px) {
    .landing-topbar {
        height: 34px;
        font-size: 13px;
    }
    
.store-topbar {
    background: #111827;
    color: #ffffff;
}
.landing-topbar:hover .landing-topbar-track {
    animation-play-state: paused;
}
.landing-topbar-track {
        animation-duration: 22s;
    }
    .landing-topbar-track span {
        padding: 0 34px;
    }
}
a { color: inherit; }
.site-header { background: var(--nex-light); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.site-header .nav-link { color: #000000 !important; font-weight: 600; font-size: 20px; }
.site-header .nav-link:hover { opacity: .85; }
.site-logo { height: 68px; max-width: 210px; object-fit: contain; }
.btn-primary { --bs-btn-bg: var(--nex-blue); --bs-btn-border-color: var(--nex-blue); --bs-btn-hover-bg: var(--nex-blue-dark); --bs-btn-hover-border-color: var(--nex-blue-dark); }
.btn-outline-primary { --bs-btn-color: var(--nex-blue); --bs-btn-border-color: var(--nex-blue); --bs-btn-hover-bg: var(--nex-blue); --bs-btn-hover-border-color: var(--nex-blue); }
.btn-proposal { color: var(--nex-blue); font-weight: 800; border-radius: 999px; }
.btn-proposal {
  width: 220px;
  height: 44px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 999px;
}
.btn-login-header { font-weight: 800; border-radius: 999px; padding-left: 18px; padding-right: 18px; }
.btn-login-header{
  width: 220px;
  height: 44px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 999px;
}
.btn-login-header:hover { color: var(--nex-blue) !important; background: #fff; border-color: #fff; }
.hero-section { position: relative; min-height: 72vh; display: grid; place-items: end center; overflow: hidden; background: #031b44; }
.hero-carousel { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide { opacity: 0; transition: opacity .9s ease-in-out; }
.hero-slide.active { opacity: 1; }
    .hero-mobile { display: none; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45)); }
.hero-cta { position: relative; z-index: 2; padding-bottom: 54px; }
.hero-cta-actions { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-cta-actions .btn { white-space: nowrap; }

/* Responsive para celular */
@media (max-width: 576px) {
    .hero-cta-actions {
        gap: 10px;
        padding: 0 15px;
    }

    .hero-cta-actions .btn {
        font-size: 15px;
        padding: 10px 18px;
    }
}
.section-kicker { color: var(--nex-blue); text-transform: uppercase; font-weight: 800; letter-spacing: .08em; font-size: .8rem; }
.section-heading h1, .section-heading h2 { font-weight: 900; }
.machine-card, .product-card { background: #fff;  border-radius: var(--radius); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; box-shadow: 0 12px 35px rgba(0,0,0,.30); }
.machine-card:hover, .product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 45px rgba(0,0,0,.13); }
.machine-card img, .product-card img { width: 100%; height: 400px; object-fit: cover; background: #eef4ff; }
.machine-img-wrap, .product-img-wrap { position: relative; overflow: hidden; background: #fff; }
.machine-img-wrap::after, .product-img-wrap::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0); pointer-events: none; transition: background .22s ease; }
.machine-img-wrap img, .product-img-wrap img { display: block; transition: transform .22s ease, filter .22s ease; }
.product-card:hover .product-img-wrap::after,
.machine-card:hover .machine-img-wrap::after { background: rgba(255,255,255,.34); }
.product-card:hover .product-img-wrap img,
.machine-card:hover .machine-img-wrap img { filter: brightness(1.08) saturate(.92); transform: scale(1.02); }
.machine-card h3, .product-card h3 { font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.machine-card p, .product-card p { color: var(--nex-muted); min-height: 48px; }
.product-main-link { display: block; text-decoration: none; color: inherit; }
.questions-section, .page-hero { background: linear-gradient(135deg, #eef5ff, #ffffff); }
.small-hero { padding: 70px 0; }
.small-hero h1 { font-weight: 900; color: var(--nex-blue); }
.about-img, .detail-img { width: 100%; border-radius: var(--radius); box-shadow: 0 18px 45px rgba(0,0,0,.11); background: #eef4ff; object-fit: cover; }
.detail-img { max-height: 520px; }
.detail-zoom-wrap { width: 100%; border-radius: var(--radius); overflow: hidden; background: #eef4ff; box-shadow: 0 18px 45px rgba(0,0,0,.11); }
.detail-zoom-wrap .detail-img { display: block; border-radius: 0; box-shadow: none; transition: transform .38s ease, filter .38s ease; }
.detail-zoom-wrap:hover .detail-img { transform: scale(1.08); filter: brightness(1.04); }
.form-card { max-width: 940px; background: #fff; border: 1px solid #e5e7eb; border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 55px rgba(0,0,0,.08); }
.content-box { background: #fff; border: 1px solid #e5e7eb; padding: 28px; border-radius: var(--radius); box-shadow: 0 14px 40px rgba(0,0,0,.06); }
.category-filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
.store-toolbar, .catalog-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.store-search-form, .catalog-search-form { min-width: min(100%, 320px); }
.store-search, .catalog-search { width: 320px; max-width: 100%; }
.store-search .form-control, .catalog-search .form-control { border-color: rgba(0,177,255,.45); }
.store-search .form-control:focus, .catalog-search .form-control:focus { border-color: var(--nex-blue); box-shadow: 0 0 0 .16rem rgba(0,177,255,.16); }
.site-footer { background: #000000; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a, .footer-social { color: rgba(255,255,255,.72); text-decoration: none; }
.footer-links a:hover, .footer-social:hover { color: #fff; }
.footer-social { border: 1px solid rgba(255,255,255,.22); padding: 6px 10px; border-radius: 999px; }
.floating-whatsapp { position: fixed; right: 18px; bottom: 18px; z-index: 999; width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; background: #25D366; color: #fff; padding: 0; border-radius: 50%; text-decoration: none; box-shadow: 0 12px 30px rgba(0,0,0,.25); transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.floating-whatsapp:hover { color: #fff; background: #1faa59; transform: translateY(-2px) scale(1.04); box-shadow: 0 16px 36px rgba(0,0,0,.28); }
.floating-whatsapp-icon { width: 34px; height: 34px; display: block; fill: currentColor; }
.floating-cart { position: fixed; right: 18px; bottom: 88px; z-index: 1001; width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 0; background: #111827; color: #fff; padding: 0; border-radius: 50%; text-decoration: none; box-shadow: 0 12px 30px rgba(0,0,0,.25); font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.floating-cart:hover { color: #fff; background: #000; transform: translateY(-2px) scale(1.04); box-shadow: 0 16px 36px rgba(0,0,0,.28); }
.floating-cart-icon { width: 30px; height: 30px; display: block; fill: currentColor; }
.floating-cart #cart-count { position: absolute; top: -6px; right: -6px; min-width: 23px; height: 23px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--nex-blue); color: #fff; border: 2px solid #fff; font-size: 12px; line-height: 1; }
.cart-thumb { width: 70px; height: 70px; object-fit: cover; border-radius: 12px; border: 1px solid #ddd; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--nex-blue), #001f4e); padding: 20px; }
.login-card { width: min(430px, 100%); background: #fff; border-radius: 24px; padding: 32px; box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.login-card h1 { font-size: 1.6rem; font-weight: 900; text-align: center; margin-bottom: 24px; }
.login-logo { display: block; margin: 0 auto 18px; height: 64px; }
.admin-body { background: #f3f6fb; }
.admin-stat { background: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 12px 30px rgba(0,0,0,.06); display: flex; justify-content: space-between; align-items: center; }
.admin-stat span { color: var(--nex-muted); text-transform: capitalize; }
.admin-stat strong { font-size: 2rem; color: var(--nex-blue); }
.admin-thumb { width: 72px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid #ddd; }
.admin-preview { max-width: 260px; max-height: 180px; object-fit: cover; border-radius: 14px; border: 1px solid #ddd; }
@media (max-width: 991px) {
    .site-logo { height: 46px; }
    .hero-section { min-height: 64vh; }
    .floating-cart { bottom: 88px; right: 18px; }
    .store-toolbar, .catalog-toolbar { align-items: stretch; justify-content: flex-start; }
    .store-search-form, .store-search, .catalog-search-form, .catalog-search { width: 100%; }
}
@media (max-width: 575px) {
    .hero-desktop { display: none; }
    .hero-mobile { display: block; }
    .machine-card img, .product-card img { height: 170px; }
    .form-card { padding: 18px; }
    .small-hero { padding: 48px 0; }
}

.gallery-admin-card { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; height: 100%; }
.product-gallery-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.gallery-thumb-btn { border: 2px solid #e5e7eb; background: #fff; border-radius: 14px; padding: 4px; cursor: pointer; transition: border-color .2s ease, transform .2s ease; }
.gallery-thumb-btn:hover, .gallery-thumb-btn.active { border-color: var(--nex-blue); transform: translateY(-2px); }
.gallery-thumb-btn img { width: 100%; height: 78px; object-fit: cover; border-radius: 10px; background: #eef4ff; }
@media (max-width: 575px) {
    .product-gallery-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gallery-thumb-btn img { height: 72px; }
}

/* Responsive para tablet */
@media (max-width: 768px) {
  .machine-card img,
  .product-card img {
    height: 300px;
  }
}

/* Responsive para celular */
@media (max-width: 576px) {
  .machine-card img,
  .product-card img {
    height: 350px;
  }

  .machine-card h3,
  .product-card h3 {
    font-size: 1rem;
  }

  .machine-card p,
  .product-card p {
    min-height: auto;
  }
}


/* Separación landing máquinas / tienda productos */
.store-hero p { max-width: 720px; margin-left: auto; margin-right: auto; color: var(--nex-muted); }
#maquinas { scroll-margin-top: 110px; }


/* Fondos editables para secciones de detalle
   El color se aplica a toda la franja horizontal, no solo al bloque de imagen. */
.detail-background-section {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 64px max(24px, calc((100vw - 1320px) / 2 + 24px));
    border-radius: 0;
    transition: background-color .25s ease;
}
.detail-background-section .section-heading { margin-top: 0; }

@media (max-width: 575px) {
    .detail-background-section {
        padding: 36px 16px;
    }
}

/* Detalle avanzado de máquinas */
.machine-detail-page { overflow: visible; }
.machine-detail-section { margin-top: 72px; }
.machine-video-wrap { position: relative; width: min(900px, 100%); margin: 0 auto; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0f172a; box-shadow: 0 18px 45px rgba(0,0,0,.16); }
.machine-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.machine-detail-carousel-wrap { width: min(860px, 100%); margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 45px rgba(0,0,0,.14); background: #eef4ff; }
.machine-detail-carousel-wrap .carousel-item img { height: 480px; object-fit: cover; background: #eef4ff; }
.machine-detail-carousel-wrap .carousel-control-prev,
.machine-detail-carousel-wrap .carousel-control-next { width: 12%; }
.machine-detail-carousel-wrap .carousel-control-prev-icon,
.machine-detail-carousel-wrap .carousel-control-next-icon { width: 42px; height: 42px; padding: 20px; border-radius: 999px; background-color: rgba(0,0,0,.55); background-size: 52%; }
.machine-static-images-section { display: block; }
.machine-static-image-block { width: min(980px, 100%); margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 45px rgba(0,0,0,.12); background: #eef4ff; }
.machine-static-image-block img { width: 100%; max-height: 620px; display: block; object-fit: cover; }
.related-machine-card img { height: 210px; }
.related-machine-card h3 { font-size: 1rem; }
.related-machine-card p { font-size: .92rem; min-height: 54px; }
@media (min-width: 1200px) {
    .col-xl-2-4 { flex: 0 0 auto; width: 20%; }
}
@media (max-width: 991px) {
    .machine-detail-section { margin-top: 56px; }
    .machine-detail-carousel-wrap .carousel-item img { height: 380px; }
    .machine-static-image-block img { max-height: 520px; }
}
@media (max-width: 575px) {
    .machine-detail-section { margin-top: 44px; }
    .machine-video-wrap,
    .machine-detail-carousel-wrap,
    .machine-static-image-block { border-radius: 16px; }
    .machine-detail-carousel-wrap .carousel-item img { height: 250px; }
    .machine-detail-carousel-wrap .carousel-control-prev,
    .machine-detail-carousel-wrap .carousel-control-next { width: 18%; }
    .machine-detail-carousel-wrap .carousel-control-prev-icon,
    .machine-detail-carousel-wrap .carousel-control-next-icon { width: 34px; height: 34px; padding: 16px; }
    .machine-static-image-block img { max-height: 420px; }
    .related-machine-card img { height: 260px; }
}

/* Portada exclusiva de tienda */
.store-cover-section {
    position: relative;
    width: 100%;
    height: 36vh;
    min-height: 260px;
    max-height: 430px;
    overflow: hidden;
    background: #eef4ff;
}
.store-cover-carousel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.store-cover-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.store-cover-mobile { display: none; }
@media (max-width: 767px) {
    .store-cover-section {
        height: 240px;
        min-height: 220px;
        max-height: 280px;
    }
    .store-cover-desktop { display: none; }
    .store-cover-mobile { display: block; }
}


/* Detalle avanzado de productos */
.product-detail-page { overflow: visible; }
.product-detail-section { margin-top: 72px; }
.product-static-images-section { display: block; }
.product-static-image-block { width: min(980px, 100%); margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 45px rgba(0,0,0,.12); background: #eef4ff; }
.product-static-image-block img { width: 100%; max-height: 620px; display: block; object-fit: cover; }
.related-products-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.related-product-card img { height: 210px; }
.related-product-card h3 { font-size: 1rem; }
.related-product-card p { font-size: .92rem; min-height: 54px; }
@media (max-width: 1199px) {
    .related-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .product-detail-section { margin-top: 56px; }
    .product-static-image-block img { max-height: 520px; }
}
@media (max-width: 767px) {
    .related-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .product-detail-section { margin-top: 44px; }
    .product-static-image-block { border-radius: 16px; }
    .product-static-image-block img { max-height: 420px; }
    .related-products-grid { grid-template-columns: 1fr; }
    .related-product-card img { height: 260px; }
}

/* Zoom en imágenes de detalle */
.machine-detail-carousel-wrap .carousel-item,
.machine-static-image-block,
.product-static-image-block { overflow: hidden; }
.machine-detail-carousel-wrap .carousel-item img,
.machine-static-image-block img,
.product-static-image-block img,
.related-machine-card img { transition: transform .38s ease, filter .38s ease; }
.machine-detail-carousel-wrap .carousel-item:hover img,
.machine-static-image-block:hover img,
.product-static-image-block:hover img,
.related-machine-card:hover img { transform: scale(1.06); filter: brightness(1.04); }
@media (hover: none) {
    .detail-zoom-wrap:hover .detail-img,
    .machine-detail-carousel-wrap .carousel-item:hover img,
    .machine-static-image-block:hover img,
    .product-static-image-block:hover img,
    .related-machine-card:hover img { transform: none; filter: none; }
}

/* Iconos informativos en detalle de producto y máquina */
.detail-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}
.detail-benefit-card {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    padding: 18px 14px 16px;
    border-radius: 16px;
    background: #f3f6fb;
    border: 1px solid #e8edf5;
    text-align: center;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.detail-benefit-check {
    position: absolute;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-left: 7px;
    padding-top: 3px;
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    line-height: 1;
    background: var(--nex-blue);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}
.detail-benefit-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--nex-blue);
}
.detail-benefit-icon svg {
    width: 42px;
    height: 42px;
    display: block;
    fill: currentColor;
}
.detail-benefit-card strong {
    display: block;
    color: var(--nex-blue-dark);
    font-size: .92rem;
    line-height: 1.18;
    margin-bottom: 4px;
}
.detail-benefit-card small {
    display: block;
    color: var(--nex-muted);
    font-size: .76rem;
    line-height: 1.25;
}
@media (max-width: 1199px) {
    .detail-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-benefit-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
    .detail-benefits { grid-template-columns: 1fr; margin-top: 22px; }
    .detail-benefit-card { min-height: auto; }
    .detail-benefit-card:last-child { grid-column: auto; }
}

/* Zoom tipo lupa para ecommerce en detalle de producto */
.product-magnifier {
    position: relative;
    cursor: crosshair;
}
.product-magnifier .detail-img {
    user-select: none;
    pointer-events: none;
}
.product-magnifier:hover .detail-img,
.product-magnifier.is-zooming .detail-img {
    transform: none;
    filter: none;
}
.product-zoom-lens {
    position: absolute;
    width: 190px;
    height: 190px;
    display: none;
    border: 3px solid #fff;
    border-radius: 12px;
    background-repeat: no-repeat;
    background-color: #fff;
    box-shadow: 0 16px 40px rgba(0,0,0,.28), inset 0 0 0 1px rgba(0,0,0,.08);
    pointer-events: none;
    z-index: 5;
}
.product-magnifier.is-zooming .product-zoom-lens {
    display: block;
}
.machine-zoom-lens { border-radius: 12px; }
@media (max-width: 991px) {
    .product-zoom-lens {
        width: 150px;
        height: 150px;
    }
}
@media (hover: none), (pointer: coarse) {
    .product-magnifier {
        cursor: default;
    }
    .product-zoom-lens {
        display: none !important;
    }
}
