﻿/* Loncin Store â€” Premium layout, original brand colors */
:root {
    --brand-red: #ea1c26;
    --brand-red-dark: #c91820;
    --brand-dark: #111111;
    --brand-dark-2: #333333;
    --brand-bg: #f4f6f8;
    --brand-border: #eeeeee;
    --brand-white: #ffffff;
    --brand-gray: #64748b;
    --brand-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    --brand-shadow-hover: 0 28px 60px rgba(234, 28, 38, 0.14);
    --brand-radius: 16px;
    --brand-radius-sm: 12px;
    --brand-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.parts-page {
    background: var(--brand-bg);
    min-height: 0;
    padding-bottom: 24px;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* â”€â”€ Hero â”€â”€ */
.parts-hero {
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(234, 28, 38, 0.18) 0%, transparent 55%),
        linear-gradient(135deg, #111111 0%, #1a1a1a 60%, #2d0508 100%);
    color: var(--brand-white);
    padding: 20px 0;
    min-height: 130px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.parts-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.35;
    pointer-events: none;
}

.parts-hero .container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.parts-hero-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.parts-hero-image {
    width: 72px;
    height: 72px;
    border-radius: var(--brand-radius-sm);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.parts-hero h1 {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.parts-hero h1::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin-top: 8px;
    background: var(--brand-red);
    border-radius: 2px;
}

.parts-hero p {
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-size: 0.875rem;
    max-width: 520px;
    line-height: 1.5;
}

.parts-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.parts-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s var(--brand-ease);
}

.parts-breadcrumb a:hover { color: var(--brand-red); }

.parts-breadcrumb li + li::before {
    content: '/';
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.4);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    margin-top: 12px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.25s var(--brand-ease);
}

.back-link:hover {
    background: rgba(234, 28, 38, 0.15);
    border-color: var(--brand-red);
    color: #fff;
}

/* â”€â”€ Layout â”€â”€ */
.parts-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    margin-top: 28px;
    align-items: start;
}

.parts-main { min-width: 0; }

/* â”€â”€ Sidebar â”€â”€ */
.parts-sidebar {
    background: var(--brand-white);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
    border: 1px solid var(--brand-border);
    position: sticky;
    top: 16px;
    max-height: var(--parts-sidebar-height, calc(100dvh - 32px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.parts-sidebar-header {
    padding: 14px 16px;
    background: var(--brand-dark);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.parts-sidebar-header i { color: var(--brand-red); }

.parts-sidebar-search {
    padding: 12px;
    border-bottom: 1px solid var(--brand-border);
    background: #fff;
    flex-shrink: 0;
}

.parts-sidebar-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.parts-sidebar-search input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    padding: 0 38px 0 14px;
    font-size: 13px;
    outline: none;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.parts-sidebar-search input:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(234, 28, 38, 0.1);
    background: #fff;
}

.parts-sidebar-search i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
}

.parts-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.parts-sidebar-list li { margin-bottom: 3px; }

.parts-sidebar-link {
    display: block;
    padding: 10px 12px;
    border-radius: var(--brand-radius-sm);
    font-size: 12px;
    color: #334155;
    text-decoration: none;
    line-height: 1.4;
    transition: all 0.22s var(--brand-ease);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
}

.parts-sidebar-link:hover {
    background: rgba(234, 28, 38, 0.08);
    color: var(--brand-red);
    border-color: rgba(234, 28, 38, 0.12);
}

.parts-sidebar-link.active {
    background: var(--brand-red);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(234, 28, 38, 0.35);
}

/* â”€â”€ Toolbar â”€â”€ */
.parts-toolbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
    border: 1px solid var(--brand-border);
    padding: 20px 24px;
    margin-top: -16px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.parts-toolbar-left {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    flex: 1;
}

.parts-search-form {
    flex: 1;
    min-width: 240px;
    max-width: 440px;
    display: flex;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border-radius: var(--brand-radius-sm);
    overflow: hidden;
}

.parts-search-form input {
    flex: 1;
    border: 1px solid var(--brand-border);
    border-right: none;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    background: #fff;
}

.parts-search-form input:focus { border-color: var(--brand-red); }

.parts-search-form button {
    border: none;
    background: var(--brand-red);
    color: #fff;
    padding: 0 22px;
    cursor: pointer;
    transition: background 0.2s;
}

.parts-search-form button:hover { background: var(--brand-red-dark); }

.parts-filter-input {
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    min-width: 240px;
    outline: none;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.parts-filter-input:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(234, 28, 38, 0.1);
}

.parts-view-toggle {
    display: flex;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius-sm);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.parts-view-btn {
    border: none;
    background: transparent;
    padding: 11px 16px;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    transition: all 0.2s var(--brand-ease);
}

.parts-view-btn.active {
    background: var(--brand-red);
    color: #fff;
}

.parts-count {
    font-size: 13px;
    color: var(--brand-gray);
    white-space: nowrap;
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 999px;
    border: 1px solid var(--brand-border);
}

.parts-count strong { color: var(--brand-dark); font-size: 15px; }

.parts-search-note {
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--brand-gray);
    padding: 12px 16px;
    background: rgba(234, 28, 38, 0.05);
    border-radius: var(--brand-radius-sm);
    border-left: 3px solid var(--brand-red);
}

.parts-search-note a { color: var(--brand-red); font-weight: 600; }

/* â”€â”€ Cards Grid â”€â”€ */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 22px;
    margin-top: 28px;
}

@media (min-width: 1400px) {
    .parts-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 24px;
    }

    .parts-layout {
        grid-template-columns: 300px 1fr;
        gap: 28px;
    }
}

@media (min-width: 1800px) {
    .parts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 26px;
    }

    .parts-layout {
        grid-template-columns: 340px 1fr;
        gap: 32px;
    }

    .parts-hero {
        min-height: 150px;
        padding: 28px 0;
    }

    .parts-hero h1 {
        font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem);
    }
}

@media (min-width: 2200px) {
    .parts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

.parts-grid.hidden,
.parts-list.hidden { display: none; }

.parts-card {
    background: var(--brand-white);
    border-radius: var(--brand-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--brand-border);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s var(--brand-ease), box-shadow 0.35s var(--brand-ease), border-color 0.35s;
    position: relative;
}

.parts-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--brand-shadow-hover);
    border-color: rgba(234, 28, 38, 0.25);
    color: inherit;
}

