/* ==============================================================================
   WANDL FLOW — EDITORIAL SPECIALTY COFFEE DESIGN SYSTEM
   Palette: Black (#141414), White (#FFFFFF) & Warm Beige (#F7F4EE / #EFEBE1)
   Typography: Nitti Typewriter + Inter
   Zero Emojis • Vector SVG Micro-icons • Token-Driven Multi-Tenant Architecture
   ============================================================================== */

@font-face {
    font-family: 'Nitti Typewriter';
    src: url('/assets/fonts/Nitti-Normal.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nitti Typewriter';
    src: url('/assets/fonts/Nitti-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* 1. Tokens Semánticos de Marca */
    --brand-primary: #141414;
    --brand-primary-hover: #262626;
    --brand-accent: #292524;
    
    /* 2. Superficies y Lienzo */
    --brand-bg: #F7F4EE;            /* Beige cálido pergamino */
    --brand-bg-subtle: #EFEBE1;     /* Beige secundario para chips y tabs */
    --brand-surface: #FFFFFF;       /* Blanco puro */
    --brand-surface-elevated: #FAF8F4;
    
    /* 3. Textos y Tipografía */
    --brand-text: #171717;
    --brand-text-secondary: #57534E;
    --brand-text-muted: #8C857B;
    
    /* 4. Estructura y Bordes */
    --brand-border: #E5DFD5;
    --brand-border-dark: #141414;
    
    /* 5. Fuentes */
    --font-brand: 'Nitti Typewriter', 'Courier Prime', 'Consolas', monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* 6. Geometría y Sombras */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    
    --shadow-subtle: 0 1px 3px rgba(20, 20, 20, 0.04);
    --shadow-card: 0 2px 8px rgba(20, 20, 20, 0.04);
    --shadow-card-hover: 0 6px 16px rgba(20, 20, 20, 0.08);
    --shadow-float: 0 12px 32px rgba(20, 20, 20, 0.16);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--brand-bg);
    color: var(--brand-text);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 110px;
    -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------------------
   1. Header y Navegación de Marca
   ------------------------------------------------------------------------------ */
.kiosk-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 244, 238, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--brand-border);
    padding: 14px 16px 10px 16px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-box {
    width: 44px;
    height: 44px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text h1 {
    font-family: var(--font-brand);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--brand-text);
    line-height: 1.15;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--brand-text-secondary);
    display: block;
    margin-top: 2px;
    font-weight: 400;
}

.service-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    color: var(--brand-text);
}

.service-pill:hover {
    border-color: var(--brand-primary);
    background: var(--brand-bg-subtle);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    color: var(--brand-text);
}

.service-label {
    font-weight: 600;
}

.service-change {
    font-size: 0.7rem;
    color: var(--brand-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 2px;
}

/* ------------------------------------------------------------------------------
   Menús Superiores (Bebidas, Alimentos, Postres, Merch)
   ------------------------------------------------------------------------------ */
.top-menu-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 8px;
    scrollbar-width: none;
}
.top-menu-nav::-webkit-scrollbar { display: none; }

.top-menu-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--brand-border);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-family: var(--font-brand);
    font-size: 0.82rem;
    color: var(--brand-text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.top-menu-tab:hover {
    border-color: var(--brand-primary);
    color: var(--brand-text);
}

.top-menu-tab.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #FFFFFF;
}

.top-menu-tab svg {
    stroke: currentColor;
}

/* ------------------------------------------------------------------------------
   Barra de Búsqueda
   ------------------------------------------------------------------------------ */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.search-icon {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    color: var(--brand-text-muted);
    pointer-events: none;
}

#kiosk-search {
    width: 100%;
    padding: 9px 36px 9px 34px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--brand-text);
    outline: none;
    transition: border-color 0.2s;
    font-family: var(--font-body);
}

#kiosk-search:focus {
    border-color: var(--brand-primary);
}

.search-clear {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--brand-text-muted);
    padding: 4px;
}

/* ------------------------------------------------------------------------------
   Píldoras de Categorías
   ------------------------------------------------------------------------------ */
.category-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-top: 4px;
    scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }

.cat-pill {
    background: var(--brand-bg-subtle);
    border: 1px solid var(--brand-border);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--brand-text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-body);
}

.cat-pill:hover,
.cat-pill.active {
    background: var(--brand-surface);
    color: var(--brand-text);
    border-color: var(--brand-primary);
}

/* ------------------------------------------------------------------------------
   2. Catálogo Feed & Grid de Productos
   ------------------------------------------------------------------------------ */
.catalog-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px;
}

.loading-container {
    text-align: center;
    padding: 60px 20px;
    color: var(--brand-text-secondary);
}

.fancy-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--brand-border);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    margin: 0 auto 16px auto;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.category-section {
    margin-bottom: 36px;
}

.category-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.category-title-bar h2 {
    font-family: var(--font-brand);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--brand-text);
}

.category-count {
    font-family: var(--font-brand);
    font-size: 0.75rem;
    color: var(--brand-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}

.product-card {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: var(--shadow-card);
}

.product-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.prod-image-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
    background: var(--brand-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--brand-border);
}

