/* ==========================================================================
   Storefront Redesign - Apple-like Premium B2B
   ========================================================================== */

:root {
    --apple-bg: #f5f5f7;
    --apple-surface: #ffffff;
    --apple-text: #1d1d1f;
    --apple-muted: #86868b;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-border: #d2d2d7;
    --apple-border-light: #e5e5ea;
}

body:not(:has(.admin-shell)) {
    --sf-pro: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-family: var(--sf-pro);
    background-color: var(--apple-bg);
    color: var(--apple-text);
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
    --primary: var(--apple-blue);
    --primary-hover: var(--apple-blue-hover);
    --primary-active: #0058b0;
    --border-light: var(--apple-border-light);
    --border: var(--apple-border);
}

body:not(:has(.admin-shell)):has(.catalog-layout) {
    background-color: #f2f7fc;
}

body:not(:has(.admin-shell)) h1,
body:not(:has(.admin-shell)) h2,
body:not(:has(.admin-shell)) h3,
body:not(:has(.admin-shell)) h4 {
    font-family: var(--sf-pro);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--apple-text);
}

body:not(:has(.admin-shell)) a {
    color: var(--primary);
    text-decoration: none;
}
body:not(:has(.admin-shell)) a:hover {
    text-decoration: underline;
}

/* Header */
body:not(:has(.admin-shell)) .app-header {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 3px solid #363b43;
    border-bottom: 1px solid #dfe5ec;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: none;
}

body:not(:has(.admin-shell)) .app-header .nav-link {
    color: var(--apple-text);
    font-weight: 500;
    font-size: 0.875rem;
}
body:not(:has(.admin-shell)) .app-header .nav-link:hover {
    color: var(--primary);
}

/* Buttons */
body:not(:has(.admin-shell)) .btn {
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    font-size: 0.9375rem;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body:not(:has(.admin-shell)) .btn-primary {
    background-color: var(--primary);
    color: white;
}

body:not(:has(.admin-shell)) .btn-primary:hover {
    background-color: var(--primary-hover);
    text-decoration: none;
}

body:not(:has(.admin-shell)) .btn-outline {
    background-color: transparent;
    color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

body:not(:has(.admin-shell)) .btn-outline:hover {
    background-color: var(--primary);
    color: white;
    text-decoration: none;
}

/* Inputs */
body:not(:has(.admin-shell)) .form-control {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #fff;
    transition: all 0.2s ease;
}

body:not(:has(.admin-shell)) .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.2);
}

/* Grid View */
body:not(:has(.admin-shell)) .product-container.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

/* Product Cards */
body:not(:has(.admin-shell)) .part-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

body:not(:has(.admin-shell)) .part-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

body:not(:has(.admin-shell)) .part-img-link {
    background: #ffffff;
    padding: 0;
    display: block;
    aspect-ratio: 1 / 1;
    width: 100% !important;
    height: auto !important;
    min-height: 120px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

body:not(:has(.admin-shell)) .part-img-link img {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90% !important;
    height: 90% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.05));
    transition: transform 0.2s ease;
}
body:not(:has(.admin-shell)) .part-img-link:hover img {
    transform: scale(1.05);
}

body:not(:has(.admin-shell)) .part-main {
    padding: 0 1rem 1rem 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

body:not(:has(.admin-shell)) .part-meta {
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

body:not(:has(.admin-shell)) .part-quality {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #e56000;
    background: transparent;
    padding: 0;
}
body:not(:has(.admin-shell)) .part-type-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--apple-muted);
}