.parts-card-image {
    background: #f8fafc;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    position: relative;
    border-bottom: 1px solid var(--brand-border);
}

.parts-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s var(--brand-ease);
}

.parts-card:hover .parts-card-image img { transform: scale(1.05); }

.parts-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--brand-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(234, 28, 38, 0.4);
}

.parts-card-new {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--brand-dark);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
    letter-spacing: 0.12em;
}

.parts-card-body {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.parts-card-ref {
    font-size: 10px;
    font-weight: 700;
    color: var(--brand-red);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.parts-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--brand-dark);
    margin: 0;
}

.parts-card-action {
    margin-top: auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-red);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* â”€â”€ List view â”€â”€ */
.parts-list {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.parts-list-item {
    display: flex;
    gap: 24px;
    background: var(--brand-white);
    border-radius: var(--brand-radius);
    border: 1px solid var(--brand-border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.3s var(--brand-ease);
}

.parts-list-item:hover {
    box-shadow: var(--brand-shadow-hover);
    border-color: rgba(234, 28, 38, 0.2);
    transform: translateX(4px);
    color: inherit;
}

.parts-list-thumb {
    width: 168px;
    min-height: 128px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    flex-shrink: 0;
}

.parts-list-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.parts-list-content {
    padding: 20px 20px 20px 0;
    flex: 1;
}

.parts-list-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--brand-dark);
}

.parts-list-content p {
    font-size: 14px;
    color: var(--brand-gray);
    margin: 0 0 12px;
    line-height: 1.6;
}

.parts-list-meta {
    font-size: 11px;
    color: var(--brand-red);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* â”€â”€ Main panel (parts page) â”€â”€ */
.parts-main-panel {
    min-width: 0;
    background: var(--brand-white);
    border-radius: var(--brand-radius);
    border: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow);
    overflow: hidden;
}

.parts-diagram {
    padding: 28px;
    border-bottom: 1px solid var(--brand-border);
    background: #f8fafc;
    text-align: center;
    position: relative;
}

.parts-diagram::after {
    content: 'Hover to zoom Â· Click to enlarge';
    position: absolute;
    bottom: 12px;
    right: 20px;
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
}

.parts-diagram,
.parts-diagram *,
.parts-diagram.is-zooming,
.parts-diagram.is-zooming *,
.parts-diagram-zoom,
.parts-diagram-zoom *,
.parts-diagram img,
#diagramImage,
#diagramZoom {
    cursor: crosshair !important;
}

.parts-diagram-zoom {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--brand-radius-sm);
}

.parts-diagram img {
    display: block;
    max-width: 100%;
    max-height: 440px;
    object-fit: contain;
    border-radius: var(--brand-radius-sm);
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.08));
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.12s ease-out;
    will-change: transform;
}

@media (hover: none), (max-width: 767px) {
    .parts-diagram::after {
        content: 'Tap to enlarge';
    }
}

.parts-main-panel > .parts-toolbar {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid var(--brand-border);
    backdrop-filter: none;
}

/* â”€â”€ Table â”€â”€ */
.parts-table-wrap {
    overflow-x: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

.parts-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 13px;
}

.parts-table thead th {
    background: var(--brand-dark);
    color: #fff;
    padding: 13px 14px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid var(--brand-red);
    position: sticky;
    top: 0;
    z-index: 1;
}

.parts-table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--brand-border);
    vertical-align: middle;
    line-height: 1.45;
    color: #334155;
}

.parts-table tbody tr:last-child td {
    border-bottom: none;
}

.parts-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.parts-table tbody tr:hover {
    background: rgba(234, 28, 38, 0.04);
}

.parts-table tr.search-highlight {
    background: rgba(234, 28, 38, 0.08) !important;
    box-shadow: inset 3px 0 0 var(--brand-red);
}

/* Column widths & alignment */
.parts-table .col-no {
    width: 56px;
    text-align: center;
}

.parts-table thead .col-no,
.parts-table thead .col-stock,
.parts-table thead .col-qty,
.parts-table thead .col-action {
    text-align: center;
}

.parts-table .col-plm {
    width: 115px;
    min-width: 115px;
    white-space: nowrap;
}

.parts-table .col-name {
    width: auto;
    min-width: 145px;
    white-space: nowrap;
}
.parts-table .col-price { width: 100px; text-align: right; white-space: nowrap; }
.parts-table thead .col-price { text-align: right; }
.parts-table .col-stock { width: 100px; text-align: center; }
.parts-table .col-qty { width: 110px; text-align: center; }
.parts-table .col-action { width: 120px; text-align: center; }

.part-ref-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: #f1f5f9;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    color: var(--brand-dark);
}

.part-plm-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    color: #475569;
    background: none;
    padding: 0;
    white-space: nowrap;
    word-break: normal;
}

.part-name {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-dark);
    line-height: 1.3;
    white-space: nowrap;
}

.part-remark {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
}

.part-price {
    font-weight: 700;
    color: var(--brand-dark);
    font-size: 13px;
}

.parts-table .qty-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0;
    background: none;
    border: none;
}

.parts-table .qty-control button {
    width: auto;
    height: auto;
    min-width: 20px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: none;
    color: var(--brand-dark);
    cursor: pointer;
}

.parts-table .qty-control button:hover {
    color: var(--brand-red);
    background: transparent !important;
}

.parts-table .qty-control input {
    width: 28px;
    min-width: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    border: none;
    background: transparent;
    pointer-events: none;
    -moz-appearance: textfield;
}

.parts-table .qty-control input::-webkit-outer-spin-button,
.parts-table .qty-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.parts-table .btn-cart {
    display: inline-block;
    width: auto;
    min-width: 96px;
    max-width: none;
    padding: 9px 14px;
    font-size: 11px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    line-height: 1.2;
    text-align: center;
}

.parts-table .in-stock,
.parts-table .out-stock {
    display: inline-block;
    font-size: 11px;
    padding: 4px 10px;
    white-space: nowrap;
    line-height: 1.3;
}

.plm-highlight {
    background: var(--brand-red);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 10px;
    white-space: nowrap;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    padding: 0;
    border: none;
}

