/* Wholesale Diecast Store - Main Stylesheet */

/* ============================================
   CSS Variables (Theme Colors)
   ============================================ */
:root {
    --primary-red: #2563eb;
    --primary-dark: #1e40af;
    --secondary-black: #0f172a;
    --accent-silver: #C0C0C0;
    --bg-white: #FFFFFF;
    --bg-light: #f8f9fa;
    --bg-dark: #2d2d2d;
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #FFFFFF;
    --border-light: #e0e0e0;
    --success-green: #28a745;
    --warning-orange: #ffc107;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* ============================================
   Layout Containers
   ============================================ */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
    background: var(--secondary-black);
    color: var(--text-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-top {
    background: var(--primary-dark);
    padding: 8px 0;
    font-size: 0.9rem;
    text-align: center;
}

.header-top a {
    color: var(--text-white);
}

.header-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 20px;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    flex-shrink: 0;
}

.nav-main {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: center;
    min-width: 0;
}

.nav-main a {
    color: var(--text-white);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    white-space: nowrap;
    font-size: 0.92rem;
}

.nav-main a:hover {
    color: var(--primary-red);
}

.nav-main a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: var(--transition);
}

.nav-main a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 12px;
    flex-shrink: 0;
}

.dealer-auth-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.dealer-auth-login {
    display: inline-block;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
}

.dealer-auth-login:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.dealer-auth-badge {
    background: #059669;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.dealer-auth-logout {
    background: transparent;
    border: none;
    color: #93c5fd;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: underline;
    padding: 0;
    white-space: nowrap;
}

.dealer-auth-logout:hover {
    color: #fff;
}

.search-box input {
    border: none;
    padding: 10px 12px;
    width: 170px;
    max-width: 28vw;
    font-size: 0.9rem;
    outline: none;
}

.search-box {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 1;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
}

.logo-text span {
    color: var(--primary-red);
}

.search-box button {
    background: var(--primary-red);
    border: none;
    padding: 10px 15px;
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

.cart-icon {
    position: relative;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-red);
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Hero Banner
   ============================================ */
.hero {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--secondary-black) 0%, var(--bg-dark) 100%);
    overflow: hidden;
}

.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 55%;
    height: 100%;
    object-fit: contain;
    object-position: center right;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(26,26,26,0.95) 0%, rgba(26,26,26,0.7) 50%, rgba(26,26,26,0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    padding: 80px 40px;
    color: var(--text-white);
}

.hero-badge {
    display: inline-block;
    background: var(--primary-red);
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--primary-red);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
}

.btn-secondary:hover {
    background: var(--text-white);
    color: var(--secondary-black);
}

.btn-outline {
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.btn-outline:hover {
    background: var(--primary-red);
    color: var(--text-white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* ============================================
   Category Section
   ============================================ */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--secondary-black);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

a.category-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    background: var(--bg-white);
    border-color: var(--primary-red);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-card h3 {
    font-size: 1.1rem;
    color: var(--secondary-black);
    margin-bottom: 5px;
}

.category-card span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ============================================
   Product Grid
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
    padding: 10px;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-red);
    color: var(--text-white);
    padding: 5px 10px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
}

.product-badge.low-stock {
    background: var(--warning-orange);
    color: var(--secondary-black);
}

.product-badge.in-stock {
    background: var(--success-green);
}

.product-info {
    padding: 20px;
}

.product-vendor {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-black);
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-sku {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.product-price .current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-red);
}

.product-price .compare {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--secondary-black);
    color: var(--text-white);
    margin-top: auto;
}

.footer-main {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand p {
    opacity: 0.8;
    margin-top: 15px;
    line-height: 1.7;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    color: rgba(255,255,255,0.7);
}

.footer-section ul a:hover {
    color: var(--primary-red);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ============================================
   Shopping Cart
   ============================================ */
.cart-page {
    padding: 40px 0;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.cart-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius);
}

.cart-item-title {
    font-weight: 600;
}

.cart-item-sku {
    font-size: 0.85rem;
    color: var(--text-light);
}

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-quantity button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.cart-quantity button:hover {
    background: var(--primary-red);
    color: var(--text-white);
    border-color: var(--primary-red);
}

.cart-quantity input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 5px;
}

.cart-summary {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius-lg);
    max-width: 400px;
    margin-left: auto;
}

.cart-summary h3 {
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.cart-summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    border-top: 2px solid var(--border-light);
    padding-top: 15px;
    margin-top: 15px;
}

/* ============================================
   Brand Cards
   ============================================ */
.brand-card {
    cursor: pointer;
    transition: var(--transition);
}

.brand-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(196, 30, 58, 0.2);
}

.brand-card .product-title {
    font-size: 1.1rem;
    text-align: center;
}

.brand-card .product-vendor {
    text-align: center;
    color: var(--primary-red);
    font-weight: 600;
}