body:not(:has(.admin-shell)) .part-name {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

body:not(:has(.admin-shell)) .part-name a {
    color: var(--apple-text);
}
body:not(:has(.admin-shell)) .part-name a:hover {
    text-decoration: none;
    color: var(--primary);
}

body:not(:has(.admin-shell)) .part-stock {
    font-size: 0.875rem;
    color: var(--apple-muted);
    margin-bottom: auto;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
body:not(:has(.admin-shell)) .part-stock .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
body:not(:has(.admin-shell)) .stock-ok .status-dot { background: #34c759; }
body:not(:has(.admin-shell)) .stock-low .status-dot { background: #ff9f0a; }
body:not(:has(.admin-shell)) .stock-out .status-dot { background: #ff3b30; }

body:not(:has(.admin-shell)) .part-buy-area {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: none;
    margin-top: auto;
}

body:not(:has(.admin-shell)) .part-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--apple-text);
}

body:not(:has(.admin-shell)) .part-action {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

body:not(:has(.admin-shell)) .part-qty {
    width: 60px;
    padding: 0.4rem;
    text-align: center;
    font-size: 0.875rem;
}

body:not(:has(.admin-shell)) .part-add-btn {
    flex-grow: 1;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

/* List View overrides */
body:not(:has(.admin-shell)) .product-container.view-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
body:not(:has(.admin-shell)) .product-container.view-list .part-card {
    flex-direction: row;
    align-items: stretch;
    height: auto;
}
body:not(:has(.admin-shell)) .product-container.view-list .part-img-link {
    width: 140px !important;
    flex: 0 0 140px;
    padding: 0.75rem;
    border-right: 1px solid var(--border-light);
}
body:not(:has(.admin-shell)) .product-container.view-list .part-main {
    padding: 1rem;
    justify-content: center;
}
body:not(:has(.admin-shell)) .product-container.view-list .part-buy-area {
    width: 180px !important;
    border-left: 1px solid var(--border-light);
    justify-content: center;
    padding: 1rem;
}

/* Home search specific */
.instant-home {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.instant-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.instant-intro h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.2;
}

.intro-help {
    text-align: right;
    font-size: 0.875rem;
}

.instant-search {
    margin: 1rem 0;
    max-width: 680px;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-container svg {
    position: absolute;
    left: 1rem;
    color: var(--apple-muted);
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.instant-home .search-input-container input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem !important;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}

.search-input-container input:focus {
    box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 0 0 4px rgba(0,113,227,0.2);
    outline: none;
}

.instant-categories-strip {
    margin: 1rem 0;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}
.instant-categories-strip::-webkit-scrollbar {
    display: none;
}

.instant-category-options {
    display: flex;
    gap: 0.5rem;
}

.instant-category-options button {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid var(--border-light);
    cursor: pointer;
    font-family: var(--sf-pro);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--apple-text);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transition: all 0.2s;
    min-width: 0;
}

.instant-category-options button:hover,
.instant-category-options button[aria-pressed="true"] {
    background: var(--apple-bg);
    border-color: var(--apple-text);
}

.instant-category-options button .cat-icon {
    display: none;
}

/* Device Models Section */
.instant-models {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.02);
    border: 1px solid var(--border-light);
}

.instant-model-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.instant-model-title h2 {
    font-size: 1.25rem;
    margin: 0;
}

.instant-family-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.instant-family-options button {
    background: #f5f5f7;
    border: 1px solid transparent;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    transition: all 0.2s;
    color: var(--apple-text);
    width: 100%;
}

.instant-family-options button small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--apple-muted);
}

.instant-family-options button:not([aria-pressed="true"]):hover {
    background: #e8e8ed;
    box-shadow: inset 0 0 0 1px #c7c7cc;
}
.instant-family-options button[aria-pressed="true"] {
    background: #1d1d1f;
    color: #fff;
}
.instant-family-options button[aria-pressed="true"] small {
    color: #a1a1a6;
}

.instant-model-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.instant-model-options button {
    background: #f5f5f7;
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    color: var(--apple-text);
}

.instant-model-options button:hover,
.instant-model-options button[aria-pressed="true"] {
    background: #fff;
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.instant-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}
.instant-selection:empty {
    display: none;
}

.instant-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0 1rem 0;
    gap: 1rem;
}
.instant-results-heading h2 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 600;
}
.results-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.instant-all-results {
    margin-top: 1.5rem;
    text-align: center;
}
[data-home-refine] {
    display: flex;
    gap: 0.5rem;
}
[data-home-refine] select {
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: #fff;
}

