/* Shop Page Styles */

:root {
    --isuzu-red: #E4002B;
    --isuzu-dark: #1a1a1a;
    --isuzu-black: #000000;
    --isuzu-gray: #666666;
    --isuzu-light-gray: #f8f8f8;
    --isuzu-white: #ffffff;
    --border-color: #e5e5e5;
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --font-primary: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--isuzu-dark);
    line-height: 1.6;
    background: var(--isuzu-white);
    overflow-x: hidden;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Page Hero */
.shop-overlay {
    inset: 0;
    position: absolute;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.45) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        transparent 100%
    );
    width: 100%;
    border-radius: 1em;
    height: 100%;
}

.page-hero {
    margin: 7em 1em 0 1em;
    padding: 10rem 0 10rem;
    text-align: center;
    background: var(--isuzu-light-gray);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
    border-radius: 1em;
}

.page-hero .container {
    background-color: #00000050;
    width: fit-content;
    padding: 1.5em ;
    border-radius: 8px;
    backdrop-filter: blur(6px);
    position: relative;
    z-index: 2;
    /* margin: 0 auto; */
}

.page-hero h1 {
    font-family: var(--font-secondary);
    font-size: 3.5rem;
    font-weight: 500;
    color: var(--isuzu-red);
    margin-bottom: 0.5rem;
}

.page-hero p {
    font-size: 1.25rem;
    color: var(--isuzu-white);
}

/* Shop Section */
.shop-section {
    padding: 3rem 0 5rem;
    background: var(--isuzu-light-gray);
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
    background: var(--isuzu-white);
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.filters-header h3 {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--isuzu-black);
}

.clear-filters {
    background: none;
    border: none;
    color: var(--isuzu-red);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters:hover {
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--isuzu-black);
    margin-bottom: 0.75rem;
}

.price-range-display {
    font-size: 0.8125rem;
    color: var(--isuzu-gray);
    font-weight: 500;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--isuzu-red);
}

.search-box svg {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--isuzu-gray);
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--isuzu-gray);
    transition: color 0.3s ease;
}

.filter-checkbox:hover {
    color: var(--isuzu-dark);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--isuzu-red);
}

/* Price Slider */
.price-slider-container {
    position: relative;
    padding: 1rem 0;
}

.price-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    margin: 0.5rem 0;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--isuzu-red);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(228, 0, 43, 0.2);
}

.price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--isuzu-red);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(228, 0, 43, 0.2);
}

/* Products Area */
.products-area {
    background: var(--isuzu-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Toolbar */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--isuzu-light-gray);
    border: none;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--isuzu-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-filter-toggle:hover {
    background: var(--border-color);
}

.results-count {
    font-size: 0.9375rem;
    color: var(--isuzu-gray);
    font-weight: 500;
}

.results-count span {
    color: var(--isuzu-red);
    font-weight: 600;
}

.sort-select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--isuzu-dark);
    background: var(--isuzu-white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--isuzu-red);
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    min-height: 32px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--isuzu-red);
    color: var(--isuzu-white);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.filter-tag button {
    background: none;
    border: none;
    color: var(--isuzu-white);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.filter-tag button:hover {
    transform: scale(1.2);
}

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

.product-card {
    background: var(--isuzu-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
}

.product-card.show {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInProduct 0.4s ease forwards;
}

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

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--isuzu-red);
}

.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    background: var(--isuzu-light-gray);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.75rem;
    border: 1.3px solid var(--success-green);
    background-color: #10b98153;
    color: var(--success-green);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.product-badge.out-of-stock {
    border: 1.3px solid var(--isuzu-gray);
    background-color: #66666675;
    color: var(--isuzu-gray);
}

.product-badge.on-offer {
    border: 1.3px solid var(--warning-orange);
    background-color: #f59f0b6a;
    color: var(--warning-orange);
}

.product-details {
    padding: 1.25rem;
}

.product-manufacturer {
    font-size: 0.8125rem;
    color: var(--isuzu-gray);
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-family: var(--font-secondary);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--isuzu-black);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-part-number {
    font-size: 0.8125rem;
    color: var(--isuzu-gray);
    margin-bottom: 0.75rem;
}

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

