/* ══════════════════════════════════════════════
   Related Products Widget — Olipop-style layout
   ══════════════════════════════════════════════ */

.bn-related-products-wrapper {
    padding: 40px 0;
}

.bn-section-title {
    text-align: center;
    font-family: 'Mulish', 'Taviraj', serif;
    font-size: 36px;
    font-weight: 700;
    color: #1a3a2a;
    margin-bottom: 32px;
}

/* ── Grid ── */

.bn-products-grid {
    display: grid;
    gap: 24px;
}

.bn-columns-2 { grid-template-columns: repeat(2, 1fr); }
.bn-columns-3 { grid-template-columns: repeat(3, 1fr); }
.bn-columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .bn-columns-4,
    .bn-columns-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .bn-columns-4,
    .bn-columns-3,
    .bn-columns-2 {
        grid-template-columns: 1fr;
    }
}

/* ── Card ── */

.bn-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--card-bg, #F5E6D3);
    background-size: cover;
    background-position: center;
}


/* Link wraps the whole card */
.bn-card-link {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
    z-index: 2;
}

/* ══ Row 1 — Image Area ══ */

.bn-card-image-area {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    z-index: 10;
}

/* Colored overlay — covers full card by default, on hover shrinks to text area */
.bn-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-bg, #F5E6D3);
    z-index: 1;
    transition: top 0.4s ease, opacity 0.3s ease;
}

.bn-product-card.has-hover-image:hover > .bn-card-overlay {
    opacity: 1;
}

/* Wavy SVG — top edge of the text area */
.bn-wavy-border {
    position: absolute;
    top: -39px;
    left: 0;
    width: 100%!important;
    height: 40px;
    display: block;
    z-index: 4;
}

/* Product image — centered, fades out on hover */
.bn-product-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: opacity 0.3s linear;
}

.bn-product-image-wrapper img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    max-width: 200px;
    margin: 0 auto;
    border-radius: 600px;
}

.bn-product-card.has-hover-image:hover .bn-product-image-wrapper {
    opacity: 0;
}

.bn-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bn-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    font-family: 'Mulish', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cards WITHOUT hover image: subtle zoom */
.bn-product-card:not(.has-hover-image):hover .bn-product-image {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ══ Row 2 — Text Area ══ */

.bn-card-text-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background-color: var(--card-bg, #F5E6D3);
    transition: bottom 0.4s ease;
    padding-top: 16px;
}

/* Inner wrapper — shifts up on hover */
.bn-card-text-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 14px;
    text-align: center;
    top: 0;
    transition: top 0.3s ease-in-out;
}

.bn-product-card:hover .bn-card-text-inner {
    top: -20px;
}

/* Title — always visible */
.bn-product-title {
    font-family: 'Mulish', 'Taviraj', serif;
    font-size: 18px;
    font-weight: 800;
    color: #1a3a2a;
    margin: 0;
    line-height: 1.2;
}

/* ── Static rating: visible by default, hidden on hover ── */

.bn-static-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    margin-top: 24px;
    transition: opacity 0.15s ease, margin-top 0.3s ease;
}

.bn-product-card:hover .bn-static-rating {
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
}

/* ── Description: hidden by default, fades in on hover ── */

.bn-product-description {
    font-family: 'Mulish', sans-serif;
    font-size: 14px;
    color: #1a3a2a;
    margin: 8px 0 0;
    line-height: 1.4;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bn-product-card:hover .bn-product-description {
    opacity: 1;
}

/* ── Footer: rating + button — hidden by default, fades in on hover ── */

.bn-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bn-product-card:hover .bn-card-footer {
    opacity: 1;
}

.bn-footer-rating {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Stars ── */

.bn-star {
    color: #1a3a2a;
}

.bn-star-full {
    color: #1a3a2a;
}

.bn-star-half {
    color: #1a3a2a;
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.bn-star-empty {
    color: #1a3a2a;
    opacity: 0.35;
}

.bn-review-count {
    font-family: 'Mulish', sans-serif;
    font-size: 11px;
    color: #1a3a2a;
    opacity: 0.5;
    margin-left: 4px;
    white-space: nowrap;
}

/* ── Add to cart button ── */

.bn-add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-family: 'Mulish', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #1a3a2a;
    background: #ffffff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    min-width: 116px;
    line-height: 1.8;
    transition: background 0.25s ease, color 0.25s ease;
}

.bn-add-to-cart:hover,
.bn-add-to-cart:focus {
    background: #1a3a2a;
    color: #ffffff;
}

.bn-add-to-cart.bn-loading {
    pointer-events: none;
    opacity: 0.6;
}

.bn-add-to-cart.bn-added {
    background: #1a3a2a;
    color: #ffffff;
}

/* ══ Mobile — show all content, disable hover effects ══ */

@media (max-width: 1024px) {
    .bn-card-text-inner {
        top: 0 !important;
    }

    .bn-product-card:hover .bn-card-text-inner {
        top: 0 !important;
    }

    .bn-static-rating {
        display: none !important;
    }

    .bn-product-description {
        opacity: 1;
    }

    .bn-card-footer {
        opacity: 1;
    }

    .bn-product-card.has-hover-image:hover .bn-card-overlay {
        top: 0;
    }

    .bn-product-card.has-hover-image:hover .bn-product-image-wrapper {
        opacity: 1;
    }
}
