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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    background: #faf9f7;
    min-height: 100vh;
    padding: 0;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

/* Header */
.header {
    background: #111827;
    color: white;
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    flex-wrap: wrap;
    gap: 20px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.exchange-rate {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.exchange-rate .label {
    color: rgba(255, 255, 255, 0.8);
}

.exchange-rate input[type="number"] {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

.exchange-rate input[type="number"]:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.exchange-rate .rate-suffix {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* Auto Exchange Rate (Read-only) */
.exchange-rate-auto input[type="text"] {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f5f4f1;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    cursor: default;
}

.rate-status {
    font-size: 10px;
    margin-left: 4px;
    animation: pulse 2s infinite;
}

.rate-status.online {
    color: #10b981;
}

.rate-status.offline {
    color: #dc2626;
    animation: none;
}

.rate-status.loading {
    color: #f59e0b;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Enduser Button */
.enduser-btn {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
    border: none;
    cursor: pointer;
}

.enduser-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4);
}

/* Admin Link (Lock Icon) */
.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.lock-icon {
    font-size: 20px;
    filter: grayscale(0%) brightness(10);
    opacity: 0.8;
}

/* Contact Banner */
.contact-banner {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    padding: 16px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 15px;
    border-bottom: 3px solid #0052CC;
}

.contact-label {
    font-weight: 600;
    opacity: 0.95;
}

.contact-name {
    font-weight: 700;
    font-size: 16px;
}

.contact-divider {
    opacity: 0.6;
    font-weight: 300;
}

.contact-email,
.contact-phone {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.contact-email:hover,
.contact-phone:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Grading Guide Popover */
.grading-guide-container {
    position: relative;
    display: inline-block;
}

.grading-guide-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grading-guide-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.grading-guide-popover {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 320px;
    z-index: 1000;
    display: none;
    color: #1e293b;
}

.grading-guide-popover.show {
    display: block;
    animation: popoverFadeIn 0.2s ease;
}

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

.popover-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.grading-guide-popover h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1e293b;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e2dc;
}

.grade-section {
    margin-bottom: 16px;
}

.grade-section:last-child {
    margin-bottom: 0;
}

.grade-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.grade-section-title.mvat {
    color: #059669;
}

.grade-section-title.svat {
    color: #7c3aed;
}

.grade-item {
    margin-bottom: 12px;
}

.grade-item:last-child {
    margin-bottom: 0;
}

.grade-name {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.grade-name.ab {
    background: rgba(5, 150, 105, 0.1);
    color: #10b981;
}

.grade-name.c {
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
}

.grade-name.faulty {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.grade-item p {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

/* Mobile adjustments for popover */
@media (max-width: 768px) {
    .grading-guide-popover {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 40px);
        max-width: 320px;
        padding: 20px;
        z-index: 2000;
    }

    .grading-guide-popover.show {
        animation: popoverFadeInMobile 0.2s ease;
    }

    @keyframes popoverFadeInMobile {
        from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    .popover-arrow {
        display: none;
    }

    .grading-guide-btn {
        padding: 3px 8px;
        font-size: 12px;
    }
}

/* Controls Panel */
.controls-panel {
    padding: 32px 48px;
    background: white;
    border-bottom: 1px solid #e5e2dc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.markup-control {
    flex: 1;
    min-width: 320px;
}

.markup-control label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 15px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e2dc;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0066FF;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0066FF;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.markup-value {
    font-weight: 700;
    font-size: 18px;
    color: #0066FF;
    min-width: 60px;
    text-align: right;
}

.markup-control small {
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
}

/* File Upload */
.file-upload {
    flex: 0 0 auto;
}

.file-label {
    display: inline-block;
    padding: 12px 24px;
    background: #1e40af;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
}

.file-label:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

#fileName {
    font-size: 14px;
}

/* Shipping Info Box - Collapsible */
.shipping-info-collapsible {
    margin: 16px 48px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #0066FF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
    overflow: hidden;
}

.shipping-info-toggle {
    width: 100%;
    padding: 16px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    transition: background 0.2s ease;
}

.shipping-info-toggle:hover {
    background: rgba(0, 102, 255, 0.08);
}

.toggle-icon {
    font-size: 20px;
}

.toggle-text {
    flex: 1;
    text-align: left;
}

.toggle-arrow {
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.shipping-info-toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

.shipping-info-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.shipping-info-content.show {
    max-height: 400px;
}

.shipping-info-content .shipping-details {
    padding: 0 24px 20px 24px;
    border-top: 1px solid rgba(0, 102, 255, 0.2);
}

/* Legacy shipping-info styles - keep for compatibility */
.shipping-info {
    margin: 24px 48px;
    padding: 24px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #0066FF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
}

.shipping-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.shipping-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shipping-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
}

.shipping-item .icon {
    font-size: 20px;
}

.shipping-item strong {
    color: #1e293b;
}

.shipping-item small {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-left: 32px;
}

.highlight-green {
    color: #10b981;
    font-weight: 700;
}

.highlight-orange {
    color: #0052CC;
    font-weight: 700;
}

/* Filters Panel */
.filters-panel {
    padding: 32px 48px;
    background: #faf9f7;
    border-bottom: 1px solid #e5e2dc;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 13px;
}

.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: white;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
    padding: 6px 0;
    font-size: 14px;
    color: #1e293b;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0066FF;
}

.mvat-label {
    color: #10b981;
}

.svat-label {
    color: #dc2626;
}

/* Grade Dropdown */
.grade-dropdown {
    position: relative;
}

.grade-dropdown-button {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grade-dropdown-button::after {
    content: '▼';
    font-size: 12px;
    color: #6b7280;
}

.grade-dropdown-button:hover,
.grade-dropdown-button:focus {
    border-color: #0066FF;
    outline: none;
}

.grade-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
    display: none;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.grade-dropdown-menu.show {
    display: block;
}

.grade-dropdown-menu .checkbox-label {
    padding: 8px;
    border-radius: 6px;
}

.grade-dropdown-menu .checkbox-label:hover {
    background: #faf9f7;
}

.grade-dropdown-menu .grade-separator {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.grade-dropdown-menu .grade-loading,
.grade-dropdown-menu .grade-empty {
    padding: 12px;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

.grade-dropdown-menu .checkbox-label small {
    color: #9ca3af;
    font-weight: normal;
    margin-left: 4px;
}

/* Color Dropdown */
.color-dropdown {
    position: relative;
}

.color-dropdown-button {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.color-dropdown-button::after {
    content: '▼';
    font-size: 12px;
    color: #6b7280;
}

.color-dropdown-button:hover,
.color-dropdown-button:focus {
    border-color: #0066FF;
    outline: none;
}

.color-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
}

.color-dropdown-menu.active {
    display: block;
}

.color-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.color-checkbox-label:hover {
    background: #faf9f7;
}

.color-checkbox-label input {
    margin: 0;
}

.color-dot-small {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.color-empty,
.color-loading {
    color: #6b7280;
    font-size: 13px;
    text-align: center;
    padding: 12px;
}

/* Capacity Dropdown */
.capacity-dropdown {
    position: relative;
}

.capacity-dropdown-button {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.capacity-dropdown-button::after {
    content: '▼';
    font-size: 12px;
    color: #6b7280;
}

.capacity-dropdown-button:hover,
.capacity-dropdown-button:focus {
    border-color: #0066FF;
    outline: none;
}

.capacity-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
}

.capacity-dropdown-menu.active {
    display: block;
}

.capacity-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.capacity-checkbox-label:hover {
    background: #faf9f7;
}

.capacity-checkbox-label input {
    margin: 0;
}

.capacity-empty,
.capacity-loading {
    color: #6b7280;
    font-size: 13px;
    text-align: center;
    padding: 12px;
}

/* Filter group for capacity */
.filter-group-capacity {
    margin-bottom: 16px;
}

.filter-group-capacity label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

/* Filter group for color */
.filter-group-color {
    margin-bottom: 16px;
}

.filter-group-color label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

.btn-secondary {
    width: 100%;
    padding: 10px 20px;
    background: #f5f4f1;
    color: #1e293b;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #e5e2dc;
}

/* Statistics */
.statistics {
    padding: 20px 48px;
    background: white;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e2dc;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 14px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #0066FF;
}

/* Table */
.table-container {
    overflow-x: auto;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: #faf9f7;
    border-bottom: 2px solid #e5e2dc;
}

thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    white-space: nowrap;
    color: #1e293b;
    font-size: 13px;
    border-right: 1px solid #e5e2dc;
}

thead th:last-child {
    border-right: none;
}

tbody tr {
    border-bottom: 1px solid #e5e2dc;
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: #faf9f7;
}

tbody td {
    padding: 16px 20px;
    color: #1e293b;
    border-right: 1px solid #f5f4f1;
}

tbody td:last-child {
    border-right: none;
}

/* Product thumbnail in table */
.th-img {
    width: 32px;
    padding: 4px 8px !important;
}

.product-thumb {
    width: 32px;
    padding: 4px 8px !important;
    cursor: pointer;
}

.product-thumb img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
    background: #faf9f7;
    transition: transform 0.2s;
}

.product-thumb:hover img {
    transform: scale(1.15);
}

/* Image Lightbox */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.image-lightbox img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.no-data {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 15px;
    height: 300px;
}

.no-data-select {
    padding: 80px 20px;
    background: linear-gradient(135deg, #faf9f7 0%, #f5f4f1 100%);
    height: 350px;
}

.no-data-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px auto;
    color: #0066FF;
    opacity: 0.8;
}

.no-data-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    text-align: center;
}

.no-data-subtitle {
    font-size: 14px;
    color: #6b7280;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
    text-align: center;
}

/* Badges */
.vat-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.vat-mvat {
    background: rgba(5, 150, 105, 0.1);
    color: #10b981;
}

.vat-svat {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.grade-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.grade-w {
    background: rgba(5, 150, 105, 0.1);
    color: #10b981;
}

.grade-c {
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
}

.grade-faulty {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.grade-asis {
    background: rgba(147, 51, 234, 0.1);
    color: #9333ea;
}

.grade-cpo {
    background: rgba(30, 64, 175, 0.1);
    color: #1e40af;
}

.stock-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(5, 150, 105, 0.1);
    color: #10b981;
}

/* Color and Capacity Cells */
.color-cell {
    white-space: nowrap;
}

.color-cell-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.capacity-cell {
    white-space: nowrap;
    font-weight: 500;
    color: #64748b;
}

/* Table Header - Thumbnail */
.th-thumb {
    width: 60px;
}

/* Price Cells */
.price-cell {
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.price-eur {
    color: #1e40af;
}

.price-huf {
    color: #10b981;
}

/* Quantity Input */
.qty-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

.qty-input:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.line-total {
    font-weight: 600;
    color: #1e293b;
    line-height: 1.6;
}

.line-total-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 6px;
}

.line-total-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.line-total-huf {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-left: 4px;
}

.line-total-gross {
    color: #0066FF;
    font-weight: 700;
}

/* Order Section - Compact Modern Layout */
.order-section {
    padding: 24px 48px;
    background: #faf9f7;
    border-top: 2px solid #e5e2dc;
}

.order-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

/* Order Form Container */
.order-form-container {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.order-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e2dc;
}

.order-form-compact {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.required {
    color: #dc2626;
}

.field-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #e5e2dc;
    color: #6b7280;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    cursor: help;
    margin-left: 2px;
}

.field-hint:hover {
    background: #0066FF;
    color: white;
}

.input-helper {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
    font-weight: 500;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e2dc;
    border-radius: 6px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    transition: all 0.2s ease;
    background: #fafafa;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: #0066FF;
    background: white;
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

.form-field input::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.shipping-toggle {
    padding: 8px 0;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.checkbox-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0066FF;
    cursor: pointer;
}

/* Order Summary Container */
.order-summary-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 160px;
}

.summary-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e2dc;
}

.order-items-compact {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #faf9f7;
    border-radius: 6px;
    margin-bottom: 6px;
    align-items: flex-start;
}

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

.order-item-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-item-meta {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
}

.order-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-btn:hover:not(:disabled) {
    background: #0066FF;
    color: white;
    border-color: #0066FF;
}

.cart-qty-btn:disabled {
    background: #f5f4f1;
    color: #d1d5db;
    cursor: not-allowed;
}

.cart-qty-display {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
}

.cart-delete-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #fca5a5;
    background: white;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-delete-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.order-item-price {
    font-weight: 700;
    color: #0066FF;
    font-size: 13px;
    text-align: right;
    white-space: nowrap;
    margin-left: 8px;
}

.no-items {
    text-align: center;
    color: #94a3b8;
    padding: 24px 12px;
    font-size: 13px;
}

.order-totals-compact {
    border-top: 1px solid #e5e2dc;
    padding-top: 12px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: #6b7280;
}

.total-line .amount {
    font-weight: 600;
    color: #1e293b;
}

.shipping-line .shipping.free {
    color: #10b981;
    font-weight: 700;
}

.total-final {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px dashed #e5e2dc;
    font-weight: 600;
    color: #1e293b;
}

.total-final .amount {
    color: #0066FF;
    font-size: 15px;
    font-weight: 700;
}

.btn-submit {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.35);
}

.btn-submit:disabled {
    background: #d1d5db;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Legacy btn-primary for compatibility */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: #0066FF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-primary:hover:not(:disabled) {
    background: #0052CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-primary:disabled {
    background: #d1d5db;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Order Section Responsive */
@media (max-width: 1024px) {
    .order-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .order-section {
        padding: 20px 24px;
    }

    .order-summary-container {
        position: static;
    }
}

@media (max-width: 768px) {
    .order-section {
        padding: 16px;
    }

    .order-form-container,
    .order-summary-container {
        padding: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .order-title,
    .summary-title {
        font-size: 16px;
    }

    /* Cart controls in order summary - mobile */
    .order-item {
        flex-direction: column;
        padding: 12px;
    }

    .order-item-price {
        text-align: left;
        font-size: 16px;
        margin-top: 8px;
        margin-left: 0;
        padding-top: 8px;
        border-top: 1px solid #e5e2dc;
    }

    .cart-qty-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .cart-delete-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .cart-qty-display {
        font-size: 16px;
        min-width: 32px;
    }
}

/* Modern Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #111827;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

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

.loading-logo {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.loading-logo span {
    color: #0066FF;
}

.loading-tagline {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 40px;
}

.loading-spinner {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.loading-spinner .dot {
    width: 12px;
    height: 12px;
    background: #0066FF;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-spinner .dot:nth-child(1) {
    animation-delay: 0s;
}

.loading-spinner .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-spinner .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

/* Legacy Loading Indicator */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 48px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 1000;
}

.spinner {
    border: 3px solid #e5e2dc;
    border-top: 3px solid #0066FF;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #1e293b;
    font-weight: 500;
    font-size: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 20px 24px;
    }

    .header h1 {
        font-size: 22px;
    }

    .contact-banner {
        padding: 12px 24px;
        font-size: 13px;
        gap: 8px;
    }

    .contact-name {
        font-size: 14px;
    }

    .controls-panel,
    .filters-panel,
    .statistics,
    .shipping-info,
    .order-section {
        padding: 24px;
    }

    .shipping-info-collapsible {
        margin: 12px 16px;
    }

    .shipping-info-toggle {
        padding: 12px 16px;
        font-size: 14px;
        gap: 10px;
    }

    .toggle-icon {
        font-size: 18px;
    }

    .shipping-info-content .shipping-details {
        padding: 0 16px 16px 16px;
    }

    .filters-panel {
        grid-template-columns: 1fr;
    }

    /* Mobile Card Layout for Products */
    .table-container {
        overflow-x: visible;
    }

    table {
        font-size: 14px;
        border: 0;
    }

    /* Hide table headers on mobile */
    thead {
        display: none;
    }

    /* Transform table rows into cards */
    tbody tr {
        display: block;
        background: white;
        border: 2px solid #e5e2dc;
        border-radius: 12px;
        margin-bottom: 16px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    tbody tr:hover {
        border-color: #0066FF;
        box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
    }

    tbody td {
        display: block;
        padding: 8px 0;
        border: 0;
        text-align: left;
    }

    /* Hide image thumbnail on mobile */
    tbody td:nth-child(1) {
        display: none !important;
    }

    /* Model name - make it prominent */
    tbody td:nth-child(2) {
        font-size: 18px;
        font-weight: 700;
        color: #1e293b;
        padding-bottom: 12px;
        border-bottom: 1px solid #e5e2dc;
        margin-bottom: 12px;
    }

    /* Flex container for mobile cards */
    tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
    }

    /* Model name - full width */
    tbody td:nth-child(2) {
        width: 100%;
        text-align: left;
        order: 1;
    }

    /* Badges row - all on one line, no wrapping */
    tbody td:nth-child(3),
    tbody td:nth-child(4),
    tbody td:nth-child(5) {
        order: 2;
        display: inline-flex;
        padding: 2px 3px;
        flex-shrink: 0;
        flex-grow: 0;
        width: auto !important;
    }

    /* After last badge, force next content to new line */
    tbody td:nth-child(5)::after {
        content: '';
        display: block;
    }

    /* Pseudo element for line break after badges */
    tbody tr::after {
        content: '';
        order: 3;
        flex-basis: 100%;
        height: 0;
    }

    /* EUR Price - left side of price box */
    tbody td:nth-child(6) {
        order: 4;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 14px;
        font-weight: 600;
        color: #1e40af;
        padding: 8px 12px;
        background: #f5f4f1;
        border: 1px solid #e5e2dc;
        border-radius: 8px 0 0 8px;
        border-right: none;
        margin-top: 8px;
    }

    /* HUF Price - right side of price box */
    tbody td:nth-child(7) {
        order: 5;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 14px;
        font-weight: 600;
        color: #10b981;
        padding: 8px 12px;
        background: #f5f4f1;
        border: 1px solid #e5e2dc;
        border-radius: 0 8px 8px 0;
        margin-top: 8px;
    }

    /* Quantity controls - full width */
    tbody td:nth-child(8) {
        order: 6;
        width: 100%;
    }

    /* Line total - full width */
    tbody td:nth-child(9) {
        order: 7;
        width: 100%;
    }

    /* Smaller badges on mobile */
    .grade-badge,
    .vat-badge,
    .stock-badge {
        font-size: 11px;
        padding: 3px 8px;
        white-space: nowrap;
    }

    /* Add labels before content on mobile */
    tbody td:nth-child(6)::before {
        content: '€';
        font-weight: 700;
        color: #6b7280;
        margin-right: 2px;
    }

    tbody td:nth-child(7)::before {
        content: 'Ft';
        font-weight: 700;
        color: #6b7280;
        margin-right: 2px;
    }

    /* Quantity controls - make prominent */
    tbody td:nth-child(8) {
        width: 100%;
        padding: 16px 0;
        margin: 12px 0;
        border-top: 1px solid #e5e2dc;
        border-bottom: 1px solid #e5e2dc;
    }

    .qty-controls {
        gap: 12px;
        justify-content: center;
    }

    .qty-btn {
        width: 44px;
        height: 44px;
        font-size: 22px;
        border-width: 2px;
    }

    .qty-display {
        font-size: 20px;
        font-weight: 700;
        min-width: 40px;
        text-align: center;
    }

    /* Line total */
    tbody td:nth-child(9) {
        width: 100%;
        font-size: 18px;
        font-weight: 700;
        color: #0066FF;
        text-align: center;
        padding: 12px 0 4px 0;
    }

    tbody td:nth-child(9)::before {
        content: 'Összesen: ';
        font-weight: 600;
        color: #6b7280;
    }

    /* Cart controls in order summary - mobile */
    .order-item {
        flex-direction: column;
        padding: 16px;
    }

    .order-item-price {
        text-align: left;
        font-size: 20px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #e5e2dc;
    }

    .cart-qty-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .cart-delete-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .cart-qty-display {
        font-size: 18px;
        min-width: 40px;
    }

    /* Exchange rate panel - wider on mobile */
    .exchange-rate {
        padding: 6px 12px;
        gap: 8px;
        font-size: 13px;
    }

    .exchange-rate .label {
        font-size: 12px;
    }

    .exchange-rate-auto input[type="text"] {
        width: 80px;
        font-size: 14px;
        padding: 6px 8px;
    }

    .exchange-rate .rate-suffix {
        font-size: 12px;
    }

    .rate-status {
        width: 8px;
        height: 8px;
    }

    /* Statistics as chips on mobile */
    .statistics {
        padding: 12px 16px;
        gap: 8px;
        justify-content: center;
        background: #faf9f7;
        border-bottom: 1px solid #e5e2dc;
    }

    .stat-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: white;
        border: 1px solid #e5e2dc;
        border-radius: 20px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    .stat-label {
        font-size: 11px;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .stat-value {
        font-size: 14px;
        font-weight: 700;
        color: #0066FF;
    }
}

/* Tablet View (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        padding: 24px 32px;
    }

    .contact-banner {
        padding: 14px 32px;
    }

    /* Keep card layout for tablets but adjust sizing */
    thead {
        display: none;
    }

    tbody tr {
        display: block;
        background: white;
        border: 2px solid #e5e2dc;
        border-radius: 12px;
        margin-bottom: 16px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    tbody tr:hover {
        border-color: #0066FF;
        box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
    }

    tbody td {
        display: block;
        padding: 8px 0;
        border: 0;
    }

    /* Flex container for tablet cards */
    tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    tbody td:nth-child(1) {
        width: 100%;
        font-size: 20px;
        font-weight: 700;
        padding-bottom: 12px;
        border-bottom: 1px solid #e5e2dc;
        margin-bottom: 12px;
        text-align: left;
    }

    tbody td:nth-child(2),
    tbody td:nth-child(3) {
        display: inline-block;
        padding: 4px 12px 4px 0;
        text-align: left;
    }

    tbody td:nth-child(4) {
        width: 100%;
        padding: 4px 0;
        text-align: left;
        margin-bottom: 4px;
    }

    /* Hide image thumbnail on tablet */
    tbody td:nth-child(1) {
        display: none !important;
    }

    /* Prices container - gray box with side by side layout */
    tbody td:nth-child(6) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 15px;
        font-weight: 600;
        color: #1e40af;
        padding: 10px 14px;
        background: #f5f4f1;
        border: 1px solid #e5e2dc;
        border-radius: 8px 0 0 8px;
        border-right: none;
        margin-left: auto;
    }

    tbody td:nth-child(7) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 15px;
        font-weight: 600;
        color: #10b981;
        padding: 10px 14px;
        background: #f5f4f1;
        border: 1px solid #e5e2dc;
        border-radius: 0 8px 8px 0;
        margin-right: auto;
    }

    tbody td:nth-child(6)::before {
        content: '€';
        font-weight: 700;
        color: #6b7280;
        margin-right: 2px;
    }

    tbody td:nth-child(7)::before {
        content: 'Ft';
        font-weight: 700;
        color: #6b7280;
        margin-right: 2px;
    }

    tbody td:nth-child(8) {
        width: 100%;
        padding: 16px 0;
        margin: 12px 0;
        border-top: 1px solid #e5e2dc;
        border-bottom: 1px solid #e5e2dc;
    }

    .qty-btn {
        width: 48px;
        height: 48px;
        font-size: 24px;
        border-width: 2px;
    }

    .qty-display {
        font-size: 22px;
        font-weight: 700;
        min-width: 50px;
    }

    tbody td:nth-child(9) {
        width: 100%;
        font-size: 19px;
        font-weight: 700;
        color: #0066FF;
        text-align: center;
        padding: 12px 0 4px 0;
    }

    tbody td:nth-child(9)::before {
        content: 'Összesen: ';
        font-weight: 600;
        color: #6b7280;
    }

    /* Cart controls in order summary - tablet */
    .cart-qty-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .cart-delete-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .cart-qty-display {
        font-size: 20px;
        min-width: 45px;
    }
}

/* Quantity Controls (+/- buttons) */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover:not(:disabled) {
    background: #0066FF;
    color: white;
    border-color: #0066FF;
    transform: scale(1.05);
}

.qty-btn:disabled {
    background: #f5f4f1;
    color: #d1d5db;
    cursor: not-allowed;
    border-color: #e5e2dc;
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #1e293b;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 100px;
    right: 24px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 15px;
    max-width: 350px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #10b981;
    color: #1e293b;
}

.toast-info {
    border-left: 4px solid #0066FF;
    color: #1e293b;
}

.toast-error {
    border-left: 4px solid #dc2626;
    color: #1e293b;
}

/* Toast positioned below floating cart */
.toast.below-cart {
    top: 75px;
}

@media (max-width: 768px) {
    .toast.below-cart {
        top: 65px;
    }
}

/* Sticky Header Container */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

/* Shipping progress first (top), filters second */
.shipping-progress-sticky {
    order: 1;
}

.filters-panel-sticky {
    order: 2;
}

/* Shipping Progress Bar - Sticky Version */
.shipping-progress-sticky {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-bottom: 1px solid #0066FF;
    padding: 8px 24px;
}

.progress-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.progress-message {
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
    flex-shrink: 0;
}

.progress-message strong {
    color: #0066FF;
}

.shipping-progress-sticky .progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e2dc;
    border-radius: 4px;
    overflow: hidden;
    min-width: 100px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066FF, #0052CC);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Filters Panel - Sticky Version */
.filters-panel-sticky {
    background: #faf9f7;
    border-bottom: 1px solid #e5e2dc;
}

.filter-toggle {
    display: none;
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    text-align: left;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.filter-toggle:hover {
    background: rgba(0, 102, 255, 0.05);
}

.filter-toggle::after {
    content: '▼';
    font-size: 10px;
    color: #6b7280;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.filter-toggle.active::after {
    transform: rotate(180deg);
}

.filter-toggle-icon {
    font-size: 16px;
}

.active-filter-count {
    background: #0066FF;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.filters-content {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-row {
    width: 100%;
}

.filter-row-category {
    display: flex;
    justify-content: center;
}

.filter-group-category {
    text-align: center;
}

.filter-group-category label {
    display: block;
    margin-bottom: 12px;
}

.filter-row-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: start;
}

/* Desktop: Model selector full width, search/grade on second row */
@media (min-width: 1025px) {
    .filter-row-options {
        grid-template-columns: 1fr 1fr auto;
        gap: 16px 24px;
    }

    .filter-row-options .filter-group-models {
        grid-column: 1 / -1;
        min-width: auto;
    }

    .filter-row-options .filter-group-models .model-selector-panel {
        max-height: 180px;
    }
}

.filters-content .filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 13px;
}

/* Category Buttons */
.category-buttons {
    display: flex;
    justify-content: center;
    gap: clamp(12px, 4vw, 32px);
    width: 100%;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    min-width: 90px;
    border: 2px solid #e5e2dc;
    border-radius: 14px;
    background: white;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.category-btn svg {
    width: 32px;
    height: 32px;
    stroke: #6b7280;
    transition: stroke 0.2s ease;
}

.category-btn:hover {
    border-color: #d1d5db;
    background: #faf9f7;
}

.category-btn.active {
    border-color: #0066FF;
    background: rgba(0, 102, 255, 0.08);
    color: #1e293b;
}

.category-btn.active svg {
    stroke: #0066FF;
}

/* Category Stock Badge */
.category-stock {
    font-size: 11px;
    font-weight: 700;
    color: white;
    background: #94a3b8;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 2px;
}

.category-btn.active .category-stock {
    background: #0066FF;
}

.category-btn:hover .category-stock {
    background: #6b7280;
}

.category-btn.active:hover .category-stock {
    background: #0052CC;
}

/* Model Selector Panel */
.filter-group-models {
    min-width: 300px;
}

.model-selector-panel {
    background: white;
    border: 1px solid #e5e2dc;
    border-radius: 10px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.series-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e2dc;
}

.series-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #e5e2dc;
    border-radius: 6px;
    background: #faf9f7;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.series-btn:hover {
    border-color: #0066FF;
    color: #1e293b;
}

.series-btn.active {
    background: rgba(0, 102, 255, 0.1);
    border-color: #0066FF;
    color: #1e293b;
}

.model-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.model-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    padding: 4px 0;
    white-space: nowrap;
}

.model-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0066FF;
    cursor: pointer;
}

