/* --- GLOBAL STYLES & VARIABLES --- */
:root {
    --color-yellow: #ffcd1c;
    --color-dark-gray: #262329;
    --color-medium-gray: #54595f;
    --color-light-gray-bg: #f0f0f0;
    --color-text: #555;
    --color-text-light: #666;
    --color-white: #ffffff;
    --font-main: 'Work Sans', sans-serif;
}

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

body {
    font-family: 'Work Sans', sans-serif;
    color: var(--color-text);
    background-color: #fff;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- MAIN CONTENT --- */


.finder-section {
    background-image: url('./assets/darker-cartridge-finder-background.jpg');
    background-size: cover;
    background-position: center center;
    padding: 40px 0 80px 0;
}

.finder-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.brand-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding-bottom: 30px;
    /* max-width: 1000px; */
}

.brand-tab {
    background-color: var(--color-white);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    width: 140px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-tab:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.brand-tab.active {
    box-shadow: 0 0 0 2px var(--color-yellow), 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--color-yellow);
}

.brand-tab img {
    max-width: 100%;
    max-height: 45px;
    object-fit: contain;
}

.cartridge-content {
    display: none;
    gap: 30px;
    width: 100%;
    /* max-width: 1000px; */
    justify-content: center;
}

.cartridge-content.active {
    display: flex;
}

.cartridge-list-box {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    flex: 1;
}

.cartridge-list-box h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text);
}

.cartridge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 25px;
    color: var(--color-text-light);
}

.search-form-box {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 500px;
}

.search-form-box h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.search-form-box form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-form-box select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: var(--color-white);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 24px;
}

.search-form-box button {
    background-color: var(--color-dark-gray);
    color: var(--color-white);
    border: none;
    padding: 14px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* --- RESPONSIVE STYLES --- */



@media (max-width: 1024px) {}

@media (max-width: 768px) {


    .cartridge-content {
        flex-direction: column;
    }


}

.image-brand {
    width: 150px;
    height: 60px;
}

/* Cartridge items */
.cartridge-item {
    cursor: pointer;
    transition: color 0.2s ease;
}

.cartridge-item:hover {
    color: var(--color-yellow);
    text-decoration: underline;
}

/* Cartridge search results */
.cartridge-results {
    width: 100%;
    max-width: 1000px;
    margin-top: 30px;
}

.special-order-message {
    padding: 2rem;
    text-align: center;
    background-color: var(--color-white);
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    margin-top: 1rem;
}

.special-order-message .pricereq {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.special-order-message .price-on-request-link1 {
    background: #ffcd1c;
    padding: 10px 20px;
    color: #000;
    font-size: 16px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.5s ease, background 0.5s ease;
    display: inline-block;
    margin-left: 5px;
}

.special-order-message .price-on-request-link1:hover {
    color: #fff;
    background: #000;
}

.search-error {
    padding: 1rem;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.no-results {
    color: #666;
    font-style: italic;
    padding: 2rem;
    text-align: center;
}

/* Product Grid - matches PrinterSearchComponent style */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 1rem;
}

.product-card {
    width: calc(33.333% - 14px);
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
}

/* When only one item, make it wider */
.product-grid .product-card:first-child:last-child {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.product-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    padding: 20px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.product-image img {
    max-height: 190px;
    max-width: 100%;
    object-fit: contain;
}

.product-details {
    padding: 15px;
    border-top: 1px solid #e1e1e1;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-sku {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 5px;
    text-align: left;
}

.product-brand {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: left;
    color: #000;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    height: 4.2em;
    overflow: hidden;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-title a {
    color: #002494;
    text-decoration: none;
}

.product-title a:hover {
    color: #ffcd1c;
}

.product-rating {
    margin-bottom: 10px;
    color: #ccc;
    font-size: 14px;
    text-align: left;
}

.product-price-action {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price-action .price {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.add-to-cart-btn {
    background-color: #002494;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: #001a75;
}

@media (max-width: 768px) {
    .product-grid {
        width: 100%;
    }

    .product-card {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .product-card {
        width: 100%;
    }
}