/* === Custom Product Grid Styling for Hanna Sale Products === */
.custom-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 16px;
}

.custom-product-card,
.swiper-slide {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* ensure content stacks naturally */
    min-height: auto; /* content defines height */
    padding: 16px;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    background: #fff;
    transition: 0.3s ease-in-out;
    position: relative;
}

.custom-product-card:hover,
.swiper-slide:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.product-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    text-align: left;
    line-height: 1.4;
    min-height: 45px;
}

.product-price {
    font-size: 16px;
    color: #007cba;
    font-weight: 700;
    text-align: left;
    margin-bottom: 8px;
}

.product-button {
    text-align: left;
    margin-top: auto; /* pushes button to bottom if space allows */
}

.product-button a.button {
    background-color: #007cba;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
    border: 2px solid #007cba;
}

.product-button a.button:hover {
    background-color: #fff;
    color: #005e99;
    border-color: #005e99;
}

/* Sold Out badge */
.sold-out-badge {
    display: inline-block;
    background: #d6d8db;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 37px;
    font-weight: 600;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
}

/* Inquire Now button */
.inquire-button {
    background-color: #25d366;
    border: 2px solid #25d366;
    color: #fff;
}

.inquire-button:hover {
    background-color: #fff;
    color: #128c7e;
    border-color: #128c7e;
}

/* Search & Sort Toolbar */
.product-toolbar {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.product-toolbar input,
.product-toolbar select {
    flex: 1;
    min-width: 220px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    background-color: #f9f9f9;
    transition: 0.3s;
}

.product-toolbar input:focus,
.product-toolbar select:focus {
    border-color: #007cba;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15);
}

/* Mobile Toolbar */
@media (max-width: 600px) {
    .product-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
    }
    .product-toolbar input {
        flex: 1 1 auto;
        min-width: 140px;
    }
    .product-toolbar select {
        flex: 0 0 100px;
        min-width: 100px;
    }
}

/* ==== Swiper Slider Styling ==== */
.swiper-container {
    position: relative;
    padding-bottom: 50px;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

.swiper-wrapper {
    padding-bottom: 10px;
}

.swiper-slide {
    min-height: 380px; /* enough to fit all content */
}

.swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    margin: 0 4px;
    border-radius: 50%;
    opacity: 1;
    transition: background 0.3s;
}

.swiper-pagination-bullet-active {
    background: #007cba;
}

/* Swiper Arrows */
.swiper-button-next,
.swiper-button-prev {
    width: 42px;
    height: 42px;
    background-color: #007cba;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    color: white;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.swiper-container:hover .swiper-button-next,
.swiper-container:hover .swiper-button-prev {
    opacity: 1;
    visibility: visible;
}

.swiper-button-next { right: 10px; }
.swiper-button-prev { left: 10px; }

/* Hide arrows on mobile */
@media (max-width: 767px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .swiper-container::after {
        content: "← Swipe →";
        display: block;
        text-align: center;
        font-size: 13px;
        color: #666;
        margin-top: 10px;
    }
}

/* === Responsive Product Grid === */
@media (max-width: 767px) {
    .custom-product-grid {
        grid-template-columns: 1fr;
    }
    .product-title,
    .product-price,
    .product-button {
        text-align: left;
    }
}