.model-checkbox-label:hover {
    color: #1e293b;
}

.model-checkbox-label.checked {
    color: #1e293b;
    font-weight: 500;
}

.filters-content .filter-group select,
.filters-content .filter-group input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: white;
}

.filters-content .filter-group select:focus,
.filters-content .filter-group input[type="text"]:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.filters-content .btn-secondary {
    margin-top: 0;
}

/* Reset button aligned with dropdowns */
.filter-group-reset {
    display: flex;
    flex-direction: column;
}

.label-placeholder {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
    visibility: hidden;
}

.btn-reset {
    width: 100%;
    padding: 10px 20px;
    background: #f5f4f1;
    color: #1e293b;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    height: 42px;
}

.btn-reset:hover {
    background: #e5e2dc;
    border-color: #94a3b8;
}

.btn-reset:active {
    transform: scale(0.98);
}

/* Mobile: hide placeholder label */
@media (max-width: 1024px) {
    .label-placeholder {
        display: none;
    }

    .btn-reset {
        margin-top: 8px;
    }
}

/* Desktop: sticky toggle + shipping, filter content scrolls or shows as overlay */
@media (min-width: 1025px) {
    .sticky-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 100;
    }

    /* Shipping progress at the very top */
    .shipping-progress-sticky {
        padding: 10px 48px;
    }

    .filters-panel-sticky {
        position: relative;
    }

    /* Filter toggle */
    .filter-toggle {
        display: flex;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .filters-content {
        display: flex;
        flex-direction: column;
        padding: 20px 48px;
        max-height: 1200px;
        overflow: visible;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease;
        opacity: 1;
    }

    .filters-content.collapsed {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        overflow: hidden;
    }

}

