:root {
    --bg: #14061f;
    --bg-2: #2a0b4a;
    --card: #24103c;
    --line: rgba(255, 255, 255, 0.16);
    --gold: #ffd23f;
    --gold-2: #ffe37a;
    --orange: #ff8a1f;
    --orange-2: #ffb347;
    --magenta: #ff2ea6;
    --cyan: #3ecbff;
    --violet: #6b21c4;
    --purple: #5b1d9a;
    --purple-deep: #3a0f68;
    --text: #f6f3ee;
    --muted: #cbb8e6;
    --danger: #ff5d6c;
    --ok: #3ee0a0;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: Outfit, system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(107, 33, 196, 0.45), transparent 55%),
        radial-gradient(900px 420px at 100% 0%, rgba(255, 46, 166, 0.18), transparent 50%),
        linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
}

.noise {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

body > *:not(.noise):not(.modal):not(.site-header) {
    position: relative;
    z-index: 1;
}

h1, h2, h3 {
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.04em;
    margin: 0;
}

h1 { font-size: clamp(3.2rem, 8vw, 7rem); line-height: 0.9; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.7rem; }

p { color: var(--muted); }

a { color: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.site-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 6vw;
    position: relative;
    z-index: 100;
    background: transparent;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 88px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font: 700 1rem Outfit, sans-serif;
    cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
    background: var(--gold);
    color: #1a1200;
    border-color: transparent;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.topnav-whatsapp-mobile {
    display: none;
}

.topnav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 0 2px #fff, 0 8px 16px rgba(0, 0, 0, 0.35);
}

.brand-text strong {
    display: block;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.08em;
    font-size: 1.35rem;
    line-height: 1;
    color: #fff;
}

.brand-text small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    font-weight: 700;
}

.brand-auth .brand-mark-img {
    width: 72px;
    height: 72px;
}

.brand-auth {
    flex-direction: row;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font: 600 0.95rem Outfit, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-gold {
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    color: #1a1200;
    box-shadow: 0 10px 24px rgba(245, 197, 24, 0.25);
}

.btn-whatsapp {
    background: #1ebd5b;
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-danger {
    background: rgba(255, 93, 108, 0.15);
    color: #ffd0d5;
    border: 1px solid rgba(255, 93, 108, 0.4);
}

.btn-disabled {
    background: #2a2433;
    color: #8d8698;
    cursor: default;
    pointer-events: none;
}

.btn-tiny {
    padding: 8px 12px;
    font-size: 0.82rem;
}

.hero, .section, .admin-main {
    padding: 28px 6vw 72px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px #fff;
}

.footer-brand p {
    margin: 0;
}

.eyebrow {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.lede {
    max-width: 640px;
    font-size: 1.15rem;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.hero-actions .btn {
    min-height: 48px;
    padding-inline: 20px;
}

.hero {
    padding-bottom: 40px;
}

.hero h1 {
    /* El <br> del markup define el corte; no forzar wrap por max-width */
    max-width: min(100%, 36ch);
}

.hero .lede {
    max-width: 36ch;
    font-size: clamp(1.02rem, 3.6vw, 1.15rem);
}

/* Primera frase que ve el cliente: que “instalamos sin cargo” destaque */
.hero .lede strong {
    color: var(--orange);
    font-weight: 800;
}

.hero-highlight {
    margin: 10px 0 14px;
    max-width: 18ch;
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(1.7rem, 6.5vw, 2.45rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--gold);
}

.hero-proof {
    grid-template-columns: repeat(2, minmax(0, 220px));
    margin-top: 22px;
    margin-bottom: 4px;
}

.hero-proof div {
    font-size: 0.92rem;
    line-height: 1.35;
    color: var(--muted);
}

.hero-proof em {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    margin-bottom: 2px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 180px));
    gap: 18px;
    margin-top: 36px;
}

.admin-stats {
    margin-top: 0;
    grid-template-columns: repeat(4, minmax(0, 180px));
}

.hero-stats div {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(22, 16, 31, 0.7);
}

.hero-stats em {
    display: block;
    font-style: normal;
    font-family: "Bebas Neue", sans-serif;
    font-size: 2.4rem;
    color: var(--gold);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.cat-card {
    text-align: left;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 18px;
    padding: 12px;
    color: var(--text);
    cursor: pointer;
}

.cat-card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
}

.cat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.cat-card.is-active,
.chip.is-active {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold) inset, 0 0 24px rgba(245, 197, 24, 0.15);
}

.toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.search input,
.form input,
.form select,
.form textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #0e0a16;
    color: var(--text);
    border-radius: 14px;
    padding: 12px 14px;
    font: 500 1rem Outfit, sans-serif;
}