/* Product Detail Page Overrides */
body:not(:has(.admin-shell)) .product-detail-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5rem;
    padding: 2rem 0;
}
body:not(:has(.admin-shell)) .product-detail-layout > * {
    min-width: 0;
}
body:not(:has(.admin-shell)) .product-gallery {
    position: sticky;
    top: 100px;
}
body:not(:has(.admin-shell)) .main-image-container {
    background: #fff;
    border-radius: 32px;
    padding: 4rem;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 30px rgba(0,0,0,0.03);
    margin-bottom: 1.5rem;
    border: none;
    width: 100%;
    cursor: zoom-in;
}
body:not(:has(.admin-shell)) .main-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
body:not(:has(.admin-shell)) .gallery-thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}
body:not(:has(.admin-shell)) .gallery-thumb {
    width: 90px;
    height: 90px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
body:not(:has(.admin-shell)) .gallery-thumb:hover {
    border-color: var(--primary);
}
body:not(:has(.admin-shell)) .product-info {
    padding-top: 1rem;
}
body:not(:has(.admin-shell)) .product-title-lg {
    font-family: inherit;
    font-size: clamp(1.75rem, 2.4vw, 2.25rem);
    line-height: 1.18;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.875rem;
    overflow-wrap: anywhere;
}
body:not(:has(.admin-shell)) .product-price-lg {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
}
body:not(:has(.admin-shell)) .purchase-box {
    background: #fff;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(0,0,0,0.04);
    margin-bottom: 3rem;
    border: none;
}
body:not(:has(.admin-shell)) .purchase-controls {
    display: flex;
    gap: 1rem;
}
body:not(:has(.admin-shell)) .purchase-controls .btn {
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
}
body:not(:has(.admin-shell)) .product-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--apple-text);
}

/* Category Page Overrides */
body:not(:has(.admin-shell)) .catalog-heading {
    text-align: center;
    padding: 2rem 0;
}
body:not(:has(.admin-shell)) .catalog-heading h1 {
    font-size: 2rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}
body:not(:has(.admin-shell)) .catalog-description {
    font-size: 1rem;
    color: var(--apple-muted);
}
body:not(:has(.admin-shell)) .catalog-layout {
    display: flex;
    gap: 2rem;
}
body:not(:has(.admin-shell)) .catalog-refine-row {
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}
body:not(:has(.admin-shell)) .catalog-tool-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
}
body:not(:has(.admin-shell)) .catalog-tool-field select {
    border: none;
    background: #f5f5f7;
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

/* Category Rails */
/* Category Models Section */

/* Cart & Checkout */
body:not(:has(.admin-shell)) .commerce-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}
body:not(:has(.admin-shell)) .cart-list {
    background: transparent;
    border: none;
    box-shadow: none;
}
body:not(:has(.admin-shell)) .cart-item {
    display: flex;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
    gap: 2rem;
    background: #fff;
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
body:not(:has(.admin-shell)) .cart-item-img {
    width: 140px;
    height: 140px;
    background: #f5f5f7;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
body:not(:has(.admin-shell)) .cart-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
body:not(:has(.admin-shell)) .cart-sidebar .summary-card,
body:not(:has(.admin-shell)) .checkout-sidebar .summary-card {
    background: #fff;
    border-radius: 32px;
    padding: 3rem;
    box-shadow: 0 4px 30px rgba(0,0,0,0.04);
    position: sticky;
    top: 100px;
}
body:not(:has(.admin-shell)) .summary-card h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}
body:not(:has(.admin-shell)) .summary-row {
    font-size: 1.125rem;
}

/* Checkout specific */
body:not(:has(.admin-shell)) .checkout-step {
    background: #fff;
    border-radius: 32px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 30px rgba(0,0,0,0.03);
}
body:not(:has(.admin-shell)) .step-header {
    margin-bottom: 2.5rem;
}
body:not(:has(.admin-shell)) .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.125rem;
}
body:not(:has(.admin-shell)) .step-header h3 {
    font-size: 1.75rem;
}

