.category-product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.category-product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
}

.product-image-wrapper {
    display: flex;              /* Use flexbox for alignment */
    justify-content: center;    /* Center content horizontally */
    align-items: center;        /* Center content vertically if needed */
    margin: 0 auto;            /* Center the wrapper */
    position: relative;         /* Keep relative positioning for child elements */
}


.product-image-wrapper #main-image {
    position: relative;  /* Ensure the image is positioned properly */
    display: block;      /* Prevent inline spacing issues */
    max-width: 100%;    /* Make sure the image doesn't overflow the container */
    height: auto;       /* Maintain aspect ratio */
    margin: 0 auto;     /* Center the image horizontally */
}

.product-image.primary-image {
    opacity: 1;
}

.product-image.secondary-image {
    opacity: 0;
}

/* Only apply the hover effect if the product has a second image */
.has-secondary-image:hover .product-image.primary-image {
    opacity: 0;
}

.has-secondary-image:hover .product-image.secondary-image {
    opacity: 1;
}

.zoom-container {
    position: relative; /* Necessary for positioning */
    overflow: hidden;   /* Ensures no overflow from zoom */
    cursor: zoom-in;    /* Change cursor on hover */
    width: 100%;        /* Full width of parent */
    height: auto;       /* Maintain aspect ratio */
}

.zoom-container img {
    width: 100%;        /* Image should fill the container */
    height: auto;       /* Maintain aspect ratio */
    transition: transform 0.2s ease; /* Smooth zoom effect */
}

.product-card {
    --bs-card-spacer-y: none;
    border: none;
}

.sale-price,
.additional-info-icon {
    color: var(--primary-blue);
}

.card-footer {
    padding: 0;
    background-color: inherit;
    border-top: none;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: 12px;
    background-color: var(--primary-blue);
    color: white;
    padding: 3px 8px;
    z-index: 1;
}

.product-badge {
    width: auto;
}

@media (max-width: 500px) {
    .product-badge {
        font-size: 10px !important;
        padding: 3px 7px;
    }
}

@media (min-width: 1400px) {
    .product-badge {
        font-size: 15px !important;
        padding: 4px 10px;
    }
}

.promo-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    --bs-card-border-radius: none;
    --bs-card-border-color: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.promo-card-image,
.promo-card-sewing-image,
.promo-card-tryon-image,
.promo-card-homehire-image,
.promo-card-accessories-image,
.promo-card-kilt-image {
    height: 100%;
    width: 100%;
    position: relative;
    background: center/cover no-repeat;
}

.promo-card-sewing-image {
    background-image: url('https://formal-hire.lon1.digitaloceanspaces.com/formal-hire/media/sewingalterationpromocard.webp');
}

.promo-card-tryon-image {
    background-image: url('https://formal-hire.lon1.digitaloceanspaces.com/formal-hire/media/stockwarehousepromoimage.webp');
}

.promo-card-homehire-image {
    background-image: url('https://formal-hire.lon1.digitaloceanspaces.com/formal-hire/media/vanshomeservicepromoimage1.webp');
}

.promo-card-accessories-image {
    background-image: url('https://formal-hire.lon1.digitaloceanspaces.com/formal-hire/media/tieselection.webp');
}

.promo-card-kilt-image {
    background-image: url('https://formal-hire.lon1.digitaloceanspaces.com/formal-hire/media/kiltdiscountofferimage.webp');
}

.promo-card-text-section {
    background-image: linear-gradient(to top, rgba(52, 66, 121, 1) 15%, rgba(52, 66, 121, 0.9) 35%, rgba(52, 66, 121, 0.7) 40%, rgba(255, 0, 0, 0) 50%);
    height: 100%;
    width: 100%;
    position: absolute;
    bottom: 0;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.promo-card-icon {
    max-height: 15px;
    width: auto;
}

@media (max-width: 400px) {
    .promo-card-text-section {
        background-image: linear-gradient(to top, rgba(52, 66, 121, 1) 30%, rgba(52, 66, 121, 0.9) 40%, rgba(52, 66, 121, 0.8) 45%, rgba(52, 66, 121, 0.5) 50%, rgba(255, 0, 0, 0) 60%);
    }
}

.thumbnail-gallery {
    display: flex;
    align-items: center;
    margin-top: 15px;
    position: relative;
    width: 100%;
}

.thumbnail-gallery.hidden {
    display: none;
}

.thumbnail-images {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0;
    width: 100%; /* Match the width of the main image */
    white-space: nowrap;
}

.thumbnail-images img {
    width: 90px;
    height: 90px;
    max-width: 90px;
    max-height: 90px;
    object-fit: cover;
    margin-right: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s ease;
}

.thumbnail-images img.active {
    border: 1.5px solid var(--primary-blue);
}

.thumbnail-arrow {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    color: var(--primary-blue);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bolder;
    z-index: 0;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.thumbnail-arrow-left {
    left: 10px;
}

.thumbnail-arrow-right {
    right: 10px;
}

.thumbnail-arrow:hover {
    background-color: var(--primary-blue);
    color: #fff;
}

.image-logo {
    position: absolute;
    bottom: 3%;
    right: 3%;
    height: auto;
}

@media (max-width: 320px) {
    .image-logo {
        display: none;
    }
}

@media (min-width: 767px) and (max-width: 1199px) {
    .image-logo {
        display: none;
    }
}

.image-logo-suit-trends {
    position: absolute;
    bottom: 3%;
    right: 3%;
    width: 110px;
    height: auto;
}

@media (max-width: 500px) {
    .image-logo-suit-trends {
        width: 80px;
    }
}

.image-logo-formal-hire {
    position: absolute;
    bottom: 3%;
    right: 3%;
    width: 175px;
    height: auto;
}

@media (max-width: 500px) {
    .image-logo-formal-hire {
        width: 125px;
    }
}

.image-logo-welsh-tartan {
    position: absolute;
    bottom: 3%;
    right: 3%;
    width: 110px;
    height: auto;
}

@media (max-width: 500px) {
    .image-logo-welsh-tartan {
        width: 85px;
    }
}

.hr-full-width {
    border: 0.8px solid #000 !important;
    opacity: 0.1;
    margin: 7px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 0;
}

.pagination-link,
.pagination-number,
.pagination-active,
.pagination-ellipsis {
    display: inline-block;
    background-color: #e9e9e9;
    color: black;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    margin: 0 5px;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.pagination-link i {
    font-size: 11px;
}

.pagination-link:hover,
.pagination-number:hover {
    background-color: #d7d7d7;
}

.pagination-active {
    background-color: var(--primary-blue);
    color: white;
}

.feature-item {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0.5rem 0;
}

.feature-item i,
.feature-item span {
    line-height: 1; /* Center icon and text */
}

.product-banner {
    background-color: var(--primary-blue);
    color: #fff;
}

.product-wide-banner {
    background-color: var(--primary-blue);
    color: #fff;
}

.description-container {
    max-height: 65px; /* Initial height */
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
    background: linear-gradient(to bottom, transparent, white);
}

/* Full height when expanded */
.description-container.expanded {
    max-height: none;
    background: none;
}

/* Fade effect */
.description-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, white);
    display: block;
}

.description-container.expanded::after {
    display: none;
}

#read-more-btn {
    display: none;
    text-align: center;
    width: 100%;
    color: #000;
}

#description-container:not(.expanded) + #read-more-btn {
    display: inline-block;
}