.qty-control button {
    width: auto;
    height: auto;
    min-width: 24px;
    padding: 0;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
}

.qty-control button:hover,
.qty-control button:focus,
.qty-control button:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--brand-red);
}

.qty-control input {
    width: 44px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
}

.btn-cart {
    background: var(--brand-red);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: var(--brand-radius-sm);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(234, 28, 38, 0.3);
    transition: transform 0.2s, background 0.2s;
}

.btn-cart:hover {
    background: var(--brand-red-dark);
    transform: translateY(-1px);
}

.btn-cart:disabled,
.btn-muted {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.in-stock {
    color: #16a34a;
    font-weight: 600;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(22, 163, 74, 0.1);
    border-radius: 999px;
}

.out-stock {
    color: #dc2626;
    font-weight: 600;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(220, 38, 38, 0.08);
    border-radius: 999px;
}

.parts-description {
    padding: 28px 24px;
    border-top: 1px solid var(--brand-border);
    background: #fafbfc;
}

.parts-description h3 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.parts-description h3::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--brand-red);
}

/* â”€â”€ Empty states â”€â”€ */
.parts-empty {
    text-align: center;
    padding: 72px 28px;
    background: var(--brand-white);
    border-radius: var(--brand-radius);
    margin-top: 28px;
    border: 1px dashed var(--brand-border);
}

.parts-empty i {
    font-size: 2.75rem;
    color: var(--brand-red);
    margin-bottom: 16px;
    opacity: 0.85;
}

.parts-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-red);
    color: #fff;
    padding: 13px 26px;
    border-radius: var(--brand-radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(234, 28, 38, 0.3);
    transition: transform 0.2s, background 0.2s;
}

.parts-empty-btn:hover {
    color: #fff;
    background: var(--brand-red-dark);
    transform: translateY(-2px);
}

.parts-filter-empty {
    display: none;
    text-align: center;
    padding: 40px;
    color: var(--brand-gray);
    font-size: 14px;
}

.parts-filter-empty.visible { display: block; }

/* â”€â”€ Modal & popup â”€â”€ */
#cart-popup {
    display: none;
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    bottom: auto;
    right: auto;
    background: var(--brand-dark);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--brand-radius-sm);
    z-index: 9999;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    border-left: 3px solid var(--brand-red);
    font-weight: 500;
}

#cart-popup.show {
    display: block;
    animation: premiumSlideDown 0.35s var(--brand-ease);
}

@keyframes premiumSlideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

#image-modal.open { display: flex; }

#image-modal img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: var(--brand-radius-sm);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