body:not(:has(.admin-shell)) .address-card,
body:not(:has(.admin-shell)) .payment-card {
    background: #f5f5f7;
    border-radius: 20px;
    padding: 2rem;
}
body:not(:has(.admin-shell)) .address-card.selected,
body:not(:has(.admin-shell)) .payment-card.selected {
    box-shadow: 0 4px 20px rgba(0,113,227,0.15);
}

/* Auth Pages */
body:not(:has(.admin-shell)) .auth-wrapper {
    min-height: 75vh;
}
body:not(:has(.admin-shell)) .auth-card {
    background: #fff;
    border-radius: 32px;
    padding: 4rem;
    max-width: 480px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}
body:not(:has(.admin-shell)) .auth-header h2 {
    font-size: 2.25rem;
}

body:not(:has(.admin-shell)) .auth-card-login {
    max-width: 420px;
    padding: 34px 36px 30px;
    border: 1px solid #e1e7ef;
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(24, 39, 60, .09);
}
body:not(:has(.admin-shell)) .auth-login-header {
    margin-bottom: 26px;
}
body:not(:has(.admin-shell)) .auth-brand-logo {
    display: block;
    width: auto;
    height: 48px;
    max-width: min(100%, 230px);
    margin: 0 auto 24px;
}
body:not(:has(.admin-shell)) .auth-card-login .auth-header h2 {
    margin: 0 0 7px;
    font-size: 1.875rem;
    line-height: 1.15;
    letter-spacing: -.025em;
}
body:not(:has(.admin-shell)) .auth-card-login .auth-header p {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.45;
}
body:not(:has(.admin-shell)) .auth-card-login .auth-form {
    display: grid;
    gap: 18px;
}
body:not(:has(.admin-shell)) .auth-card-login .form-group {
    margin: 0;
}
body:not(:has(.admin-shell)) .auth-card-login .form-label {
    margin-bottom: 7px;
    color: #46566c;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .055em;
}
body:not(:has(.admin-shell)) .auth-card-login .form-control {
    min-height: 46px;
    padding: 10px 13px;
    border-color: #d5dde7;
    border-radius: 10px;
    background: #fff;
    font-size: .9375rem;
}
body:not(:has(.admin-shell)) .auth-card-login .form-control:focus {
    border-color: #6aa5e8;
    box-shadow: 0 0 0 3px rgba(40, 120, 237, .12);
}
body:not(:has(.admin-shell)) .auth-card-login .auth-link {
    font-size: .75rem;
    letter-spacing: 0;
    text-transform: none;
}
body:not(:has(.admin-shell)) .auth-card-login .auth-submit {
    min-height: 46px;
    margin-top: 4px;
    border-radius: 10px;
    font-size: .9375rem;
    box-shadow: 0 5px 14px rgba(0, 113, 227, .18);
}
body:not(:has(.admin-shell)) .auth-login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #edf1f5;
    line-height: 1.45;
}
@media (max-width: 520px) {
    body:not(:has(.admin-shell)) .auth-wrapper {
        align-items: flex-start;
        padding: 20px 14px 32px;
    }
    body:not(:has(.admin-shell)) .auth-card-login {
        padding: 28px 22px 24px;
        border-radius: 18px;
    }
    body:not(:has(.admin-shell)) .auth-brand-logo {
        height: 44px;
        margin-bottom: 21px;
    }
}

