/* ============================================================
   Apio Sagrado — Sitio público (CSS puro, sin Tailwind)
   ============================================================ */

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Variables ────────────────────────────────────────────── */
:root {
    --green:       #1f553d;
    --green-dark:  #163d2c;
    --green-light: #2d7a56;
    --cream:       #fff5eb;
    --white:       #ffffff;
    --text:        #1a2e23;
    --muted:       #6b8070;
    --radius-sm:   8px;
    --radius-md:   14px;
    --radius-lg:   22px;
    --shadow:      0 4px 20px rgba(0,0,0,.10);
    --shadow-lg:   0 8px 40px rgba(0,0,0,.14);
    --transition:  .22s ease;
}

body {
    font-family: 'Poppins', system-ui, sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }

/* ── Utilidades ───────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 24px;
}

.text-center { text-align: center; }

/* ── Animaciones ──────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}
.anim-up {
    opacity: 0;
    animation: fadeUp .8s ease-out forwards;
    animation-delay: var(--d, 0s);
}

/* ── Etiquetas / labels ───────────────────────────────────── */
.label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--green);
    background: rgba(31,85,61,.1);
    padding: 4px 12px;
    border-radius: 99px;
    margin-bottom: 12px;
}
.label--light { color: var(--cream); background: rgba(255,255,255,.15); }

/* ── Títulos de sección ───────────────────────────────────── */
.section-title {
    font-size: clamp(22px, 3.5vw, 32px);
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
    color: var(--text);
}
.section-title--light { color: var(--white); }

.section-desc {
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    max-width: 560px;
    margin: 12px auto 0;
    line-height: 1.7;
}
.section-desc--light { color: rgba(255,255,255,.75); }

/* ── Secciones ────────────────────────────────────────────── */
.section           { padding: 72px 0; }
.section--cream    { background: var(--cream); }
.section--green    { background: var(--green); }

/* ── Zonas de envío ───────────────────────────────────────── */
.zonas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; max-width: 600px; margin: 40px auto 24px; }
.zona-card { background: #fff; border-radius: 16px; padding: 32px 24px; box-shadow: var(--shadow); text-align: center; }
.zona-card__icon { font-size: 36px; margin-bottom: 12px; }
.zona-card__name { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.zona-card__desc { font-size: 14px; color: var(--muted); line-height: 1.5; }
.zonas-nota { font-size: 14px; color: var(--muted); margin-top: 8px; }
.zonas-nota__link { color: var(--green); font-weight: 600; text-decoration: none; }
.zonas-nota__link:hover { text-decoration: underline; }

/* ── Botones ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 99px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.btn--white   { background: var(--white); color: var(--green); }
.btn--outline { background: transparent; border-color: rgba(255,255,255,.7); color: var(--white); }
.btn--outline:hover { background: rgba(255,255,255,.12); }
.btn--green   { background: var(--green); color: var(--white); }
.btn--green:hover { background: var(--green-dark); }
.btn--wa      { background: #25d366; color: #fff; font-size: 15px; padding: 15px 28px; border-radius: var(--radius-md); }
.btn--wa:hover { background: #1ebe5a; }
.btn--full    { width: 100%; margin-top: 8px; }
.btn__icon    { width: 20px; height: 20px; object-fit: contain; }

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--green);
    transition: background var(--transition), box-shadow var(--transition);
}
.header--scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.2); }

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 14px;
}

/* Marca */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 17px;
    font-weight: 500;
}
.brand__logo    { height: 40px; width: auto; }
.brand__logo--sm{ height: 28px; }
.brand--light   { color: rgba(255,255,255,.7); }

/* Nav desktop */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-desktop a {
    color: rgba(255,255,255,.8);
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-desktop a:hover { color: var(--white); }

.nav-admin {
    background: rgba(255,255,255,.15);
    color: var(--white) !important;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid rgba(255,255,255,.25);
    font-size: 12px !important;
    font-weight: 700 !important;
}
.nav-admin:hover { background: rgba(255,255,255,.25) !important; }

/* Hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav mobile */
.nav-mobile {
    display: none;
    flex-direction: column;
    background: var(--green-dark);
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
}
.nav-mobile.open {
    display: flex;
    max-height: 400px;
    padding: 16px 24px 20px;
}
.nav-mobile a {
    color: rgba(255,255,255,.8);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile__wa {
    display: inline-block;
    background: #25d366;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 99px;
    text-align: center;
    font-weight: 700 !important;
    margin-top: 8px;
    border: none !important;
}
.nav-mobile__admin {
    display: inline-block;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.7) !important;
    padding: 10px 20px !important;
    border-radius: 99px;
    text-align: center;
    font-weight: 600 !important;
    font-size: 13px !important;
    border: 1px solid rgba(255,255,255,.15) !important;
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../IMG/head.png') center/cover no-repeat, url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1400&q=80') center/cover no-repeat;
    text-align: center;
    padding: 80px 24px;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(22,61,44,.75) 0%, rgba(0,0,0,.5) 100%);
}

.hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hero__logo  { height: 100px; width: auto; margin-bottom: 8px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }
.hero__title {
    font-size: clamp(28px, 5.5vw, 52px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    text-shadow: 0 2px 16px rgba(0,0,0,.4);
}
.hero__sub {
    font-size: clamp(14px, 2vw, 18px);
    color: rgba(255,255,255,.85);
    max-width: 460px;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ═══════════════════════════════════════════════════════════
   CÓMO FUNCIONA — STEPS
   ═══════════════════════════════════════════════════════════ */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.step {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    text-align: center;
    flex: 1;
    min-width: 180px;
    max-width: 240px;
}
.step__icon  { font-size: 40px; margin-bottom: 12px; }
.step__title { font-size: 17px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.step__desc  { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; }

.step__arrow {
    font-size: 28px;
    color: rgba(255,255,255,.3);
    flex-shrink: 0;
    margin: 0 4px;
}

/* ═══════════════════════════════════════════════════════════
   RESTAURANTES
   ═══════════════════════════════════════════════════════════ */
.resto-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.resto-card__text { padding: 48px 44px; }

.resto-card__img {
    position: relative;
    height: 100%;
    min-height: 320px;
}
.resto-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.resto-card__img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--white) 0%, transparent 40%);
    z-index: 1;
    pointer-events: none;
}

.resto-card__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
/* Toggle envío / retiro */
.entrega-toggle {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}
.entrega-opt {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid #dde8e2;
    background: #f6faf7;
    cursor: pointer;
    transition: all .2s;
    color: #6b8070;
}
.entrega-opt input { display: none; }
.entrega-opt__icon { font-size: 22px; }
.entrega-opt__text { font-size: 13px; font-weight: 600; }
.entrega-opt--active {
    border-color: #2d7a56;
    background: #e8f5ee;
    color: #1f553d;
}

.chip {
    background: rgba(31,85,61,.08);
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 99px;
    border: 1px solid rgba(31,85,61,.15);
}

/* ═══════════════════════════════════════════════════════════
   POR QUÉ ELEGIRNOS
   ═══════════════════════════════════════════════════════════ */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.feature {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-md);
    padding: 28px 16px;
    text-align: center;
    transition: background var(--transition), transform var(--transition);
}
.feature:hover { background: rgba(255,255,255,.18); transform: translateY(-4px); }
.feature__icon  { font-size: 36px; margin-bottom: 10px; }
.feature__title { font-size: 14px; font-weight: 700; color: var(--white); }

/* ═══════════════════════════════════════════════════════════
   PRODUCTOS
   ═══════════════════════════════════════════════════════════ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════
   ACORDEÓN DE CATEGORÍAS
   ═══════════════════════════════════════════════════════════ */
.cat-accordion {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--white);
    border: none;
}
.cat-accordion__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-align: left;
    gap: 12px;
    transition: filter .15s;
}
.cat-accordion__head:hover { filter: brightness(1.08); }
.cat-accordion__meta { display: flex; align-items: center; gap: 10px; }
.cat-accordion__count {
    font-size: 12px;
    font-weight: 600;
    color: inherit;
    background: rgba(255,255,255,.25);
    border-radius: 99px;
    padding: 2px 10px;
}
.cat-accordion__arrow {
    font-size: 18px;
    color: #fff;
    transition: transform .25s;
    display: inline-block;
}
.cat-accordion--open .cat-accordion__arrow { transform: rotate(180deg); }
.cat-accordion__body {
    display: none;
    padding: 16px 20px 20px;
    background: var(--white);
    border: 2px solid transparent;
    border-top: none;
    border-radius: 0 0 14px 14px;
}
.cat-accordion--open .cat-accordion__body { display: block; }

