/* ================================================
   ESPRESSIMO PRODUCT HERO WIDGET Proto V1
   ================================================ */

.elementor-widget-espressimo_product_hero_proto_v1,
.elementor-widget-espressimo_product_hero_proto_v1 .elementor-widget-container {
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

/* ------------------------------------------------
   STICKY BOTTOM BAR
   ------------------------------------------------ */
.esp-ph__bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-top: 1px solid #e6dad4;
    background: rgba(255, 249, 242, 0.97);
    backdrop-filter: blur(12px);
}

.esp-ph__bar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 40px;
}

.esp-ph__bar-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f6ede3;
    overflow: hidden;
    flex-shrink: 0;
}

.esp-ph__bar-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    padding: 4px;
}

.esp-ph__bar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.esp-ph__bar-title {
    font-family: 'Dialect PM', sans-serif;
    font-size: 17px;
    font-weight: bold;
    color: #522c25;
}

.esp-ph__bar-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.esp-ph__bar-rating {
    font-family: 'Dialect PM', sans-serif;
    font-size: 13px;
    color: #75605a;
    opacity: 1;
    margin-right: 4px;
}

.esp-ph__bar-spacer { flex: 1; }

.esp-ph__bar-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.esp-ph__bar-price {
    font-family: 'Dialect PM', sans-serif;
    font-size: 26px;
    font-weight: bold;
    color: #522c25;
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
}

.esp-ph__bar-orig {
    font-family: 'Dialect PM', sans-serif;
    font-size: 18px;
    color: #522c25;
    opacity: 0.3;
    text-decoration: line-through;
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
}

.esp-ph__bar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #8B3A00;
    color: #fff;
    font-family: 'Dialect PM', sans-serif;
    font-size: 17px;
    letter-spacing: 0.05em;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
    flex-shrink: 0;
}

.esp-ph__bar-btn:hover {
    background: #a34500;
    color: #fff;
}

/* ------------------------------------------------
   HERO SPLIT
   ------------------------------------------------ */
.esp-ph {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #e6dad4;
}

/* ------------------------------------------------
   LEFT: GALLERY
   ------------------------------------------------ */
.esp-ph__gallery {
    width: 52%;
    flex-shrink: 0;
    border-left: 1px solid #e6dad4;
    position: sticky;
    top: 68px;
    /* Size to its own content (image + thumbs) and stick — instead of being locked to the
       viewport height, which warped the cover crop on short laptop viewports. align-self
       stops the stretch flex row from forcing it to the info column's height. */
    align-self: flex-start;
    display: flex;
    flex-direction: column;
}

.esp-ph__main-wrap {
    /* Container is the dynamic part: aspect-ratio makes its height track its width, so the
       cover image keeps the same proportions across views (matches the 1920 look). */
    aspect-ratio: 7 / 6;
    position: relative;
    background: #f6ede3;
    overflow: hidden;
}

/* Blurred backdrop: a soft, enlarged copy of the current product image fills the
   panel behind the sharp product, per the design. */
.esp-ph__main-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(28px) saturate(1.1);
    transform: scale(1.25);
    opacity: 0.55;
    z-index: 0;
    pointer-events: none;
}

.esp-ph__main-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100% !important;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
    /* WooCommerce-style hover lens: JS sets transform-origin to the cursor + scales up.
       Short transition so the zoom-in/out is smooth but the pan still tracks the cursor. */
    transition: transform 0.12s ease-out;
}

.esp-ph__counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 2;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    color: #522c25;
    font-family: 'Dialect PM', sans-serif;
    font-size: 16px;
    padding: 4px 12px;
    border-radius: 9999px;
}