body:not(:has(.admin-shell)) .registration-wrapper {
    align-items: flex-start;
    padding-top: 42px;
    padding-bottom: 64px;
}
body:not(:has(.admin-shell)) .registration-card {
    max-width: 920px;
    padding: 40px 48px 38px;
    border: 1px solid #e1e7ef;
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(24, 39, 60, .08);
}
body:not(:has(.admin-shell)) .registration-header {
    margin-bottom: 32px;
}
body:not(:has(.admin-shell)) .registration-header .auth-brand-logo {
    height: 46px;
    margin-bottom: 22px;
}
body:not(:has(.admin-shell)) .registration-header h2 {
    margin: 0 0 7px;
    font-size: 2rem;
    letter-spacing: -.03em;
}
body:not(:has(.admin-shell)) .registration-header p {
    margin: 0 0 8px;
    font-size: .9375rem;
}
body:not(:has(.admin-shell)) .registration-header small {
    color: #8290a3;
    font-size: .75rem;
}
.registration-section {
    padding: 24px 0;
    border-top: 1px solid #e8edf3;
}
.registration-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}
.registration-section-heading > span {
    display: grid;
    place-items: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eaf3ff;
    color: #1768c5;
    font-size: .75rem;
    font-weight: 800;
}
.registration-section-heading h3 {
    margin: 1px 0 3px;
    color: #172033;
    font-size: 1rem;
}
.registration-section-heading p {
    margin: 0;
    color: #718096;
    font-size: .8125rem;
    line-height: 1.45;
}
.registration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}
.registration-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
.registration-field > span {
    color: #46566c;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.registration-field .form-control {
    width: 100%;
    height: 46px;
    min-height: 46px;
    margin: 0;
    border-color: #d5dde7;
    border-radius: 11px;
    font-size: .875rem;
    background: #fbfcfe;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.registration-field .form-control:focus {
    border-color: #2180de;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(33, 128, 222, .11);
}
.registration-field small {
    color: #77869a;
    font-size: .75rem;
    line-height: 1.4;
}
.registration-span-2 {
    grid-column: span 2;
}
.registration-street {
    grid-column: span 1;
}
.registration-city {
    grid-column: span 2;
}
.registration-tax-field {
    grid-column: 1 / -1;
}
.registration-country-help {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f5f7fa;
}
.registration-country-help.swiss {
    background: #eef6ff;
    color: #245786;
}
.registration-consents {
    display: grid;
    gap: 12px;
    padding: 20px 0 4px;
    border-top: 1px solid #e8edf3;
}
.registration-consents label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #536176;
    font-size: .8125rem;
    line-height: 1.45;
}
.registration-consents input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: #0878e5;
}
body:not(:has(.admin-shell)) .registration-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    margin-top: 24px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0878e5 0%, #1263c8 100%);
    font-size: .9375rem;
    font-weight: 750;
    box-shadow: 0 10px 24px rgba(18, 99, 200, .24);
    transition: transform .18s ease, box-shadow .18s ease;
}
body:not(:has(.admin-shell)) .registration-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(18, 99, 200, .3);
}
body:not(:has(.admin-shell)) .registration-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #edf1f5;
}
@media (max-width: 720px) {
    body:not(:has(.admin-shell)) .registration-wrapper {
        padding: 20px 12px 40px;
    }
    body:not(:has(.admin-shell)) .registration-card {
        padding: 28px 20px 24px;
        border-radius: 18px;
    }
    .registration-grid,
    .registration-address-grid {
        grid-template-columns: 1fr;
    }
    .registration-span-2,
    .registration-street,
    .registration-city,
    .registration-tax-field {
        grid-column: 1;
    }
}

