/**
 * Products block — card carousel rendered by ProductsBlockCell.
 *
 * Used on the homepage (templates/Bookings/index2.php) and on static
 * pages where editors drop a products block from the GrapesJS editor.
 *
 * Identical visual rules to the inline <style> block on index2.php; this
 * file lets the same markup render correctly on any page that loads it.
 */

.th2-products-block.th2-section { padding: 56px 0 24px; }

.th2-products-block .th2-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.th2-products-block .th2-section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
}
.th2-products-block .th2-section-link {
    color: #16a34a;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.th2-products-block .th2-section-link:hover { color: #15803d; }

.th2-products-block .th2-carousel { position: relative; }

.th2-products-block .th2-carousel-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.th2-products-block .th2-carousel-track.is-slide {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.th2-products-block .th2-carousel-track.is-slide::-webkit-scrollbar { display: none; }
.th2-products-block .th2-carousel-track.is-slide > * {
    flex: 0 0 calc((100% - 18px * 3) / 4);
    scroll-snap-align: start;
    display: flex;
}

.th2-products-block .th2-carousel-nav {
    position: absolute;
    top: 35%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1a202c;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background .15s ease, transform .15s ease;
}
.th2-products-block .th2-carousel-nav:hover { background: #f1f5f9; transform: scale(1.05); }
.th2-products-block .th2-carousel-nav[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.th2-products-block .th2-carousel-nav-prev { left: -20px; }
.th2-products-block .th2-carousel-nav-next { right: -20px; }

.th2-products-block .th2-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}
.th2-products-block .th2-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15,23,42,0.1);
    color: inherit;
}
.th2-products-block .th2-card-img {
    position: relative;
    padding-top: 100%;
    background: #f1f5f9 center/contain no-repeat;
}
.th2-products-block .th2-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f97316;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: capitalize;
    letter-spacing: 0.2px;
}
.th2-products-block .th2-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.th2-products-block .th2-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    line-height: 1.25;
}
.th2-products-block .th2-card-rate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 0.85rem;
}
.th2-products-block .th2-card-rate i { color: #f59e0b; }
.th2-products-block .th2-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}
.th2-products-block .th2-card-price {
    color: #475569;
    font-size: 0.85rem;
}
.th2-products-block .th2-card-price strong {
    color: #1a202c;
    font-size: 1rem;
    margin-left: 2px;
}
.th2-products-block .th2-card-btn {
    background: transparent;
    border: 1px solid #16a34a;
    color: #16a34a;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.th2-products-block .th2-card-btn:hover { background: #16a34a; color: #fff; }

@media (max-width: 1199.98px) {
    .th2-products-block .th2-carousel-track { grid-template-columns: repeat(3, 1fr); }
    .th2-products-block .th2-carousel-track > :nth-child(4) { display: none; }
    .th2-products-block .th2-carousel-track.is-slide > * { flex: 0 0 calc((100% - 18px * 2) / 3); }
}
@media (max-width: 991.98px) {
    .th2-products-block .th2-carousel-track { grid-template-columns: repeat(2, 1fr); }
    .th2-products-block .th2-carousel-track > :nth-child(3),
    .th2-products-block .th2-carousel-track > :nth-child(4) { display: none; }
    .th2-products-block .th2-carousel-track.is-slide > * { flex: 0 0 calc((100% - 18px) / 2); }
    .th2-products-block .th2-carousel-nav-prev { left: 6px; }
    .th2-products-block .th2-carousel-nav-next { right: 6px; }
}
@media (max-width: 575.98px) {
    .th2-products-block .th2-carousel-track { grid-template-columns: 1fr; }
    .th2-products-block .th2-carousel-track > :nth-child(2) { display: none; }
    .th2-products-block .th2-carousel-track.is-slide > * { flex: 0 0 85%; }
}