.brand-card .product-image img {
    object-fit: contain;
    padding: 10px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1100px) {
    .header-main {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo actions"
            "nav nav";
    }

    .logo {
        grid-area: logo;
    }

    .header-actions {
        grid-area: actions;
    }

    .nav-main {
        grid-area: nav;
        width: 100%;
        justify-content: flex-start;
        padding-top: 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .search-box input {
        width: 140px;
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-image {
        width: 50%;
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .header-main {
        gap: 10px;
    }

    .nav-main {
        gap: 8px 14px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .search-box input {
        width: 120px;
    }
    
    .hero {
        height: auto;
        padding: 60px 0;
    }
    
    .hero-content {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-image {
        position: relative;
        width: 100%;
        height: 300px;
        transform: none;
        opacity: 0.3;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cart-table {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 12px 20px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.hidden { display: none; }
.visible { display: block; }

/* Loading spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Contact page */
.contact-page {
    padding: 40px 0 64px;
}

.contact-wrap {
    max-width: 640px;
}

.contact-wrap h1 {
    margin-bottom: 8px;
}

.contact-lead {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 24px;
}

.contact-card {
    background: var(--bg-light);
    padding: 28px;
    border-radius: var(--radius-lg);
}

.contact-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.contact-form {
    display: grid;
    gap: 16px;
    position: relative;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-field {
    display: grid;
    gap: 6px;
}

.contact-form label {
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font: inherit;
    background: var(--bg-white);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .btn {
    justify-self: start;
}

.contact-form .hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form-status {
    font-size: 0.95rem;
    min-height: 0;
}

.contact-form-status:empty {
    display: none;
}

.contact-form-status.ok {
    color: var(--success-green);
}

.contact-form-status.err {
    color: var(--primary-red);
}

.shipping-list {
    margin: 0;
    padding-left: 1.2em;
    color: var(--text-light);
    line-height: 1.7;
    display: grid;
    gap: 8px;
}

@media (max-width: 600px) {
    .contact-row {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 20px;
    }
}

/* Sell collection — homepage teaser + landing page */
.sell-teaser {
    background: linear-gradient(135deg, #1e2a3a 0%, #2d3f54 100%);
    color: #fff;
    padding: 48px 0;
}

.sell-teaser-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.sell-teaser-copy h2 {
    font-size: 1.85rem;
    margin-bottom: 12px;
    line-height: 1.25;
}

.sell-teaser-copy p {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.65;
    margin-bottom: 20px;
}

.sell-teaser-visual {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    min-height: 220px;
}

.sell-teaser-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 220px;
}

.sell-hero {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.sell-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sell-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 28, 38, 0.92) 0%, rgba(20, 28, 38, 0.55) 100%);
}

.sell-hero-content {
    position: relative;
    z-index: 1;
    padding: 56px 20px;
    max-width: 640px;
    color: #fff;
}

.sell-hero-content h1 {
    font-size: 2.25rem;
    margin: 12px 0;
    line-height: 1.2;
}

.sell-hero-content p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.sell-page {
    padding: 48px 0 64px;
    background: #eef1f4;
}

.sell-layout {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.15fr);
    gap: 32px;
    align-items: start;
}

.sell-info-panel {
    background: #1e2a3a;
    color: #fff;
    padding: 32px;
    border-radius: var(--radius-lg);
}

.sell-info-panel h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.sell-info-lead {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.65;
    margin-bottom: 20px;
}

.sell-trust-list {
    margin: 0 0 20px;
    padding-left: 1.2em;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}

.sell-trust-list li {
    margin-bottom: 8px;
}

.sell-info-note {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sell-info-email {
    margin: 0;
    font-size: 0.95rem;
}

.sell-info-email a {
    color: #fff;
    text-decoration: underline;
}

.sell-form-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.sell-form-card h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.sell-form-intro {
    color: var(--text-light);
    font-size: 0.92rem;
    margin-bottom: 20px;
}

.sell-form .req {
    color: var(--primary-red);
}

.sell-form .optional {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.85rem;
}

.sell-form select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font: inherit;
    background: var(--bg-white);
}

@media (max-width: 900px) {
    .sell-teaser-inner,
    .sell-layout {
        grid-template-columns: 1fr;
    }

    .sell-teaser-visual {
        order: -1;
        max-height: 240px;
    }

    .sell-hero-content h1 {
        font-size: 1.75rem;
    }
}

/* --- Liquidation wholesale portal (Phases A-D) --- */
.header-top {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.logo-text span {
    color: #60a5fa;
}

.nav-main a:hover {
    color: #93c5fd;
}

.qty-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.qty-badge.qty-ok {
    background: #ecfdf5;
    color: #047857;
}

.qty-badge.qty-low {
    background: #fffbeb;
    color: #b45309;
}

.qty-badge.qty-out {
    background: #f1f5f9;
    color: #64748b;
}

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    padding: 4px;
    border-radius: var(--radius);
}

.view-toggle button {
    border: none;
    background: transparent;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
}

.view-toggle button.active {
    background: var(--bg-white);
    color: var(--secondary-black);
    box-shadow: var(--shadow);
}

.quick-sku-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.quick-sku-bar label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary-black);
}

.quick-sku-bar input[type="text"] {
    flex: 1;
    min-width: 140px;
    padding: 9px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.quick-sku-bar input[type="number"] {
    width: 70px;
    padding: 9px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.catalog-list-wrap {
    overflow-x: auto;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

table.catalog-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.catalog-list th {
    text-align: left;
    padding: 12px 10px;
    background: #f1f5f9;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
}

table.catalog-list td {
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

table.catalog-list tr:hover {
    background: #f8fafc;
}

.catalog-list .col-thumb img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
}

.catalog-list .col-sku code {
    font-size: 0.82rem;
    color: #475569;
}

.catalog-list .col-title a {
    color: var(--secondary-black);
    font-weight: 500;
}

.catalog-list .col-title a:hover {
    color: var(--primary-red);
}

.catalog-list .col-order {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.catalog-list .col-order input[type="number"] {
    width: 56px;
    padding: 6px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.catalog-list .col-order .btn {
    padding: 6px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.btn-export {
    background: #fff;
    border: 1px solid var(--border-light);
    color: #334155;
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-export:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

/* Portal homepage */
.portal-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #fff;
    padding: 48px 20px;
    text-align: center;
}

.portal-hero h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.portal-hero p {
    max-width: 640px;
    margin: 0 auto 24px;
    opacity: 0.92;
    line-height: 1.6;
}

.portal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.portal-actions .btn-outline {
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
    background: transparent;
}

.portal-actions .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.portal-hero .quick-sku-bar {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}

.portal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 0 auto 32px;
}

.portal-stat {
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 16px;
}

.portal-stat strong {
    display: block;
    font-size: 1.5rem;
    color: #93c5fd;
}

.portal-stat span {
    font-size: 0.85rem;
    opacity: 0.85;
}

.portal-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.portal-section h2 {
    margin-bottom: 20px;
    font-size: 1.35rem;
}

.portal-brands {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.price-login a {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.9rem;
}

.dealer-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.92rem;
}

.minimum-order-warn {
    color: #b45309;
    font-size: 0.9rem;
    margin-top: 10px;
}

.order-progress-bar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #eff6ff;
    border-bottom: 1px solid #bfdbfe;
    padding: 10px 0;
    font-size: 0.92rem;
}

.order-progress-bar.hidden {
    display: none;
}

.order-progress-bar.order-progress-met {
    background: #ecfdf5;
    border-bottom-color: #a7f3d0;
}

.order-progress-bar.order-progress-below {
    background: #fffbeb;
    border-bottom-color: #fde68a;
}

.order-progress-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.order-progress-text strong {
    color: #1e3a8a;
}

.order-progress-bar.order-progress-met .order-progress-text strong {
    color: #047857;
}

.order-progress-bar.order-progress-below .order-progress-text strong {
    color: #92400e;
}

.order-progress-text span {
    color: #475569;
}

.order-progress-link {
    font-weight: 600;
    color: var(--primary-red);
    white-space: nowrap;
}

.checkout-pay-wrap.checkout-pay-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.checkout-pay-wrap.checkout-pay-disabled .paypal-button-container {
    filter: grayscale(0.35);
}

@media (max-width: 640px) {
    .order-progress-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.login-page {
    padding: 48px 20px;
    min-height: 50vh;
}

.login-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin-bottom: 8px;
}

.login-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.portal-brands a {
    padding: 10px 18px;
    background: var(--bg-light);
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--secondary-black);
    border: 1px solid var(--border-light);
}

.portal-brands a:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.portal-apply {
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
    text-align: center;
    padding: 32px 20px;
}

.portal-apply p {
    margin-bottom: 12px;
    color: var(--text-light);
}

/* Order sheet (cart) */
.order-sheet-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.order-sheet-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

table.order-sheet {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}

table.order-sheet th {
    text-align: left;
    padding: 12px;
    background: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

table.order-sheet td {
    padding: 12px;
    border-top: 1px solid var(--border-light);
    vertical-align: middle;
}

table.order-sheet .line-total {
    font-weight: 600;
    white-space: nowrap;
}

.order-summary-panel {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    max-width: 420px;
    margin-left: auto;
}

.order-summary-panel .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.order-summary-panel .summary-total {
    font-size: 1.2rem;
    font-weight: 700;
    border-top: 2px solid var(--border-light);
    padding-top: 12px;
    margin-top: 8px;
}

@media (max-width: 900px) {
    table.catalog-list .col-vendor,
    table.catalog-list th:nth-child(3) {
        display: none;
    }

    table.order-sheet .col-vendor,
    table.order-sheet th:nth-child(3) {
        display: none;
    }

    .portal-brands,
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .portal-brands,
    .brands-grid {
        grid-template-columns: 1fr;
    }
}
