/* VaraosaVerstaani - B2B Auto Parts Store */

:root {
    --primary-color: #1a365d;
    --primary-dark: #0f2440;
    --primary-light: #2c5282;
    --accent-color: #ed8936;
    --accent-hover: #dd6b20;
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --error-color: #e53e3e;
    --text-color: #2d3748;
    --text-light: #718096;
    --text-muted: #a0aec0;
    --bg-color: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-light);
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
}

.search-bar input:focus {
    outline: 2px solid var(--accent-color);
}

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

.header-link {
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.header-link:hover {
    color: white;
}

.cart-badge {
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Navigation */
.nav {
    background: var(--primary-dark);
    padding: 0 2rem;
}

.nav-list {
    display: flex;
    list-style: none;
    max-width: 1400px;
    margin: 0 auto;
    gap: 0;
}

.nav-item a {
    display: block;
    padding: 0.875rem 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-item a:hover,
.nav-item.active a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* Page Title */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Product Card */
.product-card {
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    aspect-ratio: 4/3;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.product-card-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.product-card-content {
    padding: 1.25rem;
}

.product-card-manufacturer {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-card-title a {
    color: inherit;
}

.product-card-title a:hover {
    color: var(--primary-color);
}

.product-card-code {
    font-size: 0.85rem;
    color: var(--text-light);
    font-family: 'Courier New', monospace;
    margin-bottom: 1rem;
}

.product-card-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.product-card-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-card-vat {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.product-image-main {
    aspect-ratio: 1;
    background: #f0f4f8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.product-image-main img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.product-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-manufacturer {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.product-code-box {
    background: var(--bg-color);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.product-code-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.product-code-value {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: var(--text-color);
}

.product-price-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-price-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.product-price-value {
    font-size: 2.25rem;
    font-weight: 700;
}

.product-price-vat {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--success-color);
    font-weight: 500;
}

.stock-dot {
    width: 10px;
    height: 10px;
    background: var(--success-color);
    border-radius: 50%;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-color);
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-color);
}

.quantity-btn:hover {
    background: var(--border-color);
}

.quantity-value {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

/* Specs Table */
.specs-section {
    margin-top: 3rem;
}

.specs-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border-color);
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table th,
.specs-table td {
    padding: 0.875rem 1rem;
    text-align: left;
}

.specs-table th {
    background: var(--bg-color);
    font-weight: 500;
    color: var(--text-light);
    width: 40%;
}

.specs-table td {
    font-weight: 500;
}

/* Shopping Cart */
.cart-container {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.cart-header {
    background: var(--bg-color);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background: var(--bg-color);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.cart-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.cart-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    background: #f0f4f8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-product-image img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}

.cart-product-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-product-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.cart-product-code {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cart-quantity {
    width: 80px;
}

.cart-quantity input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 1rem;
}

.cart-price {
    font-weight: 600;
    white-space: nowrap;
}

.cart-remove {
    color: var(--error-color);
    cursor: pointer;
    font-size: 1.25rem;
}

.cart-remove:hover {
    color: #c53030;
}

/* Cart Summary */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.cart-summary {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    position: sticky;
    top: 120px;
}

.cart-summary h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.summary-row.total {
    border-top: 2px solid var(--border-color);
    margin-top: 1rem;
    padding-top: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.summary-row .label {
    color: var(--text-light);
}

.summary-row.total .label {
    color: var(--text-color);
}

.cart-summary .btn-primary {
    margin-top: 1.5rem;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 2rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Utilities */
.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success-color);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Responsive */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

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

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .search-bar {
        order: 3;
        max-width: 100%;
        margin: 0;
        flex-basis: 100%;
    }

    .nav-list {
        overflow-x: auto;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .cart-table th:nth-child(4),
    .cart-table td:nth-child(4) {
        display: none;
    }
}