/* Color por categoría */
.cat-accordion--hojas      .cat-accordion__head { background: linear-gradient(90deg, #2d7a56, #52b788); }
.cat-accordion--raices     .cat-accordion__head { background: linear-gradient(90deg, #b85c38, #e07a5f); }
.cat-accordion--frutos     .cat-accordion__head { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.cat-accordion--bulbos     .cat-accordion__head { background: linear-gradient(90deg, #7d5a8a, #a884b8); }
.cat-accordion--hongos     .cat-accordion__head { background: linear-gradient(90deg, #6b5344, #9c7b6a); }
.cat-accordion--flores     .cat-accordion__head { background: linear-gradient(90deg, #c0588e, #e07aaa); }
.cat-accordion--aromaticas .cat-accordion__head { background: linear-gradient(90deg, #4a7c59, #82c091); }
.cat-accordion--otros      .cat-accordion__head { background: linear-gradient(90deg, #546e7a, #78909c); }

/* Borde inferior que combina con el color */
.cat-accordion--hojas.cat-accordion--open      .cat-accordion__body { border-color: #52b788; }
.cat-accordion--raices.cat-accordion--open     .cat-accordion__body { border-color: #e07a5f; }
.cat-accordion--frutos.cat-accordion--open     .cat-accordion__body { border-color: #e74c3c; }
.cat-accordion--bulbos.cat-accordion--open     .cat-accordion__body { border-color: #a884b8; }
.cat-accordion--hongos.cat-accordion--open     .cat-accordion__body { border-color: #9c7b6a; }
.cat-accordion--flores.cat-accordion--open     .cat-accordion__body { border-color: #e07aaa; }
.cat-accordion--aromaticas.cat-accordion--open .cat-accordion__body { border-color: #82c091; }
.cat-accordion--otros.cat-accordion--open      .cat-accordion__body { border-color: #78909c; }

.prod-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.prod-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.prod-card__img-wrap { position: relative; }
.prod-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}
.prod-card--sin-stock { opacity: .75; }
.prod-card--sin-stock:hover { transform: none; box-shadow: var(--shadow); }
.prod-card__sin-stock-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(220,38,38,.35);
}
.prod-card__body  { padding: 14px 14px 16px; }
.prod-card__name  { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.prod-card__unit  { font-size: 11px; color: var(--muted); font-weight: 500; }
.prod-card__price { font-size: 15px; font-weight: 800; color: var(--green); margin-top: 6px; }
.prod-card__price--agotado { font-size: 13px; font-weight: 700; color: #dc2626; margin-top: 6px; }

/* ═══════════════════════════════════════════════════════════
   FORMULARIO
   ═══════════════════════════════════════════════════════════ */
.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    margin-top: 36px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    padding-top: 4px;
    border-top: 1px solid #eee;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field__input {
    padding: 11px 14px;
    border: 1.5px solid #dde5e0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: #fafcfb;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}
.field__input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(31,85,61,.1);
}
.field__textarea { resize: vertical; min-height: 80px; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer { background: var(--green-dark); padding: 24px 0; }
.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.footer__copy { font-size: 13px; color: rgba(255,255,255,.45); }

/* ═══════════════════════════════════════════════════════════
   BOTONES FLOTANTES
   ═══════════════════════════════════════════════════════════ */
.fab-wa {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 200;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37,211,102,.45);
    transition: transform var(--transition), box-shadow var(--transition);
}
.fab-wa:hover { transform: scale(1.12); box-shadow: 0 6px 28px rgba(37,211,102,.6); }
.fab-wa img   { width: 100%; height: 100%; object-fit: contain; }

.fab-top {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #a3e635;
    color: #1a2e23;
    font-size: 20px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(163,230,53,.5);
    transition: transform var(--transition), box-shadow var(--transition);
}
.fab-top--visible { display: flex; }
.fab-top:hover    { transform: scale(1.1); box-shadow: 0 0 24px rgba(163,230,53,.7); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
    .nav-desktop { display: none; }
    .hamburger   { display: flex; }

    .resto-card  { grid-template-columns: 1fr; }
    .resto-card__img { min-height: 220px; order: -1; }
    .resto-card__text { padding: 28px 24px; }

    .features    { grid-template-columns: repeat(2, 1fr); }
    .step__arrow { display: none; }
}

@media (max-width: 580px) {
    .section         { padding: 52px 0; }
    .hero            { min-height: 70vh; }
    .form-card       { padding: 24px 18px; }
    .form-row        { grid-template-columns: 1fr; }
    .form-products   { grid-template-columns: repeat(2, 1fr); }
    .features        { grid-template-columns: repeat(2, 1fr); }
    .footer__inner   { flex-direction: column; text-align: center; }
    .fab-wa          { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    .fab-top         { width: 38px; height: 38px; bottom: 20px; left: 20px; font-size: 17px; }
    .order-personal  { grid-template-columns: 1fr; }
    .op-grid         { grid-template-columns: repeat(2, 1fr); }
    .cart-bar        { flex-direction: column; gap: 10px; padding: 14px 16px; }
    .cart-bar__btn   { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   FORMULARIO DE PEDIDO — NUEVO DISEÑO
   ═══════════════════════════════════════════════════════════ */

/* Wrapper general */
.order-wrapper { display: flex; flex-direction: column; gap: 20px; margin-top: 36px; }

/* Steps */
.order-step {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
}

.order-step__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.order-step__num {
    width: 32px; height: 32px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800;
    flex-shrink: 0;
}

.order-step__label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

/* Badge del carrito en el encabezado del paso 2 */
.cart-badge {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
}

/* Datos personales */
.order-personal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 600px) {
    .order-personal { grid-template-columns: 1fr; }
    .order-step     { padding: 20px 16px; }
}

.field__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    display: block;
    margin-bottom: 5px;
}

.field__input {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #dde5e0;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    background: #fafcfb;
    transition: border-color .18s, box-shadow .18s;
}
.field__input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(31,85,61,.10);
}
.field__textarea { resize: vertical; min-height: 80px; }

/* Filtros categoría */
.cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.cat-filters--catalog {
    justify-content: center;
    margin-bottom: 28px;
}

.cat-btn {
    padding: 6px 14px;
    border-radius: 99px;
    border: 1.5px solid #dde5e0;
    background: #f4f7f5;
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
}
.cat-btn:hover       { border-color: var(--green); color: var(--green); }
.cat-btn--active     { background: var(--green); border-color: var(--green); color: #fff; }

/* Buscador */
.order-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f4f7f5;
    border: 1.5px solid #dde5e0;
    border-radius: 10px;
    padding: 9px 14px;
    margin-bottom: 18px;
    transition: border-color .18s;
}
.order-search:focus-within { border-color: var(--green); }
.order-search__icon  { font-size: 15px; }
.order-search__input { border: none; background: transparent; font-family: inherit; font-size: 13px; color: var(--text); flex: 1; outline: none; }
.order-search__input::placeholder { color: var(--muted); }

/* ── Animaciones de tarjetas ──────────────────────────────── */
@keyframes cardIn {
    from { opacity: 0; transform: translateY(18px) scale(.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes qtyPop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.45); }
    100% { transform: scale(1); }
}
@keyframes badgeAppear {
    from { transform: scale(0) rotate(-20deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}
@keyframes glowPulse {
    0%   { box-shadow: 0 0 0 0   rgba(31,85,61,.45); }
    60%  { box-shadow: 0 0 0 7px rgba(31,85,61,0); }
    100% { box-shadow: 0 0 0 0   rgba(31,85,61,0); }
}

/* Grid de tarjetas de producto */
.order-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

/* Tarjeta de producto */
.op-card {
    background: var(--white);
    border: 2px solid #e8ede9;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: default;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    animation: cardIn .45s ease-out both;
    animation-delay: var(--delay, 0s);
}
.op-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,.12);
}
.op-card--active {
    border-color: var(--green);
    animation: cardIn .45s ease-out both, glowPulse .7s ease-out;
    animation-delay: var(--delay, 0s), 0s;
}

/* Imagen */
.op-card__img-wrap {
    position: relative;
    height: 100px;
    overflow: hidden;
    background: #f0f4f1;
}
.op-card__img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}
.op-card:hover .op-card__img { transform: scale(1.08); }

.op-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,.18) 100%);
    transition: opacity .2s;
}
.op-card--active .op-card__overlay {
    background: linear-gradient(to bottom, rgba(31,85,61,.08) 0%, rgba(31,85,61,.25) 100%);
}
.op-card--sin-stock { opacity: .7; }
.op-card--sin-stock:hover { transform: none; box-shadow: none; }
.op-card__sin-stock-badge {
    position: absolute;
    top: 6px; left: 6px;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(220,38,38,.4);
    z-index: 2;
}
.op-card--sin-stock .qty-btn { opacity: .35; cursor: not-allowed; }

/* Badge de cantidad sobre la imagen */
.op-card__badge {
    position: absolute;
    top: 7px; right: 7px;
    background: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    min-width: 22px; height: 22px;
    padding: 0 5px;
    border-radius: 99px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    animation: badgeAppear .25s cubic-bezier(.34,1.56,.64,1);
}

/* Cuerpo de la tarjeta */
.op-card__body {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}
.op-card__name { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.3; text-align: center; }
.op-card__unit  {
    font-size: 10px;
    color: var(--muted);
    background: #e8ede9;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 600;
}
.op-card--active .op-card__unit { background: rgba(31,85,61,.12); color: var(--green); }

/* Controles +/- */
.op-card__controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.qty-btn {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1.5px solid #dde5e0;
    background: var(--white);
    font-size: 16px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
    line-height: 1;
}
.qty-btn:hover      { border-color: var(--green); color: var(--green); background: #edf7f2; }
.qty-btn--plus      { border-color: var(--green); color: var(--green); }
.qty-btn--plus:hover { background: var(--green); color: #fff; }
.qty-btn--sm        { width: 22px; height: 22px; font-size: 13px; }

.qty-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--green);
    min-width: 18px;
    text-align: center;
}
.qty-pop { animation: qtyPop .3s cubic-bezier(.34,1.56,.64,1); }

/* Resumen del pedido */
.order-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f4f7f5;
    border-radius: 10px;
    border: 1px solid #e2ebe5;
}
.summary-item__icon  { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.summary-item__name  { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); }
.summary-item__controls { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--green); }

/* ── Barra flotante del carrito ───────────────────────────── */
.cart-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    background: var(--green-dark);
    color: #fff;
    border-radius: 99px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    transition: bottom .35s cubic-bezier(.34,1.56,.64,1);
    white-space: nowrap;
    min-width: 340px;
}
.cart-bar--visible { bottom: 28px; }

.cart-bar__info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}
.cart-bar__icon { font-size: 20px; }

.cart-bar__btn {
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 99px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background .18s, transform .18s;
}
.cart-bar__btn:hover { background: #1ebe5a; transform: scale(1.04); }

/* ═══════════════════════════════════════════════════════════
   PEDIDO EXITOSO
   ═══════════════════════════════════════════════════════════ */
@keyframes successPop {
    from { opacity: 0; transform: scale(.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}
/* ── Pantalla de revisión ───────────────────────────────── */
.review-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 640px;
    margin: 0 auto;
    animation: successPop .35s ease both;
}
.review-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 24px;
    text-align: center;
}
.review-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1.5px solid #eef2ee;
}
.review-section:last-of-type { border-bottom: none; }
.review-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--green);
    margin-bottom: 10px;
}
.review-dato {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    color: #444;
}
.review-dato span { color: #888; }
.review-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f5f3;
}
.review-item:last-child { border-bottom: none; }
.review-item__img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.review-item__name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
}
.review-item__controls {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.review-item__price {
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
    min-width: 72px;
    text-align: right;
}
.review-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 2px solid var(--green-light);
    font-size: 15px;
}
.review-total strong { font-size: 20px; color: var(--green); }
.review-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.review-confirm-btn {
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 99px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .2s, transform .2s;
}
.review-confirm-btn:hover { background: #1ebe5a; transform: translateY(-2px); }

.order-success {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 52px 32px 44px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,.15);
    animation: successPop .5s cubic-bezier(.34,1.56,.64,1);
}
.order-success__check {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    box-shadow: 0 8px 24px rgba(34,197,94,.35);
    margin-bottom: 6px;
}
.order-success__title {
    font-size: 22px;
    font-weight: 800;
    color: var(--green);
}
.order-success__num {
    font-size: 13px;
    font-weight: 600;
    color: #22c55e;
    background: rgba(34,197,94,.1);
    padding: 4px 14px;
    border-radius: 99px;
}
.order-success__text {
    font-size: 15px;
    color: var(--muted);
    max-width: 420px;
    line-height: 1.65;
    margin-top: 4px;
}
.order-success__wa {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 99px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    margin-top: 10px;
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(37,211,102,.35);
}
.order-success__wa:hover { background: #1ebe5a; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,.45); }
.order-success__new {
    background: none;
    border: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 4px;
    padding: 0;
}
.order-success__new:hover { color: var(--green); }

/* Número de pedido destacado en pantalla de éxito */
.order-success__num-box {
    background: #f0faf4;
    border: 2px dashed #52b788;
    border-radius: 14px;
    padding: 16px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 4px 0;
}
.order-success__num-label { font-size: 11px; font-weight: 700; color: #52b788; text-transform: uppercase; letter-spacing: .08em; }
.order-success__num-big   { font-size: 36px; font-weight: 800; color: #1b4332; line-height: 1.1; }
.order-success__num-hint  { font-size: 11px; color: #888; }
.order-success__track {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    color: #2d6a4f;
    border: 1.5px solid #52b788;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, transform .2s;
}
.order-success__track:hover { background: #d1f0dc; transform: translateY(-2px); }