/* Tablet and Mobile: collapsible filters */
@media (max-width: 1024px) {
    .sticky-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: white;
    }

    .filter-toggle {
        display: flex;
    }

    .filters-content {
        display: flex;
        flex-direction: column;
        padding: 16px 24px;
        border-top: 1px solid #e5e2dc;
        max-height: 1200px;
        overflow: visible;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease;
        opacity: 1;
    }

    .filters-content.collapsed {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        overflow: hidden;
    }

    .filter-row-options {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .filter-group-models {
        grid-column: 1 / -1;
        min-width: auto;
    }

    .model-selector-panel {
        max-height: 150px;
    }

    .shipping-progress-sticky {
        padding: 6px 16px;
    }

    .progress-content {
        gap: 12px;
    }

    .progress-message {
        font-size: 12px;
    }

    .shipping-progress-sticky .progress-bar {
        height: 6px;
    }
}

/* Mobile: single column filters */
@media (max-width: 768px) {
    .filters-content {
        gap: 12px;
        padding: 12px 16px;
    }

    .filter-row-options {
        grid-template-columns: 1fr;
    }

    .filter-group-models {
        min-width: auto;
    }

    .model-selector-panel {
        max-height: 120px;
    }

    .series-buttons {
        gap: 4px;
    }

    .series-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .model-checkboxes {
        gap: 2px 8px;
    }

    .model-checkbox-label {
        font-size: 12px;
    }

    .filter-toggle {
        padding: 10px 16px;
        font-size: 14px;
    }

    .progress-content {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }

    .progress-message {
        text-align: center;
        font-size: 11px;
    }

    .shipping-progress-sticky .progress-bar {
        height: 5px;
    }

    .category-btn {
        padding: 12px 16px;
        min-width: 70px;
    }

    .category-btn svg {
        width: 24px;
        height: 24px;
    }

    .category-btn span {
        font-size: 11px;
    }
}