/* Tables & Standard Lists (Cart, Orders, etc) */
body:not(:has(.admin-shell)) .table {
    width: 100%;
    border-collapse: collapse;
}
body:not(:has(.admin-shell)) .table th {
    text-align: left;
    padding: 1rem;
    color: var(--apple-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
}
body:not(:has(.admin-shell)) .table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
body:not(:has(.admin-shell)) .alert {
    border-radius: 16px;
    padding: 1rem 1.5rem;
    border: none;
}
body:not(:has(.admin-shell)) .alert.warning {
    background: #fff8e1;
    color: #8f6c00;
}
body:not(:has(.admin-shell)) .alert.error {
    background: #ffe5e5;
    color: #c90000;
}
body:not(:has(.admin-shell)) .alert.success {
    background: #e5ffe5;
    color: #008f00;
}
.main-content:not(:has(.admin-shell)) .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    body:not(:has(.admin-shell)) .app-header .header-inner {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.75rem;
        height: auto;
        min-height: 60px;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    body:not(:has(.admin-shell)) .app-header .logo { grid-column: 1; grid-row: 1; }
    body:not(:has(.admin-shell)) .app-header .user-nav {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        gap: 0.75rem !important;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    body:not(:has(.admin-shell)) .app-header .user-nav .btn { padding: 0.6rem 0.875rem; font-size: 0.8125rem; }
    body:not(:has(.admin-shell)) .app-header .search-bar {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        max-width: none !important;
        margin: 0 !important;
    }
    body:not(:has(.admin-shell)) .app-header .search-bar input { min-width: 0; }
    .instant-intro { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .instant-intro h1 { font-size: 2.25rem; white-space: normal; overflow-wrap: break-word; }
    .instant-results-heading h2 { font-size: 2rem; white-space: normal; overflow-wrap: break-word; }

    body:not(:has(.admin-shell)) .product-detail-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }
    body:not(:has(.admin-shell)) .product-gallery { position: static; }
    body:not(:has(.admin-shell)) .main-image-container { padding: 1.5rem; }
    body:not(:has(.admin-shell)) .product-title-lg { font-size: clamp(1.6rem, 6.5vw, 2rem); }
    body:not(:has(.admin-shell)) .purchase-box { padding: 1.25rem; }
    body:not(:has(.admin-shell)) .purchase-controls { flex-wrap: wrap; }
    body:not(:has(.admin-shell)) .purchase-controls .btn { min-width: 0; white-space: normal; }
    body:not(:has(.admin-shell)) .category-models { padding: 1rem; }
    body:not(:has(.admin-shell)) .device-family-choice { padding: 0.75rem; }
    body:not(:has(.admin-shell)) .category-model-choice { padding: 0.5rem 0.75rem; gap: 0.5rem; font-size: 0.8125rem; }
    body:not(:has(.admin-shell)) .catalog-heading { padding: 1rem 0; }
    body:not(:has(.admin-shell)) .catalog-heading h1 { font-size: 1.5rem; }
    body:not(:has(.admin-shell)) .quick-categories { justify-content: flex-start; }
    body:not(:has(.admin-shell)) .commerce-layout {
        grid-template-columns: 1fr;
    }
    body:not(:has(.admin-shell)) .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    body:not(:has(.admin-shell)) .cart-item-img {
        width: 100%;
        height: 200px;
    }
    body:not(:has(.admin-shell)) .catalog-layout {
        flex-direction: column;
    }
    body:not(:has(.admin-shell)) .catalog-refine-row {
        flex-direction: column;
        align-items: stretch;
        border-radius: 20px;
    }
    body:not(:has(.admin-shell)) .product-container.view-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.5rem;
    }
    body:not(:has(.admin-shell)) .product-container.view-list .part-card {
        flex-direction: column;
    }
    body:not(:has(.admin-shell)) .product-container.view-list .part-img-link {
        width: 100% !important;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    body:not(:has(.admin-shell)) .product-container.view-list .part-buy-area {
        width: 100% !important;
        border-left: none;
        border-top: 1px solid var(--border-light);
    }
    .instant-models {
        padding: 2rem 1.5rem;
    }
    .instant-family-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .instant-family-options button {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    .instant-model-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .instant-model-options button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    .main-image-container {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Footer Redesign
   ========================================================================== */
body:not(:has(.admin-shell)) .app-footer {
    background-color: var(--apple-surface);
    color: var(--apple-text);
    border-top: 1px solid var(--border-light);
    margin-top: 4rem;
}

body:not(:has(.admin-shell)):has(.lp) .app-footer {
    margin-top: 2rem;
}

body:not(:has(.admin-shell)) .footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.45fr) repeat(4, minmax(130px, 1fr));
    gap: clamp(1.5rem, 3vw, 3rem);
    padding: 3rem 0;
}

body:not(:has(.admin-shell)) .footer-service-strip {
    border-bottom: 1px solid var(--border-light);
    background: #f7faff;
}

body:not(:has(.admin-shell)) .footer-service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body:not(:has(.admin-shell)) .footer-service-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-height: 92px;
    padding: 1.25rem clamp(1rem, 2.5vw, 2rem);
    border-right: 1px solid var(--border-light);
}

body:not(:has(.admin-shell)) .footer-service-item:first-child { padding-left: 0; }
body:not(:has(.admin-shell)) .footer-service-item:last-child { border-right: 0; }
body:not(:has(.admin-shell)) .footer-service-item svg {
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: #1768d4;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body:not(:has(.admin-shell)) .footer-service-item span { display: grid; gap: 0.2rem; }
body:not(:has(.admin-shell)) .footer-service-item strong { color: #17283d; font-size: 0.9rem; font-weight: 650; }
body:not(:has(.admin-shell)) .footer-service-item small { color: #68778b; font-size: 0.8rem; line-height: 1.35; }

body:not(:has(.admin-shell)) .footer-logo {
    display: block;
    width: clamp(200px, 18vw, 240px);
    max-width: 100%;
    height: auto;
    margin-bottom: 1.25rem;
    filter: none;
    opacity: 1;
}

body:not(:has(.admin-shell)) .footer-brand p {
    color: #5b6779;
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 340px;
}

body:not(:has(.admin-shell)) .footer-brand .footer-business-note {
    margin-top: 1rem;
    padding-left: 0.85rem;
    border-left: 2px solid #b9d8fb;
    color: #68778b;
    font-size: 0.8125rem;
}

body:not(:has(.admin-shell)) .footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--apple-text);
    margin-bottom: 1.25rem;
    text-transform: none;
    letter-spacing: -0.012em;
}

body:not(:has(.admin-shell)) .footer-links a {
    display: block;
    color: #5b6779;
    font-size: 0.9375rem;
    margin-bottom: 0.875rem;
    transition: color 0.2s ease;
}

body:not(:has(.admin-shell)) .footer-links a:hover {
    color: #1768d4;
    text-decoration: none;
}

body:not(:has(.admin-shell)) .footer-links p.text-muted.small {
    color: #5b6779;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

body:not(:has(.admin-shell)) .footer-bottom {
    background: transparent;
    border-top: 1px solid var(--border-light);
    padding: 1.5rem 0;
    text-align: left;
    color: #5b6779;
    font-size: 0.8125rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

body:not(:has(.admin-shell)) .footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 900px) {
    body:not(:has(.admin-shell)) .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem;
        padding: 2.5rem 0;
    }

    body:not(:has(.admin-shell)) .footer-brand { grid-column: 1 / -1; }
    body:not(:has(.admin-shell)) .footer-service-grid { grid-template-columns: 1fr; }
    body:not(:has(.admin-shell)) .footer-service-item,
    body:not(:has(.admin-shell)) .footer-service-item:first-child {
        min-height: 0;
        padding: 1rem 0;
        border-right: 0;
        border-bottom: 1px solid var(--border-light);
    }
    body:not(:has(.admin-shell)) .footer-service-item:last-child { border-bottom: 0; }
    body:not(:has(.admin-shell)) .footer-bottom-inner { align-items: flex-start; flex-direction: column; }

    body:not(:has(.admin-shell)) .footer-logo {
        width: min(220px, 100%);
    }
}

@media (max-width: 560px) {
    body:not(:has(.admin-shell)) .footer-grid { grid-template-columns: 1fr; }
    body:not(:has(.admin-shell)) .footer-brand { grid-column: auto; }
}
