/* ----------------------------------------------------------------------------
   SmartgridOne Webshop — modern energy-tech UI
   ---------------------------------------------------------------------------- */

:root {
    /* Brand — Eniris red */
    --brand-900: #5a0a10;
    --brand-800: #821019;
    --brand-700: #a91722;
    --brand-600: #c8202b;
    --brand-500: #df3845;

    /* Energy accent (electric green) — used for "done" completion */
    --energy-400: #34d399;
    --energy-500: #10b981;
    --energy-600: #059669;

    /* Vibrant accent — used for selected states (slightly different from brand) */
    --accent: #f43f5e;
    --accent-hover: #e11d48;

    /* Neutrals */
    --ink: #0b1220;
    --ink-2: #1f2937;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --border: #e2e8f0;
    --border-2: #cbd5e1;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow:    0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
    --shadow-brand: 0 10px 30px -10px rgba(200, 32, 43, 0.35);
    --shadow-energy: 0 10px 30px -10px rgba(16, 185, 129, 0.35);

    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --t-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --t:      0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, "Segoe UI Variable", "Segoe UI", BlinkMacSystemFont, Inter, system-ui, sans-serif;
    color: var(--ink);
    line-height: 1.55;
    font-size: 15px;
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 90% -10%, rgba(200, 32, 43, 0.10), transparent 60%),
        radial-gradient(900px 500px at -10% 100%, rgba(16, 185, 129, 0.08), transparent 60%),
        url('images/stars-bg.svg'),
        linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
    background-repeat: no-repeat, no-repeat, repeat, no-repeat;
    background-size: auto, auto, 600px 600px, auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------------------------- Header ---------------------------- */

.site-header {
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.cart-icon-large {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow-brand);
}
.logo-light { color: var(--muted); font-weight: 500; }

.header-nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.icon-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--t-fast);
    padding: 0;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover {
    border-color: var(--ink-2);
    color: var(--ink-2);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* ---------------------------- Modal ---------------------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 18, 32, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 100;
    padding: 60px 24px 40px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 920px;
    box-shadow: var(--shadow-lg);
    padding: 28px 30px 22px;
    animation: modalIn 0.25s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.modal-sub { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}
.admin-toolbar { display: flex; gap: 10px; margin-bottom: 18px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px 6px 4px 2px;
}
.admin-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 16px;
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 16px;
    align-items: start;
}
.admin-item-photo {
    width: 88px;
    height: 88px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
}
.admin-item-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.admin-item-photo .no-img { color: var(--muted-2); font-size: 11px; text-align: center; line-height: 1.2; }
.admin-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.admin-fields .field { margin: 0; }
.admin-fields .field > span { font-size: 12px; margin-bottom: 4px; }
.admin-fields input,
.admin-fields textarea {
    padding: 8px 10px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
    font-family: inherit;
}
.admin-fields .full { grid-column: 1 / -1; }
.admin-fields textarea { resize: vertical; min-height: 50px; }
.admin-item-actions { display: flex; flex-direction: column; gap: 8px; }
.admin-delete-btn {
    background: #fff;
    border: 1px solid #fecdd3;
    color: #be123c;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all var(--t-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.admin-delete-btn:hover { background: #fee2e2; border-color: var(--accent); }
.admin-delete-btn svg { width: 16px; height: 16px; }
.admin-empty {
    text-align: center;
    color: var(--muted);
    padding: 28px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
@media (max-width: 640px) {
    .modal { padding: 20px 18px; }
    .admin-item { grid-template-columns: 1fr; }
    .admin-fields { grid-template-columns: 1fr; }
}

.cart-link {
    position: relative;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow-sm);
    transition: all var(--t-fast);
}
.cart-link:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.4);
}

/* ---------------------------- Step progress bar ---------------------------- */

.steps {
    list-style: none;
    padding: 0;
    margin: 28px 0 22px;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: wrap;
    row-gap: 8px;
}
.steps::-webkit-scrollbar { display: none; }