/* VAT Row Styling */
.vat-row {
    color: #6b7280;
    font-size: 14px;
}

.total-line.vat-row {
    font-size: 12px;
    color: #94a3b8;
}

/* Artisjus Row Styling */
.total-line.artisjus-row {
    color: #0052CC;
}

.total-line.artisjus-row .amount {
    color: #0052CC;
}

/* Floating Cart Value */
.floating-cart-value {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #0066FF, #0052CC);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.35);
    z-index: 100;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-cart-value:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.45);
}

.floating-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.floating-cart-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.floating-cart-items {
    font-size: 11px;
    opacity: 0.85;
    font-weight: 500;
}

.floating-cart-total {
    font-size: 15px;
    font-weight: 700;
}

/* Toast positioning when cart is visible */
.toast-container.cart-visible {
    top: 80px !important;
}

@media (max-width: 768px) {
    .floating-cart-value {
        bottom: 12px;
        right: 8px;
        left: 8px;
        padding: 10px 14px;
        border-radius: 50px;
        justify-content: center;
        width: calc(100vw - 16px);
        max-width: none;
    }

    .floating-cart-total {
        font-size: 14px;
    }

    .floating-cart-items {
        font-size: 11px;
    }

    .fab-container {
        right: 8px;
        bottom: 12px;
    }

    .fab-container.cart-visible {
        bottom: 76px;
    }

    .fab {
        width: 50px;
        height: 50px;
    }
}