#image-modal .close-modal {
    position: absolute;
    top: 24px;
    right: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 1200px) {
    .parts-layout {
        grid-template-columns: 240px 1fr;
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .parts-layout { grid-template-columns: 1fr; }

    .parts-sidebar {
        position: static;
        max-height: 320px;
    }

    .parts-toolbar { margin-top: 16px; }

    .parts-list-item { flex-direction: column; }

    .parts-list-thumb {
        width: 100%;
        min-height: 160px;
    }

    .parts-list-content { padding: 0 20px 20px; }

    .parts-table thead th,
    .parts-table tbody td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .parts-table .btn-cart {
        font-size: 9px;
        padding: 7px 4px;
    }

    .parts-table-wrap {
        overflow: visible;
    }

    .parts-table thead {
        display: none;
    }

    .parts-table,
    .parts-table tbody,
    .parts-table tr,
    .parts-table td {
        display: block;
        width: 100%;
    }

    .parts-table tr {
        margin-bottom: 14px;
        border: 1px solid var(--brand-border);
        border-radius: var(--brand-radius-sm);
        overflow: hidden;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .parts-table tbody tr:nth-child(even) {
        background: #fff;
    }

    .parts-table {
        min-width: 0;
    }

    .parts-table tr.search-highlight {
        box-shadow: inset 4px 0 0 var(--brand-red);
    }

    .parts-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
    }

    .parts-table tbody td.col-name {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .parts-table tbody td.col-name .part-name,
    .parts-table tbody td.col-name .part-remark {
        text-align: right;
        flex: 1;
        min-width: 0;
    }

    .parts-table tbody td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #64748b;
        flex: 0 0 72px;
        text-align: left;
    }

    .parts-table tbody td.col-name::before {
        align-self: flex-start;
        padding-top: 4px;
    }

    .parts-table tbody td:last-child {
        border-bottom: none;
    }

    .parts-table .qty-control,
    .parts-table .btn-cart {
        width: auto;
        max-width: none;
        margin-left: auto;
    }

    .parts-table .btn-cart {
        font-size: 11px;
        padding: 9px 14px;
        white-space: nowrap;
    }

    .parts-search-form,
    .parts-filter-input {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .parts-hero h1 {
        font-size: 1.25rem;
    }
}

/* â”€â”€ Cart page â€” Classy editorial layout â”€â”€ */
.cart-page {
    background:
        radial-gradient(circle at 0% 0%, rgba(234, 28, 38, 0.04) 0%, transparent 42%),
        linear-gradient(180deg, #fafbfc 0%, var(--brand-bg) 100%);
    min-height: 70vh;
    padding-bottom: 80px;
}

.cart-top {
    padding: 14px 0 12px;
    border-bottom: 1px solid var(--brand-border);
    background: var(--brand-white);
}

.cart-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cart-top-left h1 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    margin: 0 0 2px;
    color: var(--brand-dark);
    line-height: 1.1;
}

.cart-top-left h1 strong {
    font-weight: 700;
}

.cart-top-left p {
    margin: 0;
    color: var(--brand-gray);
    font-size: 12px;
}

.cart-steps {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cart-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.cart-steps li.active {
    color: var(--brand-dark);
}

.cart-steps li.active .cart-step-num {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
}

.cart-steps li.done {
    color: var(--brand-dark);
}

.cart-steps li.done .cart-step-num {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.cart-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

.cart-steps li + li::before {
    content: '';
    width: 24px;
    height: 1px;
    background: #e2e8f0;
    margin: 0 10px;
}

.cart-body {
    padding-top: 24px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px 18px;
    background: var(--brand-white);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s var(--brand-ease), box-shadow 0.3s var(--brand-ease);
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.3s;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.cart-item:hover::before {
    background: var(--brand-red);
}

.cart-item-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
    border: 1px solid var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.cart-item-thumb i {
    font-size: 1.75rem;
    color: #cbd5e1;
}

.cart-item-info {
    min-width: 0;
}

.cart-item-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-red);
    margin-bottom: 4px;
}

.cart-item-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-dark);
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.cart-item-name:hover {
    color: var(--brand-red);
}

.cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cart-item-meta span {
    font-size: 11px;
    color: var(--brand-gray);
    background: #f8fafc;
    border: 1px solid var(--brand-border);
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.cart-item-price {
    text-align: right;
}

.cart-item-price strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
}

.cart-item-price small {
    display: block;
    font-size: 11px;
    color: var(--brand-gray);
    margin-top: 3px;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--brand-border);
    background: #fafbfc;
}

.cart-item-qty .qty-btn,
.cart-item-qty button.qty-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
    color: var(--brand-dark);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    min-width: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-item-qty .qty-btn:hover,
.cart-item-qty button.qty-btn:hover {
    color: var(--brand-red);
}

.cart-item-qty input {
    width: 28px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    padding: 0;
    pointer-events: none;
}

.cart-item-remove {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.cart-item-remove:hover {
    color: var(--brand-red);
}

/* Summary â€” dark classy panel */
.cart-summary {
    background: var(--brand-dark);
    border-radius: 24px;
    overflow: hidden;
    position: sticky;
    top: 120px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.cart-summary-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--brand-red), #ff4d55);
}

.cart-summary-inner {
    padding: 22px 24px;
    color: #fff;
}

.cart-summary-inner h3 {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.cart-summary-inner .cart-summary-title {
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    margin: 0 0 14px;
    color: #fff;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}

.cart-summary-row strong {
    color: #fff;
    font-weight: 600;
}

.cart-summary-grand {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}

.cart-summary-grand span:first-child {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.cart-summary-grand span:last-child {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
}

.cart-summary-grand span:last-child em {
    font-style: normal;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    margin-left: 4px;
}

.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
    padding: 13px 24px;
    background: var(--brand-red);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 8px 28px rgba(234, 28, 38, 0.45);
}

.cart-checkout-btn:hover {
    background: var(--brand-red-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(234, 28, 38, 0.5);
}

.cart-continue-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.2s;
}

.cart-continue-link:hover {
    color: #fff;
}

.cart-trust {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cart-trust span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.cart-trust i {
    color: var(--brand-red);
    font-size: 11px;
}

/* Checkout — unified panel, cart-page layout */
.checkout-layout {
    align-items: stretch;
}

.checkout-panel {
    background: var(--brand-white);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.checkout-panel::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--brand-red);
}

.checkout-section {
    padding: 20px 22px 20px 26px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-section-last {
    border-bottom: none;
    padding-bottom: 22px;
}

.checkout-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-dark);
}

.checkout-section-title i {
    color: var(--brand-red);
    font-size: 12px;
    width: 16px;
    text-align: center;
}

.checkout-section-title small {
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    color: #94a3b8;
    margin-left: 4px;
}

.checkout-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-card {
    background: var(--brand-white);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    padding: 18px 20px;
}

.checkout-card-title {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-gray);
}

.checkout-card-title small {
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    color: #94a3b8;
    margin-left: 6px;
}

.checkout-fields {
    display: grid;
    gap: 12px;
}

.checkout-fields-2 {
    grid-template-columns: 1fr 1fr;
}

.checkout-fields label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkout-fields label.full {
    grid-column: 1 / -1;
}

.checkout-fields label span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.checkout-note {
    display: block;
    width: 100%;
}

.checkout-fields input,
.checkout-note textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    font-size: 14px;
    color: var(--brand-dark);
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-fields input:focus,
.checkout-note textarea:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(234, 28, 38, 0.1);
    background: #fff;
}

.checkout-note textarea {
    display: block;
    resize: vertical;
    min-height: 72px;
}

.checkout-countries {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.checkout-country {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid var(--brand-border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    background: #fafbfc;
    position: relative;
}

.checkout-country input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkout-country-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
}

.checkout-country-dot::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--brand-red);
    transform: scale(0);
    transition: transform 0.2s;
}

.checkout-country-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkout-country strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-dark);
}

.checkout-country small {
    font-size: 11px;
    color: var(--brand-gray);
}

.checkout-country.is-on,
.checkout-country:has(input:checked) {
    border-color: var(--brand-red);
    background: rgba(234, 28, 38, 0.04);
    box-shadow: 0 0 0 1px rgba(234, 28, 38, 0.08);
}

.checkout-country.is-on .checkout-country-dot,
.checkout-country:has(input:checked) .checkout-country-dot {
    border-color: var(--brand-red);
}

.checkout-country.is-on .checkout-country-dot::after,
.checkout-country:has(input:checked) .checkout-country-dot::after {
    transform: scale(1);
}