.step {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 500;
    font-size: 12.5px;
    padding: 0;
    white-space: nowrap;
    position: relative;
}
.step:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 1px;
    margin: 0 6px;
    background: var(--border-2);
}
.step .step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface);
    border: 1.5px solid var(--border-2);
    color: var(--muted);
    font-weight: 700;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t);
    flex-shrink: 0;
}
.step .step-label {
    display: none;
    letter-spacing: -0.01em;
}
.step.active .step-label {
    display: inline;
}
.step.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    user-select: none;
}
.step.locked {
    cursor: default;
    user-select: none;
}
.step.clickable {
    cursor: pointer;
    user-select: none;
}
.step.clickable:hover {
    color: var(--ink);
}
.step.clickable:hover .step-num {
    border-color: var(--ink-2);
    transform: scale(1.08);
}
.step.clickable.active { cursor: default; }
.step.clickable:focus { outline: none; }
.step.clickable:focus .step-num {
    box-shadow: 0 0 0 4px rgba(200, 32, 43, 0.18);
}
.step.active {
    color: var(--ink);
    font-weight: 700;
    padding: 4px 12px 4px 4px;
    background: linear-gradient(135deg, rgba(200, 32, 43, 0.10), rgba(200, 32, 43, 0.04));
    border-radius: 999px;
}
.step.active .step-num {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-brand);
    transform: scale(1.04);
}
.step.done .step-num {
    background: var(--energy-500);
    color: transparent;
    border-color: transparent;
    box-shadow: 0 4px 12px -4px rgba(16, 185, 129, 0.45);
    position: relative;
}
.step.done .step-num::before {
    content: "\2713";
    position: absolute;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

/* Wider screens: show all labels for nicer overview */
@media (min-width: 1200px) {
    .step .step-label { display: inline; }
    .step:not(:last-child)::after { width: 22px; margin: 0 8px; }
}

/* ---------------------------- Step panels ---------------------------- */

.step-panel { display: none; padding: 8px 0 64px; animation: fadeUp 0.4s ease both; }
.step-panel.active { display: block; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--ink);
}
.lead { color: var(--muted); margin: 0 0 24px; font-size: 16px; }
.required { color: var(--accent); }

/* ---------------------------- Product grid ---------------------------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
    margin: 32px 0;
}
.product-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px 22px;
    text-align: center;
    cursor: pointer;
    transition: all var(--t);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.product-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(200, 32, 43, 0.06), rgba(16, 185, 129, 0.06));
    opacity: 0;
    transition: opacity var(--t);
    pointer-events: none;
}
.product-card:hover {
    border-color: var(--ink-2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.product-card:hover::before { opacity: 1; }
.product-card.selected {
    border-color: var(--ink-2);
    box-shadow: var(--shadow-brand);
    background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%);
}
.product-card.selected::after {
    content: "\2713";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-brand);
    animation: popIn 0.3s ease;
}
@keyframes popIn {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}
.product-photo {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}
.product-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 30% at 50% 95%, rgba(15,23,42,0.08), transparent 70%);
    pointer-events: none;
}
.product-photo img {
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
    transition: transform var(--t);
}
.product-card:hover .product-photo img {
    transform: scale(1.05);
}
.product-photo.photo-sm { height: 120px; }
.product-card h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.product-card .price {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--ink-2);
    font-weight: 600;
    background: rgba(200, 32, 43, 0.08);
    padding: 4px 10px;
    border-radius: 999px;
}

/* ---------------------------- Buttons ---------------------------- */

.btn {
    appearance: none;
    border: 0;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t);
    font-family: inherit;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px -10px rgba(200, 32, 43, 0.5);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled {
    background: var(--border-2);
    color: var(--muted);
    cursor: not-allowed;
    box-shadow: none;
}
.btn-ghost {
    background: var(--surface);
    color: var(--ink-2);
    border: 1.5px solid var(--border-2);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
    background: var(--surface-2);
    border-color: var(--muted-2);
}
.btn-pill {
    border-radius: 999px;
    padding: 13px 38px;
    min-width: 110px;
    font-weight: 600;
}

.actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
}
.actions-end { justify-content: flex-end; }
.actions-center { justify-content: center; gap: 14px; }

/* License installations list (commercial path) */
.installation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 720px;
    margin-bottom: 24px;
}
.installation-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    box-shadow: var(--shadow-sm);
}
.installation-row .installation-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.installation-row input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
    transition: border-color var(--t-fast);
}
.installation-row input[type="text"]:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(200, 32, 43, 0.12);
}

/* Delivery breakdown — collapsible panel under the Total field */
.delivery-breakdown {
    margin-top: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.delivery-breakdown > summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 14px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    user-select: none;
    transition: background var(--t-fast);
}
.delivery-breakdown > summary:hover { background: var(--surface-2); }
.delivery-breakdown > summary::-webkit-details-marker { display: none; }
.delivery-breakdown > summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform var(--t-fast);
}
.delivery-breakdown[open] > summary::before { transform: rotate(90deg); }
.delivery-breakdown[open] > summary { border-bottom: 1px solid var(--border); }
#deliveryBreakdownBody { padding: 8px 16px 12px; }
.breakdown-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px dashed var(--border);
}
.breakdown-line:last-child { border-bottom: 0; }
.breakdown-line .breakdown-label {
    color: var(--ink-2);
    line-height: 1.45;
}
.breakdown-line .breakdown-amount,
.breakdown-line > span:last-child {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}
.breakdown-line em { font-style: normal; color: var(--muted); font-size: 12px; }
.breakdown-line.breakdown-total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    border-bottom: 0;
    font-weight: 700;
    font-size: 14px;
}
.breakdown-empty {
    color: var(--muted);
    font-style: italic;
    padding: 4px 0;
}

