/* Public Site Minimal CSS - Replaces Tailwind (~10KB vs ~150KB) */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 5rem;
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 2rem;
        gap: 2rem;
    }
}

.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .header-top-row {
        display: grid;
        grid-template-columns: 200px 1fr 200px;
        align-items: center;
        gap: 2rem;
    }
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .header-right-group {
        justify-self: end;
        order: 3;
    }
}

.header-nav-container {
    flex: 1;
    min-width: 0;
}

@media (min-width: 1024px) {
    .header-nav-container {
        order: 2;
        padding-left: 0;
        border-left: none;
        display: flex;
        justify-content: center;
    }
}

.logo {
    width: 2.75rem;
    height: 2.75rem;
    background: #4f46e5;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: #4b5563;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: #f3f4f6;
}

.cart-button {
    position: relative;
    padding: 0.5rem 1rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cart-button:hover {
    background-color: #4338ca;
}

.cart-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 1.25rem;
    text-align: center;
}

/* Brand Grid (Homepage) */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
}

@media (min-width: 640px) {
    .brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .brand-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.brand-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s;
}

.brand-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.brand-link {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.brand-link:hover {
    background-color: #f9fafb;
}

.brand-image-wrapper {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.brand-logo-placeholder {
    color: #9ca3af;
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-info {
    flex: 1;
    min-width: 0;
}

.brand-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.125rem;
}

.model-count-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4f46e5;
    background-color: #eef2ff;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.product-count-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.dot {
    font-size: 10px;
    color: #d1d5db;
}

/* Home page brand card: counts, "popular models" and the link to all models next to the name */
/* Same header height on every card in a row, so the model lists line up (longest name: Motorola) */
.brand-card-top {
    min-height: 100px;
}
@media (min-width: 640px) {
    .brand-card-top {
        min-height: 170px;
    }
}
.brand-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 12px 14px;
    min-width: 0;
}
.brand-card-counts {
    font-size: 0.6875rem;
    line-height: 1.25;
    color: #6b7280;
    text-align: center;
    white-space: pre-line;
}
.brand-card-popular {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}
.brand-card-all {
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 12px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.brand-card-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
/* Full width of the card; the arrow sits at the right edge */
.brand-card-all {
    align-self: stretch;
    justify-content: flex-start;
}
.brand-card-all > span[aria-hidden] {
    margin-left: 0;
}
/* Button text, count and arrow, and the "Popular models" label, sit at the right */
.brand-card-all { justify-content: flex-end; }
/* The copy under the popular models list */
.brand-card-all.brand-card-all-bottom { margin-top: 0.5rem; }
.brand-card-popular { align-self: flex-end; text-align: right; }
/* Three popular products under the "All models" button */
.brand-card-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px;
}
.brand-card-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    min-width: 0;
}
.brand-card-product-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.brand-card-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}
.brand-card-product:hover .brand-card-product-img {
    border-color: #a5b4fc;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.12);
}
.brand-card-product-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 2px #fff;
}
.brand-card-product-dot.is-arriving {
    background: #2563eb;
}
.brand-card-all-count {
    padding: 1px 7px;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}
.brand-card-popular {
    margin-top: 4px;
}
.brand-card-all:hover {
    background: #e0e7ff;
}
.model-mini-chevron {
    color: #9ca3af;
    font-size: 1.125rem;
    line-height: 1;
    margin-left: 2px;
    transition: transform 0.15s, color 0.15s;
}
.model-mini-link:hover .model-mini-chevron {
    color: #4f46e5;
    transform: translateX(2px);
}