.checkout-mini-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.checkout-mini-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.checkout-mini-list li strong {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.checkout-submit-btn {
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 575px) {
    .checkout-fields-2,
    .checkout-countries {
        grid-template-columns: 1fr;
    }
}

/* Empty cart */
.cart-empty-classy {
    max-width: 480px;
    margin: 60px auto 0;
    text-align: center;
    padding: 56px 40px;
    background: var(--brand-white);
    border-radius: 24px;
    border: 1px solid var(--brand-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.cart-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(234, 28, 38, 0.08), rgba(234, 28, 38, 0.02));
    border: 1px solid rgba(234, 28, 38, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.cart-empty-icon i {
    font-size: 1.75rem;
    color: var(--brand-red);
}

.cart-empty-classy h2 {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
    color: var(--brand-dark);
}

.cart-empty-classy h2 strong {
    font-weight: 700;
}

.cart-empty-classy p {
    color: var(--brand-gray);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 28px;
}

@media (min-width: 1400px) {
    .parts-diagram img {
        max-height: clamp(440px, 32vw, 560px);
    }
}

@media (min-width: 1700px) {
    .cart-layout {
        max-width: 1400px;
        margin-inline: auto;
    }
}

@media (max-width: 991px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .cart-top-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .cart-item {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }

    .cart-item-thumb {
        width: 64px;
        height: 64px;
    }

    .cart-item-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .cart-item-price {
        text-align: left;
    }

    .cart-steps {
        display: none;
    }
}


/* ── Pretty checkout (site brand colors) ── */
.pretty-checkout {
    --pc-rose: var(--brand-red, #ea1c26);
    --pc-rose-soft: rgba(234, 28, 38, 0.08);
    --pc-ink: var(--brand-dark, #111111);
    --pc-mute: var(--brand-gray, #64748b);
    --pc-bg: var(--brand-bg, #f4f6f8);
    --pc-white: var(--brand-white, #ffffff);
    --pc-line: var(--brand-border, #eeeeee);
    position: relative;
    font-family: 'Outfit', system-ui, sans-serif;
    background:
        radial-gradient(ellipse 50% 40% at 0% 0%, rgba(234, 28, 38, 0.06), transparent 55%),
        radial-gradient(ellipse 45% 35% at 100% 10%, rgba(17, 17, 17, 0.04), transparent 50%),
        var(--pc-bg);
    min-height: 70vh;
    padding: 36px 0 80px;
    overflow: hidden;
    color: var(--pc-ink);
}

.pretty-checkout * { box-sizing: border-box; }

.pretty-blobs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.pretty-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(52px);
    opacity: 0.45;
    animation: pretty-float 12s ease-in-out infinite;
}

.pretty-blob-a {
    width: 320px;
    height: 320px;
    background: rgba(234, 28, 38, 0.22);
    top: -90px;
    left: -70px;
}

.pretty-blob-b {
    width: 260px;
    height: 260px;
    background: rgba(17, 17, 17, 0.08);
    top: 18%;
    right: -70px;
    animation-delay: -4s;
}

.pretty-blob-c {
    width: 200px;
    height: 200px;
    background: rgba(234, 28, 38, 0.12);
    bottom: 10%;
    left: 38%;
    animation-delay: -7s;
    opacity: 0.35;
}

@keyframes pretty-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(18px) scale(1.05); }
}

.pretty-wrap {
    position: relative;
    z-index: 1;
}

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

.pretty-eyebrow {
    margin: 0 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--pc-white);
    border: 1px solid var(--pc-line);
    color: var(--pc-rose);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pretty-head-text h1 {
    margin: 0;
    font-family: 'Nunito', 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--pc-ink);
}

.pretty-head-text h1 span {
    color: var(--pc-rose);
    font-weight: 800;
}

.pretty-sub {
    margin: 10px 0 0;
    max-width: 420px;
    color: var(--pc-mute);
    font-size: 15px;
    line-height: 1.55;
}

.pretty-steps {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--pc-white);
    border: 1px solid var(--pc-line);
    border-radius: 999px;
    box-shadow: var(--brand-shadow, 0 20px 50px rgba(0, 0, 0, 0.08));
}

.pretty-step {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
}

.pretty-step.is-done { color: #16a34a; }
.pretty-step.is-now { color: var(--pc-ink); }

.pretty-step-n,
.pretty-step.is-done i {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-style: normal;
}

.pretty-step-n {
    background: var(--pc-bg);
    color: var(--pc-mute);
    border: 1px solid var(--pc-line);
}

.pretty-step.is-now .pretty-step-n {
    background: var(--pc-rose);
    border-color: var(--pc-rose);
    color: #fff;
    box-shadow: 0 6px 16px rgba(234, 28, 38, 0.35);
}

.pretty-step.is-done i {
    background: #dcfce7;
    color: #16a34a;
}

.pretty-step-dot {
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: var(--pc-line);
}

.pretty-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.pretty-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pretty-panel,
.pretty-bag {
    background: var(--pc-white);
    border: 1px solid var(--pc-line);
    border-radius: 28px;
    box-shadow: var(--brand-shadow, 0 20px 50px rgba(0, 0, 0, 0.08));
}

.pretty-panel {
    padding: 24px 26px 26px;
}

.pretty-panel-compact {
    padding: 14px 16px 16px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.pretty-form-section {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--pc-line, #eeeeee);
}

.pretty-form-section-last {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.pretty-form-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-family: 'Nunito', 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: var(--pc-ink, #111);
    letter-spacing: -0.01em;
}

.pretty-form-heading span {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: var(--pc-rose-soft, rgba(234, 28, 38, 0.08));
    border: 1px solid rgba(234, 28, 38, 0.12);
    color: var(--pc-rose, #ea1c26);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.pretty-form-heading em {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    color: var(--pc-mute, #64748b);
}

.pretty-panel-compact .pretty-fields {
    gap: 10px;
}

.pretty-panel-compact .pretty-fields label {
    gap: 4px;
}

.pretty-panel-compact .pretty-fields label > span {
    font-size: 11px;
}

.pretty-panel-compact .pretty-fields input,
.pretty-panel-compact .pretty-note textarea {
    padding: 9px 12px;
    font-size: 13px;
    border-radius: 12px;
}

.pretty-panel-compact .pretty-note textarea {
    min-height: 56px;
}

.pretty-panel-compact .pretty-countries {
    gap: 8px;
    margin-bottom: 10px;
}

.pretty-panel-compact .pretty-country {
    padding: 10px 12px;
    border-radius: 12px;
    gap: 10px;
}

.pretty-panel-compact .pretty-flag {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 10px;
}

.pretty-panel-compact .pretty-country-text strong {
    font-size: 13px;
}

.pretty-panel-compact .pretty-country-text small {
    font-size: 11px;
}

.pretty-panel-compact .pretty-tick {
    width: 18px;
    height: 18px;
    font-size: 9px;
}

.pretty-panel-in {
    animation: pretty-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 100ms);
}

@keyframes pretty-up {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}

.pretty-panel-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.pretty-pill {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: var(--pc-rose-soft);
    border: 1px solid rgba(234, 28, 38, 0.15);
    color: var(--pc-rose);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.pretty-panel-title h2 {
    margin: 0;
    font-family: 'Nunito', 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pc-ink);
}

.pretty-panel-title p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--pc-mute);
}

.pretty-fields {
    display: grid;
    gap: 14px;
}

.pretty-fields.two {
    grid-template-columns: 1fr 1fr;
}

.pretty-fields .full { grid-column: 1 / -1; }

.pretty-fields label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.pretty-fields label > span {
    font-size: 12px;
    font-weight: 600;
    color: var(--pc-mute);
}

.pretty-fields input,
.pretty-note textarea {
    width: 100%;
    border: 1.5px solid var(--pc-line);
    background: var(--pc-bg);
    border-radius: 16px;
    padding: 13px 15px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--pc-ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.2s;
}

.pretty-fields input::placeholder,
.pretty-note textarea::placeholder {
    color: #94a3b8;
}

.pretty-fields input:focus,
.pretty-note textarea:focus {
    border-color: rgba(234, 28, 38, 0.45);
    background: var(--pc-white);
    box-shadow: 0 0 0 4px rgba(234, 28, 38, 0.1);
    transform: translateY(-1px);
}

.pretty-countries {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.pretty-country {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1.5px solid var(--pc-line);
    background: var(--pc-bg);
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.pretty-country input { position: absolute; opacity: 0; pointer-events: none; }

.pretty-flag {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--pc-rose);
    background: var(--pc-white);
    border: 1px solid rgba(234, 28, 38, 0.15);
    flex-shrink: 0;
}

.pretty-country-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pretty-country-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--pc-ink);
}

.pretty-country-text small {
    font-size: 12px;
    color: var(--pc-mute);
}

.pretty-tick {
    margin-left: auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pc-white);
    border: 1px solid var(--pc-line);
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pretty-country:hover {
    transform: translateY(-2px);
    box-shadow: var(--brand-shadow-hover, 0 28px 60px rgba(234, 28, 38, 0.14));
}

.pretty-country.on {
    border-color: var(--pc-rose);
    background: var(--pc-white);
    box-shadow: 0 12px 28px rgba(234, 28, 38, 0.12);
}

.pretty-country.on .pretty-tick {
    background: var(--pc-rose);
    border-color: var(--pc-rose);
    color: #fff;
}

.pretty-note textarea {
    min-height: 96px;
    resize: vertical;
}

.pretty-aside {
    position: sticky;
    top: 100px;
}

.pretty-bag {
    padding: 22px;
    background: var(--pc-white);
}

.pretty-bag-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.pretty-bag-top p {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pc-mute);
}

.pretty-bag-top h3 {
    margin: 0;
    font-family: 'Nunito', 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pc-ink);
}

.pretty-edit {
    font-size: 12px;
    font-weight: 700;
    color: var(--pc-rose);
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--pc-rose-soft);
    border: 1px solid rgba(234, 28, 38, 0.12);
}

.pretty-edit:hover { background: rgba(234, 28, 38, 0.14); }

.pretty-bag-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.pretty-bag-list li {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: var(--pc-bg);
    border: 1px solid var(--pc-line);
}

.pretty-bag-thumb {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--pc-white);
    border: 1px solid var(--pc-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--pc-mute);
}