/* Terms-step panel */
.terms-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    box-shadow: var(--shadow-sm);
    margin: 20px 0 18px;
    max-width: 820px;
}
.terms-panel h2 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.terms-panel p {
    margin: 0 0 10px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-2);
}
.terms-panel p:last-child { margin-bottom: 0; }
.terms-panel a {
    color: var(--ink-2);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}
.terms-checkbox {
    margin: 8px 0 0;
    padding: 12px 14px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    max-width: 820px;
    font-weight: 600;
}
.terms-checkbox input.invalid + * { /* no specific styling needed */ }

/* Admin login overlay */
.admin-login-modal { max-width: 420px; }
.admin-login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.admin-login-form .field { margin-bottom: 0; }
.admin-login-error {
    margin: 0;
    padding: 10px 14px;
    background: #fff5f7;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--accent-hover);
    font-size: 13px;
    font-weight: 600;
}
.admin-login-form .modal-footer {
    border-top: 0;
    padding-top: 4px;
    margin-top: 0;
    justify-content: stretch;
}
.admin-login-form .modal-footer .btn { width: 100%; }

/* Order-placed banner — prominent confirmation at the top of the payment step */
.order-placed-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
    max-width: 820px;
}
.order-placed-banner .order-placed-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--energy-400), var(--energy-600));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-energy);
}
.order-placed-banner h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #065f46;
    letter-spacing: -0.01em;
}
.order-placed-banner p {
    margin: 0;
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.55;
}

/* Payment-step totals (excl/VAT/incl) */
.payment-totals {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.5);
}
.total-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    font-size: 13.5px;
    padding: 3px 0;
}
.total-line > span:last-child {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-weight: 600;
}
.total-line.total-grand {
    font-weight: 700;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 15px;
}
.total-line.total-grand > span:last-child {
    color: var(--ink);
    font-size: 16px;
}

/* DEV helper button — auto-fills required fields and jumps ahead */
.btn-dev {
    appearance: none;
    background: #fef3c7;
    border: 1.5px dashed #f59e0b;
    color: #92400e;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--t-fast);
}
.btn-dev:hover {
    background: #fde68a;
    border-color: #d97706;
    color: #78350f;
}
.dev-badge {
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.08em;
}

/* ---------------------------- Forms ---------------------------- */

.field { display: block; margin-bottom: 16px; }
.field > span {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    letter-spacing: -0.005em;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
    transition: all var(--t-fast);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--ink-2);
    box-shadow: 0 0 0 4px rgba(200, 32, 43, 0.12);
}
.field input.invalid,
.field select.invalid {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.1);
}
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Form: typeform-style with label below */
.contact-form, .billing-form { max-width: 820px; }
.field-group {
    margin-bottom: 36px;
    padding: 24px 24px 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.field-label {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 16px;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.field.labeled-below { margin-bottom: 12px; }
.field.labeled-below input,
.field.labeled-below select {
    width: 100%;
    border: 0 !important;
    border-bottom: 1.5px solid var(--border) !important;
    border-radius: 0 !important;
    padding: 10px 4px !important;
    font-size: 15px;
    box-shadow: none !important;
    background: transparent !important;
    transition: border-color var(--t-fast) !important;
}
.field.labeled-below input:focus,
.field.labeled-below select:focus {
    border-bottom-color: var(--brand-500) !important;
    outline: none !important;
}
.field.labeled-below input.invalid,
.field.labeled-below select.invalid {
    border-bottom-color: var(--accent) !important;
}
.below-label {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}
.vat-hint {
    margin-left: 8px;
    color: var(--muted-2);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-weight: 400;
    font-size: 11px;
}

.checkbox, .radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    cursor: pointer;
    color: var(--ink-2);
}
.checkbox input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--ink-2);
    cursor: pointer;
}

/* Radio dot (Yes/No) */
.radio-list { display: flex; flex-direction: column; gap: 10px; }
.radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.radio-pill input[type=radio] { display: none; }
.radio-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #e5e7eb;
    display: inline-block;
    flex-shrink: 0;
    transition: all var(--t-fast);
    position: relative;
}
.radio-pill input[type=radio]:checked + .radio-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.15);
}

