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

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

.esp-rel {
    width: 100%;
    background: #fff9f2;
    border-bottom: 1px solid #e6dad4;
    direction: rtl;
    padding: 56px 48px;
}

.esp-rel__title {
    font-family: 'Dialect PM', sans-serif;
    font-size: 48px;
    font-weight: bold;
    color: #522c25;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.esp-rel__subtitle {
    font-family: 'Dialect PM', sans-serif;
    font-size: 22px;
    color: #75605a;
    opacity: 1;
    margin-bottom: 40px;
}

/* ── Grid ── */
.esp-rel__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid #e6dad4;
    border-radius: 12px;
    overflow: hidden;
}

/* ── Card ── */
.esp-rel__card {
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    transition: background-color 0.2s;
}

/* P11 — divider sits on the RIGHT edge so the first (right-most) pair gets a line too (RTL). */
.esp-rel__card:not(:first-child) {
    border-right: 1px solid #e6dad4;
}

.esp-rel__card:hover {
    background-color: #f6ede3;
}

/* ── Badge ── */
.esp-rel__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    color: #fff;
    font-family: 'Dialect PM', sans-serif;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ── Image ── */
.esp-rel__image-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f6ede3;
}

.esp-rel__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    padding: 32px;
    transition: transform 0.5s;
    display: block;
}

.esp-rel__card:hover .esp-rel__image {
    transform: scale(1.04);
}

/* ── Body ── */
.esp-rel__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #e6dad4;
    flex: 1;
}

.esp-rel__brand {
    font-family: 'Dialect PM', sans-serif;
    font-size: 15px;
    font-weight: bold;
    color: #c46500;
    letter-spacing: 0.08em;
}

.esp-rel__name {
    font-family: 'Dialect PM', sans-serif;
    font-size: 22px;
    font-weight: bold;
    color: #522c25;
    transition: color 0.2s;
}

.esp-rel__card:hover .esp-rel__name {
    color: #8B3A00;
}

.esp-rel__desc {
    font-family: 'Dialect PM', sans-serif;
    font-size: 16px;
    color: #75605a;
    opacity: 1;
    line-height: 1.4;
}

/* ── Rating ── */
.esp-rel__rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.esp-rel__stars {
    display: flex;
    gap: 2px;
}

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

/* ── Price ── */
.esp-rel__price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e6dad4;
}

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

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

/* ── Responsive ── */
@media (max-width: 1024px) {
    .esp-rel {
        padding: 40px 24px;
    }
    .esp-rel__title {
        font-size: 34px;
    }
    .esp-rel__subtitle {
        font-size: 20px;
        margin-bottom: 32px;
    }
    /* Related grid → 2 cols */
    .esp-rel__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Reset 4-col borders; apply 2-col borders (divider between the two columns). */
    .esp-rel__card:not(:first-child) {
        border-right: none;
    }
    .esp-rel__card:nth-child(odd) {
        border-left: 1px solid #e6dad4;
    }
    .esp-rel__image {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .esp-rel {
        padding: 32px 18px;
    }
    .esp-rel__title {
        font-size: 28px;
    }
    .esp-rel__subtitle {
        font-size: 18px;
        margin-bottom: 24px;
    }
    /* Related grid → 1 col */
    .esp-rel__grid {
        grid-template-columns: 1fr;
    }
    .esp-rel__card:nth-child(odd) {
        border-left: none;
    }
    .esp-rel__body {
        padding: 20px;
    }
    .esp-rel__image {
        padding: 24px;
    }
    .esp-rel__name {
        font-size: 20px;
    }
    .esp-rel__price {
        font-size: 24px;
    }
}