.pretty-bag-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pretty-bag-meta a {
    display: block;
    color: var(--pc-ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
}

.pretty-bag-meta a:hover { color: var(--pc-rose); }

.pretty-bag-meta span {
    font-size: 12px;
    color: var(--pc-mute);
}

.pretty-bag-list strong {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--pc-ink);
}

.pretty-money {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    padding-top: 4px;
}

.pretty-money > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--pc-mute);
}

.pretty-money b { color: var(--pc-ink); font-weight: 700; }

.pretty-due {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--pc-line);
    align-items: baseline;
}

.pretty-due span {
    font-size: 13px;
    font-weight: 700;
    color: var(--pc-ink);
}

.pretty-due b {
    font-family: 'Nunito', 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--pc-rose);
}

.pretty-due b small {
    font-family: 'Outfit', sans-serif;
    font-size: 0.5em;
    color: var(--pc-mute);
    margin-left: 2px;
}

.pretty-pay {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 15px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--pc-rose);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(234, 28, 38, 0.35);
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.pretty-pay:hover {
    background: var(--brand-red-dark, #c91820);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 40px rgba(234, 28, 38, 0.42);
}

.pretty-trust {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pretty-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--pc-bg);
    border: 1px solid var(--pc-line);
    font-size: 11px;
    font-weight: 600;
    color: var(--pc-mute);
}

.pretty-trust i { color: var(--pc-rose); }

.pretty-empty {
    max-width: 440px;
    margin: 40px auto 0;
    text-align: center;
    padding: 42px 28px;
    background: var(--pc-white);
    border: 1px solid var(--pc-line);
    border-radius: 28px;
    box-shadow: var(--brand-shadow, 0 20px 50px rgba(0, 0, 0, 0.08));
}

.pretty-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pc-rose-soft);
    border: 1px solid rgba(234, 28, 38, 0.15);
    color: var(--pc-rose);
    font-size: 1.4rem;
}

.pretty-empty h2 {
    font-family: 'Nunito', 'Outfit', sans-serif;
    margin: 0 0 8px;
    color: var(--pc-ink);
}

.pretty-empty p { color: var(--pc-mute); margin: 0 0 18px; }

