/* ================================================
   ESPRESSIMO BEST SELLERS WIDGET Proto V1
   ================================================ */

.elementor-widget-espressimo_best_sellers_proto_v1,
.elementor-widget-espressimo_weekly_picks_proto_v1 {
    width: 100%;
}

.elementor-widget-espressimo_best_sellers_proto_v1 .elementor-widget-container,
.elementor-widget-espressimo_weekly_picks_proto_v1 .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
}

/* ------------------------------------------------
   SECTION
   ------------------------------------------------ */
.esp-bestsel {
    background-color: #fff9f2;
    border-bottom: 1px solid #e6dad4;
}

/* ------------------------------------------------
   HEADER
   ------------------------------------------------ */
.esp-bestsel__header {
    padding: 48px 56px 32px;
    border-bottom: 1px solid #e6dad4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.esp-bestsel__heading {
    margin: 0;
}

.esp-bestsel__subtitle-section {
    margin: 0;
}

/* ------------------------------------------------
   CAROUSEL WRAPPER
   ------------------------------------------------ */
.esp-bestsel__carousel {
    display: flex;
    align-items: stretch;
}

/* ------------------------------------------------
   NAV BUTTONS
   ------------------------------------------------ */
.esp-bestsel__nav {
    flex-shrink: 0;
    width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #522c25;
    transition: background-color 0.15s;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.esp-bestsel__nav:hover {
    background-color: #f6ede3 !important;
}

.esp-bestsel__nav--prev {
    border-left: 1px solid #e6dad4 !important;
    order: 3;
}

.esp-bestsel__nav--next {
    border-right: 1px solid #e6dad4 !important;
    order: 1;
}

.esp-bestsel__nav:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ------------------------------------------------
   TRACK
   ------------------------------------------------ */
.esp-bestsel__track-wrap {
    flex: 1;
    overflow: hidden;
    order: 2;
}

.esp-bestsel__track {
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
}

/* ------------------------------------------------
   CARD
   ------------------------------------------------ */
.esp-bestsel__card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    text-decoration: none !important;
    color: inherit;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.esp-bestsel__card:hover {
    background-color: #f0e6dc;
}

/* ------------------------------------------------
   IMAGE
   ------------------------------------------------ */
.esp-bestsel__img-outer {
    width: 100%;
    margin-bottom: 20px;
}

.esp-bestsel__img-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f6ede3 !important;
}

.esp-bestsel__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block;
    padding: 16px;
    box-sizing: border-box;
    mix-blend-mode: multiply;
}

.esp-bestsel__img-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    transition: background-color 0.2s;
}

.esp-bestsel__card:hover .esp-bestsel__img-overlay {
    background-color: rgba(82,44,37,0.04);
}

/* ------------------------------------------------
   TEXT
   ------------------------------------------------ */
.esp-bestsel__name {
    margin: 0 0 6px 0;
}

.esp-bestsel__category {
    margin: 0 0 12px 0;
}

.esp-bestsel__prices {
    margin-top: auto;          /* pin prices to the bottom of every (equal-height) card */
    display: flex;
    justify-content: right;    /* whole price block on the PHYSICAL right, direction-proof */
    align-items: baseline;
    gap: 10px;
}

/* Normal row + DOM order [currency, number] → ש"ח to the LEFT of the number.
   (Number stays the last span so the comma-format JS still formats it.) */
.esp-bestsel__price {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
}

.esp-bestsel__price-original {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    text-decoration: line-through;
    opacity: 0.4;
    font-size: 0.85em;         /* slightly larger per client */
    font-weight: 400;
}

.esp-bestsel__currency {
    font-size: 0.75em;
    opacity: 0.7;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .esp-bestsel__header {
        padding: 32px 24px 24px;
    }
    .esp-bestsel__nav {
        width: 44px;
    }
    /* Card width is driven by the carousel JS (responsive cards-per-view) — don't override it here. */
    .esp-bestsel__card {
        padding: 28px 20px;
    }
    .esp-bestsel__img {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    /* Item 9 — centre the section title on mobile. */
    .esp-bestsel__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        padding: 24px 16px 18px;
    }
    /* Item 10 — visible round nav arrows overlaid on the carousel (mobile). */
    .esp-bestsel__carousel { position: relative; }
    .esp-bestsel__nav {
        position: absolute;
        top: 40%;
        transform: translateY(-50%);
        width: 42px;
        height: 42px;
        border: none !important;
        background: rgba(255, 255, 255, 0.94) !important;
        border-radius: 50%;
        box-shadow: 0 2px 10px rgba(82, 44, 37, 0.22);
        z-index: 5;
    }
    .esp-bestsel__nav--prev { right: 8px; }
    .esp-bestsel__nav--next { left: 8px; }
    .esp-bestsel__nav:disabled { opacity: 0.35; }
    .esp-bestsel__card {
        padding: 20px 16px;
    }
    .esp-bestsel__img-outer {
        margin-bottom: 14px;
    }
    /* Item 10 — larger tag + price on mobile. */
    .esp-bestsel__name { font-size: 20px !important; }
    .esp-bestsel__category { font-size: 15px !important; }
    .esp-bestsel__price { font-size: 23px !important; }
    .esp-bestsel__price-original { font-size: 16px !important; }
}


/* Phones: two cards per view (client 2026-10-19), so cards and type are compact. */
@media (max-width: 560px) {
    .esp-bestsel__card { padding: 10px 8px !important; }
    .esp-bestsel__img-outer { margin-bottom: 8px !important; }
    .esp-bestsel__name { font-size: 15px !important; line-height: 1.3 !important; }
    .esp-bestsel__category { font-size: 13px !important; line-height: 1.4 !important;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .esp-bestsel__price { font-size: 17px !important; }
    .esp-bestsel__price-original { font-size: 13px !important; }
    .esp-bestsel__card-badge { font-size: 12px !important; padding: 2px 7px !important; }
    .esp-bestsel__nav { width: 34px !important; height: 34px !important; top: 32% !important; }
    .esp-bestsel__nav--prev { right: 4px !important; }
    .esp-bestsel__nav--next { left: 4px !important; }
}
@media (max-width: 560px) { .esp-bestsel__nav svg { width: 16px !important; height: 16px !important; } }
@media (max-width: 560px) { .esp-bestsel__nav { padding: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; } .esp-bestsel__nav svg { flex: 0 0 16px; } }

@media (max-width: 560px) { .esp-bestsel__nav { top: calc(10px + (50vw - 16px) / 2) !important; transform: translateY(-50%) !important; } }

@media (max-width: 560px) { .esp-bestsel__name { font-size: 13px !important; line-height: 1.35 !important; } } /* client 2026-10-19 */

/* exec-ui 2026-10-19 (d-contrast): old price solid #75605a instead of 40% brown. */
.esp-bestsel__price-original { opacity: 1; color: #75605a; }

/* Card category line contrast >= 4.5:1, also on the hover background #f0e6dc
   (was rgba(139,58,0,.8) = 4.2:1 on hover; .86 = 4.8:1 on hover, 5.5:1 on #fff9f2), 2026-10-20 */
.esp-bestsel__category { color: rgba(139, 58, 0, 0.86) !important; }