/* ---------------------------- Quantity step ---------------------------- */

.config-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 36px;
    margin: 28px 0;
}
.config-product {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: fit-content;
}
.config-product-mini {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    text-align: center;
    box-shadow: var(--shadow);
}
.config-product-mini .product-photo { height: 100px; margin-bottom: 10px; }
.config-product-mini h3 { margin: 0; font-size: 15px; font-weight: 600; }
.config-product-mini .price {
    display: inline-block;
    margin-top: 6px;
    color: var(--ink-2);
    font-weight: 600;
    background: rgba(200, 32, 43, 0.08);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
}

/* Hardware-toggle area at the bottom of the quantity step */
.hardware-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}
.hardware-toggles:empty { display: none; }
.btn-link-remove {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--accent);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background var(--t-fast);
}
.btn-link-remove:hover { background: rgba(244, 63, 94, 0.08); }

/* Product info box (green energy theme, lighter) */
.product-details {
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.04), rgba(52, 211, 153, 0.06));
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 22px;
    color: #064e3b;
    line-height: 1.6;
    position: relative;
}
.product-details > h2:first-child,
.product-details > h3:first-child { margin-top: 0; }
.product-details h2 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #065f46;
    letter-spacing: -0.01em;
}
.product-details .intro {
    font-style: normal;
    margin: 0 0 12px;
    color: #047857;
    font-size: 13.5px;
}
.product-details .intro:last-child { margin-bottom: 0; }
.product-details h3 {
    margin: 14px 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #065f46;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.product-details ul { margin: 0; padding: 0; list-style: none; }
.product-details ul li {
    position: relative;
    padding-left: 18px;
    margin: 4px 0;
    font-size: 13.5px;
}
.product-details ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--energy-500);
}
.product-details a { color: var(--energy-600); font-weight: 600; }

/* Compact info box variant — used when many of these appear in a row */
.product-details.compact {
    padding: 14px 16px;
    margin-bottom: 14px;
    font-size: 13px;
}
.product-details.compact h2,
.product-details.compact h3 { font-size: 12px; text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.04em; }
.product-details.compact .intro { font-size: 13px; margin-bottom: 0; }

/* Two-column features list (Included / Optional / Applications) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 24px;
    margin-top: 4px;
}
.feature-col h3 {
    margin: 0 0 8px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.feature-col h3::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    text-transform: none;
    flex-shrink: 0;
}
.feature-col.included h3::before {
    content: "\2713";
    background: var(--energy-500);
}
.feature-col.optional h3::before {
    content: "+";
    background: var(--brand-500);
    font-weight: 700;
}
.feature-col.applications h3::before {
    content: "";
    background: var(--muted);
    background-image: linear-gradient(135deg, #94a3b8, #64748b);
    /* small dot for application info */
}
.feature-col.applications h3::before {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--muted-2);
    position: relative;
}

/* Tag-style pills used for "Applications" mini-list */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none !important;
}
.tag-list li {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #065f46;
    border-radius: 999px;
    padding: 3px 10px !important;
    font-size: 12px;
    font-weight: 600;
    margin: 0 !important;
}
.tag-list li::before { display: none !important; }