/* Floating Action Buttons (FAB) */
.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1000;
    transition: bottom 0.3s ease;
}

.fab-container.cart-visible {
    bottom: 96px;
}

.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
}

.fab:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.fab-whatsapp {
    background: #25D366;
    color: white;
}

.fab-whatsapp:hover {
    background: #128C7E;
}

.fab-whatsapp svg {
    display: block;
}

.fab-order {
    background: #0066FF;
    color: white;
    display: none !important; /* Removed - using dynamic floating cart instead */
}

.fab-order-icon {
    font-size: 28px;
}

.fab-scroll-top {
    background: #6b7280;
    color: white;
}

.fab-scroll-top:hover {
    background: #475569;
}

.fab-cart-icon {
    display: block;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

/* Footer */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 48px;
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 40px;
    align-items: start;
}

.footer-brand {
    text-align: left;
}

.footer-company {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.footer-tax {
    font-size: 13px;
    color: white;
    font-family: monospace;
    pointer-events: none;
    user-select: text;
}

.footer-established {
    font-size: 12px;
    color: #475569;
    margin-top: 8px;
    font-style: italic;
}

.footer-links {
    text-align: center;
}

.footer-links-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin-bottom: 16px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 24px;
}

.footer-links-grid a {
    color: #e5e2dc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.footer-links-grid a span {
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
}