.search input { min-width: min(320px, 80vw); }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.chip {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font: 600 0.85rem Outfit, sans-serif;
}

.machine-grid,
.admin-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 22px;
}

.machine-card,
.admin-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.photo {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0c0914;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo.viewer-carousel img,
.viewer-carousel img {
    object-fit: contain;
}

.photo img[hidden],
.carousel-track img[hidden],
.carousel-track [hidden] {
    display: none !important;
}

.photo.carousel {
    cursor: pointer;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track > img,
.carousel-track > .carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #09070f;
}

.carousel-slide .video-frame {
    width: 100%;
    height: 100%;
    border-radius: 0;
    aspect-ratio: auto;
}

.carousel-slide .video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-link-slide {
    z-index: 2;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(8, 6, 15, 0.7);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.carousel-dot {
    pointer-events: auto;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.carousel-dot.is-active {
    background: var(--gold);
}

.carousel-dot.is-video {
    border-radius: 3px;
    transform: rotate(45deg);
    width: 7px;
    height: 7px;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-actions .btn {
    flex: 1 1 auto;
}

.machine-card.is-rented .photo img,
.admin-card.is-rented .photo img,
.machine-card.is-sold .photo img,
.admin-card.is-sold .photo img {
    filter: grayscale(0.45) brightness(0.72);
}

.rented-banner {
    position: absolute;
    top: 18px;
    right: -42px;
    width: 190px;
    transform: rotate(32deg);
    background: linear-gradient(90deg, #d61f4a, #ff5d6c);
    color: #fff;
    text-align: center;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.18em;
    font-size: 1.3rem;
    padding: 8px 0;
    box-shadow: 0 8px 20px rgba(214, 31, 74, 0.45);
    z-index: 4;
}

.sold-banner {
    position: absolute;
    top: 18px;
    right: -42px;
    width: 190px;
    transform: rotate(32deg);
    background: linear-gradient(90deg, #64748b, #94a3b8);
    color: #fff;
    text-align: center;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.18em;
    font-size: 1.3rem;
    padding: 8px 0;
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.45);
    z-index: 4;
}

.status-pill,
.cat-pill {
    position: absolute;
    left: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-pill { top: 12px; }
.cat-pill { bottom: 12px; left: 12px; }

.status-pill.available {
    background: rgba(62, 224, 160, 0.16);
    color: var(--ok);
    border: 1px solid rgba(62, 224, 160, 0.4);
}

.cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.machine-card .cat-pill,
.admin-card .cat-pill,
.viewer-body .cat-pill {
    background: rgba(8, 6, 15, 0.72);
    color: var(--gold);
    position: static;
    display: inline-block;
}

.machine-card .photo .cat-pills {
    position: absolute;
    bottom: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    z-index: 3;
}

.machine-card .photo.carousel .cat-pills {
    bottom: 28px;
}

.admin-card-body .cat-pills {
    margin-bottom: 6px;
}

.body,
.admin-card-body {
    padding: 16px 16px 18px;
}

.body p,
.admin-card-body p {
    min-height: 3.4em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-state {
    text-align: center;
    padding: 40px;
    border: 1px dashed var(--line);
    border-radius: 18px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 28px 6vw 20px;
    border-top: 1px solid var(--line);
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
}

.social-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-row a:not(.btn) {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(22, 16, 31, 0.75);
    display: grid;
    place-items: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.social-icon img {
    width: 20px;
    height: 20px;
    display: block;
}

.social-icon:hover {
    transform: translateY(-1px);
    border-color: var(--gold);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.social-icon-whatsapp {
    background: rgba(30, 189, 91, 0.95);
    border-color: rgba(30, 189, 91, 0.6);
}

.legal {
    text-align: center;
    margin: 0;
    padding: 0 6vw 36px;
    color: var(--muted);
    font-size: 0.85rem;
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.location-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 20px;
}

.franchise-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 28px;
    align-items: start;
}

.franchise-list {
    color: var(--muted);
    line-height: 1.75;
    padding-left: 18px;
}

.franchise-aside {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
}

.deal-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 22px;
    align-items: start;
}

.deal-copy {
    display: grid;
    gap: 14px;
}

.deal-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.deal-mode {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(8, 6, 15, 0.35);
}

.deal-mode h3 {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 3.5vw, 1.9rem);
}

.deal-mode p {
    margin: 0 0 10px;
    font-size: 0.95rem;
    line-height: 1.45;
}

.deal-mode .deal-list {
    margin: 0;
}

.deal-list-shared {
    margin-top: 4px;
}

.deal-hook {
    margin: 0;
    font-size: clamp(1.15rem, 3.4vw, 1.45rem);
    line-height: 1.45;
}

.deal-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.7;
}

.deal-list strong {
    color: var(--text);
}

.deal-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.deal-aside {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
}

.deal-aside h3 {
    margin: 0 0 14px;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.deal-split {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.deal-split li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(8, 6, 15, 0.35);
    color: var(--muted);
    font-size: 0.92rem;
}

.deal-split span {
    color: var(--gold);
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.04em;
    font-size: 1.35rem;
}

.seo-machines {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.seo-machines h3 {
    margin: 0 0 8px;
    font-size: clamp(1.35rem, 3.5vw, 1.8rem);
}

.seo-machines p {
    margin: 0;
    max-width: 70ch;
    line-height: 1.55;
}

.faq-list {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 16px 18px;
    background: var(--card);
}

.faq-item h3 {
    margin: 0 0 8px;
    font-size: clamp(1.05rem, 3.2vw, 1.25rem);
    line-height: 1.3;
}

.faq-item p {
    margin: 0;
    min-height: 0;
    color: var(--muted);
    line-height: 1.5;
}

@media (min-width: 720px) {
    .faq-list {
        grid-template-columns: 1fr 1fr;
    }
}

.viewer-deal {
    margin: 0;
}

.viewer-deal a {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}

.viewer-deal a:hover {
    text-decoration: underline;
}

.franchise-layout a[href="#como-trabajamos"] {
    color: var(--gold);
    font-weight: 600;
}

.auth-body,
.admin-body {
    min-height: 100vh;
}

.auth-card {
    width: min(420px, 92vw);
    margin: 10vh auto;
    padding: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-size: 3rem;
    margin: 18px 0 8px;
}

.form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.check {
    display: flex !important;
    align-items: center;
    gap: 10px;
    grid-auto-flow: column;
}

.check input { width: auto; }

.category-checks {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px 14px 14px;
    margin: 0;
}

.category-checks legend {
    padding: 0 6px;
    font-weight: 600;
}

.category-checks legend small {
    font-weight: 500;
    color: var(--muted);
}

.category-check-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
}

@media (min-width: 560px) {
    .category-check-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.flash.error {
    background: rgba(255, 93, 108, 0.12);
    color: #ffd0d5;
    border: 1px solid rgba(255, 93, 108, 0.35);
    padding: 10px 12px;
    border-radius: 12px;
}

.hint, .back { color: var(--muted); font-size: 0.88rem; }
.back { display: inline-block; margin-top: 16px; }

.admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.admin-hero h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
.admin-hero p { max-width: 46ch; color: var(--muted); }

.admin-card {
    display: grid;
    grid-template-columns: 140px 1fr;
}

.admin-card .photo { aspect-ratio: auto; min-height: 140px; }

.admin-card .photo .video-frame {
    width: 100%;
    height: 100%;
    min-height: 140px;
    aspect-ratio: auto;
    border-radius: 0;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* --- Prep queue (admin) --- */
.prep-section {
    margin: 8px 0 40px;
    padding: 18px 14px 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(8, 6, 15, 0.35);
}

.prep-head h2 {
    margin: 0 0 6px;
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(2rem, 6vw, 2.8rem);
    letter-spacing: 0.02em;
    line-height: 1;
}

.prep-lede {
    margin: 0 0 16px;
    color: var(--muted);
    max-width: 42ch;
    font-size: 0.95rem;
}

.prep-form.form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 0;
    margin-bottom: 18px;
}

.prep-form .prep-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.prep-form .prep-field-title {
    display: block;
    font-weight: 600;
    line-height: 1.3;
}

.prep-form .prep-field-title small {
    font-weight: 500;
    color: var(--muted);
}

.prep-form .prep-field input,
.prep-form .prep-field select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.prep-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    min-width: 0;
}

.prep-form-actions .btn {
    min-height: 48px;
    flex: 1 1 auto;
}

.prep-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.prep-count {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.prep-hide-done {
    min-height: 44px;
    align-items: center;
}

.prep-cards {
    display: grid;
    gap: 12px;
}

.prep-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--card);
}

.prep-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.prep-card-top h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
}

.prep-badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 210, 63, 0.14);
    color: var(--gold-2);
    border: 1px solid rgba(255, 210, 63, 0.28);
}

.prep-card.status-en_proceso .prep-badge {
    background: rgba(62, 203, 255, 0.14);
    color: var(--cyan);
    border-color: rgba(62, 203, 255, 0.3);
}

.prep-card.status-lista .prep-badge {
    background: rgba(62, 224, 160, 0.14);
    color: var(--ok);
    border-color: rgba(62, 224, 160, 0.3);
}

.prep-card.status-entregada .prep-badge {
    background: rgba(203, 184, 230, 0.12);
    color: var(--muted);
    border-color: var(--line);
}

.prep-client,
.prep-location {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}

.prep-map-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0 0 10px;
    padding-right: 8px;
    color: var(--cyan);
    font-weight: 700;
    text-decoration: none;
}

.prep-map-link:hover {
    text-decoration: underline;
}

.prep-status-label {
    display: grid;
    gap: 6px;
    margin: 10px 0 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.prep-status-select {
    min-height: 48px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(8, 6, 15, 0.45);
    color: var(--text);
    padding: 0 12px;
    font: inherit;
}

.prep-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prep-card-actions .btn {
    min-height: 44px;
    min-width: 44px;
}

.prep-table-wrap {
    display: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.prep-table {
    width: 100%;
    min-width: 860px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 0.92rem;
}

.prep-table th,
.prep-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    word-break: break-word;
}

.prep-table th:nth-child(1),
.prep-table td:nth-child(1) { width: 16%; }

.prep-table th:nth-child(2),
.prep-table td:nth-child(2) { width: 12%; }

.prep-table th:nth-child(3),
.prep-table td:nth-child(3) { width: 12%; }

.prep-table th:nth-child(4),
.prep-table td:nth-child(4) { width: 22%; }

.prep-table th:nth-child(5),
.prep-table td:nth-child(5) { width: 14%; }

.prep-table th:nth-child(6),
.prep-table td:nth-child(6) { width: 24%; }

.prep-table th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prep-table .prep-status-select {
    display: block;
    width: 100%;
    max-width: 150px;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    padding: 0 10px;
}

.prep-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.prep-table-actions .btn {
    min-height: 40px;
    padding-inline: 10px;
    margin: 0;
    white-space: nowrap;
}

.prep-section.is-hiding-done .prep-card.status-entregada,
.prep-section.is-hiding-done .prep-table tr.status-entregada {
    display: none;
}

.prep-empty {
    margin: 8px 0 0;
}

.admin-catalog {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.admin-catalog-head {
    margin-top: 20px;
    margin-bottom: 18px;
}

.admin-catalog-head h2 {
    margin: 0 0 6px;
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    letter-spacing: 0.02em;
    line-height: 1;
}

.admin-catalog .admin-stats {
    margin-bottom: 22px;
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 720px) {
    .admin-catalog .admin-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .prep-section {
        padding: 22px 20px 24px;
    }

    .prep-form.form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .prep-field-map,
    .prep-form-actions,
    #prep-error {
        grid-column: 1 / -1;
    }

    .prep-form-actions .btn {
        flex: 0 1 auto;
        min-width: 180px;
    }

    .prep-cards {
        display: none;
    }

    .prep-table-wrap:not([hidden]) {
        display: block;
    }
}

.modal[hidden] { display: none; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: rgba(5, 3, 10, 0.72);
    padding: 20px;
}

.modal-card {
    width: min(520px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    z-index: 5;
}

.viewer-card {
    width: min(980px, 100%);
    padding: 18px;
}

.viewer-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
}

.viewer-carousel {
    border-radius: 18px;
    min-height: 280px;
    aspect-ratio: 4 / 3;
    cursor: default;
    background: #09070f;
}

.viewer-carousel img {
    object-fit: contain;
}

.viewer-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 4px 4px;
}

.viewer-body h2 {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    letter-spacing: 0.04em;
    margin: 0;
}

.viewer-status {
    margin: 0;
    font-weight: 700;
}

.viewer-status.is-available { color: var(--ok); }
.viewer-status.is-rented { color: var(--danger); }
.viewer-status.is-sold { color: #94a3b8; }

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #09070f;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.viewer-actions {
    margin-top: auto;
    padding-top: 8px;
}

.photo-keep,
.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.photo-keep-item {
    display: grid;
    gap: 6px;
}

.photo-keep-item img,
.photo-preview-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.admin-meta {
    min-height: 0 !important;
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 8px;
}

.preview {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 14px;
}

@media (max-width: 720px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
        display: block;
        padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
        background: #14061f;
        border-bottom: 1px solid var(--line);
    }

    .topbar {
        position: relative;
        z-index: 110;
        gap: 10px;
        flex-wrap: nowrap;
        padding: 0;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .topnav {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 105;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
        margin: 0;
        padding: calc(78px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        background: #0c0516;
        overflow-y: auto;
    }

    .topnav.is-open {
        display: flex;
    }

    .topnav a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 54px;
        padding: 14px 16px;
        border-radius: 16px;
        border: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        font-size: 1.15rem;
        font-weight: 700;
        text-decoration: none;
        text-align: center;
    }

    .topnav a.btn {
        width: 100%;
        border-radius: 16px;
        font-size: 1.1rem;
    }

    .topnav .btn-ghost {
        padding: 14px 16px;
    }

    .topnav-whatsapp-mobile {
        display: flex;
        margin-top: 6px;
    }

    body.nav-open {
        overflow: hidden;
    }

    .brand-text small { display: none; }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .cat-card {
        padding: 10px;
    }

    .cat-card img {
        height: 72px;
    }

    .cat-card strong {
        font-size: 0.92rem;
        line-height: 1.2;
    }

    .chips {
        gap: 8px;
    }

    .chip {
        min-height: 40px;
        padding: 8px 12px;
    }

    .btn {
        min-height: 44px;
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .btn-tiny {
        min-height: 40px;
    }

    h1 { font-size: clamp(2.35rem, 11vw, 3.4rem); }

    .hero h1 {
        max-width: min(100%, 28ch);
    }

    .hero-highlight {
        max-width: 16ch;
    }

    .hero-proof {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hero-proof div {
        padding: 12px 12px;
        font-size: 0.84rem;
    }

    .cat-card span {
        display: none;
    }

    .cat-card img {
        height: 72px;
    }

    .hero,
    .section,
    .admin-main {
        padding: 20px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left));
    }

    .hero-stats,
    .admin-stats { grid-template-columns: 1fr 1fr; }

    .machine-grid,
    .admin-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .carousel-btn {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .card-actions .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }

    .admin-card { grid-template-columns: 1fr; }
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px max(16px, env(safe-area-inset-right)) 20px max(16px, env(safe-area-inset-left));
    }
    .franchise-layout { grid-template-columns: 1fr; }
    .deal-layout { grid-template-columns: 1fr; }

    .deal-modes {
        grid-template-columns: 1fr;
    }

    .deal-aside {
        order: -1;
    }

    .deal-copy .btn {
        width: 100%;
        min-height: 48px;
    }

    .modal {
        padding: 0;
        place-items: stretch;
        align-items: stretch;
    }

    .modal-card.viewer-card {
        width: 100%;
        max-width: none;
        min-height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: 0;
        padding: max(12px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
    }

    .viewer-layout {
        grid-template-columns: 1fr;
        gap: 14px;
        flex: 1;
        min-height: 0;
    }

    .viewer-carousel {
        width: 100%;
        min-height: min(52dvh, 420px);
        max-height: 52dvh;
        aspect-ratio: auto;
        border-radius: 14px;
    }

    .viewer-body {
        padding: 0 2px 4px;
        gap: 8px;
    }

    .viewer-body h2 {
        font-size: clamp(1.6rem, 7vw, 2rem);
    }

    .viewer-actions .btn {
        width: 100%;
        min-height: 48px;
    }

    .modal-close {
        top: max(8px, env(safe-area-inset-top));
        right: 10px;
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: rgba(8, 6, 15, 0.65);
        font-size: 1.75rem;
        line-height: 1;
    }
}