/* Compact inline tip — neutral, lighter than .product-details, with optional icon */
.tip {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand-500);
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 14px;
}
.tip.tip-warn  { border-left-color: var(--accent); background: #fff8f9; }
.tip.tip-info  { border-left-color: var(--ink-2); }
.tip.tip-success { border-left-color: var(--energy-500); background: #f0fdf4; }
.tip .tip-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    margin-top: 1px;
}
.tip-info  .tip-icon { background: var(--brand-500); }
.tip-warn  .tip-icon { background: var(--accent); }
.tip-success .tip-icon { background: var(--energy-500); }
.tip .tip-body { flex: 1; min-width: 0; }
.tip .tip-body strong { color: var(--ink); }
.tip .tip-body p { margin: 0 0 6px; }
.tip .tip-body p:last-child { margin-bottom: 0; }
.tip a {
    color: var(--ink-2);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    word-break: break-all;
}

/* Inline help line — small muted hint sitting under a label */
.hint-inline {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
}

/* Subtitle under a section heading (h2.block-q) */
.block-q-sub {
    margin: -8px 0 14px;
    color: var(--muted);
    font-size: 13px;
    max-width: 720px;
}
.block-q-sub a {
    color: var(--ink-2);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

/* Choice card subtitle (small descriptor under the main label) */
.choice-card .choice-sub {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.45;
}
.choice-card .choice-price {
    margin: 10px 0 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.choice-card.selected .choice-price { color: var(--accent); }

/* Delivery card photo */
.delivery-card .delivery-photo {
    width: 100%;
    height: 100px;
    margin-bottom: 14px;
    border-radius: var(--radius);
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}
.delivery-card .delivery-photo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Collapsible explanation panel — styled <details> */
.explain-details {
    margin: 0 0 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.explain-details > summary {
    cursor: pointer;
    padding: 12px 16px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--ink-2);
    font-size: 14px;
    user-select: none;
    transition: background var(--t-fast);
}
.explain-details > summary::-webkit-details-marker { display: none; }
.explain-details > summary:hover { background: var(--surface-2); }
.explain-details > summary::before {
    content: "i";
    font-family: Georgia, serif;
    font-style: italic;
    font-weight: 700;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.explain-details > summary::after {
    content: "\25BE";
    margin-left: auto;
    color: var(--muted);
    transition: transform var(--t-fast);
}
.explain-details[open] > summary::after { transform: rotate(180deg); }
.explain-details > summary .summary-sub {
    color: var(--muted);
    font-weight: 400;
    font-size: 12.5px;
    margin-left: 4px;
}
.explain-body {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-2);
}
.explain-body p { margin: 0 0 10px; }
.explain-body p:last-child { margin-bottom: 0; }
.explain-body ul { margin: 6px 0 10px; padding-left: 0; list-style: none; }
.explain-body ul li {
    position: relative;
    padding-left: 16px;
    margin: 3px 0;
}
.explain-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-500);
}
.explain-body a {
    color: var(--ink-2);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}
.explain-body .rate-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 4px;
    font-size: 13px;
}
.explain-body .rate-table th,
.explain-body .rate-table td {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
}
.explain-body .rate-table th {
    background: var(--surface-2);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.explain-body .rate-table td:last-child {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-weight: 600;
}

/* "info-label" style: subtle info icon instead of [INFO] prefix */
.info-label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}
.info-label::before {
    content: "i";
    font-family: Georgia, serif;
    font-style: italic;
    width: 16px;
    height: 16px;
    background: var(--brand-500);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* EMS quantity row */
.ems-field > span,
.info-label {
    font-weight: 700;
    font-size: 14px;
}
.qty-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--t-fast);
}
.qty-row:focus-within {
    border-color: var(--ink-2);
    box-shadow: 0 0 0 4px rgba(200, 32, 43, 0.12);
}
.qty-row input {
    flex: 1;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 16px;
    font-weight: 600;
    box-shadow: none !important;
}
.qty-row input.readonly {
    color: var(--muted);
    font-weight: 500;
}
/* Read-only / computed result fields look distinct from editable inputs so the
   user immediately sees they can't type in them. */
.qty-row:has(input.readonly),
.qty-row:has(input[readonly]) {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-style: dashed;
    border-color: var(--border-2);
    cursor: default;
}
.qty-row:has(input.readonly):focus-within,
.qty-row:has(input[readonly]):focus-within {
    box-shadow: none;
    border-color: var(--border-2);
}
.qty-row input.readonly,
.qty-row input[readonly] {
    cursor: default;
    color: var(--ink-2);
    font-weight: 600;
}
.qty-suffix {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.tier-hint {
    display: block;
    margin-top: 10px;
    color: var(--ink-2);
    font-weight: 600;
    font-size: 13px;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.tier-table {
    margin-top: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    box-shadow: var(--shadow-sm);
}
.tier-table summary {
    cursor: pointer;
    color: var(--ink-2);
    font-weight: 600;
    padding: 4px 0;
    list-style: none;
}
.tier-table summary::-webkit-details-marker { display: none; }
.tier-table summary::before {
    content: "▸ ";
    transition: transform var(--t-fast);
    display: inline-block;
}
.tier-table[open] summary::before { transform: rotate(90deg); }
.tier-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}
.tier-table th, .tier-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}
.tier-table th {
    background: var(--surface-2);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.tier-table td:last-child {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-weight: 600;
    color: var(--ink);
}

/* ---------------------------- Choice cards ---------------------------- */

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin: 28px 0;
    max-width: 880px;
}
.choice-grid-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 240px)); }
.choice-grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 980px; }
.choice-grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: 1000px; }

/* Commercial license config sections */
.config-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.config-section:first-of-type {
    border-top: 0;
    padding-top: 0;
    margin-top: 28px;
}
.section-heading {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--ink);
}
.section-heading u {
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}
.section-question {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--ink-2);
}

