/* =====================================================
   ESI SA — Category Scroll Styles
   Mobile-first | Astra + WooCommerce
   Add this file as: esi-sa-child/esi-scroll.css
   ===================================================== */

/* ---------------------
   Category Section Wrap
   --------------------- */
.esi-cat-section {
    margin-bottom: 32px;
}

.esi-cat-section + .esi-cat-section {
    border-top: 1px solid #ebebeb;
    padding-top: 24px;
}

/* ---------------------
   Category Row Header
   --------------------- */
.esi-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    margin-bottom: 12px;
}

.esi-cat-title {
    font-size: 17px;
    font-weight: 600;
    color: #111111;
    margin: 0;
    line-height: 1.2;
}

.esi-cat-link {
    font-size: 12px;
    color: #2b5c29;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.esi-cat-link:hover {
    text-decoration: underline;
}

/* ---------------------
   Horizontal Scroll Row
   --------------------- */
.esi-scroll-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 16px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.esi-scroll-row::-webkit-scrollbar {
    display: none;
}

/* ---------------------
   Product Card
   --------------------- */
.esi-product-card {
    flex: 0 0 140px;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid #ebebeb;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.18s ease;
}

.esi-product-card:hover {
    transform: translateY(-2px);
    border-color: #c8ddc6;
    text-decoration: none;
    color: inherit;
}

/* ---------------------
   Card Image
   --------------------- */
.esi-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f4f2ed;
}

.esi-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.esi-product-card:hover .esi-card-img img {
    transform: scale(1.04);
}

/* ---------------------
   Card Body
   --------------------- */
.esi-card-body {
    padding: 8px 10px 12px;
}

.esi-card-name {
    font-size: 11.5px;
    color: #333333;
    margin: 0 0 6px;
    line-height: 1.35;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.esi-card-price {
    font-size: 13px;
    color: #2b5c29;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

/* Strip WooCommerce price wrapper margin */
.esi-card-price .price {
    color: #2b5c29;
    font-size: 13px;
    font-weight: 700;
}

.esi-card-price del {
    font-size: 10px;
    color: #aaaaaa;
    font-weight: 400;
    margin-right: 4px;
}

/* =====================================================
   TABLET: 768px+
   ===================================================== */
@media (min-width: 768px) {

    .esi-cat-header {
        padding: 0 32px;
    }

    .esi-cat-title {
        font-size: 18px;
    }

    .esi-scroll-row {
        padding: 4px 32px 16px;
        gap: 14px;
    }

    .esi-product-card {
        flex: 0 0 165px;
    }

    .esi-card-name {
        font-size: 12px;
    }
}

/* =====================================================
   DESKTOP: 1024px+
   ===================================================== */
@media (min-width: 1024px) {

    .esi-product-card {
        flex: 0 0 185px;
    }

    .esi-cat-section {
        margin-bottom: 40px;
    }

    .esi-cat-title {
        font-size: 19px;
    }

    .esi-card-name {
        font-size: 12.5px;
    }

    .esi-card-price {
        font-size: 14px;
    }
}