.prod-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .prod-card-img {
    transform: scale(1.03);
}

.prod-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-text-muted);
}

.prod-card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.prod-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.prod-badge {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--brand-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prod-code {
    font-family: var(--font-brand);
    font-size: 0.65rem;
    color: var(--brand-text-muted);
    background: var(--brand-bg-subtle);
    padding: 1px 4px;
    border-radius: 2px;
}

.prod-title {
    font-family: var(--font-brand);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-text);
    margin-bottom: 4px;
    line-height: 1.25;
}

.prod-description {
    font-size: 0.78rem;
    color: var(--brand-text-secondary);
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prod-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--brand-border);
}

.prod-price {
    font-family: var(--font-brand);
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-text);
}

.btn-card-add {
    background: var(--brand-primary);
    color: #FFFFFF;
    border: none;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-brand);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-card-add:hover {
    background: var(--brand-primary-hover);
}

/* ------------------------------------------------------------------------------
   3. Barra Flotante Inferior de Pedido (Floating Cart)
   ------------------------------------------------------------------------------ */
.floating-cart-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 600px;
    background: var(--brand-primary);
    color: #FFFFFF;
    border-radius: var(--radius-full);
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-float);
    cursor: pointer;
    z-index: 99;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.floating-cart-bar:hover {
    transform: translateX(-50%) translateY(-2px);
}

.cart-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-badge-count {
    width: 28px;
    height: 28px;
    background: #FFFFFF;
    color: var(--brand-primary);
    font-family: var(--font-brand);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-bar-info {
    display: flex;
    flex-direction: column;
}

.cart-items-text {
    font-family: var(--font-brand);
    font-size: 0.85rem;
    font-weight: 700;
}

.cart-hint {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
}

.cart-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-total-price {
    font-family: var(--font-brand);
    font-size: 1.05rem;
    font-weight: 700;
}

.cart-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ------------------------------------------------------------------------------
   4. Modales y Hojas Flotantes (Sheets)
   ------------------------------------------------------------------------------ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s ease;
}

@media (min-width: 640px) {
    .modal-overlay {
        align-items: center;
    }
}

.modal-overlay.hidden,
.hidden {
    display: none !important;
}

.customizer-sheet,
.cart-sheet {
    background: var(--brand-surface);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-float);
    overflow: hidden;
}

@media (min-width: 640px) {
    .customizer-sheet,
    .cart-sheet {
        border-radius: var(--radius-lg);
        max-height: 85vh;
    }
}

.sheet-header,
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 20px;
    border-bottom: 1px solid var(--brand-border);
    background: var(--brand-bg);
}

.sheet-meta-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.sheet-category-badge,
.sheet-code-badge {
    font-family: var(--font-brand);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 3px;
}

.sheet-category-badge {
    background: var(--brand-bg-subtle);
    color: var(--brand-text-secondary);
}

.sheet-code-badge {
    background: var(--brand-primary);
    color: #FFFFFF;
}

#custom-prod-title,
.cart-header-title h3 {
    font-family: var(--font-brand);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-text);
    margin-bottom: 4px;
}

#custom-prod-desc {
    font-size: 0.8rem;
    color: var(--brand-text-secondary);
    margin-bottom: 6px;
}

.sheet-base-price {
    font-family: var(--font-brand);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-text);
}

.sheet-close-btn {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--brand-text);
    transition: all 0.15s ease;
}

.sheet-close-btn:hover {
    background: var(--brand-primary);
    color: #FFFFFF;
    border-color: var(--brand-primary);
}

.sheet-body,
.cart-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.sheet-footer,
.cart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--brand-border);
    background: var(--brand-bg);
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    padding: 4px 8px;
    border-radius: var(--radius-full);
}

.qty-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-number {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 20px;
    text-align: center;
}

.btn-add-cart,
.btn-checkout-pay,
.btn-primary {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--brand-primary);
    color: #FFFFFF;
    border: none;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-brand);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-add-cart:hover,
.btn-checkout-pay:hover,
.btn-primary:hover {
    background: var(--brand-primary-hover);
}

.full-width {
    width: 100%;
    justify-content: center;
}

/* Modificadores BOM */
.bom-group-card {
    margin-bottom: 20px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    background: var(--brand-surface-elevated);
    padding: 14px;
}

.bom-group-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.bom-group-title {
    font-family: var(--font-brand);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand-text);
}

.bom-group-required {
    font-size: 0.72rem;
    color: var(--brand-text-muted);
    text-transform: uppercase;
}

.bom-option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    background: var(--brand-surface);
}

.bom-option-item:hover {
    border-color: var(--brand-border);
}

.bom-option-item.selected {
    border-color: var(--brand-primary);
    background: var(--brand-bg-subtle);
}

.bom-option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--brand-text);
}

.bom-option-price {
    font-family: var(--font-brand);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-text);
}

/* ------------------------------------------------------------------------------
   5. Modal Confirmación Rápida (Estilo C)
   ------------------------------------------------------------------------------ */
