.available-products-wrapper {
    position: relative;
}

/* Add selling badge override for tartan detail */
.available-products-grid .selling-badge {
    background-color: var(--primary-grey) !important;
}

.available-products-banner {
    background-color: var(--primary-red);
    height: 180px;
    display: flex;
    position: relative;
    z-index: 1;
    padding-top: 1.75rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 1;
}

.available-products-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-red);
    opacity: 0.82;
    z-index: -1;
}

@media (max-width: 767px) {
    .available-products-banner {
        padding-top: 2rem;
        background-size: 200% auto;
        background-position: center;
    }
}

.available-products-heading {
    color: white;
    text-transform: uppercase;
    margin: 0;
}

.available-products-subheading {
    color: white;
    text-transform: uppercase;
    font-weight: 300;
}

.available-products-grid {
    position: relative;
    margin-top: -80px;
    z-index: 2;
}

/* Default desktop (4 columns) - only for xl screens */
@media (min-width: 1200px) {
    .available-products-grid .row>div:nth-child(-n+4) .product-list-image-container {
        box-shadow: 0 -12px 12px rgba(0, 0, 0, 0.1);
    }
}

/* Tablet and smaller desktop (3 columns) */
@media (max-width: 1199px) and (min-width: 768px) {
    .available-products-grid .row>div:nth-child(-n+3) .product-list-image-container {
        box-shadow: 0 -12px 12px rgba(0, 0, 0, 0.1);
    }
}

/* Mobile (2 columns) */
@media (max-width: 767px) {
    .available-products-banner {
        background-size: 125% auto !important;
        background-position: top center;
    }

    .available-products-grid {
        margin-top: -60px;
    }

    .available-products-grid .row>div:nth-child(-n+2) .product-list-image-container {
        box-shadow: 0 -12px 12px rgba(0, 0, 0, 0.1);
    }
}

/* Product Card Styles from products.css */
.product-title {
    transition: text-decoration 0.2s ease-in-out !important;
}

@media (hover: hover) and (pointer: fine) {
    .product-card-link:hover .product-title {
        text-decoration: underline !important;
    }
}

@media (max-width: 400px) {
    .product-list-content {
        font-size: 0.9rem !important;
    }
}

.selling-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--primary-red);
    color: white;
    padding: 4px 8px;
    font-size: 0.85rem;
    font-weight: 300;
    z-index: 10;
    text-transform: uppercase;
    max-width: 35%;
    white-space: normal;
    line-height: 1.2;
    word-wrap: break-word;
    text-align: center;
}

@media (max-width: 575px) {
    .selling-badge {
        display: none !important;
    }
}

/* Product Meta Styles */
.product-meta {
    margin-top: 0.3rem;
    display: flex;
    flex-direction: column;
}

.product-meta__item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--bs-gray-600);
    letter-spacing: 0.01em;
}

.product-meta__icon {
    margin-right: 0.4rem;
    opacity: 0.7;
    color: var(--bs-gray-600);
}

.product-meta__text {
    font-weight: 300;
}

@media (max-width: 575px) {
    .product-meta {
        align-items: center;
        margin-top: 0.5rem;
    }

    .product-meta__item {
        justify-content: center;
        text-align: center;
    }
}

/* Product Image Transition Styles */
.product-list-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.product-list-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Only apply transition effects when there are multiple images */
.has-multiple-images .product-list-image {
    transition: transform 0.3s ease-in-out;
}

.product-list-image--primary {
    z-index: 1;
}

.product-list-image--secondary {
    z-index: 2;
    transform: translateX(100%);
}

/* Only apply hover effects when there are multiple images */
@media (hover: hover) and (pointer: fine) {
    .has-multiple-images:hover .product-list-image--secondary {
        transform: translateX(0);
    }

    .has-multiple-images:hover .product-list-image--primary {
        transform: translateX(-100%);
    }
}

.associated-names-tooltip {
    background-color: var(--primary-red);
    color: white;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Conditional product image border - only apply to products not in top row */
.product-image-border-conditional {
    /* Default: no border for all products */
    border: none;
    padding: 0;
}

/* XL screens (≥1200px): First 4 products get shadow, rest get border */
@media (min-width: 1200px) {
    .product-image-border-conditional:not(.product-1):not(.product-2):not(.product-3):not(.product-4) {
        border: 1px solid rgba(0, 0, 0, 0.175);
        padding: 0.5rem;
    }
}

/* Tablet and smaller desktop (768px-1199px): First 3 products get shadow, rest get border */
@media (max-width: 1199px) and (min-width: 768px) {
    .product-image-border-conditional:not(.product-1):not(.product-2):not(.product-3) {
        border: 1px solid rgba(0, 0, 0, 0.175);
        padding: 0.5rem;
    }
}

/* Mobile (≤767px): First 2 products get shadow, rest get border */
@media (max-width: 767px) {
    .product-image-border-conditional:not(.product-1):not(.product-2) {
        border: 1px solid rgba(0, 0, 0, 0.175);
        padding: 0.5rem;
    }
}