.choice-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 22px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--t);
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}
.choice-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(200, 32, 43, 0.04), rgba(16, 185, 129, 0.05));
    opacity: 0;
    transition: opacity var(--t);
    pointer-events: none;
}
.choice-card:hover {
    border-color: var(--ink-2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.choice-card:hover::before { opacity: 1; }
.choice-card.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, #fff 0%, #fff5f7 100%);
    box-shadow: 0 14px 30px -12px rgba(244, 63, 94, 0.3);
}
.choice-card.selected::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 38px 38px 0;
    border-color: transparent var(--accent) transparent transparent;
}
.choice-card .check-mark {
    position: absolute;
    top: 5px;
    right: 7px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--t);
}
.choice-card.selected .check-mark { opacity: 1; }
.choice-card .choice-icon {
    width: 84px;
    height: 84px;
    color: var(--ink-2);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.choice-card.selected .choice-icon { color: var(--ink); }
.choice-card .choice-icon svg { width: 100%; height: 100%; }
.choice-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-2);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

h2.block-q {
    margin: 40px 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
h2.block-q + .block-q-sub { margin-top: 0; margin-bottom: 14px; }
.muted-text {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 18px;
    max-width: 720px;
    line-height: 1.6;
}
.muted-text a {
    color: var(--ink-2);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

/* ---------------------------- Accessory grid ---------------------------- */

.accessory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
    margin: 18px 0 8px;
}

/* First-party accessories — compact horizontal rows, info collapsed by default */
#accessoryGrid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0 8px;
}
.accessory-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 64px 1fr auto;
    grid-template-areas:
        "photo main stepper"
        "info  info info";
    gap: 16px;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--t-fast);
}
.accessory-row:hover {
    border-color: var(--border-2);
    box-shadow: var(--shadow);
}
.accessory-row.has-qty {
    border-color: var(--ink-2);
    background: linear-gradient(180deg, rgba(200, 32, 43, 0.03) 0%, var(--surface) 100%);
}
.accessory-row-photo {
    grid-area: photo;
    width: 64px;
    height: 64px;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
}
.accessory-row-photo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.accessory-row-main {
    grid-area: main;
    min-width: 0;
}
.accessory-row-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    line-height: 1.3;
}
.accessory-note {
    font-weight: 400;
    color: var(--muted);
    font-size: 12px;
}
.accessory-row-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}
.accessory-row-price {
    color: var(--ink-2);
    font-weight: 600;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.accessory-row-cost { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.accessory-row-cost .muted { color: var(--muted-2); font-family: inherit; font-weight: 400; margin-right: 2px; }
.accessory-row-cost span:not(.muted) { color: var(--ink); font-weight: 600; }
.accessory-row-sep { color: var(--border-2); }

.accessory-row-stepper {
    grid-area: stepper;
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.accessory-row.has-qty .accessory-row-stepper {
    border-color: var(--ink-2);
}
.accessory-row-stepper input[type=number] {
    width: 40px;
    text-align: center;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 14px;
    font-weight: 700;
    -moz-appearance: textfield;
    height: 30px;
}
.accessory-row-stepper input[type=number]::-webkit-outer-spin-button,
.accessory-row-stepper input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.accessory-row-stepper .qty-btn {
    width: 28px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
}
.accessory-row-stepper .qty-btn:hover {
    background: var(--surface-2);
    color: var(--ink-2);
}

.accessory-row-info {
    grid-area: info;
    margin: 0;
}
.accessory-row-info summary {
    cursor: pointer;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 0;
    list-style: none;
    display: inline-block;
    user-select: none;
}
.accessory-row-info summary::-webkit-details-marker { display: none; }
.accessory-row-info summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform var(--t-fast);
}
.accessory-row-info[open] summary::before { transform: rotate(90deg); }
.accessory-row-info[open] summary { margin-bottom: 8px; }
.accessory-info {
    margin: 0 !important;
    padding: 14px 18px !important;
    font-size: 13px;
}
.accessory-info h2 { font-size: 14px !important; margin-bottom: 6px !important; }
.accessory-info .intro { font-size: 13px !important; margin: 0 !important; }

@media (max-width: 640px) {
    .accessory-row {
        grid-template-columns: 56px 1fr;
        grid-template-areas:
            "photo main"
            "stepper stepper"
            "info info";
        gap: 12px;
    }
    .accessory-row-stepper { justify-self: start; }
}
.accessory-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 14px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--t);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-sm);
}
.accessory-card:hover {
    border-color: var(--ink-2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.accessory-card.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, #fff 0%, #fff5f7 100%);
}
.accessory-card.selected::after {
    content: "\2713";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
}
.accessory-card.info-card { cursor: default; }
.accessory-card.info-card:hover { border-color: var(--border); transform: none; box-shadow: var(--shadow-sm); }
.accessory-icon {
    font-size: 42px;
    margin-bottom: 12px;
    line-height: 1;
}
.accessory-photo {
    width: 100%;
    height: 100px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}
.accessory-photo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.accessory-name {
    font-size: 13px;
    color: var(--ink-2);
    margin: 0 0 8px;
    line-height: 1.45;
    min-height: 38px;
    font-weight: 500;
}
.accessory-price {
    color: var(--ink-2);
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 10px;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.accessory-typical {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 10px;
}
.accessory-typical strong {
    color: var(--ink);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-weight: 700;
}
.accessory-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.qty-btn {
    width: 30px;
    height: 30px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-2);
    line-height: 1;
    transition: all var(--t-fast);
}
.qty-btn:hover {
    border-color: var(--ink-2);
    color: var(--ink-2);
    background: rgba(200, 32, 43, 0.06);
}
.qty-val {
    min-width: 26px;
    text-align: center;
    font-weight: 700;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.info-check {
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    margin-top: 6px;
}

/* Whitelabel cards — wide rows with photo, name, choices/info */
#whitelabelGrid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 18px 0 8px;
    max-width: 820px;
}
.wl-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 18px;
    transition: all var(--t-fast);
    position: relative;
}
.wl-card.is-toggle { cursor: pointer; }
.wl-card.is-toggle:hover { border-color: var(--ink-2); }
.wl-card.is-toggle.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, #fff 0%, #fff5f7 100%);
}
.wl-card.is-toggle.selected::after {
    content: "\2713";
    position: absolute;
    top: 12px;
    right: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
}
.wl-photo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
}
.wl-card-body { min-width: 0; }
.wl-card-body h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.wl-price-label {
    margin: 0;
    color: var(--energy-600);
    font-weight: 600;
    font-size: 13px;
}