/* Model Mini List */
.model-mini-list {
    background-color: #f8fafc;
    padding: 0.625rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 0.625rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.model-links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.model-mini-link {
    display: block;
    padding: 0.5rem 0.625rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

.model-mini-link:hover {
    border-color: #cbd5e1;
    background-color: #f9fafb;
}

.model-mini-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-mini-name {
    font-size: 0.875rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0.5rem;
}

.model-mini-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Same pill as the "All models" count, grey */
.model-mini-count {
    flex-shrink: 0;
    min-width: 2.6rem; /* same width in every row, so the arrows line up */
    text-align: center;
    padding: 1px 7px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 700;
}

.no-models-msg {
    text-align: center;
    color: #9ca3af;
    font-size: 0.75rem;
    padding: 0.5rem 0;
}

/* Brand Page Layout */
.brand-page-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.model-group-section {
    display: flex;
    gap: 2rem;
    position: relative;
}

.model-group-title-wrapper {
    width: 4rem;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 1rem;
}

.model-group-title {
    position: sticky;
    top: 6rem;
    transform: rotate(-180deg);
    font-weight: 900;
    color: #d1d5db;
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    white-space: nowrap;
    text-transform: uppercase;
    user-select: none;
    opacity: 0.4;
    transition: opacity 0.2s;
    writing-mode: vertical-rl;
}

.model-group-section:hover .model-group-title {
    opacity: 1;
}

.model-grid-container {
    flex: 1;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .model-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .model-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .model-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.model-card {
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.2s;
}

.model-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #a5b4fc;
}

.model-card-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: #111827;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.model-card-count {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 2rem 0;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    position: relative;
    display: block;
}

.product-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    aspect-ratio: 1;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image {
    object-fit: contain;
    width: 100%;
    height: 100%;
    padding: 1rem;
}

.product-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.5rem;
    font-weight: bold;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.badge-r2 {
    background: #10b981;
    color: white;
}

.badge-tf {
    background: #f97316;
    color: white;
}

.out-of-stock {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-title {
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    color: white;
    font-weight: bold;
    font-size: 1.125rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

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

.justify-items-center {
    justify-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-col {
    flex-direction: column;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Spacing */
.space-y-1\.5> :not([hidden])~ :not([hidden]) {
    margin-top: 0.375rem;
}

.space-y-4> :not([hidden])~ :not([hidden]) {
    margin-top: 1rem;
}

/* Margins */
.mx-2 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

/* Padding */
.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-1\.5 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.pt-8 {
    padding-top: 2rem;
}

/* Sizing */
.w-5 {
    width: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.w-10 {
    width: 2.5rem;
}

.w-16 {
    width: 4rem;
}

.h-5 {
    height: 1.25rem;
}

.h-6 {
    height: 1.5rem;
}

.h-10 {
    height: 2.5rem;
}

.h-16 {
    height: 4rem;
}

.h-full {
    height: 100%;
}

.w-full {
    width: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

/* Core Layout Content */
.main-content {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
    width: 100%;
    min-width: 0;
}

@media (min-width: 640px) {
    .main-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .main-content {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Colors - Text */
.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-900 {
    color: #111827;
}

.text-indigo-600 {
    color: #4f46e5;
}

.text-indigo-800 {
    color: #3730a3;
}

.text-red-600 {
    color: #dc2626;
}

.text-green-600 {
    color: #16a34a;
}

.text-green-500 {
    color: #22c55e !important;
}

.text-yellow-500 {
    color: #eab308 !important;
}

.text-white {
    color: #ffffff;
}

/* Colors - Background */
.bg-white {
    background-color: #ffffff;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-indigo-50 {
    background-color: #eef2ff;
}

.bg-indigo-600 {
    background-color: #4f46e5;
}

/* Borders */
.border {
    border-width: 1px;
}

.border-x {
    border-left-width: 1px;
    border-right-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Typography */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.capitalize {
    text-transform: capitalize;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Display */
.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.hidden {
    display: none;
}

/* Position */
.sticky {
    position: sticky;
}

.relative {
    position: relative;
}

.top-0 {
    top: 0;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Z-index */
.z-50 {
    z-index: 50;
}

/* Transitions */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Hover States */
.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

.hover\:bg-indigo-50:hover {
    background-color: #eef2ff;
}

.hover\:text-indigo-600:hover {
    color: #4f46e5;
}

.hover\:text-indigo-800:hover {
    color: #3730a3;
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Other */
.overflow-hidden {
    overflow: hidden;
}

.fill-rule {
    fill-rule: evenodd;
}

.clip-rule {
    clip-rule: evenodd;
}

/* Aspect Ratio */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Object Fit */
.object-contain {
    object-fit: contain;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Position Utilities */
.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.absolute {
    position: absolute;
}

.top-2 {
    top: 0.5rem;
}

.left-2 {
    left: 0.5rem;
}

.right-2 {
    right: 0.5rem;
}

/* Gradients */
.bg-gradient-to-t {
    background-image: linear-gradient(to top, var(--tw-gradient-stops));
}

/* Opacity */
.opacity-0 {
    opacity: 0;
}

/* Group Hover */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Additional Colors */
.bg-green-500 {
    background-color: #22c55e;
}

.bg-orange-500 {
    background-color: #f97316;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.bg-red-800 {
    background-color: #991b1b;
}

.text-red-800 {
    color: #991b1b;
}



.px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.py-0\.5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}



/* Gradient specific for black overlay */
.from-black\/80 {
    --tw-gradient-from: rgb(0 0 0 / 0.8);
    --tw-gradient-to: rgb(0 0 0 / 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-black\/40 {
    --tw-gradient-to: rgb(0 0 0 / 0);
    --tw-gradient-stops: var(--tw-gradient-from), rgb(0 0 0 / 0.4), var(--tw-gradient-to);
}

.to-transparent {
    --tw-gradient-to: transparent;
}

/* Grid Responsive */
@media (min-width: 640px) {
    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }

    .lg\:col-span-3 {
        grid-column: span 3 / span 3;
    }

    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 0 0.5rem;
    }

    .product-grid {
        gap: 0.5rem;
    }
}

/* DEBUG OUTLINES */


/* REFINED HEADER LAYOUT */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    flex-grow: 1;
}

.header-icons-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* COMPONENT STYLES: IDENTIFY MODAL */
.identify-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    transition: opacity 0.3s ease;
}

.identify-modal-container {
    background-color: white;
    border-radius: 2.5rem;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    width: 95%;
    max-width: 500px;
    overflow: hidden;
    position: relative;
    animation: modal-entrance 0.3s ease-out;
}

@media (min-width: 768px) {
    .identify-modal-container {
        max-width: 1000px;
        width: 100%;
    }
}

@keyframes modal-entrance {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.identify-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.identify-modal-close:hover {
    color: #111827;
    background-color: #f3f4f6;
    transform: scale(1.1);
}

.identify-modal-content {
    padding: 4rem 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .identify-modal-content {
        padding: 8rem 6rem;
    }
}

.identify-modal-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .identify-modal-title {
        font-size: 4.5rem;
        margin-bottom: 2.5rem;
    }
}

.identify-modal-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 28rem;
    margin: 0 auto 4rem;
}

@media (min-width: 768px) {
    .identify-modal-subtitle {
        font-size: 1.875rem;
        max-width: 48rem;
    }
}

.identify-modal-form {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 768px) {
    .identify-modal-form {
        max-width: 48rem;
        padding: 0 4rem;
        gap: 4rem;
    }
}

.identify-modal-input-wrapper {
    width: 100%;
}

.identify-modal-input {
    width: 100%;
    padding: 2rem 2.5rem;
    border-radius: 2rem;
    border: 2px solid #f3f4f6;
    background-color: rgba(249, 250, 251, 0.5);
    outline: none;
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 6rem;
}

@media (min-width: 768px) {
    .identify-modal-input {
        padding: 3rem 2.5rem;
        font-size: 2.25rem;
        min-height: 7.5rem;
    }
}

.identify-modal-input:focus {
    background-color: white;
    box-shadow: 0 0 0 8px #eef2ff;
    border-color: #6366f1;
}

.identify-modal-button {
    width: 100%;
    padding: 2rem;
    border-radius: 2rem;
    font-weight: 900;
    font-size: 1.5rem;
    color: white;
    background-color: #4f46e5;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    min-height: 6rem;
}

@media (min-width: 768px) {
    .identify-modal-button {
        padding: 3rem;
        font-size: 2.25rem;
        min-height: 7.5rem;
    }
}

.identify-modal-button:hover:not(:disabled) {
    background-color: #4338ca;
    box-shadow: 0 25px 30px -5px rgba(79, 70, 229, 0.2);
}

.identify-modal-button:active:not(:disabled) {
    transform: scale(0.98);
}

.identify-modal-button:disabled {
    background-color: #818cf8;
    cursor: not-allowed;
}

.identify-modal-footer {
    background-color: rgba(249, 250, 251, 0.8);
    border-top: 1px solid #f3f4f6;
    padding: 3rem 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .identify-modal-footer {
        padding: 4rem 6rem;
    }
}

.identify-modal-footer-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .identify-modal-footer-text {
        font-size: 1.25rem;
    }
}

.identify-modal-message {
    padding: 2rem;
    border-radius: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
}

.identify-modal-message.success {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #dcfce7;
}

.identify-modal-message.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

/* COMPONENT STYLES: USER AUTH TRIGGER */
.user-auth-wrapper {
    position: relative;
    display: inline-block;
}

.user-auth-trigger {
    /* Base styles handled by .header-icon-btn */
}

.user-auth-trigger.identified {
    color: #22c55e !important;
}

.user-auth-trigger.waiting {
    color: #eab308 !important;
}

.user-auth-trigger.guest {
    color: #9ca3af;
}

.user-auth-trigger svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* COMPONENT STYLES: UNIFIED HEADER ICONS */
.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    background-color: #f3f4f6;
    border-radius: 0.75rem;
    color: #4b5563;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.header-icon-btn:hover {
    background-color: #e5e7eb;
    color: #111827;
    transform: translateY(-2px);
}

.header-icon-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Header Nav Styles */
.header-nav-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.nav-main-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-title-link {
    color: #111827;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

@media (min-width: 768px) {
    .nav-title-link {
        font-size: 1.5rem;
    }
}

.nav-title-link:hover {
    color: #4f46e5;
}

.nav-title-text {
    color: #111827;
    font-weight: 700;
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

@media (min-width: 768px) {
    .nav-title-text {
        font-size: 1.5rem;
    }
}

.nav-stats-badge {
    background-color: #f3f4f6;
    color: #4b5563;
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: lowercase;
}

@media (min-width: 768px) {
    .nav-stats-badge {
        font-size: 0.875rem;
        border-radius: 9999px;
    }
}

/* User Auth Dropdown Card */
.auth-dropdown-container {
    position: absolute;
    left: 0;
    top: 100%;
    padding-top: 0.5rem;
    width: 14rem;
    z-index: 50;
}

@media (min-width: 1024px) {
    .auth-dropdown-container {
        left: 0;
        right: auto;
    }
}

.auth-dropdown-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
    border: 1px solid #f3f4f6;
    overflow: hidden;
}

.auth-section {
    padding: 0.75rem 1.25rem;
}

.auth-section-label {
    font-size: 10px;
    font-weight: 900;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.identified-info {
    border-bottom: 1px solid #f9fafb;
    background-color: rgba(249, 250, 251, 0.3);
}

.guest-info {
    border-bottom: 1px solid #f9fafb;
    background-color: rgba(238, 242, 255, 0.3);
}

.auth-email-text {
    font-size: 0.875rem;
    font-weight: 900;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 900;
    color: #4f46e5;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0;
}

.auth-btn-primary:hover {
    color: #3730a3;
}

.lang-section {
    border-top: 1px solid #f3f4f6;
    margin-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.auth-lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
}

.auth-lang-btn {
    padding: 0.375rem;
    border-radius: 0.375rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid transparent;
    cursor: pointer;
    background-color: transparent;
    color: #6b7280;
    transition: all 0.2s;
}

.auth-lang-btn:hover {
    background-color: #f9fafb;
    color: #111827;
}

.auth-lang-btn.active {
    background-color: #4f46e5;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.auth-links-section {
    padding-top: 0.25rem;
}

.auth-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
}

.auth-link-item:hover {
    background-color: #f9fafb;
}

.auth-link-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.auth-link-icon svg {
    width: 1rem;
    height: 1rem;
}

/* Account menu: Profile row with the log-out icon at its end */
.auth-link-row { display: flex; align-items: center; }
.auth-link-row .auth-link-item { flex: 1; min-width: 0; }
.auth-logout-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; margin-right: 0.75rem; border: 0; border-radius: 0.5rem; background: none; color: #dc2626; cursor: pointer; }
.auth-logout-icon:hover { background: #fef2f2; }
.auth-logout-icon svg { width: 1.15rem; height: 1.15rem; }

.auth-footer-section {
    border-top: 1px solid #f3f4f6;
    margin-top: 0.25rem;
}

.auth-logout-btn {
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #dc2626;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.auth-logout-btn:hover {
    background-color: #fef2f2;
}

.auth-logout-btn svg {
    width: 1rem;
    height: 1rem;
}

/* DASHED DEBUG OUTLINES - Only active when developer mode is on */
.debug-outlines header {
    border: 2px dashed red !important;
    padding: 2px;
}

.debug-outlines main {
    border: 2px dashed blue !important;
    padding: 2px;
}

.debug-outlines footer {
    border: 2px dashed green !important;
    padding: 2px;
}

/* COMPONENT STYLES: GLOBAL NAVIGATION */
.header {
    background-color: white;
    border-bottom: 1px solid #f3f4f6;
    height: 4.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 80rem;
    margin: 0 auto;
    width: 100%;
    padding: 0 1.5rem;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-left-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-nav-container {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* COMPONENT STYLES: HEADER NAV WRAPPER */
.header-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow: hidden;
}

.nav-main-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

/* COMPONENT STYLES: HEADER CART */
.cart-icon-container {
    position: relative;
    /* Base styles handled by .header-icon-btn */
}

.cart-icon-container svg {
    width: 1.25rem;
    height: 1.25rem;
}

.cart-badge-new {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background-color: #4f46e5;
    color: white;
    font-size: 10px;
    font-weight: 900;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    border: 2px solid white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

/* COMPONENT STYLES: FOOTER */
.footer {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
    padding: 3rem 0;
}

.footer-content {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-links-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #4f46e5;
}

.footer-copy {
    font-size: 10px;
    color: #9ca3af;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.footer-debug-toggle {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.footer-debug-toggle:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.footer-debug-panel {
    margin: 1.5rem auto 0;
    max-width: 32rem;
    background-color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    text-align: left;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: #374151;
}

.footer-debug-panel strong {
    color: #111827;
}

/* COMPONENT STYLES: SESSION STATS */
.session-stats-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.session-stats-header {
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.25rem;
}

.session-stats-metrics {
    color: #4b5563;
    font-weight: 600;
}

.session-stats-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 10px;
    color: #6b7280;
}

.stat-img.stat-critical {
    color: #dc2626;
    font-weight: 700;
}

.stat-js.stat-warning {
    color: #d97706;
    font-weight: 700;
}

.stat-total-ok {
    color: #059669;
    font-weight: 700;
}

.stat-dev-warning {
    color: #7c3aed;
    font-style: italic;
}

.text-green-500 {
    color: #22c55e;
}

.text-green-600 {
    color: #16a34a;
}

.text-red-500 {
    color: #ef4444;
}

.text-red-600 {
    color: #dc2626;
}

.mt-1 {
    margin-top: 0.25rem;
}

.pb-1 {
    padding-bottom: 0.25rem;
}

.border-b {
    border-bottom: 1px solid #e5e7eb;
}

/* COMPONENT STYLES: CMS CONTENT (PROSE) */
.prose {
    white-space: pre-line;
    line-height: 1.75;
    color: #374151;
}

.prose h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.prose strong {
    font-weight: 700;
    color: #111827;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose span[style*="color"] {
    white-space: normal;
    /* Allow color spans to wrap normally even inside pre-line */
}

/* COMPONENT STYLES: PRODUCT PAGE */
.product-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .product-layout {
        grid-template-columns: repeat(5, 1fr);
        gap: 3rem;
    }
}

/* Model page: "Show all (N)" under a section that opens with its first cards */
.model-show-all {
    display: block;
    margin: 16px auto 0;
    width: fit-content;
    padding: 10px 22px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
}
.model-show-all:hover {
    border-color: #2563eb;
    color: #2563eb;
}
/* Model page: the vertical section title is a link (?only=<section> shows just that section) */
.model-section-title {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.model-section-title:hover {
    color: #2563eb;
}
/* Model page: spec filter chips (lib/spec-filters.ts; ?only=<section>&f=<chip>) */
.spec-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 12px; }
.spec-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #374151; font-size: 0.85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.spec-chip:hover { border-color: #2563eb; color: #2563eb; }
.spec-chip.is-active { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.spec-chip-count { color: #6b7280; font-weight: 500; font-size: 0.78rem; }

/* Product page: Specifications tab (supplier specs, lib/specs.ts) */
.product-specs {
    width: 100%;
    max-width: 640px;
    border-collapse: collapse;
    font-size: 15px;
}
.product-specs th, .product-specs td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}
.product-specs th {
    width: 45%;
    font-weight: 500;
    color: #6b7280;
}
.product-specs td {
    color: #111827;
    font-weight: 600;
}

/* "Translate" under the supplier's English description, and the translation it shows */
.supplier-translation-ask {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.supplier-translation-btn {
    padding: 8px 16px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.supplier-translation-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}
.supplier-translation {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #d1d5db;
}
.supplier-translation-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

.product-gallery-note {
    margin: 8px 0 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.product-gallery-column {
    grid-column: span 1;
    min-width: 0;
}

@media (min-width: 1024px) {
    .product-gallery-column {
        grid-column: span 3;
    }
}

.product-details-column {
    grid-column: span 1;
    min-width: 0;
}

@media (min-width: 1024px) {
    .product-details-column {
        grid-column: span 2;
    }
}

/* Product Gallery */
.product-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-image-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .main-image-card {
        padding: 2rem;
    }
}

.main-image-viewport {
    aspect-ratio: 1 / 1;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}

@media (min-width: 1024px) {
    .main-image-viewport {
        height: 28rem;
    }
}

.main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image-card:hover .main-img {
    transform: scale(1.02);
}

.source-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 10px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 10;
}

.source-badge-r2 {
    background-color: #10b981;
}

.source-badge-tf {
    background-color: #f97316;
}

/* Thumbnail List */
.thumbnail-list {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.thumbnail-list::-webkit-scrollbar {
    height: 4px;
}

.thumbnail-list::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 10px;
}

.thumbnail-item {
    width: 5.5rem;
    height: 5.5rem;
    flex-shrink: 0;
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.375rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.thumbnail-item.active {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.thumbnail-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mini-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.125rem 0.25rem;
    border-radius: 0 0.5rem 0 0.5rem;
    font-size: 8px;
    font-weight: 800;
    color: white;
}

/* Product Details UI */
.product-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* The product page title is shown in full: the card rule of the same name above clamps to 2 lines. */
h1.product-title {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

/* Product Stock Indicator */
.stock-level-container {
    margin-bottom: 1.5rem;
}

.stock-level-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stock-label-text {
    color: #6b7280;
}

.stock-count-text {
    color: #111827;
}

.stock-track {
    width: 100%;
    height: 0.5rem;
    background-color: #f3f4f6;
    overflow: hidden;
    /* Square corners as requested */
    border-radius: 0;
}

.stock-fill {
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease;
    /* Square corners as requested */
    border-radius: 0;
}

.stock-red {
    background-color: #ef4444;
}

.stock-orange {
    background-color: #f97316;
}

.stock-yellow {
    background-color: #eab308;
}

.stock-green {
    background-color: #10b981;
}

.stock-blue {
    background-color: #3b82f6;
}

.product-price-tag {
    font-size: 2.25rem;
    font-weight: 800;
    color: #4f46e5;
    margin-bottom: 1.5rem;
}

.compatibility-section {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.compatibility-icon {
    flex-shrink: 0;
    color: #9ca3af;
}

.compatibility-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.compat-pill {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.compat-pill:hover {
    background-color: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.breadcrumb-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: #4f46e5;
}

.breadcrumb-separator {
    color: #d1d5db;
}

.breadcrumb-current {
    color: #111827;
    font-weight: 600;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-meta-footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.meta-item {
    font-size: 0.75rem;
    color: #9ca3af;
}

.meta-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 10px;
    font-weight: 700;
}

.meta-value {
    color: #4b5563;
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Add to Cart Group */
.atc-layout-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 480px) {
    .atc-layout-group {
        flex-direction: column;
    }
}

/* Product page: [qty][price] on one row, the add-to-cart button full width below. */
.atc-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.atc-price-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.atc-price-row .product-price-tag {
    margin-bottom: 0;
}

/* Several units with "Mitu soodsamalt": the single price struck through, the unit price in green */
.product-price-tag.is-deal {
    color: #16a34a;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}
.product-price-old {
    font-size: 1.25rem;
    font-weight: 600;
    color: #9ca3af;
}

/* Quantity at the stock limit: the up arrow is off and this note says why */
.qty-max-note {
    font-size: 13px;
    color: #b45309;
    margin-top: -0.25rem;
}
.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.atc-price-row .qty-selector {
    height: 3.5rem;
}

.atc-stack .atc-button {
    flex: none;
    width: 100%;
}

/* "Mitu klaasi soodsamalt": each further unit of the same product cheaper (lib/multibuy.ts). */
.multibuy-note {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.95rem;
    line-height: 1.35;
}

.multibuy-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff;
    font-weight: 800;
    font-size: 0.8rem;
}

.multibuy-total {
    display: block;
    margin-top: 0.2rem;
    font-weight: 700;
    color: #15803d;
}

.cart-multibuy-saving,
.cart-multibuy-hint {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #15803d;
}

.cart-multibuy-hint {
    color: #4f46e5;
}

/* Quantity Selector Component */
.qty-selector {
    display: flex;
    align-items: stretch;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    min-width: 6rem;
}

.qty-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    padding: 0 1rem;
    background: white;
}

.qty-arrows {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e5e7eb;
    width: 2.5rem;
}

.qty-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    padding: 0;
}

.qty-btn:hover {
    background: #f3f4f6;
    color: #4f46e5;
}

.qty-btn:first-child {
    border-bottom: 1px solid #e5e7eb;
}

.qty-btn svg {
    width: 1rem;
    height: 1rem;
}

/* Add to Cart Button */
.atc-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}

@media (min-width: 640px) {
    .atc-button {
        padding: 1rem 2rem;
    }
}

.atc-primary {
    background-color: #4f46e5;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.atc-primary:hover {
    background-color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.atc-success {
    background-color: #10b981;
    color: white;
    cursor: default;
}

.atc-disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Cart Page Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 1024px) {
    .cart-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.cart-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cart-item {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.cart-item-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .cart-item {
        padding: 1rem;
        gap: 1rem;
    }

    .cart-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

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

    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-img-box {
    width: 5rem;
    height: 5rem;
    background-color: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .cart-img-box {
        width: 6rem;
        height: 6rem;
    }
}

.cart-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

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

.cart-item-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
    line-height: 1.25;
}

.cart-qty-ctrl {
    display: flex;
    align-items: center;
    background-color: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    padding: 0.25rem;
}

.cart-qty-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-qty-btn:hover {
    background-color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cart-qty-val {
    min-width: 2.5rem;
    text-align: center;
    font-weight: 700;
    color: #111827;
}

.cart-row-total-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 80px;
}

.cart-row-total {
    font-size: 1.25rem;
    font-weight: 900;
    color: #4f46e5;
}

.cart-item-price-each {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
}

/* Price changed since the line was added (cart refresh): old price crossed out. */
.cart-price-changed {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b45309;
    text-align: right;
}

.cart-price-changed s {
    color: #9ca3af;
    font-weight: 600;
}

.cart-remove-btn {
    padding: 0.5rem;
    color: #fecaca;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0.5rem;
}

.cart-remove-btn:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

/* Form Styles for Cart */
.cart-form-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cart-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-step-num {
    background-color: #4f46e5;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 900;
}

.cart-input-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .cart-input-group {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cart-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-label {
    font-size: 10px;
    font-weight: 900;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cart-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    outline: none;
    transition: all 0.2s;
}

.cart-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cart-input.empty {
    background-color: #fffbeb;
    border-color: #fcd34d;
}

/* Shipping Methods */
.shipping-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .shipping-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Nothing in the cart may be wider than the screen: grid and flex children default to
   min-width:auto, so the pickup <select> (as wide as its longest point name) pushed the page
   to 418 px on a 390 px phone (audit 2026-11-26, B3). */
.cart-layout > *,
.cart-main > *,
.shipping-grid > *,
.cart-input-group > * {
    min-width: 0;
}
.shipping-card select,
.pickup-picker,
.pickup-select {
    min-width: 0;
    max-width: 100%;
}
.pickup-result-name,
.pickup-result-address {
    overflow-wrap: anywhere;
}

.shipping-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: white;
}

.shipping-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.shipping-card.active {
    border: 2px solid #4f46e5;
    background-color: #f5f3ff;
}

.shipping-name {
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.shipping-cost {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4f46e5;
}

.shipping-hint {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 10px;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Order Summary */
.summary-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.summary-label {
    font-size: 10px;
    font-weight: 800;
    color: #6b7280; /* 4.8:1 on white; #9ca3af was 2.5:1 (audit 27 Nov 2026) */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.summary-total-box {
    border-top: 1px solid #f3f4f6;
    padding-top: 1.5rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.summary-total-label {
    font-size: 10px;
    font-weight: 800;
    color: #4f46e5; /* 6.3:1 on white; #818cf8 was 2.9:1 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-total-value {
    font-size: 2rem;
    font-weight: 900;
    color: #4f46e5;
}

.checkout-btn {
    width: 100%;
    padding: 1.25rem;
    background-color: #4f46e5;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 2rem;
}

.checkout-btn:hover:not(:disabled) {
    background-color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.checkout-btn:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}
/* ---------------------------------------------------------------------------
   Delivery promise
   Speed is what the customer decides on. Green = on our own shelf, ships in
   days; amber = has to be ordered in and takes noticeably longer. The slower
   source is never named — the customer learns the wait, not the supplier.
   --------------------------------------------------------------------------- */
.delivery-promise {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.75rem 0 0.25rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.35;
}

.delivery-promise .delivery-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-top: 0.4rem;
    flex: 0 0 auto;
}

.delivery-fast {
    background: #ecfdf5;
    color: #065f46;
}

.delivery-fast .delivery-dot {
    background: #10b981;
}

.delivery-slow {
    background: #fffbeb;
    color: #92400e;
}

.delivery-slow .delivery-dot {
    background: #f59e0b;
}

.delivery-arriving {
    background: #eff6ff;
    color: #1e40af;
}

.delivery-arriving .delivery-dot {
    background: #3b82f6;
}

/* Compact variant for listing cards. */
.delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
    white-space: nowrap;
}

/* ============================================================
   HEADER: profile row under the title (UserAuth.tsx)
   ============================================================ */
.header {
    height: auto;
    min-height: 4.5rem;
}

.header-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0 0.75rem;
}

/* Top row: account icon centred (the floating pill sits at its right end). */
.header-account-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-height: 60px;
    padding: 10px 0 0.4rem;
    border-bottom: 1px solid #f3f4f6;
}

.header-account-bar .header-icon-btn {
    width: 40px;
    height: 40px;
}

.header-title-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.header-title-row .header-nav-container,
.header-title-row .header-nav-wrapper,
.header-title-row .nav-main-group {
    min-width: 0;
    max-width: 100%;
}

/* Long product titles end in "…" instead of running past both edges. */
.header-title-row {
    padding: 0.35rem 1rem 0;
}

.header-title-row .nav-main-group {
    display: flex;
    align-items: center;
}

.header-title-row .nav-title-text,
.header-title-row .nav-title-link {
    min-width: 0;
    max-width: 100%;
}

/* Home page: "Poes kokku 9 erinevat telefoni brandi ja 5321 toodet" under the title, grey like the brand cards' counts. */
.header-title-row .header-nav-wrapper {
    flex-direction: column;
    gap: 0;
}

.nav-subtitle {
    margin-top: 0.3rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.3;
    color: #6b7280;
    text-align: center;
}




.header-auth-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.header-account {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}

.header-account-email {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    min-height: 2.4rem;
    padding: 0.35rem 1rem;
    border: 0;
    border-radius: 9999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.header-account-email span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-account-email svg {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    color: #16a34a;
}

.header-account-email:hover {
    background: #e0e7ff;
}

.header-account-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    width: 14rem;
    z-index: 55;
}

/* Account row as a full-width dark band (like big shops): the email reads as "your account",
   the white floating pills stand out on it. The band is painted past the centred header
   container with a spread shadow, so the page never scrolls sideways. */
.header-account-bar {
    position: relative;
    border-bottom: 0;
    margin-bottom: 0.35rem;
}
/* The band itself, behind the row; clipped on this layer only, so the account menu can open below it. */
.header-account-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #1f2937;
    box-shadow: 0 0 0 100vmax #1f2937;
    clip-path: inset(0 -100vmax);
}
.header-account-bar .user-auth-trigger {
    background: rgba(255, 255, 255, 0.12);
}
.header-account-bar .user-auth-trigger.guest {
    color: #f9fafb;
}
.header-account-bar .user-auth-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
}
.header-account-bar .header-account-email {
    background: transparent;
    color: #f9fafb;
    border-radius: 0.5rem;
}
.header-account-bar .header-account-email:hover,
.header-account-bar .header-account-email[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.12);
}
.header-account-bar .header-account-email svg {
    color: #4ade80;
}
.header-account-bar .header-account-email .header-account-caret {
    width: 0.85rem;
    height: 0.85rem;
    color: #9ca3af;
}
.auth-link-item .account-alerts-count {
    margin-left: auto;
}

/* The e-mail form opens to the right of the person icon, the two centred together as one group
   and the icon level with the form's middle. Phones keep it under the icon (no room beside it). */
.header-account-bar.is-form {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 0.75rem;
}
/* Level with the e-mail input, which is the form's first line (the explanation sits under it):
   the panel's top padding + half the difference between the 44px input and 40px icon. */
.header-account-bar.is-form > .user-auth-trigger {
    margin-top: calc(0.75rem + 2px);
}
/* The explanation under the input row (and under an error message), not above it. */
.header-account-bar .identify-bar-text {
    order: 2;
}
/* In the dark header band the form has no panel of its own: no fill, no border, white text. */
.header-account-bar .identify-bar {
    background: transparent;
    border: 0;
}
.header-account-bar .identify-bar-text {
    color: #f9fafb;
}
.header-account-bar .identify-bar-error {
    color: #fca5a5;
}
.header-account-bar .identify-bar-close {
    color: #d1d5db;
}
.header-account-bar.is-form .header-auth-row {
    width: auto;
    flex: 0 1 34rem;
    min-width: 0;
}
.header-account-bar.is-form .identify-bar {
    margin: 0;
}
@media (max-width: 640px) {
    .header-account-bar.is-form {
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
    }
    .header-account-bar.is-form > .user-auth-trigger {
        margin-top: 0;
    }
    .header-account-bar.is-form .header-auth-row {
        width: 100%;
        flex: none;
    }
}

/* The email login stands out from the white header: a light purple panel in the brand colour. */
.identify-bar {
    width: 100%;
    max-width: 34rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
    margin: 0.35rem auto;
    padding: 0.75rem 1rem;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
}

.identify-bar-text {
    font-size: 0.75rem;
    color: #3730a3;
    line-height: 1.35;
}

.identify-bar-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.identify-bar-input {
    flex: 1;
    min-width: 0;
    height: 2.75rem;
    padding: 0 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 1rem; /* 16px avoids the iOS zoom on focus */
    background: white;
    color: #111827;
}

.identify-bar-input:focus {
    outline: 2px solid #6366f1;
    outline-offset: 1px;
    border-color: #6366f1;
}

.identify-bar-send {
    height: 2.75rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 0.75rem;
    background: #4f46e5;
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.identify-bar-send:disabled {
    opacity: 0.6;
    cursor: default;
}

.identify-bar-close {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}

.identify-bar-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.identify-bar-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.identify-bar-error {
    font-size: 0.8125rem;
    color: #dc2626;
}

.identify-pending {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.75rem;
    max-width: 40rem;
    padding: 0.35rem 0.85rem;
    border-radius: 0.75rem;
    background: #fefce8;
    color: #854d0e;
    font-size: 0.8125rem;
    text-align: center;
}

.identify-pending-text {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.identify-pending-note {
    width: 100%;
    font-size: 0.75rem;
    font-weight: 400;
}

.identify-pending-note.error {
    color: #dc2626;
}

/* The mail's 6-digit code, typed in the notice (identify/ui.tsx IdentifyPending) */
.identify-code-label {
    width: 100%;
    font-size: 0.75rem;
    font-weight: 600;
}

/* The link page: which address it logs in, and a warning when another one is logged in (#284) */
.identify-switch-warning {
    margin: 0.75rem auto;
    max-width: 28rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 600;
}

.identify-not-yours {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.8125rem;
}

.identify-code-row {
    display: flex;
    gap: 0.4rem;
    width: 100%;
    max-width: 20rem;
    margin: 0.25rem auto;
}

.identify-code-input {
    letter-spacing: 0.25em;
    text-align: center;
}

/* ============================================================
   FLOATING ACTION PILL (FloatingActions.tsx): search, cart, language.
   Top-right, on the sticky header's row: z-index 55 puts it above the header (50)
   and below the search overlay (60). It sits at the right end of the account bar,
   so it never covers the title row.
   ============================================================ */
.floating-actions {
    position: fixed;
    right: 16px;
    /* centred on the account bar's 40px icon (its centre is 30px from the top): 30 - 58/2 */
    top: calc(1px + env(safe-area-inset-top, 0px));
    z-index: 55;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.12), 0 1px 3px rgba(17, 24, 39, 0.08);
}

.floating-actions-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 48px;
    height: 48px;
    padding: 0 12px;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s;
}

.floating-actions-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.floating-actions-btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: -2px;
}

.floating-actions-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

.floating-actions-btn .cart-badge-new {
    top: 2px;
    right: 2px;
}

.floating-actions-lang {
    letter-spacing: 0.03em;
}

/* Top-left mirror of the pill (NavPill.tsx): home + up one level. Same look, height and layer. */
.floating-actions.floating-nav {
    right: auto;
    left: 16px;
}

.floating-nav-up {
    min-width: 0;
}

/* Product page, phones: "‹ 3 / 24 ›" for the list the product was opened from (ProductSwipe.tsx);
   swiping left / right does the same. Desktop has the list's grid instead. */
.product-swipe {
    display: none;
}
@media (max-width: 768px) {
    .product-swipe {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        margin: 0.25rem auto 0.5rem;
        color: #6b7280;
        font-size: 0.8125rem;
    }
    .product-swipe-btn {
        width: 2.25rem;
        height: 2.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 9999px;
        background: #f3f4f6;
        color: #111827;
        font-size: 1.4rem;
        line-height: 1;
        text-decoration: none;
    }
    .product-swipe-btn.is-off {
        opacity: 0.3;
    }
    .product-swipe-pos {
        min-width: 4rem;
        text-align: center;
    }
}

/* The up link's target name, desktop only. Capped so the pill never reaches the centred
   account icon: the pill's right edge is ~127px + label, the icon's left edge 50vw - 20px. */
.floating-nav-label {
    max-width: min(16rem, calc(50vw - 160px));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Both pills always sit on the dark account band (the header is sticky), so no white box:
   transparent, light icons, a faint light hover like the email button beside them. */
.floating-actions {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
.floating-actions-btn {
    color: #f9fafb;
}
.floating-actions-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}
.floating-actions-btn:focus-visible {
    outline-color: #a5b4fc;
}

.language-pill {
    position: relative;
}

.language-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 10rem;
    display: flex;
    flex-direction: column;
    padding: 0.35rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.15);
}

.language-menu button {
    min-height: 44px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    color: #111827;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.language-menu button:hover,
.language-menu button:focus-visible {
    background: #eef2ff;
    outline: none;
}


.footer-stats {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

/* SEARCH OVERLAY (SearchComponent.tsx): full width at the top of the screen, dark like the
   header's account band (#1f2937) with light text. */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(17, 24, 39, 0.5);
}

.search-overlay-panel {
    width: 100%;
    background: #1f2937;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding-top: env(safe-area-inset-top, 0px);
}

.search-overlay-inner {
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    max-height: 85dvh;
}

.search-overlay-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.search-overlay-bar > svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    color: #9ca3af;
}

.search-overlay-input {
    flex: 1;
    min-width: 0;
    height: 2.75rem;
    border: 0;
    outline: none;
    font-size: 1.125rem;
    background: transparent;
    color: #f9fafb;
    caret-color: #f9fafb;
}

.search-overlay-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.search-overlay-close {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #d1d5db;
    cursor: pointer;
}

.search-overlay-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.search-overlay-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

.search-overlay-results {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Phones: the header title wraps instead of being cut off ("Vali oma telefoni mud…"). */
@media (max-width: 640px) {
    .nav-title-text,
    .nav-title-link {
        white-space: normal;
        font-size: 1.05rem;
        line-height: 1.25;
        text-align: center;
    }
}

/* Search overlay: one close button (hide the browser's own clear "x" of type=search). */
.search-overlay-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

/* Search results: list rows, not underlined browser links (Tailwind does not load on the shop). */
.search-overlay-results h3 {
    margin: 0.75rem 0.75rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9ca3af;
}

.search-overlay-results a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    color: #f9fafb;
    font-size: 1rem;
    text-decoration: none;
}

.search-overlay-results a:hover,
.search-overlay-results a:focus-visible {
    background: rgba(255, 255, 255, 0.1);
}

.search-overlay-results a span {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* "Searching...", "Type at least 2 characters", "No results". */
.search-overlay-note {
    padding: 1.25rem 1rem;
    text-align: center;
    color: #d1d5db;
    font-size: 0.95rem;
}

.search-overlay-list {
    padding: 0.25rem 0.5rem 1rem;
}

/* "Choose your phone model" and the contact links: wrapped pills, not one long column. */
.search-overlay-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem 0.5rem;
}

.search-overlay-results .search-overlay-chips a {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.95rem;
}

/* A product that fits every phone: picture, name, price. */
.search-overlay-results a.search-overlay-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-overlay-product img,
.search-overlay-product i {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 0.375rem;
    background: #ffffff;
    object-fit: contain;
}

.search-overlay-product b {
    flex: 1;
    min-width: 0;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-overlay-results a.search-overlay-product span {
    margin-left: 0;
    color: #f9fafb;
    font-weight: 600;
    white-space: nowrap;
}

/* Nothing found: how to ask the shop. */
.search-overlay-help p {
    margin: 0.75rem 0.75rem 0.25rem;
    color: #d1d5db;
    font-size: 0.95rem;
}

/* Phones (kept last so it overrides the pill rules above): a smaller pill (40px buttons), and the matching reserved room. */
@media (max-width: 640px) {
    .floating-actions {
        /* 48px pill: 30 - 48/2 */
        top: calc(6px + env(safe-area-inset-top, 0px));
        padding: 3px;
    }
    .floating-actions-btn {
        min-width: 40px;
        height: 40px;
        padding: 0 8px;
    }
    .floating-actions-btn svg {
        width: 1.3rem;
        height: 1.3rem;
    }
    /* Phones: chevron only (the link's aria-label still names the target). */
    .floating-nav-label {
        display: none;
    }
}

/* Model page cards: green "in stock" pill on products held in our own warehouse. */
.stock-pill {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem 0.2rem 0.45rem;
    border-radius: 9999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(22, 101, 52, 0.15);
}

.stock-pill-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #16a34a;
}

/* Blue "Arriving 26.11": nothing on our shelf, on an open incoming order (orderable now). */
.stock-pill.is-arriving {
    background: #dbeafe;
    color: #1e40af;
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.15);
}

.stock-pill.is-arriving .stock-pill-dot {
    background: #2563eb;
}

/* Violet "Made to order": a phone skin printok makes from the customer's design (docs/modules/printok-skins.md). */
.stock-pill.is-made {
    background: #ede9fe;
    color: #5b21b6;
    box-shadow: 0 1px 2px rgba(91, 33, 182, 0.15);
}

.stock-pill.is-made .stock-pill-dot {
    background: #7c3aed;
}

/* Product page of a skin: the designer (SkinDesigner.tsx, after printok's device-skins.css). Phone: the title,
   then the preview pinned under the sticky header while the steps scroll; desktop: a big sticky preview left. */
.skin-d { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "media" "panel"; gap: 1rem; --skin-d-h: 36vh; }
.skin-d-head { grid-area: head; display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.skin-d-head .product-title { margin-bottom: 0; }
.skin-d-head .stock-pill { position: static; }
.skin-d-intro { color: #4b5563; font-size: 0.95rem; line-height: 1.5; margin: 0; }
.skin-d-media { grid-area: media; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; container-type: inline-size; position: sticky; top: var(--skin-d-top, 4.5rem); z-index: 6; padding: 0.6rem 0.6rem 0.4rem; border-radius: 0 0 0.75rem 0.75rem; background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #eef1f5 70%); box-shadow: 0 8px 18px -10px rgba(15, 23, 42, 0.35); }
.skin-d-panel { grid-area: panel; min-width: 0; padding-bottom: 1.5rem; }
@media (min-width: 1024px) {
    .skin-d { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "media head" "media panel"; grid-template-rows: auto 1fr; column-gap: 3rem; --skin-d-h: min(68vh, 40rem); }
    .skin-d-media { align-self: start; top: calc(var(--skin-d-top, 4.5rem) + 1rem); gap: 0.75rem; padding: 1.25rem; border-radius: 1rem; box-shadow: none; }
}
.skin-d-stage { position: relative; max-width: 100%; touch-action: auto; user-select: none; -webkit-user-select: none; filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.22)) drop-shadow(0 2px 4px rgba(15, 23, 42, 0.18)); }
/* text to move: the preview takes the touches (drag / pinch / twist), the page scrolls outside it */
.skin-d-stage.has-layers { cursor: grab; touch-action: none; }
.skin-d-stage.has-layers:active { cursor: grabbing; }
.skin-d-stage:focus-visible { outline: 2px solid #4f46e5; outline-offset: 6px; border-radius: 0.5rem; }
.skin-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.skin-d-art { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.skin-d-art svg { display: block; width: 100%; height: 100%; }
img.skin-d-outline { pointer-events: none; object-fit: fill; max-width: none; }
.skin-d-facts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.1rem 0.6rem; font-size: 0.75rem; color: #6b7280; text-align: center; }
.skin-d-facts strong { color: #111827; }
.skin-d-toggle { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.skin-d-note { margin: 0.4rem 0 0; font-size: 0.8125rem; line-height: 1.4; color: #6b7280; }
.skin-d-gesture { display: none; margin: 0; text-align: center; }
@media (min-width: 1024px) {
    .skin-d-facts { font-size: 0.875rem; gap: 0.3rem 0.9rem; }
    .skin-d-gesture { display: block; }
}
.skin-d-warn { color: #b45309; font-weight: 600; }
/* selection box, rotate / scale handle and centre guides (skin-layers.tsx) */
svg.skin-overlay { pointer-events: none; overflow: hidden; }
.skin-sel { fill: none; stroke: #4f46e5; }
.skin-sel-corner { fill: #fff; stroke: #4f46e5; }
.skin-guide { stroke: #ec4899; }
.skin-handle { pointer-events: all; cursor: grab; touch-action: none; }
.skin-handle-hit { fill: transparent; }
.skin-handle-dot { fill: #4f46e5; stroke: #fff; }
.skin-handle-icon { fill: none; stroke: #fff; stroke-linecap: round; }

.skin-d-step { border-top: 1px solid #e5e7eb; padding-top: 0.9rem; margin-top: 1rem; }
.skin-d-step-title { display: flex; align-items: center; gap: 0.55rem; font-size: 1rem; font-weight: 800; color: #111827; margin: 0 0 0.6rem; }
.skin-d-step-n { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: #4f46e5; color: #fff; font-size: 0.85rem; flex: none; }
.skin-d-label { margin: 0.7rem 0 0.3rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #6b7280; }
.skin-d-shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.6rem, 1fr)); gap: 0.45rem; }
.skin-d-shape { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.45rem 0.3rem 0.4rem; border: 1px solid #e5e7eb; border-radius: 0.6rem; background: #fff; font: inherit; color: #111827; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.skin-d-shape:hover { border-color: #a5b4fc; }
.skin-d-shape.is-active { border-color: #4f46e5; box-shadow: 0 0 0 2px #4f46e5; }
.skin-d-shape-pic { display: flex; align-items: center; justify-content: center; width: 100%; height: 5.6rem; }
.skin-d-shape-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.skin-d-shape-name { font-size: 0.72rem; line-height: 1.2; text-align: center; color: #374151; }
.skin-d-shape-price { font-size: 0.85rem; font-weight: 700; }
.skin-d-tabs { display: flex; gap: 0.3rem; border-bottom: 1px solid #e5e7eb; }
.skin-d-tabs button { padding: 0.5rem 0.9rem; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font: inherit; font-weight: 600; color: #6b7280; cursor: pointer; }
.skin-d-tabs button.is-active { color: #4f46e5; border-bottom-color: #4f46e5; }
.skin-d-patterns { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: 0.4rem; margin-top: 0.6rem; }
.skin-d-pattern { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.3rem; border: 1px solid #e5e7eb; border-radius: 0.55rem; background: #fff; font: inherit; font-size: 0.7rem; line-height: 1.15; text-align: center; color: #111827; cursor: pointer; }
.skin-d-pattern:hover { border-color: #a5b4fc; }
.skin-d-pattern.is-active { border-color: #4f46e5; box-shadow: 0 0 0 2px #4f46e5; font-weight: 600; }
svg.skin-d-swatch-svg { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0.35rem; display: block; }
.skin-d-swatches { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.skin-d-swatch { width: 1.9rem; height: 1.9rem; border-radius: 0.4rem; border: 1px solid rgba(0, 0, 0, 0.2); cursor: pointer; padding: 0; }
.skin-d-swatch.is-active { outline: 2px solid #4f46e5; outline-offset: 2px; }
.skin-d-picker { width: 2.4rem; height: 1.9rem; padding: 0; border: 1px solid #e5e7eb; border-radius: 0.4rem; background: none; cursor: pointer; }
.skin-d-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.skin-d-chip { padding: 0.4rem 0.8rem; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; font: inherit; font-size: 0.85rem; font-weight: 600; color: #374151; cursor: pointer; }
.skin-d-chip:hover { border-color: #a5b4fc; }
.skin-d-chip.is-active { border-color: #4f46e5; background: #eef2ff; color: #3730a3; }
.skin-d-bold { font-weight: 800; }
.skin-d-textctl { display: grid; gap: 0.35rem; margin-top: 0.6rem; }
.skin-d-check { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; font-size: 0.95rem; }
.skin-d-check input { width: 1.15rem; height: 1.15rem; accent-color: #4f46e5; }
.skin-d-field { display: grid; gap: 0.2rem; }
.skin-d-field textarea { width: 100%; box-sizing: border-box; padding: 0.55rem 0.65rem; border: 1px solid #d1d5db; border-radius: 0.5rem; font: inherit; font-size: 1rem; resize: vertical; }
.skin-d-range { display: grid; gap: 0.15rem; margin-top: 0.5rem; font-size: 0.85rem; }
.skin-d-range input { width: 100%; accent-color: #4f46e5; }
.skin-d-picker-box { position: relative; }
.skin-d-select { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.55rem 0.8rem; border: 1px solid #d1d5db; border-radius: 0.6rem; background: #fff; font: inherit; color: #111827; cursor: pointer; text-align: left; }
.skin-d-select:hover, .skin-d-select[aria-expanded="true"] { border-color: #4f46e5; }
.skin-d-select-value { font-size: 1.15rem; }
.skin-d-select-caret { font-size: 1.1rem; color: #6b7280; }
.skin-d-pop { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 0.3rem); background: #fff; border: 1px solid #e5e7eb; border-radius: 0.6rem; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18); }
.skin-d-fonts { list-style: none; margin: 0; padding: 0.25rem; max-height: 18rem; overflow-y: auto; }
.skin-d-fonts li { font-size: 1.15rem; padding: 0.4rem 0.6rem; border-radius: 0.4rem; cursor: pointer; }
.skin-d-fonts li:hover { background: #f3f4f6; }
.skin-d-fonts li.is-active { color: #4f46e5; }
.skin-d-buy { display: flex; flex-direction: column; gap: 0.6rem; border-top: 1px solid #e5e7eb; padding-top: 1rem; margin-top: 1rem; }
.skin-d-buy .qty-selector { height: 3.5rem; }
.skin-d-buy .atc-button { flex: none; width: 100%; }
.skin-d-buy .delivery-promise { margin: 0; }
.skin-d-unit { font-size: 0.9rem; color: #6b7280; margin-top: -0.4rem; }

/* Product page: description (line text or supplier text) + "Fits: <models>". */
.product-desc {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    max-width: 48rem;
}

.product-desc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.product-desc-text {
    color: #374151;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.product-desc-bullets {
    list-style: disc;
    padding-left: 1.25rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.product-desc-bullets li {
    margin-bottom: 0.25rem;
}

.product-desc-fits {
    color: #6b7280;
    font-size: 0.9375rem;
}

/* Product page: "More for <model>" row under the product (same cards as the model page). */
.product-more {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.product-more-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-more-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.product-more-all {
    flex-shrink: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
}

.product-more-all:hover {
    text-decoration: underline;
}

/* Site-wide notice bar at the top of the sticky header (translations key site.notice).
   --notice-h moves the fixed nav and search/cart pills down by its height. */
.site-notice-on {
    --notice-h: 32px;
}

.site-notice-on .header {
    flex-direction: column;
    align-items: stretch;
}

.site-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--notice-h);
    padding: 0 1rem;
    background: #fef3c7;
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    overflow: hidden;
}

.site-notice-on .floating-actions {
    top: calc(var(--notice-h) + 1px + env(safe-area-inset-top, 0px));
}

@media (max-width: 640px) {
    .site-notice-on {
        --notice-h: 44px;
    }
    .site-notice {
        font-size: 0.75rem;
    }
    .site-notice-on .floating-actions {
        top: calc(var(--notice-h) + 6px + env(safe-area-inset-top, 0px));
    }
}

/* Cart: per-item delivery estimate under the title (green = our shelf, amber = ordered in). */
.cart-item-delivery {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.cart-item-delivery.is-fast {
    color: #166534;
}

.cart-item-delivery.is-ordered {
    color: #92400e;
}

.cart-item-delivery.is-arriving {
    color: #1e40af;
}

.cart-item-delivery-dot {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: currentColor;
}

/* A phone skin's design under the cart line's name (shape, pattern or colour, text). */
.cart-item-design {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.8125rem;
    color: #4b5563;
    overflow-wrap: anywhere;
}

.cart-item-design-swatch {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.2rem;
    border: 1px solid #d1d5db;
    vertical-align: -0.1rem;
}

/* Header title in capitals ("APPLE / IPHONE 17"): it is a page label, not running text. */
.nav-title-text,
.nav-title-link {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Product card (ProductGrid.tsx): name and price under the picture on every screen, since a phone
   has no hover. Two name lines are always reserved so the prices of a row line up. */
.product-card {
    color: inherit;
    text-decoration: none;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem 0.75rem;
}

.card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    color: #374151;
    overflow-wrap: anywhere;
}

.card-price {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    color: #111827;
}

/* The add-to-cart button in the picture's top-right corner (the left stays free for the "Laos" pill),
   on hover with a mouse. In the cart it is `.card-cart-persist` instead. */
.card-hover-cart {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    opacity: 0;
    transition: opacity 150ms;
}

.group:hover .card-hover-cart,
.card-hover-cart:focus-within {
    opacity: 1;
}

.card-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 9999px;
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

.card-cart-btn:hover {
    background: #4338ca;
}

/* Card button while the product is in the cart: green with a check; hover turns it red with an
   X because a click removes it. The persistent one sits in the card's top-right corner. */
.card-cart-btn.card-cart-in {
    background: #16a34a;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.4);
}

.card-cart-icon-remove {
    display: none;
}

/* Only with a mouse: a tap leaves :hover on, so a phone would show a red X right after adding. */
@media (hover: hover) {
    .card-cart-btn.card-cart-in:hover {
        background: #dc2626;
        box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
    }

    .card-cart-btn.card-cart-in:hover .card-cart-icon-in {
        display: none;
    }

    .card-cart-btn.card-cart-in:hover .card-cart-icon-remove {
        display: block;
    }
}

.card-cart-persist {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
}

/* Touch screen: always shown, in the picture's bottom-right corner, since on a phone-wide card the top
   corner collides with the "Laos" / "Saabub" pill. The in-cart button moves there too, so it does not jump. */
@media (hover: none) {
    .card-hover-cart,
    .card-cart-persist {
        top: auto;
        bottom: 0.5rem;
        right: 0.5rem;
        opacity: 1;
    }
}

/* Cookie consent bar for Google Analytics (GoogleAnalytics.tsx) */
.consent-bar {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    max-width: 40rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1rem;
    padding: .875rem 1rem;
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: .875rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}
.consent-text { flex: 1 1 16rem; margin: 0; font-size: .875rem; line-height: 1.4; }
.consent-buttons { display: flex; gap: .5rem; margin-left: auto; }
.consent-btn { padding: .5rem 1rem; border-radius: 9999px; font-size: .875rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.consent-decline { background: #fff; color: #374151; border-color: #d1d5db; }
.consent-decline:hover { background: #f3f4f6; }
.consent-accept { background: #7c3aed; color: #fff; }
.consent-accept:hover { background: #6d28d9; }

/* Product page tabs: description / suitable models / product info (ProductTabs.tsx).
   Each tab is framed like the main image card; the selected one is filled with the frame's gray. */
.product-tabs {
    margin-top: 3rem;
    max-width: 48rem;
}
.product-tabs-list {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px;
}
.product-tab {
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}
.product-tab:hover { color: #111827; background: #f9fafb; }
.product-tab-active,
.product-tab-active:hover {
    background: #e5e7eb;
    color: #111827;
}
.product-tab-panel { padding-top: 1.5rem; }
/* Phones: equal columns; a long label wraps instead of scrolling the row sideways. */
@media (max-width: 480px) {
    .product-tabs-list {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 0.375rem;
        overflow: visible;
    }
    .product-tab {
        white-space: normal;
        padding: 0.5rem 0.25rem;
        border-radius: 0.75rem;
        font-size: 0.875rem;
        line-height: 1.25;
        text-align: center;
    }
}
.product-tab-panel .product-desc {
    margin: 0;
    padding: 0;
    border: 0;
}
.product-info-list { margin: 0; }
.product-info-row {
    display: flex;
    gap: 1rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.product-info-row dt {
    width: 9rem;
    flex-shrink: 0;
    color: #6b7280;
}
.product-info-row dd {
    margin: 0;
    color: #111827;
    font-weight: 600;
}

/* Site footer (SiteFooter.tsx): trust row, link columns, contact; server-rendered for SEO. */
.site-footer {
    padding: 0 0 2rem;
    text-align: left;
}
.site-footer-trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.75rem 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}
.site-footer-trust-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}
.site-footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 2rem;
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 1.5rem;
}
.site-footer-heading {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #111827;
    margin: 0 0 0.75rem;
}
.site-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer-col li { margin-bottom: 0.375rem; }
.site-footer-col a,
.site-footer-brands a {
    color: #4b5563;
    font-size: 0.875rem;
    text-decoration: none;
}
.site-footer-col a:hover,
.site-footer-brands a:hover { color: #4f46e5; }
.site-footer-brands {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    color: #9ca3af;
}
.site-footer-address {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-style: normal;
    font-size: 0.875rem;
    color: #4b5563;
}
.site-footer-company {
    margin-top: 0.5rem;
    font-weight: 600;
    color: #374151;
}
.site-footer .footer-content { text-align: center; }
.site-footer .footer-copy {
    font-size: 0.75rem;
    opacity: 1;
    margin: 0.5rem 0 0;
}

/* Info pages (/info/<slug>): terms, delivery, returns, FAQ, guides, contact. */
.info-page {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    color: #374151;
}
.info-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}
.info-page-body { line-height: 1.7; }
.info-page-body p { margin: 0 0 1rem; }
.info-page-body h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin: 2rem 0 0.75rem;
}
.info-page-body h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 1.5rem 0 0.5rem;
}
.info-page-body ul,
.info-page-body ol {
    padding-left: 1.25rem;
    margin: 0 0 1rem;
}
.info-page-body ul { list-style: disc; }
.info-page-body ol { list-style: decimal; }
.info-page-body li { margin-bottom: 0.375rem; }
.info-page-body a { color: #4f46e5; text-decoration: underline; }
.info-page-body details {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.875rem 1rem;
    margin-bottom: 0.625rem;
}
.info-page-body summary {
    cursor: pointer;
    font-weight: 600;
    color: #111827;
}
.info-page-body details p { margin: 0.625rem 0 0; }
.info-page-body .info-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 1rem 0 1.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #111827;
}
.info-page-body .info-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.info-contact {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1.5rem;
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
}
.info-contact dt { color: #6b7280; }
.info-contact dd { margin: 0; font-weight: 600; color: #111827; }
.info-contact a { color: #4f46e5; }

/* Description blocks (lib/content-blocks.ts) inside the product description tab. */
.product-block { margin-top: 1.5rem; }
.product-block:first-child { margin-top: 0; }
.product-block-heading {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
}
.product-block a { color: #4f46e5; text-decoration: underline; }

/* Supplier's original description, collapsed in the product info tab. */
.product-original {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    color: #4b5563;
    font-size: 0.9375rem;
    line-height: 1.6;
}
.product-original summary {
    cursor: pointer;
    font-weight: 600;
    color: #374151;
}
.product-original p { margin: 0.625rem 0 0; }

/* Comparison tables on info pages (guides); scroll sideways on narrow screens. */
.info-page-body .info-table {
    overflow-x: auto;
    margin: 0.5rem 0 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
}
.info-page-body table {
    width: 100%;
    min-width: 36rem;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.info-page-body th,
.info-page-body td {
    padding: 0.625rem 0.875rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #f3f4f6;
}
.info-page-body th { background: #f9fafb; font-weight: 700; color: #111827; }
.info-page-body tr:last-child td { border-bottom: 0; }
.info-page-body td:first-child { font-weight: 600; color: #111827; }

/* Site footer, dark: set apart from the light page (like allo.ee); 4 columns on desktop. */
.footer.site-footer {
    background-color: #111827;
    border-top: 0;
    color: #d1d5db;
    padding-bottom: 1.5rem;
}
.site-footer .site-footer-trust {
    max-width: none;
    background-color: #1f2937;
    border-bottom: 0;
    padding: 1.25rem max(1.5rem, calc((100% - 77rem) / 2));
}
.site-footer .site-footer-trust-item { color: #f9fafb; }
.site-footer .site-footer-columns {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
}
@media (min-width: 640px) {
    .site-footer .site-footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .site-footer .site-footer-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.site-footer .site-footer-heading { color: #ffffff; }
.site-footer .site-footer-col a,
.site-footer .site-footer-brands a,
.site-footer .site-footer-address a { color: #e5e7eb; }
.site-footer .site-footer-col a:hover,
.site-footer .site-footer-brands a:hover,
.site-footer .site-footer-address a:hover { color: #a5b4fc; }
.site-footer .site-footer-brands { color: #6b7280; }
.site-footer .site-footer-address { color: #9ca3af; }
.site-footer .site-footer-company { color: #e5e7eb; }
.site-footer .footer-content {
    border-top: 1px solid #1f2937;
    padding-top: 1.25rem;
    margin-top: 1rem;
}
.site-footer .footer-stats,
.site-footer .footer-copy { color: #9ca3af; }

/* Footer: second heading in the first column ("Brändid" under "Top mudelid"). */
.site-footer .site-footer-subheading { margin-top: 1.5rem; }
.site-footer .site-footer-brands { margin-top: 0; }

/* Checkout summary: VAT line (rate from the site's company). */
.summary-vat .summary-label,
.summary-vat .summary-value { font-size: 0.8125rem; color: #6b7280; }

/* My orders: Active / Past tabs; quiet "Log out" link at the bottom of the account pages. */
.orders-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.orders-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-weight: 600;
    text-decoration: none;
}

.orders-tab:hover {
    color: #111827;
}

.orders-tab.is-active {
    border-bottom-color: #4f46e5;
    color: #4f46e5;
}

.orders-tab-count {
    min-width: 1.5rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    text-align: center;
}

.orders-tab.is-active .orders-tab-count {
    background: #eef2ff;
    color: #4f46e5;
}

.orders-tab-empty {
    padding: 2rem 0;
    color: #6b7280;
    text-align: center;
}

.account-footer {
    margin-top: 3rem;
    text-align: center;
}

.account-logout-link {
    padding: 0.25rem 0.5rem;
    border: 0;
    background: none;
    color: #9ca3af;
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
}

.account-logout-link:hover {
    color: #dc2626;
}

.checkout-error {
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Cart: a product that sold out since it was added — stays, marked, until the customer removes it. */
.cart-item.is-unavailable {
    background: #fef2f2;
    border-radius: 0.75rem;
}

.cart-item.is-unavailable .cart-img-box,
.cart-item.is-unavailable .cart-row-total-box {
    opacity: 0.45;
}

.cart-item-unavailable {
    margin-top: 0.35rem;
    color: #b91c1c;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
}

.cart-item-unavailable-remove {
    padding: 0;
    border: 0;
    background: none;
    color: #b91c1c;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* "Tell me when it is in stock" (product page, cart rows). */
.stock-alert {
    margin: 0.75rem 0 1rem;
    font-size: 0.875rem;
}

/* Inside the yellow "on order" box: part of the message, not a separate block. */
.delivery-promise .stock-alert {
    margin: 0.5rem 0 0;
}

.stock-alert.is-compact {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
}

.stock-alert-link {
    padding: 0;
    border: 0;
    background: none;
    color: #4f46e5;
    font: inherit;
    font-weight: 600;
    /* A button centres its text: a link that wraps to 2 lines (narrow phones) drifted right.
       Left-aligned, wrapped lines start under the words, not under the icon. */
    display: inline-flex;
    align-items: baseline;
    gap: 0.3em;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.stock-alert-link .stock-alert-text {
    text-decoration: underline;
}

.stock-alert-link:disabled {
    color: #9ca3af;
    cursor: default;
}

.stock-alert-hint {
    margin-top: 0.15rem;
    color: #6b7280;
    font-size: 0.8125rem;
}

.stock-alert-form {
    display: flex;
    gap: 0.5rem;
    max-width: 24rem;
}

.stock-alert-form input {
    flex: 1;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.stock-alert-form button {
    padding: 0.45rem 0.9rem;
    border: 0;
    border-radius: 0.5rem;
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.stock-alert.is-done {
    color: #15803d;
    font-weight: 600;
}

.stock-alert-error {
    margin-top: 0.25rem;
    color: #b91c1c;
    font-size: 0.8125rem;
}
/* Header account menu: the visitor's votes and "notify me" requests. */
.header-account-menu { width: 17rem; max-height: min(80vh, 36rem); overflow-y: auto; }
/* Phones: the pill sits between the floating nav buttons; a long email ends in "…". */
@media (max-width: 640px) { .header-account-email { max-width: calc(100vw - 230px); font-size: 0.875rem; padding: 0.3rem 0.7rem; } }
.account-alerts { padding: 0.5rem 0.25rem; border-bottom: 1px solid #f3f4f6; }
.account-alerts-title { display: flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.5rem; font-size: 0.8rem; font-weight: 700; color: #374151; }
.account-alerts-count { margin-left: auto; min-width: 1.4rem; padding: 0 0.4rem; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: 0.75rem; text-align: center; }
.account-alert-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem; border-radius: 0.5rem; color: #111827; text-decoration: none; font-size: 0.8rem; line-height: 1.3; }
.account-alert-item:hover { background: #f9fafb; }
.account-alert-img { flex-shrink: 0; width: 2.25rem; height: 2.25rem; border-radius: 0.4rem; background: #f3f4f6; object-fit: contain; }
.account-alert-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Orders page: the cart's cards. */
.orders-page { max-width: 56rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
/* Profile page: same card and fields as the cart */
.profile-intro { margin: 0 0 1.5rem; color: #6b7280; }
.profile-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .profile-grid { grid-template-columns: repeat(2, 1fr); } }
.profile-wide { grid-column: 1 / -1; }
.cart-input.profile-readonly { background: #f9fafb; color: #6b7280; cursor: not-allowed; }
.profile-saved { margin: 1rem 0 0; text-align: center; color: #16a34a; font-weight: 700; }
/* Profile: logged-in devices and "delete my data" (#282) */
.profile-devices, .profile-delete { margin-top: 1.25rem; }
.profile-devices ul { list-style: none; margin: 0; padding: 0; }
.profile-devices li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; padding: 0.6rem 0; border-top: 1px solid #f3f4f6; }
.profile-devices li:first-child { border-top: 0; }
.profile-device-name { font-weight: 700; color: #111827; }
.profile-device-seen { color: #6b7280; font-size: 0.875rem; flex: 1; }
.profile-delete p { margin: 0 0 1rem; color: #6b7280; }
.profile-delete-btn { padding: 0.6rem 1rem; border: 1px solid #dc2626; border-radius: 0.5rem; background: #fff; color: #dc2626; font-weight: 700; cursor: pointer; }
.profile-delete-btn:hover:not(:disabled) { background: #fef2f2; }
.profile-delete-btn:disabled { opacity: 0.6; cursor: wait; }
.profile-download-btn { display: inline-block; padding: 0.6rem 1rem; border: 1px solid #d1d5db; border-radius: 0.5rem; background: #fff; color: #111827; font-weight: 700; text-decoration: none; }
.profile-download-btn:hover { background: #f9fafb; }
.profile-delete-title { margin-top: 1.75rem; }
/* My notifications page (/notifications) */
.notif-title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; font-size: 1.05rem; font-weight: 800; color: #111827; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid #f3f4f6; }
.notif-item:first-child { border-top: 0; }
.notif-img { flex-shrink: 0; width: 2.75rem; height: 2.75rem; border-radius: 0.5rem; background: #f3f4f6; object-fit: contain; }
.notif-name { flex: 1; min-width: 0; color: #111827; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.notif-name:hover { color: #4f46e5; }
.notif-since { flex-shrink: 0; font-size: 0.8rem; color: #9ca3af; }
.notif-cancel { flex-shrink: 0; min-width: 7rem; padding: 0.4rem 0.85rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; background: #fff; color: #6b7280; font-size: 0.85rem; font-weight: 700; text-align: center; cursor: pointer; }
.notif-cancel:hover { border-color: #fca5a5; color: #dc2626; }
.notif-block { margin-bottom: 1.25rem; }
/* Newsletter row: title + text on the left, the same button as every other row. */
.notif-title-inline { display: block; margin: 0; }
.notif-suggest-text.notif-row-text { display: block; margin: 0.2rem 0 0; font-weight: 400; }
.notif-suggest-text { margin: -0.4rem 0 0.5rem; font-size: 0.875rem; color: #6b7280; }
/* Same size as Cancel, so a row's button keeps its place when it switches. */
.notif-follow { flex-shrink: 0; min-width: 7rem; padding: 0.4rem 0.85rem; border: 1px solid #4f46e5; border-radius: 0.5rem; background: #4f46e5; color: #fff; font-size: 0.85rem; font-weight: 700; text-align: center; cursor: pointer; }
.notif-follow:hover { background: #4338ca; border-color: #4338ca; }
.notif-follow:disabled, .notif-cancel:disabled { opacity: 0.5; cursor: wait; }
/* Cart: this site takes no payments now (Admin -> Hosts -> Payments). */
.payments-off-note { margin: 0; padding: 1rem; border: 1px solid #fde68a; border-radius: 0.75rem; background: #fffbeb; color: #92400e; font-weight: 600; text-align: center; }
/* Cart: search over the parcel machines, above the list */
/* Cart: delivery country, above the delivery methods (only when the site delivers abroad) */
.ship-countries { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.ship-country { padding: 0.55rem 1rem; border: 1px solid #e5e7eb; border-radius: 9999px; background: #fff; color: #374151; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.ship-country:hover:not(:disabled) { border-color: #a5b4fc; }
.ship-country.active { border-color: #4f46e5; background: #eef2ff; color: #3730a3; }
.ship-country:disabled { opacity: 0.45; cursor: not-allowed; }
.pickup-picker { display: flex; flex-direction: column; gap: 0.4rem; }
.pickup-search { width: 100%; padding: 0.55rem 0.75rem; border: 1px solid #c7d2fe; border-radius: 0.375rem; background: #fff; font-size: 0.875rem; outline: none; }
.pickup-search:focus { border-color: #6366f1; box-shadow: 0 0 0 2px #e0e7ff; }
.pickup-count { font-size: 0.75rem; color: #6b7280; }
/* Search results: finger-sized rows, name over address, the list scrolls inside the card */
.pickup-results { list-style: none; margin: 0; padding: 0; max-height: 22rem; overflow-y: auto; border: 1px solid #c7d2fe; border-radius: 0.5rem; background: #fff; }
.pickup-results li + li { border-top: 1px solid #eef2ff; }
.pickup-result { display: flex; flex-direction: column; gap: 0.15rem; width: 100%; min-height: 3rem; padding: 0.6rem 0.85rem; border: 0; background: transparent; text-align: left; cursor: pointer; }
.pickup-result:hover, .pickup-result:focus-visible { background: #eef2ff; outline: none; }
.pickup-result.is-selected { background: #e0e7ff; }
.pickup-result-name { font-size: 0.95rem; font-weight: 700; color: #111827; line-height: 1.3; }
.pickup-result-address { font-size: 0.8rem; color: #6b7280; line-height: 1.3; }
.notif-on { flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.4rem; }
.notif-subscribed { min-width: 7rem; padding: 0.4rem 0.85rem; border: 1px solid #16a34a; border-radius: 0.5rem; background: #16a34a; color: #fff; font-size: 0.85rem; font-weight: 700; text-align: center; }
.notif-cancel.notif-cancel-small { min-width: 0; padding: 0.4rem 0.6rem; font-size: 0.8rem; font-weight: 600; }
.orders-list { display: flex; flex-direction: column; gap: 1.25rem; }
.orders-empty { text-align: center; }
.orders-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.orders-empty h2 { margin: 0 0 0.5rem; font-size: 1.35rem; font-weight: 800; color: #111827; }
.orders-empty p { margin: 0 0 1.5rem; color: #6b7280; }
.orders-empty .checkout-btn { display: inline-flex; width: auto; padding-left: 2rem; padding-right: 2rem; text-decoration: none; }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.order-ref { font-size: 1.05rem; font-weight: 800; color: #111827; }
.order-date { font-size: 0.85rem; color: #6b7280; }
.order-status { padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: #eef2ff; color: #4338ca; }
.order-status.is-paid { background: #dcfce7; color: #166534; }
.order-status.is-pending { background: #fef9c3; color: #854d0e; }
.order-status.is-failed { background: #fee2e2; color: #991b1b; }
.order-status.is-cancelled { background: #f3f4f6; color: #4b5563; }
.order-items { display: flex; flex-direction: column; gap: 0.75rem; }
.order-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.order-item-name { font-weight: 600; color: #111827; }
.order-item-qty { font-size: 0.8rem; color: #6b7280; }
.order-item-price { font-weight: 700; color: #111827; white-space: nowrap; }
.order-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #e5e7eb; color: #6b7280; font-size: 0.85rem; }
.order-total { text-align: right; }
.order-total strong { display: block; font-size: 1.4rem; font-weight: 800; color: #4f46e5; }
/* A page's heading for search engines and screen readers when the header already shows it. */
.page-h1-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 404 page */
.not-found-page { max-width: 32rem; margin: 0 auto; padding: 4rem 1rem; text-align: center; }
.not-found-page h1 { margin: 0 0 0.75rem; font-size: 1.6rem; font-weight: 800; color: #111827; }
.not-found-page p { margin: 0 0 1.5rem; color: #6b7280; }
.not-found-page .checkout-btn { display: inline-flex; width: auto; margin-top: 0; padding: 0.9rem 2rem; font-size: 1.05rem; text-decoration: none; }

/* ---- Withdrawal form (/taganemine, app/(public)/taganemine) ---- */
.withdrawal-page > p { margin: 0.5rem 0 1.25rem; color: #4b5563; line-height: 1.6; }
.withdrawal-form { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; }
.withdrawal-to { margin: 0; color: #374151; line-height: 1.5; }
.withdrawal-field { display: flex; flex-direction: column; gap: 0.35rem; }
.withdrawal-field > span { font-size: 0.875rem; font-weight: 700; color: #374151; }
.withdrawal-field textarea.cart-input { resize: vertical; font-weight: 500; font-family: inherit; }
.withdrawal-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.withdrawal-field .cart-input { min-width: 0; }
.withdrawal-hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.withdrawal-error { margin: 0; color: #b91c1c; font-weight: 600; }
.withdrawal-statement { white-space: pre-wrap; word-break: break-word; font: 0.9rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 1rem; margin: 1rem 0; }
.withdrawal-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.withdrawal-actions .checkout-btn { flex: 1 1 14rem; }
.withdrawal-back { background: none; border: 0; color: #4f46e5; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0.5rem; }
.withdrawal-done h2 { color: #047857; margin-top: 0; }
.site-footer-withdraw { font-weight: 700; }
.withdrawal-form .checkout-btn, .withdrawal-actions .checkout-btn { margin-top: 0.5rem; }

/* Checkout: bank link or card (Montonio card page). Same look as the delivery cards. */
.pay-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.pay-choice-option { display: flex; align-items: center; gap: 0.5rem; min-width: 0; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 0.875rem 1rem; cursor: pointer; background: white; font-weight: 700; font-size: 0.875rem; }
.pay-choice-option.active { border: 2px solid #4f46e5; background-color: #f5f3ff; }
.pay-choice-option input { accent-color: #4f46e5; margin: 0; }
.pay-card-note { font-size: 0.8125rem; color: #4b5563; margin: 0 0 0.5rem; }

/* ============================================================
   LOGGED-IN HEADER ICONS (FloatingActions.tsx .has-account, AccountMenu.tsx .has-email):
   profile, notifications (with the open-requests count) and orders before the cart in the
   top-right pill. The e-mail menu stays in the middle. Guests see the header as before.
   Wide screens: one row, the e-mail pill kept clear of both pills. Below 960px the icons
   leave no room for a readable e-mail in the middle, so the e-mail gets its own line in the
   dark band, under the pills, at full width (nothing is hidden or cut to "…").
   ============================================================ */
.floating-account-btn[aria-current="page"] {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: inset 0 0 0 1.5px rgba(165, 180, 252, 0.75);
}

@media (min-width: 960px) {
    /* The right pill is at most 6 buttons (~310px + 16px gutter): the e-mail stays inside the
       middle, and the left pill's "up" label stops before it. */
    .header-account-bar.has-email .header-account-email {
        max-width: calc(100vw - 680px);
    }
    body:has(.floating-actions.has-account) .floating-nav-label {
        max-width: min(13rem, calc(50vw - 160px));
    }
}

@media (max-width: 959px) {
    /* Second line of the band: the pills (fixed, 1px from the top, 58px tall) sit above it. */
    .header-account-bar.has-email {
        padding-top: 62px;
    }
    .header-account-bar.has-email .header-account-email {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    /* Phone pills are 6px from the top and 48px tall. */
    .header-account-bar.has-email {
        padding-top: 58px;
    }
    /* Up to 6 buttons (search, 3 account icons, cart, language) beside home + back at 360px:
       slimmer buttons, no gaps; still 40px tall. */
    .floating-actions.has-account {
        gap: 0;
    }
    .floating-actions.has-account .floating-actions-btn {
        min-width: 36px;
        padding: 0 4px;
    }
}

/* ---- Audit 27 Nov 2026: cart layout shift, quantity buttons, courier fields, payment line ---- */

/* /cart is drawn in the browser (the cart lives in localStorage). Every state of the page is at least
   one screen tall, so the footer starts below the fold and nothing visible moves when the cart,
   the empty-cart card or the delivery lines appear (CLS 0.36-0.38 before). */
.cart-shell {
    min-height: 100vh;
}

/* Delivery line while the stock answer is on its way: same height, nothing shown. */
.cart-item-delivery.is-pending {
    visibility: hidden;
}

/* Cart quantity: - 1 + in one row, each button at least 40x40 px (was 39x16). */
.qty-selector.qty-inline {
    align-items: stretch;
    min-width: 0;
}
.qty-inline .qty-btn {
    flex: none;
    width: 2.5rem;
    min-height: 2.5rem;
}
.qty-inline .qty-btn:first-child {
    border-bottom: none;
    border-right: 1px solid #e5e7eb;
}
.qty-inline .qty-btn:last-child {
    border-left: 1px solid #e5e7eb;
}
.qty-inline .qty-display {
    padding: 0 0.5rem;
    min-width: 2rem;
}
/* The wider selector next to the price box: less gap on phones, and wrap rather than overflow
   on a very narrow screen (at 390 px the price box was pushed past the card's edge). */
@media (max-width: 768px) {
    .cart-item-actions {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
}

/* Courier address: 16 px text, so iOS Safari does not zoom in on focus (it was 13.3 px: the
   Tailwind classes on these inputs are not built for the shop). Placeholders are plain grey
   examples ("nt Tallinn"), not bold text that looks already filled in. */
.courier-input {
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    background: #fff;
    border: 1px solid #c7d2fe;
    border-radius: 0.375rem;
    padding: 0.6rem 0.75rem;
    box-sizing: border-box;
}
.courier-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
    opacity: 1;
}
.courier-input:focus {
    outline: 2px solid #6366f1;
    outline-offset: 0;
    border-color: #6366f1;
}

/* "Makseviis: Swedbank" under the total. */
.summary-pay-via {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}