.added-sheet-card {
    background: var(--brand-surface);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-float);
    padding: 18px 20px;
}

.added-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.added-badge-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.added-header-text h3 {
    font-family: var(--font-brand);
    font-size: 1rem;
    font-weight: 700;
}

.added-timer-hint {
    font-size: 0.72rem;
    color: var(--brand-text-muted);
}

.added-item-preview {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--brand-bg-subtle);
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.added-item-img-box {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--brand-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.added-item-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.added-item-info h4 {
    font-family: var(--font-brand);
    font-size: 0.88rem;
    font-weight: 700;
}

.added-item-mods {
    display: block;
    font-size: 0.75rem;
    color: var(--brand-text-secondary);
}

.added-item-price {
    font-family: var(--font-brand);
    font-size: 0.9rem;
    color: var(--brand-text);
}

.added-progress-bar-track {
    width: 100%;
    height: 3px;
    background: var(--brand-border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 14px;
}

.added-progress-bar-fill {
    height: 100%;
    background: var(--brand-primary);
    width: 100%;
}

.added-actions-row {
    display: flex;
    gap: 8px;
}

.btn-added-continue,
.btn-added-view-cart {
    flex: 1;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-brand);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-added-continue {
    background: var(--brand-bg);
    border: 1px solid var(--brand-border);
    color: var(--brand-text);
}

.btn-added-view-cart {
    background: var(--brand-primary);
    border: 1px solid var(--brand-primary);
    color: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ------------------------------------------------------------------------------
   6. Carrito & Datos de Checkout
   ------------------------------------------------------------------------------ */
.cart-items-list {
    margin-bottom: 20px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--brand-border);
}

.cart-item-title {
    font-family: var(--font-brand);
    font-size: 0.88rem;
    font-weight: 700;
}

.cart-item-mods-text {
    font-size: 0.75rem;
    color: var(--brand-text-secondary);
}

.cart-item-price {
    font-family: var(--font-brand);
    font-size: 0.92rem;
    font-weight: 700;
}

.upsell-section {
    background: var(--brand-bg);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.upsell-title {
    font-family: var(--font-brand);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.upsell-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.upsell-card {
    min-width: 140px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
}

.upsell-card-title {
    font-family: var(--font-brand);
    font-size: 0.78rem;
    font-weight: 700;
}

.upsell-card-price {
    font-family: var(--font-brand);
    font-size: 0.8rem;
    color: var(--brand-text-secondary);
}

.service-type-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.btn-toggle {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--brand-border);
    background: var(--brand-surface);
    border-radius: var(--radius-md);
    font-family: var(--font-brand);
    font-size: 0.82rem;
    color: var(--brand-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-toggle.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #FFFFFF;
}

.form-field {
    margin-bottom: 12px;
}

.form-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-field input {
    width: 100%;
    padding: 10px 12px;
    background: var(--brand-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--brand-text);
    outline: none;
    font-family: var(--font-body);
}

.form-field input:focus {
    border-color: var(--brand-primary);
    background: var(--brand-surface);
}

.map-picker-container {
    margin-top: 10px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--brand-surface);
}

.map-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.75rem;
    background: var(--brand-bg);
    border-bottom: 1px solid var(--brand-border);
}

.btn-locate-me {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.map-container {
    height: 180px;
    width: 100%;
}

.map-coordinates-label {
    display: block;
    padding: 4px 10px;
    font-family: var(--font-brand);
    font-size: 0.7rem;
    color: var(--brand-text-muted);
}

.totals-breakdown {
    border-top: 1px solid var(--brand-border);
    padding-top: 12px;
    margin-top: 16px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--brand-text-secondary);
    margin-bottom: 6px;
}

.total-row.grand-total {
    font-family: var(--font-brand);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-text);
    border-top: 1px solid var(--brand-border);
    padding-top: 8px;
    margin-top: 8px;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.7rem;
    color: var(--brand-text-muted);
    width: 100%;
    margin-top: 8px;
}

.security-badges span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ------------------------------------------------------------------------------
   7. Modal de Éxito & PIN de Entrega
   ------------------------------------------------------------------------------ */
.success-card {
    background: var(--brand-surface);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-float);
}

.success-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.success-card h3 {
    font-family: var(--font-brand);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

#success-order-msg {
    font-size: 0.82rem;
    color: var(--brand-text-secondary);
    margin-bottom: 20px;
}

.pin-box {
    background: var(--brand-bg);
    border: 1px dashed var(--brand-border-dark);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.pin-label {
    display: block;
    font-family: var(--font-brand);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--brand-text-secondary);
    margin-bottom: 6px;
}

.pin-digits {
    font-family: var(--font-brand);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--brand-primary);
}

.pin-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--brand-text-muted);
    margin-top: 6px;
}

.order-summary-box {
    background: var(--brand-surface-elevated);
    border: 1px solid var(--brand-border);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.order-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--brand-text-secondary);
    margin-bottom: 4px;
}

.order-meta-row strong {
    font-family: var(--font-brand);
    color: var(--brand-text);
}
