/* Main layout containers */
.product-header-flex {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 30px;
    gap: 30px;
}

@media (min-width: 768px) {
    .product-header-flex {
        flex-direction: row;
    }

    .image-column {
        flex: 0 0 45%;
        max-width: 45%;
    }

    .details-column {
        flex: 1;
    }
}

.image-column {
    width: 100%;
    background: #404040;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.details-column {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.details-column h1 {
    padding: 10px 10px;
    margin: 0;
    border-bottom: 1px solid #eee;
    background-color: #404040;
    color: #fff;
}

.details-column-body {
    padding: 20px;
}

.kit-builder-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 992px) {
    .kit-builder-grid {
        flex-direction: row;
    }
}

.kit-column {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #ddd;
}

.kit-column h2 {
    padding: 10px 10px;
    margin: 0;
    border-bottom: 1px solid #eee;
    background-color: #404040;
    color: #fff;
    font-size: 1.2em;
}

/* Kit Summary Panel */
.kit-summary {
    flex: 0 0 320px;
    position: sticky;
    top: 130px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.kit-summary h2 {
    padding: 10px 10px;
    margin: 0;
    border-bottom: 1px solid #eee;
    background-color: #404040;
    color: #fff;
    font-size: 1.2em;
}

.kit-summary-body {
    padding: 10px;
}

/* Category & Part Cards */
.product-group-title {
    background: #333;
    color: #FFF;
    padding: 10px 20px;
    font-size: 1em;
    border-top: 1px solid #eee;
    margin: 0;
    font-weight: bold;
    cursor: pointer;
    position: relative;
}

.product-group-title::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4em;
    font-weight: bold;
}

.product-group-title.active::after {
    content: '-';
}

.product-group-content.collapsed {
    display: none;
}

.part-card {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 15px;
    transition: border-color 0.2s;
    background-color: #fff;
}

.part-card:hover {
    border-color: #007bff;
}

.part-card.selected {
    border-color: #28a745;
    background-color: #f0fff4;
}

.part-card-header {
    grid-column: 1;
    grid-row: 1;
    font-weight: bold;
    font-size: 1em;
}

.part-card-product-type {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.9em;
    color: #555;
}

.part-card-specs {
    color: #555;
    font-size: 0.9em;
}

.part-card-pricing {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 100px;
}

.part-card-pricing .price {
    font-size: 1.2em;
    font-weight: bold;
    color: #000;
}

.stock-status {
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    margin-top: 5px;
    display: inline-block;
}

.stock-status.in-stock {
    background-color: #28a745;
}

.stock-status.ex-manufacturer {
    background-color: #6c757d;
}

.part-card-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 15px;
    align-items: start;
}

.part-card-image {
    width: 80px;
    height: 80px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

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

.part-card-main-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.part-card-notes {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.85em;
    color: red;
    margin-top: 8px;
}

/* Part Actions */
.part-card-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.add-part-btn,
.view-product-btn,
.part-added-indicator,
.remove-part-btn {
    flex: 1;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 5px;
    text-align: center;
    transition: background-color 0.2s;
}

.add-part-btn {
    background-color: #FFFF00;
    color: #000;
}

.add-part-btn:hover {
    background-color: #404040;
    color: #fff;
}

.view-product-btn {
    background-color: #404040;
}

.view-product-btn:hover {
    background-color: #333;
    color: #fff;
}

.part-qty-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.part-added-indicator {
    display: none;
    background-color: #28a745;
    color: white;
    cursor: default;
}

.part-added-indicator .fa-check {
    margin-right: 5px;
}

.remove-part-btn {
    display: none;
    background-color: #404040;
}

.remove-part-btn:hover {
    background-color: #333;
}

.part-card-badge-container {
    flex: 0 0 100%;
    display: flex;
    justify-content: flex-start;
    padding-left: 5px;
    margin-bottom: 5px;
}

/* Labels */
.part-card-optional-label,
.part-card-required-label,
.part-card-recommended-label {
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    width: auto;
}

.part-card-optional-label {
    background-color: #6c757d;
}

.part-card-required-label {
    background-color: #FF0000;
}

.part-card-recommended-label {
    background-color: #007bff;
}

.part-sub-group-title {
    font-size: 1em;
    font-weight: bold;
    color: #555;
    padding: 15px 10px 5px;
    margin: 10px 0 0 0;
    border-top: 1px dashed #ccc;
}

/* Filters */
#global-filter-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.filter-group h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 0.9em;
}

@media (min-width: 768px) {
    .filter-controls {
        flex-direction: row;
        align-items: center;
    }
}

.filter-controls label {
    font-weight: 600;
    flex: 1;
}

.filter-controls select {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: block;
    margin-top: 4px;
    width: 100%;
}

/* Summary Items */
.summary-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.summary-group-title {
    font-size: 1em;
    font-weight: bold;
    color: #333;
    margin: 15px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #333;
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-item-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.summary-item-specs {
    font-size: 0.85em;
    color: #555;
    margin-top: 4px;
}

.summary-remove-btn {
    background: none;
    border: none;
    color: #000;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    padding: 0 0 0 15px;
    line-height: 1;
    flex-shrink: 0;
}

.summary-remove-btn:hover {
    color: #c82333;
}

.summary-item-details {
    flex-grow: 1;
}

.summary-total {
    font-size: 1.5em;
    font-weight: bold;
    text-align: right;
}

/* Buttons */
.add-to-cart-btn {
    background-color: #ffff00;
    color: #000;
    border: none;
    padding: 15px;
    width: 100%;
    text-transform: uppercase;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 15px;
}

.clear-all-btn {
    background-color: #f8f9fa;
    color: #343a40;
    border: 1px solid #ddd;
    padding: 8px;
    width: 100%;
    text-transform: uppercase;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.add-to-cart-btn:hover {
    background-color: #404040;
    color: #fff;
}

/* Visibility classes */
#front-suspension-container .product-list-section,
#rear-suspension-container .product-list-section,
.template-hidden {
    display: none;
}

/* Vehicle Header Styles */
.vehicle-title {
    margin: 0;
    padding: 0;
    font-size: 1.5em;
}

.vehicle-years {
    margin-top: 10px;
    font-weight: normal;
    color: #555;
}

.open-search-btn {
    margin-top: 20px;
    padding: 10px 15px;
    border: none;
    text-transform: uppercase;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: #FFFF00;
    color: #000;
}

.open-search-btn:hover {
    background-color: #404040;
    color: #fff;
}

.vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* No Kits Message */
.no-kits-container {
    text-align: center;
    padding: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 30px;
}

.no-kits-title {
    font-size: 1.5em;
    color: #333;
}

.padded-message {
    padding: 20px;
}