.wl-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.wl-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--t-fast);
    background: var(--surface);
}
.wl-choice:hover { border-color: var(--border-2); background: var(--surface-2); }
.wl-choice input[type=radio] { display: none; }
.wl-choice-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-2);
    flex-shrink: 0;
    margin-top: 2px;
    background: var(--surface);
    transition: all var(--t-fast);
}
.wl-choice.is-selected {
    border-color: var(--accent);
    background: #fff5f7;
}
.wl-choice.is-selected .wl-choice-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.18);
}
.wl-choice-text { flex: 1; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.wl-choice-label { display: block; }
.wl-choice-price {
    display: block;
    margin-top: 4px;
    font-weight: 700;
    color: var(--ink);
    font-size: 13px;
}
.wl-choice.is-selected .wl-choice-price { color: var(--accent); }

@media (max-width: 640px) {
    .wl-card { grid-template-columns: 1fr; }
    .wl-photo { width: 100%; max-width: 200px; height: 120px; }
}

/* Reusable "More info" button — opens the info modal */
.info-btn {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--ink-2);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 0;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color var(--t-fast);
}
.info-btn::before {
    content: "i";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-600);
    color: #fff;
    font-family: Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
}
.info-btn:hover { color: var(--ink); }
.info-btn:focus { outline: none; }
.info-btn:focus::before { box-shadow: 0 0 0 4px rgba(200, 32, 43, 0.18); }

.info-modal { max-width: 620px; }
.info-modal-body {
    margin-top: 4px;
    padding: 4px 2px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--ink-2);
    max-height: 60vh;
    overflow-y: auto;
}
.info-modal-body p { margin: 0 0 12px; }
.info-modal-body p:last-child { margin-bottom: 0; }
.info-modal-body ul { margin: 8px 0 12px; padding-left: 18px; }
.info-modal-body ul li { margin: 5px 0; }
.info-modal-body strong { color: var(--ink); }
.info-modal-body em { color: var(--muted); font-style: normal; display: inline-block; margin-top: 2px; }
.info-modal-body a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    word-break: break-word;
}
.info-modal-body a:hover { color: var(--brand-700); }

/* Whitelabel choice options — collapsed by default, expand via summary toggle */
.wl-options { margin-top: 8px; }
.wl-options > summary {
    cursor: pointer;
    list-style: none;
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px dashed var(--border-2);
    border-radius: 10px;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--t-fast);
}
.wl-options > summary::-webkit-details-marker { display: none; }
.wl-options > summary::before {
    content: "▸";
    display: inline-block;
    transition: transform var(--t-fast);
}
.wl-options[open] > summary::before { transform: rotate(90deg); }
.wl-options > summary:hover { background: var(--surface); border-color: var(--border); }
.wl-options[open] > summary {
    border-style: solid;
    background: var(--surface);
    margin-bottom: 8px;
}
.wl-options .wl-choices { margin-top: 0; }