.pretty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--pc-rose);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.pretty-btn:hover {
    background: var(--brand-red-dark, #c91820);
    color: #fff;
}

@media (max-width: 991px) {
    .pretty-grid { grid-template-columns: 1fr; }
    .pretty-aside { position: static; order: -1; }
}

@media (max-width: 640px) {
    .pretty-checkout { padding: 24px 0 56px; }
    .pretty-fields.two,
    .pretty-countries { grid-template-columns: 1fr; }
    .pretty-steps span:last-child { display: none; }
    .pretty-panel { padding: 18px; border-radius: 22px; }
}

/* ── Pretty payment page extras ── */
.pretty-wrap-pay {
    max-width: 1040px;
}

.pretty-grid-pay {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
}

.pretty-pay-page .pretty-pill {
    font-size: 14px;
}

.pretty-pay-delivery {
    padding: 8px 10px;
    background: var(--pc-bg, #f4f6f8);
    border: 1px solid var(--pc-line, #eeeeee);
    border-radius: 10px;
}

.pretty-pay-delivery p {
    margin: 0 0 2px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--pc-ink, #111);
}

.pretty-pay-delivery p:last-child {
    margin-bottom: 0;
}

.pretty-pay-delivery p:not(:first-child) {
    color: var(--pc-mute, #64748b);
}

.pretty-pay-note {
    margin-top: 4px !important;
    font-style: italic;
}

.pretty-pay-methods-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pretty-pay-page .pretty-pay-method {
    padding: 10px 12px;
    border-radius: 12px;
    gap: 10px;
}

.pretty-pay-page .pretty-pay-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.pretty-pay-page .pretty-pay-text strong {
    font-size: 13px;
}

.pretty-pay-page .pretty-pay-text small {
    display: none;
}

.pretty-pay-page .pretty-invoice-table-wrap {
    max-height: 240px;
}

.pretty-bag-compact {
    padding: 14px;
    border-radius: 18px;
    background: var(--pc-white, #fff);
    border: 1px solid var(--pc-line, #eeeeee);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.pretty-invoice-foot-stack {
    flex-direction: column;
    align-items: stretch;
    padding-top: 0;
    border-top: none;
    margin-bottom: 12px;
}

.pretty-invoice-foot-stack .pretty-invoice-foot-total {
    margin-left: 0;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--pc-line, #eeeeee);
}

.pretty-pay-sm {
    padding: 12px 14px;
    font-size: 13px;
}

.pretty-trust-sm {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--pc-line, #eeeeee);
}

.pretty-trust-sm span {
    padding: 4px 8px;
    font-size: 10px;
}

.pretty-pay-page .pretty-aside {
    top: 90px;
}

@media (max-width: 991px) {
    .pretty-grid-pay {
        grid-template-columns: 1fr;
    }

    .pretty-pay-page .pretty-aside {
        position: static;
        order: -1;
    }
}

@media (max-width: 640px) {
    .pretty-pay-methods-row {
        grid-template-columns: 1fr;
    }
}

.pretty-address {
    display: grid;
    gap: 14px;
}

.pretty-address-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    align-items: start;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--pc-line, #eeeeee);
}

.pretty-address-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pretty-address-row span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pc-mute, #64748b);
    padding-top: 2px;
}

.pretty-address-row strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--pc-ink, #111);
    line-height: 1.45;
}

.pretty-pay-methods {
    display: grid;
    gap: 12px;
}

.pretty-pay-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1.5px solid var(--pc-line, #eeeeee);
    background: var(--pc-bg, #f4f6f8);
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.pretty-pay-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pretty-pay-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--pc-line, #eeeeee);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.pretty-pay-icon img {
    max-width: 34px;
    height: auto;
}

.pretty-pay-icon-cod {
    color: var(--pc-rose, #ea1c26);
    font-size: 18px;
}

.pretty-pay-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pretty-pay-text strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--pc-ink, #111);
}

.pretty-pay-text small {
    font-size: 12px;
    color: var(--pc-mute, #64748b);
}

.pretty-pay-method .pretty-tick {
    margin-left: auto;
}

.pretty-pay-method:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(234, 28, 38, 0.1);
}

.pretty-pay-method.on {
    border-color: var(--pc-rose, #ea1c26);
    background: #fff;
    box-shadow: 0 12px 28px rgba(234, 28, 38, 0.12);
}

.pretty-pay-method.on .pretty-tick {
    background: var(--pc-rose, #ea1c26);
    border-color: var(--pc-rose, #ea1c26);
    color: #fff;
}

.pretty-review-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pretty-review-list li {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: var(--pc-bg, #f4f6f8);
    border: 1px solid var(--pc-line, #eeeeee);
}

.pretty-review-list strong {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--pc-ink, #111);
}

.pretty-pay-actions {
    margin-bottom: 12px;
}

.pretty-pay-actions #paypal-button-container {
    min-height: 48px;
}

/* PayPal checkout disabled — set data-paypal-enabled="true" on .pretty-pay-page to show */
.pretty-pay-page[data-paypal-enabled="false"] #paypal-button-container,
.pretty-pay-page[data-paypal-enabled="false"] label[for="paypal"] {
    display: none !important;
}

.pretty-pay-page[data-paypal-enabled="false"] .pretty-pay-methods-row {
    grid-template-columns: 1fr;
}

.pretty-back-link {
    display: inline-flex;
    margin-top: 4px;
    text-decoration: none;
}

@media (max-width: 640px) {
    .pretty-address-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* ── Pretty invoice / order complete ── */
.pretty-invoice-page {
    padding-bottom: 48px;
}

.pretty-wrap-narrow {
    max-width: 920px;
}

.pretty-head-compact {
    margin-bottom: 14px;
}

.pretty-head-compact .pretty-head-text h1 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.pretty-head-compact .pretty-sub {
    margin-top: 4px;
    font-size: 13px;
}

.pretty-success {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--pc-white, #fff);
    border: 1px solid var(--pc-line, #eeeeee);
    border-radius: 18px;
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.pretty-success-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.pretty-success-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, #ea1c26, #ff4d57);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(234, 28, 38, 0.28);
}

.pretty-success-copy {
    flex: 1;
    min-width: 0;
}

.pretty-success-copy .pretty-eyebrow {
    margin: 0 0 2px;
    padding: 0;
    font-size: 10px;
    border: none;
    background: transparent;
}

.pretty-success-copy h1 {
    margin: 0;
    font-family: 'Nunito', 'Outfit', sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pc-ink, #111);
    line-height: 1.2;
}

.pretty-success-copy h1 span {
    color: var(--pc-rose, #ea1c26);
}

.pretty-success-copy .pretty-sub {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.4;
    max-width: none;
}

.pretty-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.pretty-btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 999px;
}

.pretty-edit-sm {
    padding: 6px 10px;
    font-size: 11px;
}

.pretty-invoice {
    background: var(--pc-white, #fff);
    border: 1px solid var(--pc-line, #eeeeee);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.pretty-invoice-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--pc-line, #eeeeee);
}

.pretty-invoice-top {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--pc-line, #eeeeee);
}

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

.pretty-invoice-brand img {
    height: 32px;
    width: auto;
}

.pretty-invoice-brand p {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-brand h2 {
    margin: 0;
    font-family: 'Nunito', 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pc-ink, #111);
}

.pretty-invoice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pretty-invoice-chips span {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--pc-bg, #f4f6f8);
    border: 1px solid var(--pc-line, #eeeeee);
    font-size: 11px;
    font-weight: 600;
    color: var(--pc-mute, #64748b);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pretty-invoice-status.status-new { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.pretty-invoice-status.status-accepted { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.pretty-invoice-status.status-completed { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.pretty-invoice-status.status-canceled { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

.pretty-invoice-details {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--pc-bg, #f4f6f8);
    border: 1px solid var(--pc-line, #eeeeee);
    border-radius: 12px;
}

.pretty-invoice-details label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-details p {
    margin: 0 0 2px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--pc-ink, #111);
}

.pretty-invoice-details p:last-child {
    margin-bottom: 0;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-table-wrap {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 12px;
    border: 1px solid var(--pc-line, #eeeeee);
    border-radius: 12px;
}

.pretty-invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.pretty-invoice-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--pc-bg, #f4f6f8);
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pc-mute, #64748b);
    text-align: left;
    border-bottom: 1px solid var(--pc-line, #eeeeee);
}

.pretty-invoice-table thead th:nth-child(2),
.pretty-invoice-table thead th:nth-child(3),
.pretty-invoice-table tbody td:nth-child(2),
.pretty-invoice-table tbody td:nth-child(3) {
    text-align: right;
    white-space: nowrap;
}

.pretty-invoice-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--pc-line, #eeeeee);
    vertical-align: top;
    color: var(--pc-ink, #111);
}

.pretty-invoice-table tbody tr:last-child td {
    border-bottom: none;
}

.pretty-invoice-table tbody td strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.pretty-invoice-meta-line {
    display: block;
    font-size: 11px;
    line-height: 1.35;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-totals-compact {
    max-width: 280px;
    margin-left: auto;
    padding: 10px 12px;
    gap: 6px;
}

.pretty-invoice-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--pc-line, #eeeeee);
}

.pretty-invoice-foot-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 12px;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-foot-line b {
    color: var(--pc-ink, #111);
    font-weight: 700;
    margin-left: 4px;
}

.pretty-invoice-foot-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-left: auto;
    font-size: 12px;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-foot-total span {
    font-weight: 600;
}

.pretty-invoice-foot-total b {
    font-family: 'Nunito', 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pc-rose, #ea1c26);
    white-space: nowrap;
}

.pretty-warranty-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.pretty-warranty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #047857;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}

.pretty-warranty-btn:hover {
    background: #065f46;
}

.pretty-warranty-note {
    color: #047857;
    margin: 0;
    font-weight: 600;
}

.pretty-warranty-note a {
    color: #047857;
    text-decoration: underline;
}

.pretty-invoice-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
}

.pretty-invoice-meta div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.pretty-invoice-meta span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-meta strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--pc-ink, #111);
    word-break: break-word;
}

.pretty-invoice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.pretty-invoice-box {
    background: var(--pc-bg, #f4f6f8);
    border: 1px solid var(--pc-line, #eeeeee);
    border-radius: 20px;
    padding: 18px 20px;
}

.pretty-invoice-box h3 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-box p {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--pc-ink, #111);
    line-height: 1.45;
}

.pretty-invoice-box .pretty-address-row {
    border-bottom-color: rgba(0,0,0,0.06);
    grid-template-columns: 70px 1fr;
    padding-bottom: 8px;
    margin-bottom: 0;
}

.pretty-invoice-box .pretty-address-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pretty-invoice-total {
    color: var(--pc-rose, #ea1c26) !important;
}

.pretty-invoice-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.pretty-invoice-items-head,
.pretty-invoice-item {
    display: grid;
    grid-template-columns: 1fr 70px 120px;
    gap: 12px;
    align-items: center;
}

.pretty-invoice-items-head {
    padding: 0 14px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-items-head span:nth-child(2),
.pretty-invoice-items-head span:nth-child(3),
.pretty-invoice-qty,
.pretty-invoice-price {
    text-align: right;
}

.pretty-invoice-item {
    padding: 14px;
    background: var(--pc-bg, #f4f6f8);
    border: 1px solid var(--pc-line, #eeeeee);
    border-radius: 18px;
}

.pretty-invoice-item-info strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--pc-ink, #111);
    margin-bottom: 6px;
}

.pretty-invoice-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.pretty-invoice-tags span {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--pc-line, #eeeeee);
    font-size: 11px;
    font-weight: 600;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-item-info small {
    font-size: 12px;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-qty,
.pretty-invoice-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--pc-ink, #111);
}

.pretty-invoice-totals {
    max-width: 340px;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    background: var(--pc-bg, #f4f6f8);
    border: 1px solid var(--pc-line, #eeeeee);
    border-radius: 18px;
}

.pretty-invoice-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-totals b {
    color: var(--pc-ink, #111);
    font-weight: 700;
}

.pretty-invoice-totals .pretty-due {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px dashed var(--pc-line, #eeeeee);
    align-items: baseline;
}

.pretty-invoice-totals .pretty-due span {
    font-weight: 700;
    color: var(--pc-ink, #111);
}

.pretty-invoice-totals .pretty-due b {
    font-family: 'Nunito', 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--pc-rose, #ea1c26);
}

.pretty-invoice-totals .pretty-due b small {
    font-size: 0.5em;
    color: var(--pc-mute, #64748b);
}

.pretty-invoice-thanks {
    margin: 22px 0 0;
    text-align: center;
    font-size: 14px;
    color: var(--pc-mute, #64748b);
}

@media (max-width: 768px) {
    .pretty-invoice-grid {
        grid-template-columns: 1fr;
    }

    .pretty-invoice-items-head,
    .pretty-invoice-item {
        grid-template-columns: 1fr 50px 90px;
    }

    .pretty-invoice {
        padding: 18px;
        border-radius: 22px;
    }

    .pretty-success {
        padding: 12px 14px;
        border-radius: 16px;
    }

    .pretty-success-actions {
        width: 100%;
    }
}

@media print {
    .pretty-blobs,
    .pretty-success-actions,
    .header-section,
    .footer-section,
    nav {
        display: none !important;
    }

    .pretty-checkout {
        background: #fff !important;
        padding: 0 !important;
    }

    .pretty-invoice,
    .pretty-success {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
