        * { box-sizing: border-box; }
        :root {
            --bg: #F4F7FB;
            --text: #11243E;
            --muted: #6B7A90;
            --header-a: #123a63;
            --header-b: #0d2b4a;
            --cm-brand-navy: #0B3A78;
            --cm-brand-blue: #0057B8;
            --cm-brand-sky: #2DA8FF;
            --cm-brand-soft: #EAF4FF;
            --cm-header-bg: #082F6B;
            --cm-text-strong: #11243E;
            --cm-text-soft: #6B7A90;
            --cm-border-soft: #D9E4F0;
            --cm-success-text: #1E7A59;
            --cm-danger-text: #B4233C;
            --cm-white: #FFFFFF;
            --cm-font-heading: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
            --cm-font-ui: "Open Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
            --card-bg: #ffffff;
            --card-border: #D9E4F0;
            --accent: #123a63;
            --placeholder-bg: #e7eef9;
            --stock-bg: #f4f6f8;
            --chip-default: #d6dce3;
            --chip-text: #1f2933;
            --activo-bg: #dcfce7;
            --activo-text: #2e7d32;
            --agotado-bg: #fee2e2;
            --agotado-text: #c62828;
            --descontinuado-bg: #f4f6f8;
            --descontinuado-text: #334155;
            --promo-bg: #fef3c7;
            --promo-text: #92400e;
            --order-pend-bg: #fffbeb;
            --order-pend-text: #92400e;
            --order-pend-border: #f59e0b;
            --order-client-bg: #eff6ff;
            --order-client-text: #1d4ed8;
            --order-client-border: #3b82f6;
            --order-send-bg: #eef2ff;
            --order-send-text: #4338ca;
            --order-send-border: #6366f1;
            --order-done-bg: #ecfdf5;
            --order-done-text: #166534;
            --order-done-border: #22c55e;
            --max-content: 1240px;
            --safe-left: env(safe-area-inset-left, 0px);
            --safe-right: env(safe-area-inset-right, 0px);
            --safe-bottom: env(safe-area-inset-bottom, 0px);
            --safe-top: env(safe-area-inset-top, 0px);
            --space-xs: clamp(6px, 0.8vw, 10px);
            --space-sm: clamp(10px, 1.1vw, 14px);
            --space-md: clamp(14px, 1.7vw, 22px);
            --space-lg: clamp(18px, 2.4vw, 32px);
            --radius-card: clamp(12px, 1.2vw, 18px);
            --fab-size: clamp(50px, 7vw, 58px);
            --wa-size: clamp(72px, 8.8vw, 84px);
            --wa-icon-wrap: clamp(56px, 7.2vw, 66px);
            --wa-icon: clamp(46px, 5.8vw, 54px);
            --catalog-sticky-height: 176px;
            --pedido-product-card-bg: #f9fbff;
            --pedido-product-card-padding: 8px 10px;
            --pedido-product-card-gap: 8px;
            --pedido-product-thumb-size: 68px;
            --pedido-product-columns-desktop: minmax(62px, 72px) minmax(0, 1fr) minmax(232px, 256px);
            --pedido-product-columns-mobile: 66px minmax(0, 1fr);
            --cm-surface: #ffffff;
            --cm-surface-soft: #F7FAFE;
            --cm-surface-tint: #eff5ff;
            --cm-text-main: var(--cm-text-strong);
            --cm-text-secondary: var(--cm-text-soft);
            --cm-border: #D9E4F0;
            --cm-border-strong: #c5d7eb;
            --cm-focus-ring: 0 0 0 3px rgba(41, 182, 246, 0.2);
            --cm-radius-control: 11px;
            --cm-radius-card: 17px;
            --cm-radius-pill: 999px;
            --cm-panel-radius: 14px;
            --cm-control-height: 40px;
            --cm-control-height-sm: 34px;
            --cm-shadow-soft: 0 8px 24px rgba(3, 45, 114, 0.08);
            --cm-shadow-xs: 0 2px 8px rgba(8, 47, 107, 0.08);
            --cm-shadow-sm: 0 6px 16px rgba(8, 47, 107, 0.08);
            --cm-shadow-md: 0 10px 22px rgba(8, 47, 107, 0.12);
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            margin: 0;
            font-family: var(--cm-font-ui);
            color: var(--text);
            background: var(--bg);
            text-rendering: optimizeLegibility;
            -webkit-font-smoothing: antialiased;
            min-height: 100dvh;
            height: 100dvh;
            overflow-x: hidden;
            overflow: hidden;
        }

        .catalog-sticky-zone {
            position: sticky;
            top: 0;
            z-index: 32;
            background: var(--bg);
            padding-top: var(--safe-top);
            border-bottom: 1px solid var(--cm-border);
            box-shadow: var(--cm-shadow-sm);
        }

        .header {
            background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
            color: var(--cm-text-strong);
            padding: 8px clamp(24px, 2.5vw, 32px);
            min-height: 84px;
            border-bottom: 1px solid rgba(173, 199, 227, 0.7);
        }

        .header-inner {
            display: grid;
            grid-template-columns: minmax(260px, 292px) minmax(0, 1fr) auto;
            align-items: center;
            gap: clamp(12px, 1.35vw, 18px);
            width: 100%;
            max-width: var(--max-content);
            margin: 0 auto;
        }

        .catalog-main-bar {
            display: grid;
            align-items: center;
        }

        .catalog-brand {
            min-width: 0;
            display: inline-flex;
            align-items: center;
            width: min(100%, 292px);
            max-width: 292px;
            gap: 8px;
            padding: 6px 9px;
            border-radius: 11px;
            background: linear-gradient(180deg, #ffffff 0%, #e7f1ff 100%);
            border: 1px solid rgba(11, 58, 120, 0.1);
            box-shadow: 0 2px 8px rgba(11, 58, 120, 0.06);
        }

        .header-copy {
            min-width: 0;
            flex: 0 1 auto;
        }

        .header h1 {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: clamp(1.32rem, 1.58vw, 1.58rem);
            line-height: 1.02;
            color: var(--cm-brand-navy);
            letter-spacing: 0.01em;
            font-weight: 900;
        }

        .header p {
            margin: 3px 0 0;
            font-family: var(--cm-font-ui);
            font-size: clamp(0.62rem, 0.72vw, 0.72rem);
            font-weight: 600;
            opacity: 1;
            color: #5d728b;
            letter-spacing: 0.018em;
            white-space: nowrap;
        }

        .logo-titulo {
            flex-shrink: 0;
            width: clamp(42px, 3.3vw, 52px);
            height: auto;
            max-height: clamp(42px, 3.3vw, 52px);
            object-fit: contain;
            object-position: center;
            display: block;
            background: transparent;
        }

        .catalog-search-wrap {
            min-width: 0;
            display: grid;
            gap: 0;
        }

        .catalog-search-wrap label {
            display: none;
        }

        .catalog-search-wrap input {
            width: 100%;
            border: 1px solid var(--cm-border);
            background: var(--cm-surface);
            border-radius: var(--cm-radius-control);
            font-family: var(--cm-font-ui);
            font-size: clamp(0.9rem, 0.98vw, 0.96rem);
            min-height: 46px;
            padding: 10px 15px;
            outline: none;
            color: var(--cm-text-main);
            box-shadow: none;
            transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
        }

        .catalog-search-wrap input::placeholder {
            color: var(--cm-text-soft);
            font-family: var(--cm-font-ui);
            font-weight: 500;
        }

        .catalog-search-wrap input:hover {
            border-color: var(--cm-border-strong);
            background: #fcfeff;
        }

        .catalog-search-wrap input:focus {
            border-color: var(--cm-brand-blue);
            box-shadow: var(--cm-focus-ring);
            background: #ffffff;
        }

        .catalog-top-actions {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            flex-wrap: nowrap;
        }

        .catalog-session-actions {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            order: 2;
        }

        .catalog-session-btn,
        .catalog-action-btn {
            border: 1px solid #c7d5e5;
            background: #ffffff;
            color: #3f5876;
            border-radius: var(--cm-radius-control);
            min-height: 39px;
            padding: 0 14px;
            font-family: var(--cm-font-heading);
            font-size: 0.78rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
        }

        .catalog-session-btn[hidden] {
            display: none !important;
        }

        .catalog-session-btn:hover,
        .catalog-action-btn:hover {
            border-color: #9eb9d6;
            color: #274a73;
            background: #f8fbff;
            box-shadow: 0 2px 6px rgba(11, 58, 120, 0.08);
        }

        .catalog-session-btn.logout {
            border-color: #d2ddea;
            color: #5b6f88;
            background: #ffffff;
        }

        #btnCatalogoIniciarSesion {
            background: var(--cm-brand-navy);
            border-color: var(--cm-brand-navy);
            color: #ffffff;
        }

        #btnCatalogoIniciarSesion:hover {
            background: #072f65;
            border-color: #072f65;
            color: #ffffff;
        }

        .catalog-action-btn.portal {
            order: 3;
            border-color: #d2deec;
            color: #5a7089;
            background: #ffffff;
        }

        .catalog-action-btn.portal:hover {
            color: #2b527e;
            border-color: #aac3de;
            background: #f8fbff;
        }

        .catalog-cart-btn {
            order: 1;
            border: 1px solid #c6d7ea;
            background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
            color: var(--cm-text-strong);
            border-radius: var(--cm-panel-radius);
            min-height: 48px;
            padding: 7px 11px;
            display: inline-flex;
            align-items: center;
            gap: 9px;
            cursor: pointer;
            min-width: 252px;
            max-width: min(100%, 330px);
            transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
            box-shadow: 0 4px 10px rgba(11, 58, 120, 0.08);
        }

        .catalog-cart-btn:hover {
            border-color: #a3c0df;
            background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
        }

        .catalog-cart-btn.is-empty {
            border-color: #cedcee;
            background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
            box-shadow: 0 3px 10px rgba(11, 58, 120, 0.07);
        }

        .catalog-cart-btn.has-items {
            border-color: #9fc2e4;
            background: linear-gradient(180deg, #fafdff 0%, #eaf3ff 100%);
            box-shadow: 0 8px 16px rgba(0, 87, 184, 0.11);
        }

        .catalog-cart-btn.is-sync-flash {
            animation: cart-sync-flash 320ms ease-out;
        }

        .catalog-cart-icon-wrap {
            width: 35px;
            height: 35px;
            border-radius: 10px;
            border: 1px solid #bfd2e8;
            background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            overflow: visible;
            flex-shrink: 0;
            position: relative;
        }

        .catalog-cart-icon {
            width: 21px;
            height: 21px;
            display: block;
            stroke: #0e4e9b;
            stroke-width: 1.95;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none;
        }

        .catalog-cart-count-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            min-width: 17px;
            height: 17px;
            padding: 0 5px;
            border-radius: var(--cm-radius-pill);
            border: 1px solid rgba(255, 255, 255, 0.9);
            background: linear-gradient(135deg, #0d4da2, var(--cm-brand-blue));
            color: #ffffff;
            font-family: var(--cm-font-heading);
            font-size: 0.62rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            box-shadow: 0 2px 6px rgba(3, 45, 114, 0.25);
            z-index: 2;
        }

        @keyframes cart-add-pulse {
            0% {
                transform: translateY(0) scale(1);
            }
            38% {
                transform: translateY(-1px) scale(1.018);
            }
            100% {
                transform: translateY(0) scale(1);
            }
        }

        @keyframes cart-sync-flash {
            0% {
                box-shadow: 0 0 0 rgba(41, 182, 246, 0);
                transform: translateY(0);
            }
            45% {
                box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.2), 0 6px 16px rgba(3, 45, 114, 0.2);
                transform: translateY(-1px);
            }
            100% {
                box-shadow: 0 0 0 rgba(41, 182, 246, 0);
                transform: translateY(0);
            }
        }

        @keyframes cart-value-bump {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.1);
            }
            100% {
                transform: scale(1);
            }
        }

        .catalog-cart-btn.is-cart-add-pulse,
        .cart-fab.is-cart-add-pulse {
            animation: cart-add-pulse 420ms ease-out;
            will-change: transform;
        }

        .catalog-cart-copy {
            display: grid;
            gap: 1px;
            text-align: left;
            min-width: 0;
            flex: 1 1 auto;
        }

        .catalog-cart-title {
            font-family: var(--cm-font-heading);
            font-size: 0.76rem;
            font-weight: 700;
            color: #183e66;
            line-height: 1.2;
            letter-spacing: 0.01em;
        }

        .catalog-cart-meta {
            font-family: var(--cm-font-ui);
            font-size: 0.74rem;
            color: #4a6785;
            font-weight: 700;
            line-height: 1.25;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: color 0.2s ease, opacity 0.2s ease;
        }

        .catalog-cart-resume-qty,
        .catalog-cart-resume-total {
            font-family: var(--cm-font-heading);
            font-size: 0.74rem;
            font-weight: 700;
            line-height: 1.2;
        }

        .catalog-cart-resume-sep {
            opacity: 0.75;
            font-size: 0.73rem;
            font-weight: 700;
        }

        .catalog-cart-resume-empty {
            font-family: var(--cm-font-ui);
            font-size: 0.74rem;
            font-weight: 600;
            opacity: 0.95;
        }

        .catalog-cart-btn.is-empty .catalog-cart-title {
            color: #24496f;
        }

        .catalog-cart-btn.is-empty .catalog-cart-meta {
            color: #5c7590;
        }

        .catalog-cart-btn.has-items .catalog-cart-title {
            color: #123f70;
        }

        .catalog-cart-btn.has-items .catalog-cart-meta {
            color: #305a84;
            font-weight: 700;
        }

        .catalog-cart-btn.has-items .catalog-cart-resume-total {
            color: #0d4f9f;
            font-weight: 800;
        }

        .catalog-cart-btn.has-items .catalog-cart-resume-qty {
            color: #345c86;
        }

        .catalog-cart-btn.is-empty .catalog-cart-resume-empty {
            color: #4b6f95;
            font-weight: 600;
        }

        .catalog-cart-count-badge.is-count-bump,
        .catalog-cart-meta.is-value-bump {
            animation: cart-value-bump 220ms ease-out;
        }

        .to-top {
            position: fixed;
            bottom: calc(126px + var(--safe-bottom));
            right: calc(16px + var(--safe-right));
            top: auto;
            z-index: 38;
            border: 1px solid rgba(3, 45, 114, 0.3);
            border-radius: 999px;
            width: clamp(42px, 3.8vw, 46px);
            height: clamp(42px, 3.8vw, 46px);
            min-width: 40px;
            min-height: 40px;
            padding: 0;
            background: linear-gradient(160deg, var(--cm-brand-navy), var(--cm-header-bg));
            color: #ffffff;
            cursor: pointer;
            box-shadow: 0 6px 14px rgba(3, 45, 114, 0.16);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            opacity: 1;
            transform: translateY(0) scale(1);
            transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease, background 0.18s ease;
            touch-action: manipulation;
        }

        .to-top:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 18px rgba(3, 45, 114, 0.22);
            background: linear-gradient(160deg, #02265f, #063876);
        }

        .to-top-icon {
            width: 22px;
            height: 22px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .to-top-icon svg {
            width: 16px;
            height: 16px;
            display: block;
            stroke: #ecf4ff;
            stroke-width: 1.85;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none;
        }

        .fab-hidden {
            opacity: 0;
            pointer-events: none;
            transform: translateY(6px) scale(0.92);
        }

        .whatsapp-float {
            position: fixed;
            bottom: calc(14px + var(--safe-bottom));
            right: calc(12px + var(--safe-right));
            top: auto;
            z-index: 40;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            color: #0f172a;
            font-size: 0.8rem;
            font-weight: 700;
            background: linear-gradient(180deg, #ffffff, #f6faff);
            border-radius: 999px;
            width: var(--wa-size);
            height: var(--wa-size);
            min-width: 44px;
            min-height: 44px;
            padding: 0;
            box-shadow: var(--cm-shadow-md);
            border: 1px solid var(--cm-border);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            touch-action: manipulation;
        }

        .whatsapp-float:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 24px rgba(8, 47, 107, 0.2);
        }

        .whatsapp-icon-wrap {
            width: var(--wa-icon-wrap);
            height: var(--wa-icon-wrap);
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #ffffff;
            box-shadow: inset 0 0 0 1px rgba(3, 45, 114, 0.2);
            overflow: hidden;
        }

        .whatsapp-float img {
            width: var(--wa-icon);
            height: var(--wa-icon);
            display: block;
            object-fit: cover;
            border-radius: 999px;
            background: transparent;
            padding: 0;
            transform: scale(1.34);
            transform-origin: center;
        }

        .whatsapp-qmark {
            display: none;
        }

        .toolbar {
            position: static;
            z-index: 1;
            background: linear-gradient(180deg, #f4f8ff 0%, #f9fcff 100%);
            border-top: 1px solid rgba(215, 228, 242, 0.62);
            border-bottom: 1px solid rgba(215, 228, 242, 0.78);
            padding: 14px clamp(24px, 2.5vw, 32px) 14px;
            margin-bottom: 12px;
        }

        .toolbar-inner {
            display: grid;
            grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.12fr) auto;
            gap: 11px;
            align-items: end;
            max-width: var(--max-content);
            margin: 0 auto;
        }

        .toolbar .field {
            display: grid;
            gap: 5px;
            min-width: 0;
        }

        .toolbar .field-reset {
            min-width: 180px;
            max-width: 220px;
        }

        .toolbar .field label {
            display: block;
            font-family: var(--cm-font-heading);
            font-size: 0.76rem;
            line-height: 1.2;
            color: var(--cm-text-secondary);
            margin-bottom: 0;
            font-weight: 700;
        }

        .toolbar .field input,
        .toolbar .field select {
            width: 100%;
            border: 1px solid var(--cm-border);
            background: var(--cm-surface);
            border-radius: var(--cm-radius-control);
            font-family: var(--cm-font-ui);
            font-size: 0.88rem;
            line-height: 1.2;
            min-height: 42px;
            padding: 9px 14px;
            outline: none;
            color: var(--cm-text-main);
            transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
        }

        .toolbar .field select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            padding-right: 42px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%2358799f' d='M1.4 1.2 6 5.8l4.6-4.6L12 2.6 6 8 0 2.6z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            background-size: 11px 8px;
        }

        .toolbar .field input::placeholder,
        .toolbar .field select:invalid {
            color: var(--cm-text-soft);
        }

        .toolbar .field input:hover,
        .toolbar .field select:hover {
            border-color: var(--cm-border-strong);
            background: #fcfeff;
        }

        .toolbar .field input:focus,
        .toolbar .field select:focus {
            border-color: var(--cm-brand-blue);
            box-shadow: var(--cm-focus-ring);
            background: #ffffff;
        }

        .toolbar .field input:disabled,
        .toolbar .field select:disabled {
            color: #8ca0b8;
            background: #f3f7fb;
            border-color: #d9e4f1;
            cursor: not-allowed;
        }

        .reset-filters-btn {
            width: 100%;
            border: 1px solid var(--cm-border);
            background: rgba(255, 255, 255, 0.92);
            border-radius: var(--cm-radius-control);
            font-family: var(--cm-font-heading);
            font-size: 0.84rem;
            min-height: 42px;
            padding: 0 15px;
            font-weight: 700;
            color: var(--cm-text-secondary);
            cursor: pointer;
            transition: border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, background-color 0.18s ease;
        }

        .reset-filters-btn:hover {
            border-color: var(--cm-border-strong);
            color: #51677f;
            background: #ffffff;
        }

        .reset-filters-btn:focus-visible {
            border-color: var(--cm-brand-blue);
            box-shadow: var(--cm-focus-ring);
            outline: none;
        }

        .reset-filters-btn:disabled {
            color: #95a8bd;
            border-color: #d6e1ed;
            background: #f5f8fc;
            cursor: not-allowed;
        }

        .reset-filters-btn.is-active {
            border-color: #9ec2e8;
            color: var(--cm-brand-blue);
            background: var(--cm-brand-soft);
        }

        .toolbar-active-filters {
            max-width: var(--max-content);
            margin: 8px auto 0;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            min-height: 0;
        }

        .toolbar-active-filters[hidden] {
            display: none;
        }

        .toolbar-filter-chip {
            display: inline-flex;
            align-items: center;
            min-height: 28px;
            border-radius: var(--cm-radius-pill);
            border: 1px solid #c9def5;
            background: #f1f7ff;
            color: var(--cm-brand-navy);
            font-family: var(--cm-font-heading);
            font-size: 0.74rem;
            font-weight: 700;
            line-height: 1.2;
            padding: 0 11px;
            white-space: nowrap;
        }

        .portal-mobile-fab {
            display: none;
        }

        .search-info {
            max-width: var(--max-content);
            margin: 8px auto 0;
            font-family: var(--cm-font-ui);
            font-size: 0.79rem;
            color: var(--cm-text-secondary);
            min-height: 17px;
            line-height: 1.35;
        }

        .catalog-session-btn:focus-visible,
        .catalog-action-btn:focus-visible,
        .catalog-cart-btn:focus-visible,
        .to-top:focus-visible,
        .whatsapp-float:focus-visible,
        .reset-filters-btn:focus-visible,
        .qty-stepper button:focus-visible,
        .qty-stepper input:focus-visible,
        .add-cart-btn:focus-visible,
        .remove-one-card-btn:focus-visible,
        .cart-qty button:focus-visible,
        .cart-qty input:focus-visible,
        .cart-remove:focus-visible,
        .cart-close:focus-visible,
        .cart-note:focus-visible {
            outline: none;
            box-shadow: var(--cm-focus-ring);
        }

        .pedido-cliente-section {
            margin-bottom: var(--space-md);
        }

        .pedido-cliente-card {
            background: #ffffff;
            border: 1px solid #dbe2ea;
            border-radius: clamp(12px, 1.4vw, 16px);
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
            padding: clamp(12px, 1.8vw, 18px);
            display: grid;
            gap: 10px;
        }

        .pedido-cliente-head h2 {
            margin: 0;
            font-size: clamp(1rem, 1.4vw, 1.18rem);
            color: #0f172a;
        }

        .pedido-cliente-head p {
            margin: 4px 0 0;
            font-size: 0.85rem;
            color: #64748b;
        }

        .pedido-cliente-form {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
            gap: 8px;
            align-items: end;
        }

        .pedido-cliente-login-wrap .pedido-cliente-form {
            grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
            gap: 10px;
            align-items: end;
        }

        .pedido-cliente-field label {
            display: block;
            font-size: 0.78rem;
            color: #475569;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .pedido-cliente-field input {
            width: 100%;
            border: 1px solid #cdd6e2;
            background: #ffffff;
            border-radius: var(--cm-radius-control);
            min-height: var(--cm-control-height);
            padding: 8px 11px;
            font-size: 0.9rem;
            outline: none;
            transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
        }

        .pedido-cliente-field textarea,
        .pedido-cliente-field select {
            width: 100%;
            border: 1px solid #cdd6e2;
            background: #ffffff;
            border-radius: var(--cm-radius-control);
            min-height: var(--cm-control-height);
            padding: 8px 11px;
            font-size: 0.9rem;
            outline: none;
            transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
            resize: vertical;
        }

        .pedido-cliente-field input:hover {
            border-color: #b9cce2;
            background: #fcfeff;
        }

        .pedido-cliente-field textarea:hover,
        .pedido-cliente-field select:hover {
            border-color: #b9cce2;
            background: #fcfeff;
        }

        .pedido-cliente-field input:focus {
            border-color: #1d4ed8;
            box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
        }

        .pedido-cliente-field textarea:focus,
        .pedido-cliente-field select:focus {
            border-color: #1d4ed8;
            box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
        }

        .pedido-cliente-actions {
            display: flex;
            align-items: end;
        }

        .pedido-cliente-login-wrap .pedido-cliente-actions {
            align-self: stretch;
        }

        .pedido-btn {
            border: 1px solid #cbd5e1;
            background: #ffffff;
            color: #1e293b;
            border-radius: var(--cm-radius-control);
            min-height: var(--cm-control-height);
            padding: 8px 13px;
            font-size: 0.84rem;
            font-weight: 700;
            cursor: pointer;
            touch-action: manipulation;
            transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, filter 0.16s ease;
        }

        .pedido-btn.primary {
            background: linear-gradient(135deg, #0f4da1, #0057b8);
            border-color: #0f4da1;
            color: #ffffff;
            box-shadow: 0 3px 9px rgba(3, 45, 114, 0.18);
        }

        .pedido-cliente-login-wrap .pedido-btn.primary {
            min-width: 178px;
        }

        .pedido-btn.success {
            background: #16a34a;
            border-color: #16a34a;
            color: #ffffff;
        }

        .pedido-btn:disabled {
            opacity: 0.65;
            cursor: not-allowed;
        }

        .pedido-btn:not(:disabled):hover {
            border-color: #b7cce2;
            background: #f8fbff;
        }

        .pedido-btn.primary:not(:disabled):hover {
            border-color: #0c438e;
            filter: brightness(1.03);
        }

        .pedido-btn.ghost {
            background: #ffffff;
            border-color: #c4d6eb;
            color: #1a4b86;
        }

        .pedido-btn.ghost:not(:disabled):hover {
            background: #f4f9ff;
            border-color: #9fc0e4;
        }

        .pedido-btn:focus-visible {
            outline: none;
            box-shadow: var(--cm-focus-ring);
        }

        .pedido-cliente-message {
            display: none;
            border-radius: 10px;
            border: 1px solid transparent;
            padding: 8px 10px;
            font-size: 0.82rem;
            line-height: 1.4;
        }

        .pedido-cliente-message.show {
            display: block;
        }

        .pedido-cliente-message.info {
            background: #eff6ff;
            color: #1e3a8a;
            border-color: #bfdbfe;
        }

        .pedido-cliente-message.info-soft {
            background: transparent;
            color: #5f748d;
            border-color: transparent;
            font-size: 0.75rem;
            font-weight: 600;
            padding: 1px 2px;
            line-height: 1.35;
        }

        .pedido-cliente-message.success {
            background: #ecfdf5;
            color: #166534;
            border-color: #bbf7d0;
        }

        .pedido-cliente-message.error {
            background: #fef2f2;
            color: #991b1b;
            border-color: #fecaca;
        }

        #pedidoClienteMessage.pedido-cliente-message.show {
            margin-top: 2px;
        }

        #pedidoClienteMessage.pedido-cliente-message.info {
            font-weight: 700;
        }

        .pedido-feedback-modal {
            position: fixed;
            inset: 0;
            z-index: 1600;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 14px;
            background: rgba(15, 23, 42, 0.5);
        }

        .pedido-feedback-modal.open {
            display: flex;
        }

        .pedido-feedback-card {
            width: min(420px, 100%);
            border-radius: 14px;
            border: 1px solid #dbe2ea;
            background: #ffffff;
            box-shadow: 0 22px 40px rgba(15, 23, 42, 0.25);
            padding: 14px;
            display: grid;
            gap: 10px;
        }

        .pedido-feedback-title {
            margin: 0;
            font-size: 0.98rem;
            color: #0f172a;
        }

        .pedido-feedback-text {
            margin: 0;
            font-size: 0.86rem;
            line-height: 1.45;
            color: #334155;
            word-break: break-word;
        }

        .pedido-feedback-actions {
            display: flex;
            justify-content: flex-end;
        }

        .pedido-cliente-editor {
            border-top: 1px solid #e7edf5;
            padding-top: 8px;
            display: grid;
            gap: 8px;
        }

        .pedido-portal-steps {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0;
            border: 1px solid #dbe6f2;
            border-radius: 9px;
            background: #f8fbff;
            overflow: hidden;
        }

        .pedido-portal-step {
            border: 0;
            border-right: 1px solid #dde8f4;
            background: transparent;
            color: #6d8098;
            font-size: 0.68rem;
            font-weight: 700;
            padding: 5px 7px;
            text-align: center;
            line-height: 1.24;
            position: relative;
            transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
        }

        .pedido-portal-step:last-child {
            border-right: 0;
        }

        .pedido-portal-step.active {
            background: #eaf3ff;
            color: #124b95;
            box-shadow: none;
        }

        .pedido-portal-step.done {
            background: #eef9f2;
            color: #1e6b41;
        }

        .pedido-portal-step.pending {
            background: transparent;
            color: #8494a8;
            box-shadow: none;
        }

        .pedido-cliente-login-wrap {
            display: grid;
            gap: 5px;
            border: 1px solid #e3ebf5;
            border-radius: 11px;
            background: #ffffff;
            padding: 7px 8px;
        }

        .pedido-cliente-login-wrap[hidden] {
            display: none !important;
        }

        .pedido-auth-switch-row {
            margin-top: 2px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-wrap: wrap;
        }

        .pedido-auth-switch-text {
            font-size: 0.74rem;
            color: #6b7a90;
            font-weight: 600;
        }

        .pedido-cliente-register-wrap .pedido-cliente-register-form {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            align-items: start;
        }

        .pedido-cliente-register-wrap .pedido-cliente-field-full {
            grid-column: 1 / -1;
        }

        .pedido-cliente-register-wrap .pedido-cliente-register-actions {
            grid-column: 1 / -1;
            display: flex;
            justify-content: flex-end;
            gap: 8px;
        }

        .pedido-step-title {
            margin: 0;
            font-size: 0.77rem;
            color: #16385f;
            font-weight: 800;
        }

        .pedido-login-help {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.7rem;
            line-height: 1.28;
            color: #5f7590;
            font-weight: 500;
        }

        .pedido-portal-panel {
            display: grid;
            gap: 8px;
        }

        .pedido-portal-panel[hidden] {
            display: none !important;
        }

        .pedido-cliente-session {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
            border: 1px solid #dbe2ea;
            border-radius: 12px;
            background: #f8fafc;
            padding: 8px 10px;
        }

        .pedido-cliente-session p {
            margin: 0;
            color: #334155;
            font-size: 0.82rem;
            font-weight: 700;
        }

        #btnCerrarSesionPortalCliente {
            border-color: #fecaca;
            background: #fff1f2;
            color: #9f1239;
        }

        #btnCerrarSesionPortalCliente:hover {
            border-color: #fda4af;
            background: #ffe4e6;
        }

        #btnCerrarSesionPortalCliente:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
        }

        #btnVolverListaPedidos {
            border-color: #bfdbfe;
            background: #eff6ff;
            color: #1e40af;
        }

        #btnVolverListaPedidos:hover {
            border-color: #93c5fd;
            background: #dbeafe;
            color: #1d4ed8;
        }

        #btnVolverListaPedidos:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        }

        .pedido-cliente-list-wrap {
            border: 1px solid #e4ebf4;
            border-radius: 10px;
            background: #ffffff;
            padding: 7px 8px;
            display: grid;
            gap: 5px;
        }

        .pedido-cliente-list-wrap[hidden] {
            display: none !important;
        }

        .pedido-cliente-list-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-wrap: wrap;
        }

        .pedido-cliente-list-head strong {
            font-size: 0.78rem;
            color: #132a46;
            font-weight: 800;
        }

        .pedido-cliente-list-head .pedido-btn {
            min-height: 29px;
            padding: 4px 9px;
            font-size: 0.7rem;
        }

        .pedido-sync-status {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-wrap: wrap;
            border: 1px solid #e5edf7;
            border-radius: 8px;
            background: #fbfdff;
            padding: 5px 7px;
        }

        .pedido-sync-status[hidden] {
            display: none !important;
        }

        .pedido-sync-status[data-state="syncing"] {
            border-color: #d4e5fb;
            background: #f2f8ff;
        }

        .pedido-sync-status[data-state="success"] {
            border-color: #d2f0df;
            background: #f4fcf8;
        }

        .pedido-sync-status[data-state="error"] {
            border-color: #f6d8d8;
            background: #fff7f7;
        }

        .pedido-sync-status-text {
            font-size: 0.71rem;
            font-weight: 600;
            color: #475569;
            line-height: 1.3;
        }

        .pedido-sync-status[data-state="syncing"] .pedido-sync-status-text {
            color: #1e40af;
        }

        .pedido-sync-status[data-state="success"] .pedido-sync-status-text {
            color: #166534;
        }

        .pedido-sync-status[data-state="error"] .pedido-sync-status-text {
            color: #b91c1c;
        }

        #btnReintentarSyncPedidos {
            min-height: 30px;
            font-size: 0.73rem;
            padding: 5px 10px;
            border-color: #fecaca;
            background: #fff1f2;
            color: #9f1239;
        }

        #btnReintentarSyncPedidos:hover {
            border-color: #fda4af;
            background: #ffe4e6;
        }

        .pedido-cliente-filterbar {
            display: inline-flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
        }

        .pedido-filter-btn {
            border: 1px solid #cbd5e1;
            background: #ffffff;
            color: #334155;
            border-radius: 999px;
            min-height: 31px;
            padding: 4px 10px;
            font-size: 0.73rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
        }

        .pedido-filter-btn.active {
            border-color: #1d4ed8;
            background: #1d4ed8;
            color: #ffffff;
            box-shadow: 0 6px 14px rgba(29, 78, 216, 0.25);
        }

        .pedido-cliente-list {
            display: grid;
            gap: 5px;
            max-height: 276px;
            min-height: 276px;
            align-content: start;
            grid-auto-rows: max-content;
            overflow: auto;
            padding-right: 2px;
        }

        .pedido-cliente-list-wrap #pedidoClienteListMessage {
            min-height: 18px;
            margin: 0;
        }

        .pedido-list-item {
            width: 100%;
            border: 1px solid #d9e5f2;
            background: #ffffff;
            color: #0f172a;
            border-radius: 8px;
            text-align: left;
            padding: 7px 8px;
            display: grid;
            gap: 2px;
            cursor: pointer;
            transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
        }

        .pedido-list-item:hover {
            border-color: #a9c8ea;
            box-shadow: 0 4px 10px rgba(15, 52, 105, 0.1);
        }

        .pedido-list-item.active {
            border-color: #2a66c3;
            background: #f3f8ff;
            box-shadow: 0 4px 11px rgba(15, 52, 105, 0.12);
        }

        .pedido-list-item.is-readonly {
            border-color: #dce6f3;
            background: #f8fbff;
        }

        .pedido-list-item-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .pedido-list-item-ref {
            font-size: 0.77rem;
            font-weight: 800;
            color: #0f2e52;
        }

        .pedido-list-item-status {
            border-radius: 999px;
            padding: 2px 7px;
            font-size: 0.62rem;
            font-weight: 800;
            border: 1px solid transparent;
            white-space: nowrap;
            letter-spacing: 0.01em;
        }

        .pedido-list-item-status.estado-pendiente {
            background: #fef3c7;
            color: #92400e;
            border-color: #fcd34d;
        }

        .pedido-list-item-status.estado-cambios {
            background: #dbeafe;
            color: #1e40af;
            border-color: #93c5fd;
        }

        .pedido-list-item-status.estado-listo-despacho {
            background: #ecfeff;
            color: #0f766e;
            border-color: #67e8f9;
        }

        .pedido-list-item-status.estado-enviado {
            background: #e0e7ff;
            color: #3730a3;
            border-color: #a5b4fc;
        }

        .pedido-list-item-status.estado-finalizado {
            background: #dcfce7;
            color: #166534;
            border-color: #86efac;
        }

        .pedido-list-item-status.estado-cancelado {
            background: #fff4f4;
            color: #b4233c;
            border-color: #f3c5c5;
        }

        .pedido-list-item-meta {
            font-size: 0.69rem;
            color: #546b86;
            line-height: 1.24;
            white-space: normal;
            word-break: break-word;
        }

        .pedido-list-item-total {
            font-family: var(--cm-font-heading);
            font-size: 0.77rem;
            font-weight: 800;
            color: #123a63;
            margin-top: 0;
        }

        .pedido-list-item-fecha,
        .pedido-list-item-update {
            font-family: var(--cm-font-ui);
            font-weight: 600;
        }

        .pedido-detalle-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 2px;
            padding-bottom: 3px;
            border-bottom: 1px solid #e6eef7;
        }

        .pedido-cliente-readonly-info {
            border: 1px solid #d5e2f0;
            border-radius: 11px;
            padding: 8px 11px;
            font-size: 0.8rem;
            font-weight: 600;
            line-height: 1.4;
            background: #f8fbff;
            color: #42596f;
        }

        .pedido-cliente-readonly-info.estado-enviado {
            background: #eef2ff;
            border-color: #c7d2fe;
            color: #3730a3;
        }

        .pedido-cliente-readonly-info.estado-finalizado {
            background: #ecfdf5;
            border-color: #bbf7d0;
            color: #166534;
        }

        .pedido-cliente-readonly-info.estado-cancelado {
            background: #fff4f4;
            border-color: #f3c5c5;
            color: #b4233c;
        }

        .pedido-cliente-productos-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-wrap: wrap;
        }

        .pedido-cliente-productos-head strong {
            color: #213b59;
            font-size: 0.9rem;
            font-weight: 800;
        }

        .pedido-cliente-sortbar {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .pedido-sort-label {
            color: #64748b;
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.03em;
        }

        .pedido-sort-btn {
            border: 1px solid #cbd5e1;
            background: #ffffff;
            color: #334155;
            border-radius: 999px;
            min-height: 30px;
            padding: 4px 9px;
            font-size: 0.71rem;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
        }

        .pedido-sort-btn.active {
            border-color: #1d4ed8;
            background: #1d4ed8;
            color: #ffffff;
            box-shadow: 0 6px 14px rgba(29, 78, 216, 0.24);
        }

        .pedido-cliente-meta {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(165px, 100%), 1fr));
            gap: 6px;
            border: 1px solid #e3edf7;
            border-radius: 12px;
            background: #f8fbff;
            padding: 8px;
        }

        .pedido-meta-item {
            border: 0;
            border-radius: 8px;
            background: transparent;
            padding: 5px 7px;
            border-left: 2px solid rgba(0, 87, 184, 0.18);
        }

        .pedido-meta-item .label {
            display: block;
            font-size: 0.68rem;
            color: #64748b;
            margin-bottom: 2px;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            font-weight: 700;
        }

        .pedido-meta-item .value {
            font-size: 0.81rem;
            font-weight: 600;
            color: #102544;
            word-break: break-word;
        }

        .pedido-cliente-productos {
            display: grid;
            gap: 5px;
        }

        .pedido-cliente-producto {
            border: 1px solid #d9e6f4;
            border-radius: 10px;
            background: #ffffff;
            padding: 7px 8px;
            display: grid;
            grid-template-columns: var(--pedido-product-columns-desktop);
            align-items: start;
            gap: 7px;
        }

        .pedido-cliente-producto.is-readonly {
            background: #f8fbff;
            border-color: #d4e1ef;
        }

        .pedido-producto-media {
            display: flex;
            align-items: flex-start;
            justify-content: center;
        }

        .pedido-producto-info {
            min-width: 0;
            display: grid;
            gap: 2px;
            align-content: start;
        }

        .pedido-producto-nombre {
            margin: 0;
            font-size: 0.83rem;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.22;
            white-space: normal;
            word-break: break-word;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .pedido-producto-imagen-wrap {
            margin-top: 0;
            width: var(--pedido-product-thumb-size);
            aspect-ratio: 1 / 1;
            border: 1px solid #d5dde9;
            border-radius: 10px;
            background: #f8fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            flex-shrink: 0;
            padding: 5px;
        }

        .pedido-producto-imagen-wrap.has-image {
            cursor: zoom-in;
            transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
        }

        .pedido-producto-imagen-wrap.has-image:hover {
            border-color: #93c5fd;
            box-shadow: 0 6px 14px rgba(59, 130, 246, 0.16);
            transform: translateY(-1px);
        }

        .pedido-producto-imagen-wrap.has-image:focus-visible {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
        }

        .pedido-producto-imagen {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
            background: #ffffff;
        }

        .pedido-producto-imagen-placeholder {
            color: #64748b;
            font-size: 0.68rem;
            font-weight: 700;
            text-align: center;
            padding: 4px;
            line-height: 1.25;
        }

        .pedido-producto-codigo {
            margin: 0;
            font-size: 0.68rem;
            color: #5f748d;
            line-height: 1.24;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
            word-break: break-word;
        }

        .pedido-producto-sec {
            margin: 0;
            font-size: 0.68rem;
            color: #475569;
            line-height: 1.24;
            white-space: normal;
            word-break: break-word;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .pedido-producto-actions {
            min-width: 0;
            display: grid;
            grid-template-columns: auto auto;
            gap: 4px 8px;
            justify-content: end;
            justify-items: end;
            align-items: center;
            align-content: start;
        }

        .pedido-remove-btn {
            border: 1px solid #fecaca;
            background: #fff1f2;
            color: #9f1239;
            border-radius: 8px;
            min-height: 29px;
            padding: 4px 8px;
            font-size: 0.68rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            justify-self: end;
        }

        .pedido-producto-totales {
            display: grid;
            gap: 2px;
            justify-items: end;
            text-align: right;
            align-self: start;
            grid-column: 1 / -1;
            grid-row: auto;
            width: 100%;
            border-top: 1px solid #e3ecf7;
            padding-top: 4px;
        }

        .pedido-cantidad-lectura {
            font-size: 0.78rem;
            font-weight: 700;
            color: #4f6580;
            line-height: 1.25;
        }

        .pedido-precio-unitario,
        .pedido-subtotal {
            font-size: 0.72rem;
            color: #3b4f66;
            line-height: 1.25;
        }

        .pedido-subtotal {
            font-family: var(--cm-font-heading);
            font-weight: 800;
            color: #123a63;
            font-size: 0.8rem;
            margin-top: 2px;
        }

        .pedido-qty-control {
            display: inline-flex;
            align-items: center;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            overflow: hidden;
            min-height: 30px;
            background: #ffffff;
            justify-self: end;
        }

        .pedido-qty-control button {
            width: 30px;
            border: none;
            border-right: 1px solid #e2e8f0;
            border-left: 1px solid #e2e8f0;
            background: #f8fafc;
            color: #0f172a;
            font-size: 0.95rem;
            font-weight: 800;
            cursor: pointer;
        }

        .pedido-qty-control button:first-child {
            border-left: none;
        }

        .pedido-qty-control button:last-child {
            border-right: none;
        }

        .pedido-qty-input {
            width: 52px;
            border: none;
            text-align: center;
            font-size: 0.82rem;
            font-weight: 700;
            color: #0f172a;
            outline: none;
            background: #ffffff;
        }

        .pedido-cliente-editor[hidden],
        .pedido-cliente-note-wrap[hidden],
        .pedido-cliente-total[hidden] {
            display: none !important;
        }

        .pedido-cliente-note-wrap label {
            display: block;
            font-size: 0.78rem;
            color: #475569;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .pedido-cliente-note-wrap {
            border-top: 1px solid #e3edf7;
            padding-top: 8px;
        }

        .pedido-cliente-add-wrap {
            border: 1px dashed #d4e2f1;
            border-radius: 12px;
            background: #fbfdff;
            padding: 9px;
            display: grid;
            gap: 7px;
        }

        .pedido-cliente-add-wrap[hidden] {
            display: none !important;
        }

        .pedido-cliente-add-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .pedido-cliente-add-head strong {
            font-size: 0.86rem;
            color: #1f3b59;
            font-weight: 700;
        }

        .pedido-cliente-note {
            width: 100%;
            min-height: 74px;
            border: 1px solid #cdd6e2;
            border-radius: 10px;
            padding: 9px 11px;
            font-size: 0.88rem;
            line-height: 1.4;
            resize: vertical;
            outline: none;
            background: #ffffff;
        }

        .pedido-cliente-note.is-readonly,
        .pedido-cliente-note[readonly] {
            background: #f8fbff;
            border-color: #d7e4f2;
            color: #42566f;
            cursor: default;
        }

        .pedido-cliente-note:focus {
            border-color: #1d4ed8;
            box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
        }

        .pedido-cliente-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
            border-top: 1px solid #e3edf7;
            padding-top: 8px;
        }

        #pedidoClienteStepDetalle.modo-lectura .pedido-cliente-footer {
            justify-content: flex-start;
        }

        #pedidoClienteStepDetalle.modo-lectura .pedido-cliente-total {
            font-weight: 700;
        }

        .pedido-cliente-total {
            font-size: 0.9rem;
            color: #0f172a;
            font-weight: 700;
        }

        #btnGuardarCambiosPedido {
            border-color: var(--cm-brand-blue);
            background: linear-gradient(135deg, #0f4da1, #0057b8);
            color: #ffffff;
            box-shadow: 0 3px 8px rgba(3, 45, 114, 0.18);
            min-width: 146px;
        }

        #btnGuardarCambiosPedido:hover {
            border-color: #0d4693;
            filter: brightness(1.03);
        }

        #btnCancelarEdicionPedido {
            border-color: #cad7e6;
            background: #ffffff;
            color: #3c5674;
        }

        #pedidoClienteListMessage.pedido-cliente-message.show,
        #pedidoAgregarMessage.pedido-cliente-message.show,
        #pedidoGuardarMessage.pedido-cliente-message.show {
            margin-top: 1px;
        }

        #pedidoClienteListMessage.pedido-cliente-message.info-soft.show,
        #pedidoAgregarMessage.pedido-cliente-message.info.show,
        #pedidoGuardarMessage.pedido-cliente-message.info.show {
            background: transparent;
            border-color: transparent;
            color: #60758f;
            font-size: 0.75rem;
            font-weight: 600;
            padding: 1px 2px;
        }

        .pedido-cliente-modal {
            position: fixed;
            inset: 0;
            z-index: 85;
            background: rgba(15, 23, 42, 0.48);
            display: none;
            align-items: center;
            justify-content: center;
            padding: clamp(12px, 3vw, 22px);
        }

        .pedido-cliente-modal.open {
            display: flex;
        }

        .pedido-cliente-modal-card {
            width: min(900px, 100%);
            max-height: min(88vh, 800px);
            background: #ffffff;
            border: 1px solid var(--cm-border);
            border-radius: var(--cm-radius-card);
            box-shadow: var(--cm-shadow-soft);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .pedido-cliente-modal-head {
            padding: 10px 12px;
            border-bottom: 1px solid var(--cm-border);
            background: var(--cm-surface-soft);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }

        .pedido-cliente-modal-head-copy {
            min-width: 0;
        }

        .pedido-cliente-modal-head-actions {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .pedido-portal-close-mobile {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 34px;
            padding: 6px 9px;
            font-size: 0.72rem;
            border-radius: 10px;
            border: 1px solid #bfdbfe;
            background: #eff6ff;
            color: #1e3a8a;
            font-weight: 700;
            white-space: nowrap;
        }

        .pedido-cliente-modal-head h3 {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 800;
            color: var(--cm-text-main);
        }

        .pedido-cliente-modal-head-copy p {
            margin: 2px 0 0;
            font-size: 0.73rem;
            font-weight: 600;
            color: #5f7590;
            line-height: 1.35;
        }

        .pedido-cliente-modal-close {
            border: 1px solid var(--cm-border);
            background: #ffffff;
            color: #334155;
            border-radius: var(--cm-radius-control);
            width: 36px;
            height: 36px;
            min-width: 36px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 700;
        }

        .pedido-cliente-modal-body {
            padding: 10px 12px;
            background: #ffffff;
            overflow-y: auto;
            overflow-x: hidden;
            min-height: 0;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            touch-action: pan-y;
            display: grid;
            gap: 8px;
        }

        .pedido-producto-modal,
        .pedido-producto-confirm-modal {
            position: fixed;
            inset: 0;
            z-index: 90;
            background: rgba(15, 23, 42, 0.48);
            display: none;
            align-items: center;
            justify-content: center;
            padding: clamp(12px, 3vw, 22px);
        }

        .pedido-producto-modal.open,
        .pedido-producto-confirm-modal.open {
            display: flex;
        }

        .pedido-producto-modal-card {
            width: min(900px, 100%);
            max-height: min(88vh, 780px);
            background: var(--cm-white);
            border: 1px solid var(--cm-border);
            border-radius: 16px;
            box-shadow: var(--cm-shadow-soft);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .pedido-producto-modal-head {
            padding: 13px 14px 11px;
            border-bottom: 1px solid var(--cm-border);
            display: flex;
            justify-content: space-between;
            align-items: start;
            gap: 10px;
            background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
        }

        .pedido-producto-modal-head h3 {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 1rem;
            font-weight: 800;
            color: var(--cm-text-strong);
        }

        .pedido-producto-modal-head p {
            margin: 3px 0 0;
            font-family: var(--cm-font-ui);
            font-size: 0.78rem;
            line-height: 1.4;
            color: var(--cm-text-soft);
            max-width: 560px;
        }

        .pedido-producto-modal-close {
            border: 1px solid var(--cm-border);
            background: #ffffff;
            color: #49627f;
            border-radius: 11px;
            width: 38px;
            height: 38px;
            min-width: 38px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 700;
            transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
        }

        .pedido-producto-modal-close:hover {
            border-color: var(--cm-border-strong);
            background: #f7fbff;
            color: var(--cm-brand-navy);
        }

        .pedido-producto-modal-close:focus-visible {
            outline: none;
            box-shadow: var(--cm-focus-ring);
        }

        .pedido-producto-modal-body {
            padding: 12px 14px;
            overflow: auto;
            display: grid;
            gap: 11px;
            background: var(--cm-white);
        }

        .pedido-producto-search-label {
            font-family: var(--cm-font-heading);
            font-size: 0.75rem;
            color: #4f6782;
            font-weight: 700;
            letter-spacing: 0.01em;
        }

        .pedido-producto-search-input {
            width: 100%;
            min-height: 40px;
            border: 1px solid var(--cm-border);
            border-radius: 11px;
            padding: 9px 12px;
            font-family: var(--cm-font-ui);
            font-size: 0.88rem;
            color: var(--cm-text-strong);
            background: #ffffff;
            outline: none;
            transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
        }

        .pedido-producto-search-input::placeholder {
            color: #7b90a9;
            font-weight: 500;
            font-family: var(--cm-font-ui);
        }

        .pedido-producto-search-input:hover {
            border-color: #bfd0e3;
            background: #fcfeff;
        }

        .pedido-producto-search-input:focus {
            border-color: var(--cm-brand-blue);
            box-shadow: var(--cm-focus-ring);
        }

        .pedido-producto-list {
            display: grid;
            gap: 7px;
            max-height: min(55vh, 470px);
            overflow: auto;
            padding-right: 2px;
        }

        .pedido-producto-item {
            border: 1px solid var(--cm-border);
            border-radius: 12px;
            background: #ffffff;
            display: grid;
            grid-template-columns: 62px minmax(0, 1fr) auto;
            gap: 10px;
            align-items: center;
            padding: 8px 9px;
            transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
        }

        .pedido-producto-item:hover,
        .pedido-producto-item:focus-within {
            border-color: #b7cee7;
            background: #fbfdff;
            box-shadow: 0 4px 12px rgba(8, 47, 107, 0.07);
        }

        .pedido-producto-thumb {
            width: 62px;
            height: 62px;
            border-radius: 11px;
            background: #f4f9ff;
            border: 1px solid var(--cm-border);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .pedido-producto-thumb img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #ffffff;
            display: block;
        }

        .pedido-producto-thumb-placeholder {
            width: 100%;
            height: 100%;
            border-radius: 10px;
            border: 1px solid rgba(3, 45, 114, 0.12);
            background: linear-gradient(180deg, #f9fcff 0%, #edf5ff 100%);
            display: grid;
            place-items: center;
            gap: 3px;
            padding: 5px;
            text-align: center;
            color: #647d99;
        }

        .pedido-producto-main {
            min-width: 0;
            display: grid;
            gap: 2px;
        }

        .pedido-producto-main-name {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 0.87rem;
            font-weight: 800;
            color: var(--cm-text-strong);
            line-height: 1.32;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .pedido-producto-main-meta {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.76rem;
            color: #627c98;
            line-height: 1.32;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .pedido-producto-main-code {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.72rem;
            color: #7a8fa8;
            line-height: 1.3;
        }

        .pedido-producto-select-btn {
            border: 1px solid #b9cde6;
            background: #f2f8ff;
            color: #204f80;
            border-radius: 10px;
            min-height: 34px;
            padding: 7px 10px;
            font-family: var(--cm-font-heading);
            font-size: 0.77rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
        }

        .pedido-producto-select-btn:hover:not(:disabled) {
            border-color: #7fa7d4;
            background: #e7f2ff;
            color: #123a63;
        }

        .pedido-producto-select-btn:focus-visible {
            outline: none;
            box-shadow: var(--cm-focus-ring);
        }

        .pedido-producto-empty {
            border: 1px dashed #bfd0e4;
            border-radius: 12px;
            padding: 12px;
            font-family: var(--cm-font-ui);
            font-size: 0.82rem;
            color: #647f9c;
            line-height: 1.45;
            text-align: center;
            background: #f8fbff;
        }

        .pedido-producto-confirm-card {
            width: min(620px, 100%);
            max-height: min(88vh, 760px);
            background: #ffffff;
            border: 1px solid var(--cm-border);
            border-radius: 16px;
            box-shadow: var(--cm-shadow-soft);
            overflow: hidden;
            display: grid;
            gap: 0;
        }

        .pedido-producto-confirm-head {
            padding: 13px 14px 11px;
            border-bottom: 1px solid var(--cm-border);
            background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
        }

        .pedido-producto-confirm-head h3 {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 1rem;
            font-weight: 800;
            color: var(--cm-text-strong);
        }

        .pedido-producto-confirm-body {
            padding: 12px 14px;
            display: grid;
            gap: 13px;
            grid-template-columns: 128px minmax(0, 1fr);
            align-items: start;
        }

        .pedido-producto-confirm-image-wrap {
            width: 128px;
            height: 128px;
            border-radius: 13px;
            border: 1px solid var(--cm-border);
            background: #f4f9ff;
            overflow: hidden;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .pedido-producto-confirm-image-wrap img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #ffffff;
            display: none;
        }

        .pedido-producto-confirm-image-wrap.has-image img {
            display: block;
        }

        .pedido-producto-confirm-image-placeholder {
            width: 100%;
            height: 100%;
            border-radius: 12px;
            border: 1px solid rgba(3, 45, 114, 0.12);
            background: linear-gradient(180deg, #f9fcff 0%, #edf5ff 100%);
            display: grid;
            place-items: center;
            gap: 6px;
            text-align: center;
            color: #68809d;
            padding: 10px;
        }

        .pedido-producto-confirm-image-wrap.has-image .pedido-producto-confirm-image-placeholder {
            display: none;
        }

        .pedido-producto-placeholder-icon {
            width: 22px;
            height: 18px;
            border: 1.4px solid #6a89ab;
            border-radius: 4px;
            position: relative;
            background: rgba(255, 255, 255, 0.9);
            display: inline-block;
        }

        .pedido-producto-placeholder-icon::before {
            content: "";
            position: absolute;
            width: 4px;
            height: 4px;
            border-radius: 50%;
            top: 3px;
            right: 4px;
            background: #6a89ab;
        }

        .pedido-producto-placeholder-icon::after {
            content: "";
            position: absolute;
            left: 4px;
            bottom: 3px;
            width: 10px;
            height: 6px;
            border-radius: 2px;
            background: linear-gradient(135deg, #7f9fc1 0%, #4f739d 100%);
            clip-path: polygon(0 100%, 40% 35%, 64% 68%, 100% 18%, 100% 100%);
        }

        .pedido-producto-placeholder-text {
            display: block;
            font-family: var(--cm-font-ui);
            font-size: 0.62rem;
            font-weight: 600;
            line-height: 1.25;
            letter-spacing: 0.01em;
            max-width: 72px;
            text-wrap: balance;
        }

        .pedido-producto-confirm-data {
            display: grid;
            gap: 6px;
            min-width: 0;
        }

        .pedido-producto-confirm-kicker {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 0.72rem;
            color: #607896;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            font-weight: 700;
        }

        .pedido-producto-confirm-name {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 1.02rem;
            line-height: 1.3;
            color: var(--cm-text-strong);
            font-weight: 800;
            text-wrap: balance;
        }

        .pedido-producto-confirm-meta-grid {
            display: grid;
            gap: 6px;
        }

        .pedido-producto-confirm-meta {
            margin: 0;
            border: 1px solid #d9e6f3;
            background: #f8fbff;
            border-radius: 10px;
            padding: 6px 8px;
            display: grid;
            gap: 2px;
            line-height: 1.3;
        }

        .pedido-producto-confirm-meta-label {
            font-family: var(--cm-font-heading);
            font-size: 0.68rem;
            color: #6a839e;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            font-weight: 700;
        }

        .pedido-producto-confirm-meta-value {
            font-family: var(--cm-font-ui);
            font-size: 0.8rem;
            color: #2e4a68;
            font-weight: 700;
            word-break: break-word;
        }

        .pedido-producto-confirm-price-label {
            margin: 2px 0 0;
            font-family: var(--cm-font-heading);
            font-size: 0.72rem;
            color: #607896;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            font-weight: 700;
        }

        .pedido-producto-confirm-price {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 1.12rem;
            color: var(--cm-brand-navy);
            font-weight: 800;
            line-height: 1.2;
        }

        .pedido-producto-confirm-qty {
            margin-top: 2px;
            display: grid;
            gap: 5px;
        }

        .pedido-producto-confirm-qty label {
            font-family: var(--cm-font-heading);
            font-size: 0.74rem;
            color: #4f6782;
            font-weight: 700;
            letter-spacing: 0.01em;
        }

        .pedido-producto-confirm-qty input {
            width: 100%;
            min-width: 0;
            min-height: 40px;
            border: 1px solid var(--cm-border);
            border-radius: 11px;
            padding: 8px 10px;
            font-family: var(--cm-font-heading);
            font-size: 0.92rem;
            color: var(--cm-text-strong);
            background: #ffffff;
            outline: none;
            text-align: center;
            font-weight: 700;
        }

        .pedido-producto-confirm-stepper {
            display: grid;
            grid-template-columns: 38px minmax(0, 1fr) 38px;
            gap: 6px;
            align-items: center;
            width: min(190px, 100%);
        }

        .pedido-stepper-btn {
            min-height: 40px;
            border: 1px solid var(--cm-border);
            border-radius: 11px;
            background: #f2f7ff;
            color: #204f80;
            font-size: 1rem;
            font-weight: 800;
            line-height: 1;
            cursor: pointer;
            transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
        }

        .pedido-stepper-btn:hover:not(:disabled) {
            border-color: #8eb2d8;
            background: #e6f1ff;
            color: #123a63;
        }

        .pedido-stepper-btn:active {
            transform: translateY(1px);
        }

        .pedido-stepper-btn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .pedido-stepper-btn:focus-visible {
            outline: none;
            border-color: var(--cm-brand-blue);
            box-shadow: var(--cm-focus-ring);
        }

        .pedido-producto-confirm-qty input:focus {
            border-color: var(--cm-brand-blue);
            box-shadow: var(--cm-focus-ring);
        }

        .pedido-producto-confirm-actions {
            border-top: 1px solid var(--cm-border);
            padding: 10px 14px 14px;
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            flex-wrap: wrap;
            background: #fbfdff;
        }

        .container {
            padding: clamp(10px, 1.4vw, 16px) clamp(20px, 2.3vw, 30px);
            width: 100%;
            max-width: calc(var(--max-content) + 60px);
            margin: 0 auto;
            height: calc(100dvh - var(--catalog-sticky-height));
            overflow: hidden;
        }

        .content-layout {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: clamp(12px, 1.8vw, 20px);
            align-items: start;
            height: 100%;
        }

        .products-area {
            min-width: 0;
            scroll-margin-top: 12px;
            height: 100%;
            overflow-y: auto;
            overscroll-behavior: contain;
            padding-right: 2px;
            width: 100%;
            margin: 0 auto;
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 24vw, 280px), 1fr));
            gap: clamp(12px, 1.35vw, 16px);
            width: 100%;
            max-width: var(--max-content);
            margin: 0 auto;
            justify-content: center;
        }

        .card {
            background: var(--cm-surface);
            border: 1px solid var(--cm-border);
            border-radius: var(--cm-radius-card);
            overflow: hidden;
            box-shadow: var(--cm-shadow-xs);
            transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
            content-visibility: auto;
            contain-intrinsic-size: 306px;
        }

        .card:hover {
            transform: translateY(-2px);
            border-color: var(--cm-border-strong);
            box-shadow: var(--cm-shadow-sm);
        }

        .card.is-in-cart {
            border-color: #a9c9ea;
            box-shadow: 0 8px 18px rgba(0, 87, 184, 0.09), inset 0 0 0 1px rgba(41, 182, 246, 0.14);
        }

        .card.is-in-cart .qty-stepper {
            border-color: #aac7e6;
            background: #fcfeff;
        }

        .card.is-qty-feedback {
            animation: card-qty-feedback 280ms ease-out;
        }

        .image-box {
            height: clamp(126px, 15.5vw, 154px);
            background: linear-gradient(180deg, #f8fbff 0%, #f2f7fd 100%);
            border-bottom: 1px solid var(--card-border);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            padding: 8px;
        }

        .image-box img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #ffffff;
            border-radius: 10px;
            display: block;
        }

        .image-box.has-image {
            cursor: zoom-in;
        }

        .image-placeholder {
            width: 100%;
            height: 100%;
            border-radius: 12px;
            border: 1px solid rgba(3, 45, 114, 0.15);
            background:
                radial-gradient(120% 100% at 0% 0%, rgba(41, 182, 246, 0.16) 0%, rgba(41, 182, 246, 0) 52%),
                linear-gradient(180deg, #f9fcff 0%, #eef5ff 100%);
            color: var(--cm-text-soft);
            text-align: center;
            padding: 10px 10px 9px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            position: relative;
            overflow: hidden;
        }

        .image-placeholder::after {
            content: "";
            position: absolute;
            top: 8px;
            left: 50%;
            width: 44px;
            height: 2px;
            border-radius: 999px;
            transform: translateX(-50%);
            background: linear-gradient(
                90deg,
                rgba(0, 87, 184, 0) 0%,
                rgba(0, 87, 184, 0.34) 50%,
                rgba(0, 87, 184, 0) 100%
            );
        }

        .image-placeholder-icon {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            border: 1px solid rgba(0, 87, 184, 0.24);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(234, 244, 255, 0.9) 100%);
            display: grid;
            place-items: center;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.9),
                0 4px 10px rgba(0, 87, 184, 0.08);
        }

        .image-placeholder-icon svg {
            width: 24px;
            height: 24px;
            stroke: #5a7fae;
            stroke-width: 1.7;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none;
        }

        .image-placeholder-text {
            display: block;
            max-width: 94px;
            font-family: var(--cm-font-ui);
            font-size: 0.78rem;
            line-height: 1.2;
            font-weight: 600;
            letter-spacing: 0.01em;
            color: var(--cm-text-soft);
            text-wrap: balance;
        }

        .content {
            padding: 9px 11px 10px;
            text-align: center;
            display: grid;
            gap: 6px;
            justify-items: center;
        }

        .name {
            margin: 0 auto;
            min-height: 0;
            font-family: var(--cm-font-heading);
            color: var(--cm-text-main);
            font-size: clamp(1.12rem, 1.42vw, 1.26rem);
            line-height: 1.22;
            font-weight: 800;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            min-height: calc(1.22em * 2);
            text-align: center;
            max-width: min(100%, 92%);
            text-wrap: balance;
        }

        .card-meta-line {
            margin: 0 auto;
            font-family: var(--cm-font-ui);
            font-size: clamp(0.8rem, 0.9vw, 0.87rem);
            color: var(--cm-text-secondary);
            font-weight: 600;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-align: center;
            max-width: min(100%, 84%);
        }

        .meta-row {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 10px;
        }

        .estado {
            font-family: var(--cm-font-heading);
            font-size: clamp(0.68rem, 0.9vw, 0.76rem);
            font-weight: 700;
            padding: 5px 10px;
            border-radius: var(--cm-radius-pill);
            background: var(--chip-default);
            color: var(--chip-text);
        }

        .estado-activo { background: var(--activo-bg); color: var(--activo-text); }
        .estado-agotado { background: var(--agotado-bg); color: var(--agotado-text); }
        .estado-descontinuado { background: var(--descontinuado-bg); color: var(--descontinuado-text); }
        .estado-promocion { background: var(--promo-bg); color: var(--promo-text); }

        .cantidad {
            font-family: var(--cm-font-heading);
            font-size: clamp(0.68rem, 0.9vw, 0.76rem);
            font-weight: 700;
            white-space: nowrap;
            padding: 5px 10px;
            border-radius: var(--cm-radius-pill);
            background: var(--stock-bg);
            color: #49627e;
        }

        .laboratorio-chip {
            font-family: var(--cm-font-ui);
            font-size: clamp(0.68rem, 0.9vw, 0.76rem);
            font-weight: 600;
            padding: 5px 10px;
            border-radius: var(--cm-radius-pill);
            border: 1px solid var(--cm-border);
            background: #f7fbff;
            color: #4f6783;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .precio {
            font-family: var(--cm-font-heading);
            font-size: clamp(1.4rem, 2.02vw, 1.66rem);
            font-weight: 800;
            color: var(--cm-brand-blue);
            margin: 4px auto 2px;
            line-height: 1.08;
            letter-spacing: 0.01em;
            text-align: center;
            width: fit-content;
        }

        .no-resultados {
            grid-column: 1 / -1;
            background: #ffffff;
            border: 1px dashed #cbd5e1;
            color: #475569;
            border-radius: 12px;
            padding: 18px;
            text-align: center;
            font-size: 0.9rem;
        }

        .footer {
            position: fixed;
            left: calc(10px + var(--safe-left));
            bottom: calc(10px + var(--safe-bottom));
            z-index: 28;
            margin: 0;
            padding: 4px 8px;
            max-width: min(58vw, 360px);
            border-radius: 999px;
            border: 1px solid rgba(177, 198, 222, 0.6);
            background: rgba(255, 255, 255, 0.88);
            box-shadow: 0 2px 8px rgba(8, 47, 107, 0.08);
            text-align: left;
            font-family: var(--cm-font-ui);
            font-size: clamp(0.62rem, 0.72vw, 0.7rem);
            line-height: 1.2;
            color: #6d7f95;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            pointer-events: none;
            user-select: none;
        }

        .cart-panel {
            background: var(--cm-surface);
            border: 1px solid var(--cm-border);
            border-radius: var(--cm-radius-card) 0 0 var(--cm-radius-card);
            box-shadow: var(--cm-shadow-soft);
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            width: min(390px, 100vw);
            height: 100dvh;
            max-height: none;
            min-height: 0;
            border-right: none;
            z-index: 60;
            transform: translateX(102%);
            transition: transform 0.22s ease;
        }

        .cart-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            border-bottom: 1px solid var(--cm-border);
            padding-bottom: 7px;
        }

        .cart-title {
            margin: 0;
            font-size: 1.02rem;
            font-family: var(--cm-font-heading);
            font-weight: 800;
            color: var(--cm-text-main);
        }

        .cart-close {
            border: 1px solid var(--cm-border);
            background: var(--cm-surface);
            color: #4a6381;
            width: 38px;
            height: 38px;
            border-radius: var(--cm-radius-control);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            cursor: pointer;
            transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
        }

        .cart-close:hover {
            border-color: var(--cm-border-strong);
            color: var(--cm-brand-navy);
            background: #f8fbff;
        }

        .cart-state {
            font-size: 0.77rem;
            color: #506983;
            font-family: var(--cm-font-ui);
            font-weight: 600;
        }

        .cart-items {
            display: flex;
            flex-direction: column;
            gap: 7px;
            overflow: auto;
            padding-right: 3px;
            min-height: 0;
            max-height: none;
            flex: 1 1 auto;
        }

        .cart-empty {
            border: 1px dashed #c8d9ec;
            border-radius: var(--cm-radius-control);
            padding: 10px;
            font-size: 0.78rem;
            color: #637a93;
            text-align: center;
            background: #f7fbff;
        }

        .cart-item {
            border: 1px solid var(--cm-border);
            border-radius: var(--cm-radius-control);
            padding: 7px;
            display: grid;
            grid-template-columns: 56px minmax(0, 1fr);
            gap: 7px;
            align-items: flex-start;
            background: #ffffff;
            box-shadow: var(--cm-shadow-xs);
        }

        .cart-item.is-row-feedback {
            border-color: #b7d3ef;
            box-shadow: 0 0 0 2px rgba(41, 182, 246, 0.11);
        }

        .cart-item-thumb {
            width: 56px;
            height: 56px;
            border-radius: 9px;
            border: 1px solid var(--cm-border);
            background: #ffffff;
            overflow: hidden;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .cart-item-thumb img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
            background: #ffffff;
        }

        .cart-item-thumb-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            border-radius: 9px;
            background: linear-gradient(180deg, #f8fcff 0%, #eef5ff 100%);
            color: #5e7691;
            text-align: center;
            line-height: 1.15;
            padding: 4px;
            font-family: var(--cm-font-ui);
            border: 1px solid rgba(3, 45, 114, 0.12);
        }

        .cart-item-thumb-placeholder-icon {
            font-size: 0.66rem;
            line-height: 1;
            color: #4e6f95;
        }

        .cart-item-thumb-placeholder-text {
            font-size: 0.56rem;
            font-weight: 700;
            letter-spacing: 0.01em;
        }

        .cart-item-main {
            min-width: 0;
            display: grid;
            gap: 4px;
        }

        .cart-item-name {
            margin: 0 0 2px 0;
            font-size: 0.8rem;
            font-family: var(--cm-font-heading);
            font-weight: 700;
            color: var(--cm-text-main);
            line-height: 1.25;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .cart-item-meta {
            margin: 0;
            font-size: 0.7rem;
            color: #607992;
            font-family: var(--cm-font-ui);
            font-weight: 600;
            line-height: 1.25;
        }

        .cart-qty {
            display: inline-flex;
            align-items: center;
            border: 1px solid var(--cm-border);
            border-radius: var(--cm-radius-control);
            overflow: hidden;
            background: #ffffff;
            min-height: var(--cm-control-height-sm);
            width: fit-content;
        }

        .cart-qty button {
            width: 30px;
            height: var(--cm-control-height-sm);
            border: none;
            background: #f4f9ff;
            color: #4f6885;
            font-family: var(--cm-font-heading);
            font-size: 0.88rem;
            cursor: pointer;
            min-width: 30px;
            min-height: var(--cm-control-height-sm);
            transition: background-color 0.15s ease, color 0.15s ease;
        }

        .cart-qty button:hover {
            background: #e9f3ff;
            color: var(--cm-brand-blue);
        }

        .cart-qty input {
            width: 36px;
            height: var(--cm-control-height-sm);
            border: none;
            text-align: center;
            font-size: 0.76rem;
            font-family: var(--cm-font-heading);
            font-weight: 700;
            color: var(--cm-text-main);
            background: #ffffff;
        }

        .cart-item-subtotal {
            font-size: 0.76rem;
            font-weight: 800;
            font-family: var(--cm-font-heading);
            color: var(--cm-brand-navy);
            text-align: left;
            line-height: 1.1;
        }

        .cart-item-foot {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .cart-remove {
            border: 1px solid #f0c8cf;
            color: #b44a59;
            background: #fff4f6;
            border-radius: 9px;
            padding: 5px 8px;
            font-size: 0.7rem;
            font-family: var(--cm-font-heading);
            font-weight: 700;
            cursor: pointer;
            min-height: 30px;
            transition: border-color 0.16s ease, background-color 0.16s ease;
        }

        .cart-remove:hover {
            border-color: #e7aeb9;
            background: #ffeff3;
        }

        .cart-note-label {
            display: block;
            font-size: 0.74rem;
            font-family: var(--cm-font-heading);
            font-weight: 700;
            color: #3f5875;
            margin-bottom: 4px;
        }

        .cart-note-wrap {
            border-top: 1px solid var(--cm-border);
            padding-top: 7px;
            margin-top: 1px;
        }

        .cart-note {
            width: 100%;
            min-height: 64px;
            border: 1px solid var(--cm-border);
            border-radius: var(--cm-radius-control);
            padding: 8px 9px;
            resize: vertical;
            font-size: 0.78rem;
            font-family: var(--cm-font-ui);
            color: var(--cm-text-main);
            background: #ffffff;
        }

        .cart-note:focus {
            border-color: var(--cm-brand-blue);
            box-shadow: var(--cm-focus-ring);
            outline: none;
        }

        .cart-totals {
            border-top: 1px solid var(--cm-border);
            padding: 8px 9px 0;
            border-radius: var(--cm-radius-control);
            background: linear-gradient(180deg, #f7fbff 0%, #fdfefe 100%);
            display: grid;
            gap: 4px;
            transition: box-shadow 0.18s ease, border-color 0.18s ease;
        }

        .cart-totals.is-totals-feedback {
            border-color: #bfd9f3;
            box-shadow: 0 0 0 2px rgba(41, 182, 246, 0.12);
        }

        .cart-total-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8rem;
            color: #506983;
            font-family: var(--cm-font-ui);
            font-weight: 600;
        }

        .cart-total-final {
            font-size: 1.04rem;
            font-weight: 800;
            color: var(--cm-text-main);
            font-family: var(--cm-font-heading);
        }

        #cartTotal {
            transition: transform 0.18s ease, color 0.18s ease;
        }

        #cartTotal.is-total-bump {
            color: var(--cm-brand-navy);
            transform: translateY(-1px) scale(1.02);
        }

        .cart-state.is-state-bump {
            color: #345879;
        }

        .cart-checkout-btn {
            width: 100%;
            min-height: 44px;
            border: none;
            border-radius: var(--cm-radius-control);
            background: linear-gradient(135deg, var(--cm-brand-navy), var(--cm-brand-blue));
            color: #ffffff;
            font-size: 0.86rem;
            font-family: var(--cm-font-heading);
            font-weight: 800;
            letter-spacing: 0.01em;
            cursor: pointer;
            touch-action: manipulation;
            box-shadow: 0 4px 10px rgba(3, 45, 114, 0.2);
            transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
            margin-top: 2px;
        }

        .cart-checkout-btn:hover {
            filter: brightness(1.03);
            box-shadow: 0 6px 12px rgba(3, 45, 114, 0.24);
        }

        .cart-checkout-btn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .cart-fab {
            position: fixed;
            z-index: 55;
            right: calc(12px + var(--safe-right));
            bottom: calc(108px + var(--safe-bottom));
            display: inline-flex;
            align-items: center;
            gap: 8px;
            border: 1px solid var(--header-a);
            background: #ffffff;
            color: var(--text);
            border-radius: 999px;
            min-height: 46px;
            padding: 8px 12px;
            box-shadow: 0 12px 20px rgba(15, 23, 42, 0.2);
            cursor: pointer;
            font-size: 0.82rem;
            font-weight: 800;
            touch-action: manipulation;
            display: none;
        }

        .cart-fab-label {
            font-size: 0.78rem;
            font-weight: 800;
        }

        .cart-fab-count {
            min-width: 22px;
            height: 22px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--header-a);
            color: #ffffff;
            font-size: 0.72rem;
            padding: 0 6px;
        }

        .cart-fab-total {
            color: var(--header-a);
            font-size: 0.8rem;
            font-weight: 800;
            white-space: nowrap;
        }

        .cart-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.45);
            z-index: 50;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }

        body.cart-open {
            overflow: hidden;
        }

        body.cart-open .cart-panel {
            transform: translateX(0);
        }

        body.cart-open .cart-backdrop {
            opacity: 1;
            pointer-events: auto;
        }

        .cart-toast {
            position: fixed;
            left: 50%;
            transform: translate(-50%, 16px);
            bottom: calc(90px + var(--safe-bottom));
            z-index: 70;
            background: #0f172a;
            color: #ffffff;
            padding: 8px 12px;
            border-radius: 999px;
            font-size: 0.8rem;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s ease;
            white-space: nowrap;
        }

        .cart-toast.show {
            opacity: 1;
            transform: translate(-50%, 0);
        }

        .checkout-modal {
            position: fixed;
            inset: 0;
            z-index: 80;
            background: rgba(15, 23, 42, 0.48);
            display: none;
            align-items: center;
            justify-content: center;
            padding: clamp(12px, 3vw, 22px);
        }

        .checkout-modal.open {
            display: flex;
        }

        .checkout-card {
            width: min(780px, 100%);
            max-height: min(86vh, 740px);
            background: #ffffff;
            border-radius: 14px;
            border: 1px solid #dbe2ea;
            box-shadow: 0 24px 42px rgba(15, 23, 42, 0.25);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .checkout-head {
            padding: 14px 16px 12px;
            border-bottom: 1px solid var(--cm-border);
            background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
        }

        .checkout-head-copy {
            display: grid;
            gap: 3px;
        }

        .checkout-flow-tag {
            margin: 0;
            font-size: 0.67rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #486485;
        }

        .checkout-title {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 1.06rem;
            font-weight: 800;
            color: var(--cm-text-strong);
            letter-spacing: 0.01em;
        }

        .checkout-subtitle {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.78rem;
            line-height: 1.4;
            color: var(--cm-text-soft);
        }

        .checkout-body {
            padding: 14px 16px;
            overflow: auto;
            display: grid;
            gap: 10px;
        }

        .checkout-summary {
            margin: 0;
            border: 1px solid var(--cm-border);
            border-radius: 14px;
            background: #ffffff;
            padding: 12px;
            display: grid;
            gap: 10px;
        }

        .checkout-summary-head {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 8px;
            flex-wrap: wrap;
        }

        .checkout-summary-kicker {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 0.76rem;
            letter-spacing: 0.025em;
            text-transform: uppercase;
            color: #486485;
            font-weight: 700;
        }

        .checkout-summary-date {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.8rem;
            color: #5f7188;
            font-weight: 600;
        }

        .checkout-summary-list {
            display: grid;
            gap: 8px;
            max-height: 260px;
            overflow: auto;
            padding-right: 2px;
        }

        .checkout-summary-item {
            border: 1px solid #dbe7f4;
            border-radius: 12px;
            background: #f9fcff;
            padding: 9px 10px;
            display: grid;
            gap: 6px;
        }

        .checkout-summary-item-head {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
            align-items: baseline;
        }

        .checkout-summary-item-name {
            margin: 0;
            font-family: var(--cm-font-heading);
            color: var(--cm-text-strong);
            font-size: 0.9rem;
            line-height: 1.35;
            font-weight: 700;
        }

        .checkout-summary-item-subtotal {
            margin: 0;
            font-family: var(--cm-font-heading);
            color: #0d2b4a;
            font-size: 0.9rem;
            font-weight: 800;
            white-space: nowrap;
        }

        .checkout-summary-item-meta {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            font-family: var(--cm-font-ui);
            font-size: 0.76rem;
            color: #617894;
            line-height: 1.35;
        }

        .checkout-summary-item-meta span {
            display: inline-flex;
            align-items: center;
            border: 1px solid #d7e4f2;
            border-radius: 999px;
            background: #ffffff;
            padding: 3px 8px;
            font-weight: 600;
        }

        .checkout-summary-empty {
            margin: 0;
            border: 1px dashed #c6d7ea;
            border-radius: 12px;
            background: #f8fbff;
            color: #657c98;
            padding: 12px;
            text-align: center;
            font-family: var(--cm-font-ui);
            font-size: 0.82rem;
            line-height: 1.45;
        }

        .checkout-summary-note {
            border: 1px solid #dbe7f4;
            background: #f8fbff;
            border-radius: 12px;
            padding: 8px 10px;
            display: grid;
            gap: 3px;
        }

        .checkout-summary-note-label {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 0.74rem;
            color: #58718e;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            font-weight: 700;
        }

        .checkout-summary-note-text {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.82rem;
            line-height: 1.45;
            color: #334b68;
            white-space: pre-wrap;
        }

        .checkout-summary-totals {
            border-top: 1px solid var(--cm-border);
            padding-top: 10px;
            display: grid;
            gap: 7px;
        }

        .checkout-summary-total-row {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            font-family: var(--cm-font-heading);
            font-size: 0.9rem;
            color: #334b68;
            font-weight: 700;
        }

        .checkout-summary-total-row strong {
            color: var(--cm-text-strong);
            font-size: 1rem;
            font-weight: 800;
        }

        .checkout-summary-total-general {
            border: 1px solid #bfd6f3;
            border-radius: 12px;
            background: #eef5ff;
            padding: 8px 10px;
            color: #0d3f7d;
        }

        .checkout-summary-total-general strong {
            color: #0a3362;
            font-size: 1.22rem;
        }

        .checkout-status-message {
            display: none;
            margin-top: 2px;
            border: 1px solid transparent;
            border-radius: 10px;
            padding: 8px 10px;
            font-size: 0.8rem;
            line-height: 1.45;
        }

        .checkout-status-message.show {
            display: block;
        }

        .checkout-status-message.info {
            background: #eff6ff;
            border-color: #bfdbfe;
            color: #1e3a8a;
        }

        .checkout-status-message.success {
            background: #ecfdf5;
            border-color: #bbf7d0;
            color: #166534;
        }

        .checkout-status-message.error {
            background: #fef2f2;
            border-color: #fecaca;
            color: #991b1b;
        }

        .checkout-auth-required,
        .checkout-session-ready {
            margin-top: 0;
            border: 1px solid var(--cm-border);
            border-radius: 12px;
            background: #f8fbff;
            padding: 8px 10px;
            display: grid;
            gap: 6px;
        }

        .checkout-auth-required[hidden],
        .checkout-session-ready[hidden] {
            display: none !important;
        }

        .checkout-auth-title,
        .checkout-session-title {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 0.87rem;
            color: #153f70;
            line-height: 1.35;
            font-weight: 800;
        }

        .checkout-auth-help,
        .checkout-session-help {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.8rem;
            color: #445b76;
            line-height: 1.45;
            font-weight: 600;
        }

        .checkout-auth-microcopy {
            margin: -2px 0 0;
            font-family: var(--cm-font-ui);
            font-size: 0.74rem;
            color: #69829f;
            line-height: 1.4;
            font-weight: 600;
        }

        .checkout-form {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
            align-items: end;
            gap: 10px;
        }

        .checkout-auth-actions {
            display: flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            gap: 6px;
            align-self: end;
            margin-bottom: 1px;
        }

        .checkout-field label {
            display: block;
            font-family: var(--cm-font-ui);
            font-size: 0.75rem;
            font-weight: 700;
            color: #4d6582;
            margin-bottom: 5px;
        }

        .checkout-field input {
            width: 100%;
            min-height: 40px;
            border: 1px solid #c9d9ea;
            border-radius: 11px;
            padding: 8px 11px;
            font-family: var(--cm-font-ui);
            font-size: 0.86rem;
            color: var(--cm-text-strong);
            background: #ffffff;
            outline: none;
            transition: border-color 0.18s ease, box-shadow 0.18s ease;
        }

        .checkout-field input:focus {
            border-color: var(--cm-brand-blue);
            box-shadow: var(--cm-focus-ring);
        }

        .checkout-field input.input-error {
            border-color: #ef4444;
            background: #fff5f5;
        }

        .checkout-error {
            margin-top: 4px;
            min-height: 16px;
            font-size: 0.75rem;
            color: #b91c1c;
            font-weight: 600;
        }

        .checkout-session-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
            gap: 8px;
        }

        .checkout-session-grid p {
            margin: 0;
            border: 1px solid #dbe2ea;
            border-radius: 10px;
            background: #ffffff;
            color: var(--cm-text-strong);
            padding: 7px 9px;
            font-family: var(--cm-font-ui);
            font-size: 0.77rem;
            line-height: 1.3;
        }

        .checkout-json-wrap {
            margin-top: 12px;
            border: 1px solid #dbe2ea;
            border-radius: 10px;
            background: #f8fafc;
            overflow: hidden;
        }

        .checkout-json-title {
            font-size: 0.78rem;
            font-weight: 700;
            color: #334155;
            background: #eef2f7;
            padding: 8px 10px;
            border-bottom: 1px solid #dbe2ea;
        }

        .checkout-json {
            margin: 0;
            max-height: 240px;
            overflow: auto;
            padding: 10px;
            font-size: 0.77rem;
            line-height: 1.5;
            color: #0f172a;
            background: #f8fafc;
            white-space: pre-wrap;
            word-break: break-word;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
        }

        .checkout-confirmation {
            margin-top: 8px;
            border: 1px solid #bbf7d0;
            background: #f0fdf4;
            border-radius: 12px;
            padding: 9px 10px;
            display: grid;
            gap: 3px;
        }

        .checkout-confirmation[hidden] {
            display: none;
        }

        .checkout-confirmation-title {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 0.92rem;
            font-weight: 800;
            color: #166534;
        }

        .checkout-confirmation-id {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.79rem;
            color: #274161;
        }

        .checkout-confirmation-cliente {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.79rem;
            color: #274161;
        }

        .checkout-confirmation-total {
            margin: 0;
            font-family: var(--cm-font-heading);
            font-size: 0.82rem;
            color: #145f46;
            font-weight: 800;
        }

        .checkout-confirmation-help {
            margin: 2px 0 0;
            font-family: var(--cm-font-ui);
            font-size: 0.76rem;
            line-height: 1.4;
            color: #166534;
        }

        .checkout-confirmation-sync {
            margin: 2px 0 0;
            font-family: var(--cm-font-ui);
            font-size: 0.74rem;
            line-height: 1.35;
            color: #475569;
        }

        .checkout-confirmation-actions {
            margin-top: 8px;
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
        }

        .checkout-actions {
            padding: 10px 16px 14px;
            border-top: 1px solid var(--cm-border);
            display: flex;
            gap: 10px;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            background: #fbfdff;
        }

        .checkout-actions-help {
            margin: 0;
            font-family: var(--cm-font-ui);
            font-size: 0.76rem;
            line-height: 1.4;
            font-weight: 600;
            color: #607997;
            flex: 1 1 260px;
        }

        .checkout-actions-help.ready {
            color: #265f45;
        }

        .checkout-actions-help.locked {
            color: #8a3d3d;
        }

        .checkout-btn {
            border: 1px solid #c9d9ea;
            background: #ffffff;
            color: #173251;
            border-radius: 11px;
            min-height: 38px;
            padding: 8px 12px;
            cursor: pointer;
            font-family: var(--cm-font-heading);
            font-size: 0.8rem;
            font-weight: 700;
            line-height: 1.2;
            transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
        }

        .checkout-btn:hover {
            border-color: #a7bfdb;
            background: #f8fbff;
        }

        .checkout-btn:focus-visible {
            outline: none;
            box-shadow: var(--cm-focus-ring);
        }

        .checkout-btn:disabled {
            opacity: 0.75;
            cursor: not-allowed;
            transform: none;
        }

        .checkout-btn.primary {
            background: var(--cm-brand-navy);
            border-color: var(--cm-brand-navy);
            color: #ffffff;
            min-width: 220px;
            box-shadow: 0 6px 16px rgba(3, 45, 114, 0.16);
        }

        .checkout-btn.primary:hover:not(:disabled) {
            background: #042a65;
            border-color: #042a65;
        }

        .checkout-btn.success {
            background: #16a34a;
            border-color: #16a34a;
            color: #ffffff;
        }

        .checkout-btn.warn {
            background: #ffffff;
            border-color: #c7d8ea;
            color: #4e6683;
            min-width: 120px;
        }

        .checkout-btn.warn:hover:not(:disabled) {
            background: #f5f9ff;
            border-color: #a9c0da;
            color: #264f7c;
        }

        .checkout-btn.ghost {
            background: transparent;
            border-color: transparent;
            color: #647d98;
            text-decoration: underline;
            text-underline-offset: 2px;
            min-width: auto;
            padding-inline: 6px;
        }

        .checkout-btn.ghost:hover:not(:disabled) {
            background: transparent;
            border-color: transparent;
            color: #3c5879;
        }

        .checkout-card[data-session-state="required"] .checkout-btn.primary:disabled {
            opacity: 1;
            box-shadow: none;
            background: #dde7f3;
            border-color: #c6d5e7;
            color: #6a7f99;
        }

        .checkout-card[data-session-state="active"] .checkout-btn.primary:not(:disabled) {
            box-shadow: 0 8px 18px rgba(3, 45, 114, 0.2);
        }

        .checkout-card[data-flow-state="sent"] .checkout-head {
            background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
            border-bottom-color: #cfe0f2;
        }

        .checkout-card[data-flow-state="sent"] .checkout-title {
            color: #0f3e6f;
        }

        .checkout-card[data-flow-state="sent"] .checkout-subtitle {
            color: #5d7692;
        }

        .checkout-card[data-flow-state="sent"] .checkout-status-message {
            display: none !important;
        }

        .checkout-card[data-flow-state="sent"] .checkout-summary {
            background: #fbfdff;
            border-color: #d5e3f2;
        }

        .checkout-card[data-flow-state="sent"] .checkout-session-ready {
            border-style: dashed;
            background: #fcfdff;
        }

        .checkout-card[data-flow-state="sent"] .checkout-confirmation {
            border-color: #a6dfc2;
            background: linear-gradient(180deg, #f4fdf8 0%, #ecfaf2 100%);
            box-shadow: 0 4px 14px rgba(30, 122, 89, 0.1);
        }

        .checkout-card[data-flow-state="sent"] .checkout-confirmation-title {
            font-size: 0.98rem;
            color: #145f46;
        }

        .checkout-card[data-flow-state="sent"] .checkout-confirmation-actions {
            margin-top: 11px;
            padding-top: 8px;
            border-top: 1px solid #c9e8d8;
            justify-content: flex-start;
        }

        .checkout-card[data-flow-state="sent"] .checkout-actions {
            min-height: 0;
            padding-top: 8px;
            padding-bottom: 10px;
            border-top-color: #d8e4f2;
            justify-content: flex-end;
        }

        .checkout-card[data-flow-state="sent"] .checkout-actions-help,
        .checkout-card[data-flow-state="sent"] #btnConfirmarPedido {
            display: none !important;
        }

        .product-image-viewer {
            position: fixed;
            inset: 0;
            z-index: 1700;
            background: rgba(15, 23, 42, 0.72);
            display: none;
            align-items: center;
            justify-content: center;
            padding: clamp(12px, 2.5vw, 20px);
        }

        .product-image-viewer.open {
            display: flex;
        }

        .product-image-viewer-card {
            width: min(900px, 100%);
            max-height: min(92vh, 920px);
            border: 1px solid #dbe2ea;
            border-radius: 14px;
            background: #ffffff;
            box-shadow: 0 26px 48px rgba(15, 23, 42, 0.3);
            overflow: hidden;
            display: grid;
            grid-template-rows: auto minmax(0, 1fr);
        }

        .product-image-viewer-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            border-bottom: 1px solid #e2e8f0;
            padding: 10px 12px;
        }

        .product-image-viewer-head h3 {
            margin: 0;
            font-size: 0.92rem;
            color: #0f172a;
            font-weight: 800;
        }

        .product-image-viewer-close {
            border: 1px solid #cbd5e1;
            background: #ffffff;
            color: #334155;
            border-radius: 10px;
            min-width: 40px;
            min-height: 40px;
            font-size: 1rem;
            font-weight: 800;
            cursor: pointer;
        }

        .product-image-viewer-body {
            padding: 12px;
            display: grid;
            gap: 8px;
            justify-items: center;
        }

        .product-image-viewer-body img {
            width: 100%;
            max-height: min(78vh, 760px);
            object-fit: contain;
            border-radius: 10px;
            background: #ffffff;
            border: 1px solid #e2e8f0;
        }

        .product-image-viewer-body p {
            margin: 0;
            font-size: 0.82rem;
            font-weight: 700;
            color: #334155;
            text-align: center;
            word-break: break-word;
        }

        .card-controls {
            margin-top: 1px;
            display: grid;
            gap: 6px;
            justify-items: center;
            width: 100%;
        }

        .card-qty-row {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 6px;
            flex-wrap: nowrap;
            width: 100%;
        }

        .qty-stepper {
            display: inline-flex;
            align-items: center;
            border: 1px solid var(--cm-border);
            border-radius: var(--cm-radius-control);
            overflow: hidden;
            min-height: 42px;
            background: var(--cm-surface);
            width: min(100%, 198px);
        }

        .qty-stepper.is-feedback {
            box-shadow: 0 0 0 2px rgba(41, 182, 246, 0.2);
            border-color: #9ec4e9;
        }

        .qty-stepper button {
            width: 34px;
            height: 42px;
            border: none;
            background: #f5f9ff;
            color: #4d6684;
            font-family: var(--cm-font-heading);
            font-size: 0.96rem;
            font-weight: 700;
            cursor: pointer;
            min-width: 34px;
            min-height: 42px;
            touch-action: manipulation;
            transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
            box-shadow: none;
            will-change: transform;
        }

        .qty-stepper button[data-action="cart-minus"] {
            background: #f7faff;
            color: #637c97;
        }

        .qty-stepper button[data-action="cart-plus"] {
            background: #ecf5ff;
            color: var(--cm-brand-blue);
        }

        .qty-stepper button:hover {
            background: #e8f2fe;
        }

        .qty-stepper button:active {
            transform: translateY(1px) scale(0.97);
            box-shadow: none;
        }

        @keyframes qty-stepper-press {
            0% {
                transform: scale(1);
            }
            45% {
                transform: scale(0.94);
            }
            100% {
                transform: scale(1);
            }
        }

        .qty-stepper button.is-stepper-press {
            animation: qty-stepper-press 180ms ease-out;
        }

        .qty-stepper input {
            width: 54px;
            border: none;
            text-align: center;
            font-family: var(--cm-font-heading);
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--cm-text-main);
            min-height: 42px;
            flex: 1 1 auto;
            background: #ffffff;
        }

        .add-cart-btn {
            border: none;
            border-radius: var(--cm-radius-control);
            background: linear-gradient(135deg, var(--cm-brand-navy), var(--cm-brand-blue));
            color: #ffffff;
            font-family: var(--cm-font-heading);
            font-size: 0.84rem;
            font-weight: 700;
            min-height: 40px;
            padding: 8px 12px;
            cursor: pointer;
            touch-action: manipulation;
            box-shadow: 0 2px 6px rgba(3, 45, 114, 0.2);
            transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
        }

        .add-cart-btn:hover {
            filter: brightness(1.03);
            box-shadow: 0 4px 10px rgba(3, 45, 114, 0.24);
        }

        .remove-one-card-btn {
            border: 1px solid #f0c8cf;
            border-radius: var(--cm-radius-control);
            background: #fff4f6;
            color: #b44a59;
            font-family: var(--cm-font-heading);
            font-size: 0.82rem;
            font-weight: 700;
            min-height: 40px;
            min-width: 86px;
            padding: 8px 12px;
            cursor: pointer;
            touch-action: manipulation;
            transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
        }

        .remove-one-card-btn:hover {
            border-color: #e8adb8;
            background: #fff1f4;
            color: #a93f4e;
        }

        .remove-one-card-btn[hidden] {
            display: none !important;
        }

        .add-cart-btn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .in-cart-hint {
            font-family: var(--cm-font-heading);
            font-size: 0.77rem;
            color: #3f6286;
            min-height: 28px;
            line-height: 1.2;
            font-weight: 600;
            background: #edf6ff;
            border: 1px solid #c8def5;
            border-radius: var(--cm-radius-pill);
            padding: 0 11px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: fit-content;
            margin: 0 auto;
        }

        .in-cart-hint.empty {
            display: none;
        }

        .in-cart-hint.active {
            color: var(--cm-brand-navy);
            background: #eaf4ff;
            border: 1px solid #afcff0;
            box-shadow: none;
        }

        .in-cart-hint.active::before {
            content: "✓";
            width: 16px;
            height: 16px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.63rem;
            font-weight: 800;
            color: #ffffff;
            background: var(--cm-brand-blue);
            flex-shrink: 0;
        }

        .in-cart-hint.is-feedback {
            animation: chip-feedback-pulse 260ms ease-out;
        }

        @keyframes card-qty-feedback {
            0% {
                box-shadow: 0 0 0 0 rgba(41, 182, 246, 0);
            }
            35% {
                box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.17);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(41, 182, 246, 0);
            }
        }

        @keyframes chip-feedback-pulse {
            0% {
                transform: scale(1);
            }
            45% {
                transform: scale(1.05);
            }
            100% {
                transform: scale(1);
            }
        }

        .card-qty-input::-webkit-outer-spin-button,
        .card-qty-input::-webkit-inner-spin-button,
        .cart-qty-input::-webkit-outer-spin-button,
        .cart-qty-input::-webkit-inner-spin-button,
        .pedido-producto-confirm-qty input::-webkit-outer-spin-button,
        .pedido-producto-confirm-qty input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .card-qty-input,
        .cart-qty-input,
        .pedido-producto-confirm-qty input {
            -moz-appearance: textfield;
        }

        @media (max-width: 1120px) {
            .header-inner {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .catalog-brand {
                justify-content: space-between;
            }

            .catalog-top-actions {
                justify-content: flex-start;
            }

            .toolbar-inner {
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
            }
        }

        @media (max-width: 860px) {
            body {
                height: auto;
                overflow: auto;
            }

            .catalog-sticky-zone {
                position: static;
                top: auto;
                z-index: auto;
                box-shadow: none;
            }

            .header {
                padding: 7px 10px;
            }

            .header-inner {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .catalog-brand {
                justify-content: flex-start;
                gap: 8px;
            }

            .header h1 {
                font-size: 1.12rem;
            }

            .header p {
                font-size: 0.74rem;
            }

            .catalog-search-wrap input {
                min-height: 36px;
                padding: 7px 10px;
                font-size: 0.8rem;
            }

            .catalog-top-actions {
                width: 100%;
                justify-content: stretch;
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 6px;
            }

            .catalog-session-actions {
                grid-column: 1 / -1;
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 6px;
            }

            .catalog-session-btn,
            .catalog-action-btn.portal {
                width: 100%;
                min-height: 34px;
                font-size: 0.72rem;
            }

            .catalog-cart-btn {
                grid-column: 1 / -1;
                width: 100%;
                min-height: 44px;
                padding: 5px 8px;
            }

            .catalog-cart-title {
                font-size: 0.74rem;
            }

            .catalog-cart-meta {
                font-size: 0.7rem;
            }

            .toolbar {
                padding: 7px 10px 8px;
            }

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

            .toolbar-active-filters {
                display: none !important;
            }

            .toolbar .field label {
                display: block;
                font-size: 0.68rem;
                margin-bottom: 2px;
            }

            .toolbar .field input,
            .toolbar .field select,
            .reset-filters-btn {
                min-height: 36px;
                padding: 7px 10px;
                font-size: 0.8rem;
            }

            .portal-mobile-fab {
                display: none !important;
            }

            .container { padding: clamp(10px, 2.4vw, 16px); }
            .container {
                height: auto;
                overflow: visible;
            }
            .content-layout {
                height: auto;
            }
            .products-area {
                height: auto;
                overflow: visible;
                padding-right: 0;
            }

            .logo-titulo {
                width: clamp(56px, 18vw, 78px);
                max-height: clamp(38px, 12vw, 54px);
            }

            .grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px;
            }
            .card {
                contain-intrinsic-size: 304px;
            }
            .image-box {
                height: clamp(102px, 22vw, 124px);
            }
            .content {
                padding: 7px;
            }
            .name {
                margin-bottom: 6px;
                min-height: 0;
                font-size: 0.9rem;
            }
            .card-meta-line {
                margin-bottom: 3px;
                font-size: 0.68rem;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
            }
            .precio {
                font-size: 1rem;
                margin-bottom: 4px;
            }
            .card-controls {
                margin-top: 6px;
                gap: 6px;
            }
            .qty-stepper {
                min-height: 36px;
            }
            .qty-stepper button {
                width: 32px;
                height: 36px;
                min-width: 32px;
                min-height: 36px;
                font-size: 0.92rem;
            }
            .qty-stepper input {
                width: 48px;
                min-height: 36px;
                font-size: 0.8rem;
            }
            .in-cart-hint {
                font-size: 0.66rem;
                min-height: 20px;
                padding: 3px 8px;
            }
        }

        @media (min-width: 760px) and (max-width: 860px) {
            .grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        @media (max-width: 1024px), (hover: none) and (pointer: coarse) {
            .pedido-cliente-modal {
                padding: 0;
            }
            .pedido-cliente-modal-card {
                width: 100vw;
                max-height: 100dvh;
                height: 100dvh;
                border-radius: 0;
                border: none;
            }
            .pedido-cliente-modal-head {
                position: sticky;
                top: 0;
                z-index: 8;
                background: #ffffff;
                padding-top: calc(10px + var(--safe-top));
                padding-bottom: 10px;
                align-items: stretch;
            }
            .pedido-cliente-modal-head p {
                display: none;
            }
            .pedido-cliente-modal-head-actions {
                margin-left: auto;
                width: auto;
                justify-content: flex-end;
            }
            .pedido-portal-close-mobile {
                width: clamp(132px, 44vw, 210px);
                min-height: 42px;
            }
            .pedido-cliente-modal-close {
                display: none;
            }
            .pedido-cliente-modal-body {
                padding-bottom: max(140px, calc(104px + var(--safe-bottom)));
            }
            .pedido-cliente-login-wrap .pedido-cliente-form {
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            }
            .pedido-cliente-login-wrap .pedido-cliente-actions {
                grid-column: 1 / -1;
                justify-content: flex-end;
            }
            .pedido-cliente-register-wrap .pedido-cliente-register-form {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            .pedido-cliente-register-wrap .pedido-cliente-register-actions {
                justify-content: stretch;
                gap: 6px;
            }
            .pedido-cliente-register-wrap .pedido-cliente-register-actions .pedido-btn {
                width: 100%;
            }
        }

        @media (max-width: 640px) {
            .header-inner { align-items: center; }
            .header {
                padding: 6px 8px;
            }
            .catalog-brand {
                gap: 6px;
            }
            .header h1 {
                font-size: 1rem;
            }
            .header p {
                font-size: 0.7rem;
                margin-top: 1px;
            }
            .logo-titulo {
                width: clamp(48px, 16vw, 64px);
                max-height: clamp(32px, 10vw, 44px);
            }
            .catalog-search-wrap input {
                min-height: 34px;
                padding: 6px 9px;
                font-size: 0.78rem;
            }
            .portal-mobile-fab {
                display: none !important;
            }
            .toolbar-inner {
                grid-template-columns: 1fr;
            }
            .catalog-top-actions {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 5px;
            }
            .catalog-session-actions {
                grid-column: auto;
                display: block;
            }
            .catalog-session-btn,
            .catalog-action-btn.portal {
                min-height: 34px;
                padding: 6px 8px;
                font-size: 0.7rem;
            }
            .catalog-session-actions .catalog-session-btn {
                width: 100%;
            }
            .catalog-action-btn.portal {
                grid-column: auto;
                width: 100%;
            }
            .catalog-cart-btn {
                display: none;
            }

            .cart-fab {
                background: linear-gradient(135deg, var(--header-a), var(--header-b));
                border-color: rgba(255, 255, 255, 0.72);
                color: #ffffff;
            }

            .cart-fab-total,
            .cart-fab-label,
            .cart-fab-count {
                color: #ffffff;
            }

            .cart-fab-count {
                background: rgba(255, 255, 255, 0.2);
                border: 1px solid rgba(255, 255, 255, 0.4);
            }
            .toolbar {
                padding: 6px 8px 8px;
            }
            .toolbar .field label {
                font-size: 0.66rem;
                margin-bottom: 2px;
            }
            .toolbar .field input,
            .toolbar .field select,
            .reset-filters-btn {
                min-height: 34px;
                padding: 6px 9px;
                font-size: 0.78rem;
            }
            .pedido-btn,
            .pedido-filter-btn,
            .pedido-sort-btn,
            .cart-remove {
                min-height: 44px;
            }
            .pedido-filter-btn,
            .pedido-sort-btn {
                padding: 8px 12px;
            }
            .pedido-portal-close-mobile {
                min-height: 42px;
            }
            .pedido-cliente-actions {
                grid-column: 1 / -1;
            }
            .pedido-cliente-login-wrap .pedido-cliente-form {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            .pedido-cliente-login-wrap .pedido-cliente-actions {
                grid-column: 1 / -1;
                justify-content: stretch;
            }
            .pedido-btn.primary {
                width: 100%;
            }
            .pedido-portal-steps {
                grid-template-columns: 1fr;
            }
            .pedido-cliente-filterbar {
                width: 100%;
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                gap: 5px;
                padding-bottom: 2px;
            }
            .pedido-cliente-filterbar::-webkit-scrollbar {
                display: none;
            }
            .pedido-filter-btn {
                flex: 0 0 auto;
                text-align: center;
                min-height: 34px;
                padding: 5px 10px;
                font-size: 0.7rem;
            }
            .pedido-cliente-session {
                flex-direction: column;
                align-items: stretch;
            }
            .pedido-cliente-list-head {
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
                gap: 6px;
                flex-wrap: wrap;
            }
            .pedido-cliente-list {
                max-height: min(56vh, 460px);
            }
            .pedido-list-item {
                padding: 8px 10px;
                gap: 4px;
            }
            .pedido-list-item-ref {
                font-size: 0.78rem;
            }
            .pedido-list-item-meta {
                font-size: 0.71rem;
            }
            .pedido-list-item-ref,
            .pedido-list-item-meta,
            .pedido-meta-item .value {
                overflow-wrap: anywhere;
            }
            #btnCerrarSesionPortalCliente {
                width: 100%;
            }
            #btnRefrescarPedidosCliente,
            #btnReintentarSyncPedidos {
                width: auto;
                min-height: 34px;
                padding: 6px 10px;
                font-size: 0.72rem;
            }
            .pedido-sync-status {
                padding: 6px 8px;
                gap: 6px;
            }
            .pedido-sync-status-text {
                font-size: 0.71rem;
                line-height: 1.3;
            }
            .pedido-detalle-top {
                flex-direction: column;
                align-items: stretch;
            }
            #btnVolverListaPedidos {
                width: 100%;
            }
            .pedido-cliente-meta {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 5px;
            }
            .pedido-cliente-sortbar {
                width: 100%;
            }
            .pedido-cliente-productos-head {
                align-items: stretch;
            }
            .pedido-cliente-producto {
                grid-template-columns: var(--pedido-product-columns-mobile);
                align-items: start;
                padding: 10px;
                gap: 10px;
            }
            .pedido-producto-info {
                gap: 5px;
            }
            .pedido-producto-actions {
                grid-column: 1 / -1;
                grid-template-columns: 1fr;
                justify-items: stretch;
                gap: 8px;
            }
            .pedido-producto-totales {
                grid-column: 1;
                grid-row: auto;
                justify-items: start;
                text-align: left;
                min-width: 0;
                border-top: none;
                border-left: none;
                padding-top: 0;
                padding-left: 0;
            }
            .pedido-qty-control {
                justify-self: start;
                min-height: 42px;
            }
            .pedido-qty-control button {
                width: 40px;
            }
            .pedido-qty-input {
                min-height: 42px;
                width: 64px;
            }
            .pedido-remove-btn {
                width: 100%;
            }
            .pedido-cliente-footer {
                flex-direction: column;
                align-items: stretch;
                margin-bottom: calc(10px + var(--safe-bottom));
            }
            #btnBuscarProductoPedido {
                width: 100%;
            }
            #btnGuardarCambiosPedido {
                width: 100%;
            }
            .pedido-producto-modal {
                padding: 0;
            }
            .pedido-producto-modal-card,
            .pedido-producto-confirm-card {
                width: 100vw;
                max-height: 100vh;
                border-radius: 0;
                border: none;
            }
            .pedido-producto-item {
                grid-template-columns: 1fr;
            }
            .pedido-producto-thumb {
                width: 70px;
                height: 70px;
            }
            .pedido-producto-select-btn {
                width: 100%;
            }
            .pedido-producto-confirm-body {
                grid-template-columns: 1fr;
            }
            .pedido-producto-confirm-image-wrap {
                width: 100%;
                height: min(220px, 40vh);
            }
            .pedido-producto-imagen-wrap {
                width: calc(var(--pedido-product-thumb-size) - 2px);
                padding: 6px;
            }
            .pedido-producto-confirm-qty input {
                width: 100%;
            }
            .pedido-producto-confirm-stepper {
                width: 100%;
            }
            .pedido-producto-confirm-actions .pedido-btn {
                width: 100%;
            }
            .pedido-feedback-actions .pedido-btn {
                width: 100%;
            }
            .checkout-session-grid {
                grid-template-columns: 1fr;
            }
            .checkout-modal {
                padding: 0;
            }
            .checkout-card {
                width: 100vw;
                max-height: 100vh;
                border-radius: 0;
                border: none;
            }
            .checkout-body {
                padding: 12px;
            }
            .checkout-summary-list {
                max-height: none;
            }
            .checkout-summary-item-head {
                grid-template-columns: 1fr;
                gap: 4px;
            }
            .checkout-summary-item-subtotal {
                justify-self: flex-start;
            }
            .checkout-form {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            .checkout-auth-actions {
                margin-bottom: 0;
            }
            .checkout-actions {
                flex-direction: column;
                align-items: stretch;
            }
            .checkout-actions-help {
                flex: 1 1 auto;
            }
            #btnCheckoutLoginContinue,
            #btnCheckoutCerrarSesionCliente,
            #btnConfirmarPedido {
                width: 100%;
            }
            .grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .to-top {
                right: calc(10px + var(--safe-right));
                bottom: calc(142px + var(--safe-bottom));
                width: 44px;
                height: 44px;
            }
            .whatsapp-float {
                right: calc(8px + var(--safe-right));
                bottom: calc(8px + var(--safe-bottom));
                width: 68px;
                height: 68px;
            }

            .cart-fab {
                display: inline-flex;
                right: calc(8px + var(--safe-right));
                bottom: calc(78px + var(--safe-bottom));
                min-height: 42px;
                padding: 6px 9px;
            }

            .cart-panel {
                width: 100vw;
                border-radius: 0;
            }

            .cart-items {
                max-height: 36vh;
            }

            .cart-item {
                grid-template-columns: 52px minmax(0, 1fr);
                gap: 6px;
                padding: 6px;
            }

            .cart-item-thumb {
                width: 52px;
                height: 52px;
                border-radius: 8px;
            }

            .cart-item-thumb-placeholder {
                font-size: 0.58rem;
                padding: 4px;
            }

            .cart-item-name {
                margin-bottom: 2px;
                font-size: 0.76rem;
            }

            .cart-item-meta {
                font-size: 0.68rem;
            }

            .cart-qty {
                min-height: 30px;
                width: fit-content;
                margin: 0 auto;
            }

            .cart-qty button {
                width: 28px;
                height: 28px;
                min-width: 28px;
                min-height: 28px;
                font-size: 0.82rem;
            }

            .cart-qty input {
                width: 32px;
                height: 28px;
                font-size: 0.76rem;
            }

            .cart-item-foot {
                gap: 6px;
            }

            .cart-item-subtotal {
                font-size: 0.74rem;
            }

            .cart-remove {
                min-height: 30px;
                padding: 4px 8px;
                font-size: 0.66rem;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            html { scroll-behavior: auto; }
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

        @media print {
            body { background: #ffffff; }
            .toolbar, .portal-mobile-fab, .to-top, .whatsapp-float, .cart-fab, .cart-panel, .cart-backdrop, .checkout-modal, .pedido-cliente-modal, .pedido-producto-modal, .pedido-producto-confirm-modal, .product-image-viewer {
                display: none !important;
            }
            .container { padding: 14px; }
            .content-layout { display: block; }
            .grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 12px;
            }
            .card { box-shadow: none; }
        }