.footer-links-grid a:hover {
    color: #0066FF;
}

.footer-links-grid a:hover span {
    color: #94a3b8;
}

.footer-contact {
    text-align: right;
}

.footer-contact-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin-bottom: 12px;
}

.footer-email {
    color: #0066FF;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.footer-email:hover {
    color: #2dd4bf;
}

.footer-bottom {
    background: #020617;
    padding: 16px 48px;
    text-align: center;
    font-size: 12px;
    color: #475569;
    border-top: 1px solid #1e293b;
}

/* Footer Responsive */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        padding: 32px 24px;
    }

    .footer-brand {
        text-align: left;
    }

    .footer-contact {
        text-align: right;
    }

    .footer-links {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
        padding: 24px 16px;
    }

    .footer-brand,
    .footer-contact,
    .footer-links {
        text-align: center;
    }

    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .footer-bottom {
        padding: 12px 16px;
    }
}

/* ============================================
   Retail Password Modal
   ============================================ */
.retail-password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.retail-password-modal.active {
    display: flex;
}

.retail-modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.retail-modal-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #111827;
}

.retail-modal-content p {
    color: #6b7280;
    margin-bottom: 20px;
}

.retail-modal-content input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
}

.retail-modal-content input:focus {
    outline: none;
    border-color: #0066FF;
}

.retail-error-msg {
    color: #ef4444;
    font-size: 14px;
    margin-bottom: 12px;
}

.retail-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.retail-modal-buttons button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.retail-btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.retail-btn-cancel:hover {
    background: #e5e7eb;
}

.retail-btn-submit {
    background: #0066FF;
    color: white;
}

.retail-btn-submit:hover {
    background: #0052cc;
}