/* Third-party "More info" panel inside the info-card — deprecated, replaced by .info-btn modal */
.tp-info {
    margin-top: 10px;
    width: 100%;
    text-align: left;
}
.tp-info summary {
    cursor: pointer;
    list-style: none;
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 600;
    user-select: none;
    padding: 4px 0;
}
.tp-info summary::-webkit-details-marker { display: none; }
.tp-info summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform var(--t-fast);
}
.tp-info[open] summary::before { transform: rotate(90deg); }
.tp-info-body {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink-2);
}
.tp-info-body a {
    color: var(--ink-2);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    word-break: break-word;
}
.tp-info-body ul {
    margin: 6px 0;
    padding-left: 16px;
}
.tp-info-body ul li { margin: 3px 0; }
.tp-info-body strong { color: var(--ink); }
.tp-info-body em { color: var(--muted); font-style: normal; display: block; margin-top: 6px; }

/* ---------------------------- Order review ---------------------------- */

#reviewContent {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 24px 0 8px;
    max-width: 820px;
}
.review-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.review-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(180deg, rgba(200, 32, 43, 0.04), transparent);
    border-bottom: 1px solid var(--border);
}
.review-card-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.review-edit {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--ink-2);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: inherit;
    transition: all var(--t-fast);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.review-edit:hover { background: rgba(200, 32, 43, 0.08); }
.review-edit::before {
    content: "\270E";
    font-size: 12px;
    opacity: 0.8;
}
.review-lines {
    padding: 4px 18px 14px;
}
.review-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}
.review-line:last-child { border-bottom: 0; }
.review-line-label {
    color: var(--ink-2);
    line-height: 1.45;
}
.review-line-sub {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}
.review-line-label em {
    font-style: normal;
    color: var(--muted);
    font-size: 12.5px;
}
.review-line-amount {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}
.review-line.review-line-subtotal {
    padding-top: 12px;
    border-bottom: 0;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    font-weight: 600;
    color: var(--ink);
}
.review-line.review-line-subtotal .review-line-amount { color: var(--ink); }

.review-totals {
    margin-top: 8px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(200, 32, 43, 0.06), rgba(16, 185, 129, 0.06));
    border: 1px solid rgba(200, 32, 43, 0.18);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.review-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}
.review-total-row span:last-child {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    color: var(--ink);
    font-size: 17px;
}
.review-total-row.yearly span:last-child { color: var(--energy-600); }
.review-total-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

.review-empty {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    color: var(--muted);
}

/* ---------------------------- Confirmation ---------------------------- */

.confirmation {
    text-align: center;
    padding: 56px 32px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    margin: 36px 0;
}
.check {
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--energy-400), var(--energy-600));
    color: #fff;
    font-size: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-energy);
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.confirmation h1 { font-size: 28px; margin-bottom: 12px; }
.confirmation .btn { margin-top: 28px; }
#confirmationDetails {
    text-align: left;
    max-width: 520px;
    margin: 28px auto 0;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 20px;
    font-size: 14px;
    border: 1px solid var(--border);
}
#confirmationDetails .summary-line { padding: 6px 0; }

/* Summary line shared */
.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    gap: 12px;
}
.summary-line > span:last-child { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 600; white-space: nowrap; }
.summary-line.total {
    border-top: 1px solid var(--border);
    margin-top: 10px;
    padding-top: 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}
.summary-line.total > span:last-child { color: var(--ink); font-size: 16px; }

/* ---------------------------- Footer ---------------------------- */

.site-footer {
    background: transparent;
    padding: 32px 0 28px;
    margin-top: 40px;
    color: var(--muted);
    font-size: 13px;
}
.site-footer .container { padding-top: 24px; border-top: 1px solid var(--border); }
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-2);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.footer-brand .cart-icon-large {
    width: 26px;
    height: 26px;
    font-size: 14px;
    border-radius: 8px;
}
.footer-meta {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.footer-meta a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--t-fast);
}
.footer-meta a:hover { color: var(--ink-2); }
.footer-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border-2);
    display: inline-block;
}
@media (max-width: 640px) {
    .footer-inner { justify-content: center; text-align: center; }
}

.hidden { display: none !important; }

/* ---------------------------- Responsive ---------------------------- */

@media (max-width: 640px) {
    h1 { font-size: 24px; }
    .container { padding: 0 18px; }
    .config-layout { grid-template-columns: 1fr; }
    .row { grid-template-columns: 1fr; }
    .steps { margin: 24px -18px; padding: 0 18px; }
    .step { font-size: 12px; }
    .field-group { padding: 18px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