.esp-ph__zoom {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 2;
    /* !important beats the theme's button background (which showed as pink). */
    background: rgba(255,255,255,0.7) !important;
    backdrop-filter: blur(8px);
    border: none !important;
    border-radius: 9999px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

/* P2 — hover is brown (was pink), with a white icon. */
.esp-ph__zoom:hover { background: #8B3A00 !important; }
.esp-ph__zoom svg { stroke: #522c25; transition: stroke 0.15s; }
.esp-ph__zoom:hover svg { stroke: #fff; }

/* P2 — zoom lightbox overlay. */
.esp-ph__lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(20, 10, 6, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}
.esp-ph__lightbox img {
    max-width: 96vw;
    max-height: 92vh;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 60px rgba(0,0,0,0.5);
}
.esp-ph__lightbox-close {
    position: absolute;
    top: 18px;
    inset-inline-end: 22px;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
}

.esp-ph__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: background 0.15s;
}

.esp-ph__arrow:hover { background: #fff; }
.esp-ph__arrow--prev { left: 12px; }
.esp-ph__arrow--next { right: 12px; }

.esp-ph__thumbs {
    display: flex;
    border-top: 1px solid #e6dad4;
    flex-shrink: 0;
}

.esp-ph__thumb {
    flex: 1;
    aspect-ratio: 1;
    background: #f6ede3 !important;
    border: none;
    border-left: 1px solid #e6dad4;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.15s, box-shadow 0.15s;
    padding: 0;
}

.esp-ph__thumb:first-child { border-left: none; }

.esp-ph__thumb:hover { opacity: 0.7; background: #f6ede3 !important; }

.esp-ph__thumb.is-active {
    opacity: 1;
    box-shadow: inset 0 0 0 2px #c46500;
}

.esp-ph__thumb img {
    width: 100%;
    height: 100% !important;
    object-fit: contain;
    mix-blend-mode: multiply;
    padding: 8px;
    box-sizing: border-box;
}

/* ------------------------------------------------
   RIGHT: PRODUCT INFO
   ------------------------------------------------ */
.esp-ph__info {
    flex: 1;
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 68px);
}

/* Badges */
.esp-ph__badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.esp-ph__brand {
    font-family: 'Dialect PM', sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: #c46500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esp-ph__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d4c4bc;
}

.esp-ph__category {
    font-family: 'Dialect PM', sans-serif;
    font-size: 18px;
    color: #75605a;
    opacity: 1;
}

.esp-ph__stock {
    font-family: 'Dialect PM', sans-serif;
    font-size: 14px;
    padding: 2px 12px;
    border-radius: 9999px;
    color: #fff;
}

.esp-ph__stock.is-instock    { background: #8B3A00; }
.esp-ph__stock.is-outofstock { background: #999; }
.esp-ph__stock.is-outofstock { background: #999; }

.esp-ph__shipping {
    font-family: 'Dialect PM', sans-serif;
    font-size: 14px;
    padding: 2px 12px;
    border-radius: 9999px;
    background: rgba(196,101,0,0.15);
    color: #c46500;
}

/* Title */
.esp-ph__title {
    font-family: 'Dialect PM', sans-serif;
    font-size: 58px;
    line-height: 1.05;
    font-weight: bold;
    color: #522c25;
    letter-spacing: 0.03em;
    margin: 0 0 8px 0;
}

.esp-ph__subtitle {
    font-family: 'Dialect PM', sans-serif;
    font-size: 24px;
    line-height: 1.5;
    color: #75605a;
    opacity: 1;
    margin: 0;
}

/* Pricing */
.esp-ph__pricing {
    display: flex;
    align-items: baseline;
    gap: 16px;
    border-top: 1px solid #e6dad4;
    border-bottom: 1px solid #e6dad4;
    padding: 20px 0;
    flex-wrap: wrap;
}

.esp-ph__price {
    font-family: 'Dialect PM', sans-serif;
    font-size: 54px;
    font-weight: bold;
    color: #522c25;
    line-height: 1;
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
}

.esp-ph__orig {
    font-family: 'Dialect PM', sans-serif;
    font-size: 26px;
    color: #522c25;
    opacity: 0.3;
    text-decoration: line-through;
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
}

.esp-ph__savings {
    font-family: 'Dialect PM', sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #8B3A00;
    background: rgba(139,58,0,0.1);
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.esp-ph__installments {
    font-family: 'Dialect PM', sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #c46500;
    background: rgba(196,101,0,0.1);
    padding: 4px 12px;
    border-radius: 8px;
}

/* Delivery */
.esp-ph__delivery {
    background: #f6ede3;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 24px;
}

.esp-ph__delivery-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.esp-ph__delivery-label {
    font-family: 'Dialect PM', sans-serif;
    font-size: 16px;              /* P3 — scaled up */
    color: #75605a;
    opacity: 1;
}

.esp-ph__delivery-val {
    font-family: 'Dialect PM', sans-serif;
    font-size: 19px;             /* P3 — scaled up */
    font-weight: bold;
    color: #522c25;
}

.esp-ph__delivery-sep {
    width: 1px;
    background: #e6dad4;
    align-self: stretch;
}

/* CTA */
.esp-ph__cta {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.esp-ph__qty {
    display: flex;
    align-items: center;
    border: 1px solid #e6dad4;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.esp-ph__qty-btn {
    width: 48px;
    height: 52px;
    background: transparent;
    border: none;
    font-size: 22px;
    color: #522c25;
    cursor: pointer;
    transition: background 0.15s;
}

.esp-ph__qty-btn:hover { background: #f6ede3; }

.esp-ph__qty-num {
    width: 40px;
    text-align: center;
    font-family: 'Dialect PM', sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: #522c25;
}

.esp-ph__cart-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #8B3A00;
    color: #fff;
    font-family: 'Dialect PM', sans-serif;
    font-size: 22px;
    letter-spacing: 0.05em;
    height: 52px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.esp-ph__cart-btn:hover { background: #a34500; color: #fff; }

.esp-ph__expert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid rgba(82,44,37,0.3);
    color: #522c25;
    font-family: 'Dialect PM', sans-serif;
    font-size: 18px;
    padding: 0 16px;
    height: 52px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
}

.esp-ph__expert-btn:hover {
    border-color: #522c25;
    background: #f6ede3;
    color: #522c25;
}

/* Trust Icons */
.esp-ph__trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    border-top: 1px solid #e6dad4;
    padding-top: 16px;
}

.esp-ph__trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.esp-ph__trust-item span {
    font-family: 'Dialect PM', sans-serif;
    font-size: 15px;
    color: #75605a;
    opacity: 1;
}

/* Quick Nav */
.esp-ph__quicknav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    border-top: 1px solid #e6dad4;
    padding-top: 16px;
}

.esp-ph__quicknav-item {
    text-align: center;
    font-family: 'Dialect PM', sans-serif;
    font-size: 15px;
    color: #522c25;
    background: #ede0d4;
    border: 1px solid #d4c4bc;
    border-radius: 8px;
    padding: 8px 4px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.esp-ph__quicknav-item:hover {
    background: #e0cfc4;
    border-color: #c46500;
    color: #8B3A00;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    /* Stack hero: gallery on top, info below */
    .esp-ph {
        flex-direction: column;
    }
    .esp-ph__gallery {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #e6dad4;
        position: static;
        top: auto;
        height: auto;
    }
    .esp-ph__main-wrap {
        aspect-ratio: 4 / 3;
        flex: none;
    }
    .esp-ph__main-img,
    .esp-ph__thumb img {
        max-width: 100%;
    }
    .esp-ph__info {
        max-height: none;
        overflow-y: visible;
        padding: 32px 24px;
    }
    .esp-ph__title {
        font-size: 42px;
    }
    .esp-ph__price {
        font-size: 44px;
    }
    .esp-ph__bar-inner {
        padding: 10px 24px;
    }
}

@media (max-width: 560px) {
    .esp-ph__info {
        padding: 24px 16px;
    }
    .esp-ph__title {
        font-size: 34px;
    }
    .esp-ph__subtitle {
        font-size: 20px;
    }
    .esp-ph__price {
        font-size: 38px;
    }
    .esp-ph__orig {
        font-size: 22px;
    }
    /* Stack delivery panel and CTA */
    .esp-ph__delivery {
        flex-direction: column;
        gap: 12px;
    }
    .esp-ph__delivery-sep {
        display: none;
    }
    .esp-ph__cta {
        flex-wrap: wrap;
    }
    .esp-ph__cart-btn {
        flex: 1 1 100%;
        order: 2;
    }
    .esp-ph__expert-btn {
        flex: 1 1 100%;
        order: 3;
    }
    /* Trust + quicknav drop to 2 columns */
    .esp-ph__trust,
    .esp-ph__quicknav {
        grid-template-columns: repeat(2, 1fr);
    }
    .esp-ph__bar-inner {
        padding: 8px 16px;
        gap: 10px;
    }
    .esp-ph__bar-info {
        display: none;
    }
    .esp-ph__bar-price {
        font-size: 20px;
    }
    .esp-ph__bar-btn {
        padding: 10px 16px;
        font-size: 15px;
    }
}

/* Breadcrumb (2026-10-13), same look as the category hero crumbs */
.esp-ph__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 48px; border-bottom: 1px solid #e6dad4; font-size: 18px; color: #522c25; }
.esp-ph__crumb { color: #75605a; text-decoration: none; opacity: 1; transition: opacity 0.2s ease; }
.esp-ph__crumb:hover { opacity: 1; color: #522c25; }
.esp-ph__crumb--current { font-weight: 700; opacity: 1; color: #522c25; }
.esp-ph__crumb-sep { opacity: 0.3; }
@media (max-width: 1024px) { .esp-ph__crumbs { padding-left: 24px; padding-right: 24px; } }
@media (max-width: 560px) { .esp-ph__crumbs { font-size: 14px; gap: 6px; padding: 10px 16px; } }


/* 2026-10-13: the info column no longer scrolls inside a fixed height (its last rows were
   cut off by the next section); the gallery stays sticky beside it. Chips size to their text. */
.esp-ph__info { max-height: none !important; overflow: visible !important; }
.esp-ph__quicknav { display: flex !important; flex-wrap: wrap; }
.esp-ph__quicknav-item { flex: 1 1 auto; padding: 8px 14px; white-space: nowrap; }

/* Room under the footer for the sticky purchase bar (69px desktop, 65px phones) so it never hides the
   footer's last row (client 2026-10-19). */
body:has(.esp-ph__bar) .esp-footer::after { content: ""; display: block; height: 70px; } /* inside the footer, so the gap keeps the footer colour */

/* ── exec-ui 2026-10-19 ── */
/* Out of stock pill: same colours as the archive "אזל מהמלאי" badge. */
.esp-ph__stock.is-outofstock { background: #E0D0C4 !important; color: #522C25 !important; }
/* Gallery arrows: no theme pink (#CC3366) border/hover; white circle, brown chevron. */
.esp-ph__arrow, .esp-ph__arrow:focus {
    border: 0 !important; border-radius: 9999px !important; padding: 0 !important;
    background: rgba(255,255,255,0.8) !important; color: #522c25 !important;
}
.esp-ph__arrow:hover, .esp-ph__arrow:focus-visible { background: #fff !important; color: #522c25 !important; }
.esp-ph__arrow:focus-visible { outline: 2px solid #c46500; outline-offset: 2px; }
.esp-ph__arrow { width: 52px !important; height: 52px !important; min-width: 52px; }

/* d-e6 (2026-10-19): on phones the thumbnail row is a sideways-scrolling strip of 64px thumbs. */
@media (max-width: 767px) {
    .esp-ph__thumbs {
        flex-wrap: nowrap; gap: 8px; padding: 8px 16px;
        overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .esp-ph__thumbs::-webkit-scrollbar { display: none; }
    .esp-ph__thumb, .esp-ph__thumb:first-child {
        flex: 0 0 64px; width: 64px !important; height: 64px; min-width: 64px;
        scroll-snap-align: start; border: 1px solid #e6dad4 !important; border-radius: 8px !important;
    }
    .esp-ph__thumb img { padding: 4px; }
}

/* Phones and tablets: the image stays at 100%; zoom only through the magnifier button (client 2026-10-19). */
@media (max-width: 1024px) { .esp-ph__main-img { cursor: default; transform: none !important; } }
