:root {
            --ep-orange: #f26522;
            --ep-orange-dark: #e55a18;
            --ep-wa: #25d366;
            --ep-wa-dark: #1ebe5b;
            --ep-bg: #f8f6f3;
            --ep-card-radius: 15px;
            /* Uniform product thumbs (width = height) */
            --ep-img-thumb: 120px;
        }
        #main.ep-main { background: var(--ep-bg); min-height: 50vh; padding-bottom: 2.5rem; }
        .ep-page-title {
            font-family: 'Poppins', 'Open Sans', sans-serif;
            font-weight: 700;
            font-size: 1.75rem;
            margin: 0 0 1.25rem;
            line-height: 1.3;
        }
        .ep-page-title .ep-title-hi { color: var(--ep-orange); }
        .ep-page-title .ep-title-en { color: #333; font-weight: 700; }
        /* Mobile: 1 product per row; tablet: 2; laptop+: 4 */
        .ep-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.85rem;
        }
        @media (min-width: 768px) {
            .ep-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.85rem;
            }
        }
        @media (min-width: 992px) {
            .ep-grid {
                grid-template-columns: repeat(4, 1fr);
                gap: 1.25rem;
            }
            .ep-price-line {
                padding: 0.42rem 0.6rem;
                border-radius: 10px;
            }
            .ep-card__head .ep-card__prices .ep-price-label {
                font-size: 0.72rem;
            }
            .ep-card__head .ep-card__prices .ep-price-num {
                font-size: 0.95rem;
            }
            .ep-card__head .ep-card__prices .ep-offer-amt {
                font-size: 1.12rem;
            }
        }
        .ep-card {
            position: relative;
            background: #fff;
            border-radius: var(--ep-card-radius);
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
            padding: 1rem 1rem 1.1rem;
            /*display: flex;*/
            flex-direction: column;
            align-items: stretch;
            box-sizing: border-box;
            /*height: 100%;*/
            overflow: hidden;
        }
        /* Row1: photo | title+prices  →  Row2: full-width description  →  Row3: actions (no empty cell under photo) */
        .ep-card__grid {
            display: grid;
            grid-template-columns: var(--ep-img-thumb) 1fr;
            grid-template-rows: auto auto auto;
            grid-template-areas:
                "img head"
                "desc desc"
                "act act";
            column-gap: 0.75rem;
            row-gap: 0.5rem;
            width: 100%;
            flex: 1 1 auto;
            min-height: 0;
            align-items: start;
        }
        .ep-card--bestseller::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 72px;
            height: 72px;
            background: linear-gradient(135deg, #2563eb 55%, transparent 55%);
            border-top-left-radius: var(--ep-card-radius);
            z-index: 1;
            pointer-events: none;
        }
        .ep-ribbon {
            position: absolute;
            top: 8px;
            left: 6px;
            z-index: 2;
            font-size: 0.55rem;
            font-weight: 800;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            line-height: 1.15;
            text-align: center;
            width: 52px;
            pointer-events: none;
            text-shadow: 0 1px 1px rgba(0,0,0,0.2);
        }
        .ep-card__img-wrap {
            grid-area: img;
            position: relative;
            flex: 0 0 var(--ep-img-thumb);
            width: var(--ep-img-thumb);
            height: var(--ep-img-thumb);
            min-width: var(--ep-img-thumb);
            min-height: var(--ep-img-thumb);
            max-width: var(--ep-img-thumb);
            max-height: var(--ep-img-thumb);
            align-self: flex-start;
            display: flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            border-radius: 10px;
            background: linear-gradient(180deg, #f3f4f6 0%, #fff 100%);
            padding: 6px;
            overflow: hidden;
        }
        .ep-card__img-wrap img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center;
        }
        .ep-card__head {
            grid-area: head;
            flex: 1 1 0;
            position: relative;
            min-width: 0;
            min-height: 0;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            text-align: left;
            padding: 0;
            box-sizing: border-box;
        }
        /* Share: top of product image, shown on hover (always on touch) */
        .ep-card__img-wrap .ep-share {
            position: absolute;
            top: 4px;
            right: 4px;
            left: auto;
            border: none;
            background: rgba(255, 255, 255, 0.94);
            color: #64748b;
            padding: 5px 6px;
            line-height: 1;
            border-radius: 8px;
            z-index: 5;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s ease, visibility 0.2s ease, color 0.15s ease, background 0.15s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .ep-card__img-wrap:hover .ep-share,
        .ep-card__img-wrap:focus-within .ep-share {
            opacity: 1;
            visibility: visible;
        }
        .ep-card__img-wrap .ep-share:hover {
            color: var(--ep-orange);
            background: #fff;
        }
        @media (hover: none) {
            .ep-card__img-wrap .ep-share {
                opacity: 1;
                visibility: visible;
            }
        }
        .ep-card__name {
            font-size: 1rem;
            font-weight: 700;
            color: #111;
            margin: 0;
            padding: 0;
            width: 100%;
            max-width: 100%;
            line-height: 1.32;
            font-family: 'Poppins', sans-serif;
            flex-shrink: 0;
            word-wrap: break-word;
            overflow-wrap: anywhere;
        }
        /* MRP + Offer: single row, compact pill-style strip under title */
        .ep-card__head .ep-card__prices {
            margin-top: 0.4rem;
            margin-bottom: 0;
            padding: 0;
            width: 100%;
            max-width: 100%;
            text-align: left;
            flex-shrink: 0;
        }
        .ep-price-line {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.35rem 0.5rem;
            width: 100%;
            padding: 0.38rem 0.55rem;
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            border: 1px solid #e8eef4;
            border-radius: 10px;
            box-sizing: border-box;
            line-height: 1.25;
        }
        .ep-price-sep {
            color: #cbd5e1;
            font-weight: 300;
            font-size: 0.7rem;
            line-height: 1;
            user-select: none;
            flex-shrink: 0;
            padding: 0 0.1rem;
        }
        .ep-card__head .ep-card__prices .ep-price-label {
            font-size: 0.62rem;
            font-weight: 700;
            color: #64748b;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            margin-right: 0.2rem;
        }
        .ep-card__head .ep-card__prices .ep-mrp {
            display: inline-flex;
            align-items: baseline;
            flex-wrap: wrap;
            gap: 0.1rem 0.2rem;
            color: #111;
            font-weight: 400;
        }
        .ep-card__head .ep-card__prices .ep-mrp--strike .ep-price-num {
            text-decoration: line-through;
            text-decoration-color: #94a3b8;
            color: #94a3b8;
            font-weight: 500;
        }
        .ep-card__head .ep-card__prices .ep-price-num {
            font-size: 0.86rem;
            font-weight: 600;
            color: #334155;
        }
        .ep-card__head .ep-card__prices .ep-offer-row {
            display: inline-flex;
            align-items: baseline;
            flex-wrap: wrap;
            gap: 0.1rem 0.2rem;
            color: #111;
            font-weight: 400;
        }
        .ep-card__head .ep-card__prices .ep-offer-row .ep-price-label {
            color: var(--ep-orange);
        }
        .ep-card__head .ep-card__prices .ep-offer-amt {
            font-weight: 800;
            color: var(--ep-orange);
            font-size: 1.05rem;
            letter-spacing: -0.02em;
        }
        .ep-card__head .ep-card__prices .ep-disc-hint {
            display: block;
            margin-top: 0.28rem;
            font-size: 0.72rem;
            width: 100%;
        }
        .ep-card__desc-block {
            grid-area: desc;
            margin: 0;
            padding: 0.35rem 0 0;
            flex: 0 1 auto;
            min-height: 0;
            width: 100%;
            min-width: 0;
            text-align: left;
            border-top: 1px solid #eef2f7;
            box-sizing: border-box;
        }
        .ep-card__desc,
        .ep-desc-body {
            font-size: 0.82rem;
            color: #6b7280;
            line-height: 1.45;
            margin: 0;
            text-align: left;
            word-break: break-word;
        }
        /* Collapsed: max 2 lines (expand via .ep-desc-toggle-js) */
        .ep-desc-body.ep-desc-body--collapsed {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
        }
        .ep-desc-body.ep-desc-body--expanded {
            display: block;
            -webkit-line-clamp: unset;
            overflow: visible;
        }
        .ep-desc-toggle,
        .ep-desc-toggle-js {
            margin-top: 0.35rem;
            padding: 0;
            border: none;
            background: none;
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--ep-orange);
            cursor: pointer;
            text-decoration: underline;
            text-underline-offset: 2px;
        }
        .ep-desc-toggle:hover,
        .ep-desc-toggle-js:hover { color: var(--ep-orange-dark); }

        /* Mobile-only rating (after prices); hidden on tablet/desktop */
        .ep-product-rating {
            display: none;
            width: 100%;
            margin-top: 0.35rem;
            padding-top: 0.35rem;
            border-top: 1px dashed #e8eef4;
            box-sizing: border-box;
        }
        .ep-rating-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.35rem 0.5rem;
            margin-bottom: 0.25rem;
        }
        .ep-rating-hint {
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #64748b;
        }
        .ep-star-rating {
            display: inline-flex;
            gap: 0.12rem;
        }
        .ep-star-btn {
            border: none;
            background: none;
            padding: 0 0.1rem;
            line-height: 1;
            font-size: 1.35rem;
            color: #e5e7eb;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: color 0.15s ease, transform 0.1s ease;
        }
        .ep-star-btn--on,
        .ep-star-btn:hover,
        .ep-star-btn:focus {
            color: #f59e0b;
            outline: none;
        }
        .ep-star-btn:active { transform: scale(0.95); }
        .ep-rating-avg {
            font-size: 0.7rem;
            color: #64748b;
            margin: 0;
            line-height: 1.35;
        }
        @media (max-width: 767.98px) {
            .ep-product-rating { display: block; }
        }

        .ep-card__actions {
            grid-area: act;
            display: flex;
            flex-direction: row;
            align-items: stretch;
            gap: 0.5rem;
            width: 100%;
            margin: 0;
            padding: 0.45rem 0 0;
            flex-shrink: 0;
            box-sizing: border-box;
        }
        .ep-btn-wa {
            flex: 1 1 0;
            min-width: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            background: var(--ep-wa);
            color: #fff !important;
            font-weight: 600;
            font-size: 0.82rem;
            padding: 0.55rem 0.5rem;
            border-radius: 10px;
            text-decoration: none;
            border: none;
            transition: filter 0.15s ease;
        }
        .ep-btn-wa:hover { filter: brightness(0.95); color: #fff !important; }
        .ep-btn-wa svg { flex-shrink: 0; }
        .ep-btn-offer {
            flex: 1 1 0;
            min-width: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--ep-orange);
            color: #fff;
            font-weight: 600;
            font-size: 0.82rem;
            padding: 0.55rem 0.5rem;
            border-radius: 10px;
            border: none;
            transition: filter 0.15s ease;
        }
        .ep-btn-offer:hover { filter: brightness(0.95); color: #fff; }
        .ep-card__img-wrap .ep-ph {
            font-size: calc(var(--ep-img-thumb) * 0.3);
            color: #d1d5db;
            line-height: 1;
        }
        .ep-loader-wrap { text-align: center; padding: 2rem; }
        .ep-loader-wrap img { max-width: 200px; }

        /* Tablet & below: breathing room, readable scale */
        @media (max-width: 991.98px) {
            #main.ep-main { padding-bottom: 2rem; }
            .ep-page-title {
                font-size: clamp(1.2rem, 4vw, 1.55rem);
                margin-bottom: 1rem;
            }
            .ep-card {
                border-radius: 12px;
                box-shadow: 0 2px 14px rgba(15, 23, 42, 0.07);
            }
        }

        /* Two-column tablet range (768–991): balanced padding & alignment */
        @media (min-width: 768px) and (max-width: 991.98px) {
            :root { --ep-img-thumb: 112px; }
            .ep-grid { gap: 0.85rem; }
            .ep-card { padding: 0.9rem 0.85rem 1rem; }
            .ep-card__name { font-size: 0.92rem; }
            .ep-card__actions {
                gap: 0.45rem;
            }
            .ep-btn-wa,
            .ep-btn-offer {
                font-size: 0.78rem;
                padding: 0.5rem 0.45rem;
            }
        }

        /* Phones: tight rhythm; description full-width row (no hole under photo) */
        @media (max-width: 767.98px) {
            :root { --ep-img-thumb: 100px; }
            #portfolio-details.portfolio-details .container,
            .vendor-storefront-root .vendor-storefront-panel .vendor-storefront-container {
                padding-left: 0px;
                padding-right: 0px;
            }
            .ep-grid {
                gap: 0.75rem;
            }
            .ep-card {
                padding: 0.65rem 0.6rem 0.75rem;
                border-radius: 11px;
            }
            .ep-card__grid {
                column-gap: 0.5rem;
                row-gap: 0.4rem;
            }
            .ep-card__desc-block {
                border-top: none;
                padding-top: 0.28rem;
            }
            .ep-card__img-wrap {
                border-radius: 8px;
                padding: 5px;
            }
            .ep-card__name {
                font-size: clamp(0.78rem, 2.9vw, 0.9rem);
                line-height: 1.28;
            }
            .ep-share {
                padding: 3px;
                font-size: 0.95rem;
                color: #94a3b8;
            }
            .ep-card__head .ep-card__prices {
                margin-top: 0.28rem;
            }
            .ep-price-line {
                padding: 0.3rem 0.42rem;
                border-radius: 8px;
                gap: 0.28rem 0.4rem;
            }
            .ep-card__head .ep-card__prices .ep-price-label {
                font-size: 0.56rem;
                letter-spacing: 0.05em;
            }
            .ep-card__head .ep-card__prices .ep-price-num {
                font-size: 0.74rem;
            }
            .ep-card__head .ep-card__prices .ep-offer-amt {
                font-size: clamp(0.82rem, 3.2vw, 0.95rem);
            }
            .ep-card__head .ep-card__prices .ep-disc-hint {
                font-size: 0.62rem !important;
                margin-top: 0.15rem;
            }
            .ep-card__desc,
            .ep-desc-body {
                font-size: 0.72rem;
                line-height: 1.42;
                color: #64748b;
            }
            .ep-desc-toggle,
            .ep-desc-toggle-js {
                font-size: 0.68rem;
                margin-top: 0.28rem;
            }
            .ep-card__actions {
                flex-direction: row;
                gap: 0.5rem;
                padding-top: 0.4rem;
            }
            .ep-btn-wa,
            .ep-btn-offer {
                flex: 1;
                min-width: 0;
                min-height: 42px;
                font-size: 0.8rem;
                padding: 0.5rem 0.55rem;
                border-radius: 10px;
                -webkit-tap-highlight-color: transparent;
            }
            .ep-btn-wa svg {
                width: 14px;
                height: 14px;
            }
            .ep-ribbon { font-size: 0.48rem; width: 46px; top: 6px; left: 4px; }
            .ep-card--bestseller::before {
                width: 58px;
                height: 58px;
            }
        }

        /* Very small phones */
        @media (max-width: 380px) {
            :root { --ep-img-thumb: 88px; }
            .ep-grid { gap: 0.6rem; }
            .ep-card { padding: 0.55rem 0.45rem 0.65rem; }
            .ep-card__name { font-size: 0.74rem; }
            .ep-btn-wa,
            .ep-btn-offer { font-size: 0.72rem; min-height: 40px; }
        }

/* ==========================================================================
   Scoped embed (profile-details / portfolio-details inside #divBubble .row)
   Prevents grid row stretch + template .portfolio-details conflicts.
   Target: .vendor-storefront-root > .vendor-storefront-panel > .vendor-storefront-container
   ========================================================================== */
.vendor-storefront-root {
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
    margin-top:10px;
}

.vendor-storefront-root .vendor-storefront-panel {
    margin: 0;
    padding-top: 0 !important;
    padding-bottom: 0.75rem;
    background: transparent !important;
}

.vendor-storefront-root .vendor-storefront-panel .vendor-storefront-container {
    box-sizing: border-box;
}

/* Cards must hug content — avoid height:100% stretching in Bootstrap grid rows */
.vendor-storefront-root .ep-grid {
    align-items: start;
}

.vendor-storefront-root .ep-grid > article.ep-card,
.vendor-storefront-root .ep-grid > * {
    min-height: 0;
}

.vendor-storefront-root .ep-card {
    height: auto !important;
    max-height: none !important;
    align-self: start;
}

.vendor-storefront-root .ep-card__grid {
    flex: 0 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
}

.vendor-storefront-root .ep-card__desc-block {
    flex: 0 0 auto !important;
    min-height: 0 !important;
}

.vendor-storefront-root .ep-card__head {
    flex: 0 1 auto !important;
    min-height: 0 !important;
}