.product-price {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--isuzu-red);
}

.product-price-old {
    font-size: 1.125rem;
    color: var(--isuzu-gray);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-cart,
.btn-track {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-cart {
    background: var(--isuzu-red);
    color: var(--isuzu-white);
}

.btn-add-cart:hover {
    background: #c00024;
    transform: translateY(-2px);
}

.btn-track {
    background: var(--isuzu-light-gray);
    color: var(--isuzu-dark);
    border: 2px solid var(--border-color);
}

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

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--isuzu-white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
}

.cart-header h3 {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--isuzu-black);
}

.cart-close {
    background: none;
    border: none;
    color: var(--isuzu-gray);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.cart-close:hover {
    color: var(--isuzu-red);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--isuzu-light-gray);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    color: var(--isuzu-black);
    margin-bottom: 0.25rem;
}

.cart-item-part {
    font-size: 0.8125rem;
    color: var(--isuzu-gray);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-family: var(--font-secondary);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--isuzu-red);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--isuzu-white);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    border-color: var(--isuzu-red);
    color: var(--isuzu-red);
}

.qty-display {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--isuzu-gray);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.cart-item-remove:hover {
    color: var(--isuzu-red);
}

.cart-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--isuzu-black);
}

.cart-total span:last-child {
    color: var(--isuzu-red);
}

.btn-primary,
.btn-outline {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--isuzu-red);
    color: var(--isuzu-white);
    margin-bottom: 0.75rem;
}

.btn-primary:hover {
    background: #c00024;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--isuzu-dark);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--isuzu-light-gray);
}

.btn-block {
    width: 100%;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;

}

/* Cart FAB */
.cart-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--isuzu-red);
    border: none;
    border-radius: 50%;
    color: var(--isuzu-white);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-fab:hover {
    transform: scale(1.1);
}

.cart-fab.bounce {
    animation: cartBounce 0.5s ease;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.1); }
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: var(--isuzu-black);
    color: var(--isuzu-white);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Checkout Form */
.checkout-form-container {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.checkout-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.back-to-shop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--isuzu-light-gray);
    border: none;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--isuzu-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-shop:hover {
    background: var(--border-color);
}

.checkout-header h2 {
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--isuzu-black);
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
}

.checkout-details h3,
.order-summary h3 {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--isuzu-black);
    margin-bottom: 1.5rem;
}

.checkout-form .form-group {
    margin-bottom: 1.5rem;
}

.checkout-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--isuzu-black);
    margin-bottom: 0.5rem;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--isuzu-red);
}

.checkout-form textarea {
    resize: vertical;
}

.order-summary {
    background: var(--isuzu-light-gray);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.summary-items {
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item-name {
    font-size: 0.9375rem;
    color: var(--isuzu-dark);
}

.summary-item-qty {
    font-size: 0.8125rem;
    color: var(--isuzu-gray);
}

.summary-item-price {
    font-weight: 600;
    color: var(--isuzu-red);
}

.summary-totals {
    padding: 1rem 0;
    border-top: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--isuzu-dark);
}

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

.summary-row.total span:last-child {
    color: var(--isuzu-red);
}

/* Responsive */
@media (max-width: 1024px) {

    .page-hero{
        margin-top: 6em;
    }

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

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        z-index: 1001;
        max-height: 100vh;
        transition: left 0.4s ease;
    }

    .filters-sidebar.open {
        left: 0;
    }

    .mobile-filter-toggle {
        display: flex;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding: 0 1rem;
    }

    .page-hero h1 {
        font-size: 2.5rem;
    }

    .page-hero {
        padding: 6rem 8px 6rem;
    }

    .products-area {
        padding: 1.5rem 1rem;
    }

    .products-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
        bottom: 0;
        height: 80vh;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }

    .cart-sidebar.open {
        right: 0;
        bottom: 0;
        margin-top: auto;
    }

    .cart-fab {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .checkout-header h2 {
        font-size: 1.5rem;
    }
}