/* =========================================================
   MASTERBOOK PRODUCT SHOWCASE v1.1.0
   Layout statis: panel promosi kiri + grid produk kanan.
========================================================= */

.mbpc-showcase,
.mbpc-showcase *,
.mbpc-showcase *::before,
.mbpc-showcase *::after {
    box-sizing: border-box;
    font-family: "Poppins", Arial, sans-serif !important;
}

.mbpc-showcase {
    --mbpc-primary: #a85a0a;
    --mbpc-primary-dark: #743900;
    --mbpc-dark: #26221f;
    --mbpc-text: #655e58;
    --mbpc-muted: #928b85;
    --mbpc-border: #e7e2dd;
    --mbpc-soft: #faf8f6;
    --mbpc-promo-bg: #eef8fa;

    display: block;

    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 14px 0 26px;

    overflow: hidden;

    color: var(--mbpc-dark);
}

/* =========================================================
   HEADING
========================================================= */

.mbpc-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;

    width: 100%;
    margin-bottom: 17px;
}

.mbpc-heading-copy {
    min-width: 0;
}

.mbpc-eyebrow {
    display: block;

    margin-bottom: 5px;

    color: var(--mbpc-primary);

    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.85px;
    text-transform: uppercase;
}

.mbpc-heading h2 {
    margin: 0 !important;

    color: var(--mbpc-dark) !important;

    font-size: clamp(24px, 2.4vw, 34px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.7px;
}

.mbpc-heading p {
    max-width: 650px;
    margin: 6px 0 0;

    color: var(--mbpc-text);

    font-size: 8.5px;
    line-height: 1.65;
}

.mbpc-view-all {
    position: relative;

    flex: 0 0 auto;

    padding: 4px 0;

    color: var(--mbpc-dark) !important;

    font-size: 8px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
}

.mbpc-view-all::after {
    content: "";

    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    height: 1px;

    background: currentColor;

    transform: scaleX(0.55);
    transform-origin: right center;

    transition: transform 0.2s ease;
}

.mbpc-view-all:hover {
    color: var(--mbpc-primary) !important;
}

.mbpc-view-all:hover::after {
    transform: scaleX(1);
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.mbpc-showcase-layout {
    display: grid;
    grid-template-columns: minmax(190px, 0.92fr) minmax(0, 5fr);
    align-items: stretch;
    gap: 14px;

    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.mbpc-showcase.without-promo .mbpc-showcase-layout {
    grid-template-columns: minmax(0, 1fr);
}

/* =========================================================
   PROMO PANEL
========================================================= */

.mbpc-promo-panel {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-width: 0;
    min-height: 356px;
    padding: 21px 17px 11px;

    overflow: hidden;

    color: var(--mbpc-dark) !important;
    background:
        radial-gradient(
            circle at 87% 9%,
            rgba(255, 255, 255, 0.85),
            transparent 24%
        ),
        var(--mbpc-promo-bg);

    border-radius: 17px;

    text-decoration: none !important;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.mbpc-promo-panel::before,
.mbpc-promo-panel::after {
    content: "";

    position: absolute;

    border: 1px solid rgba(33, 80, 96, 0.08);
    border-radius: 50%;

    pointer-events: none;
}

.mbpc-promo-panel::before {
    top: -65px;
    right: -60px;

    width: 165px;
    height: 165px;
}

.mbpc-promo-panel::after {
    bottom: -105px;
    left: -80px;

    width: 215px;
    height: 215px;
}

.mbpc-promo-panel:hover {
    transform: translateY(-3px);

    box-shadow: 0 15px 32px rgba(47, 67, 68, 0.09);
}

.mbpc-promo-copy {
    position: relative;
    z-index: 3;
}

.mbpc-promo-copy > span {
    display: block;

    margin-bottom: 7px;

    color: var(--mbpc-primary);

    font-size: 6.5px;
    font-weight: 700;
    letter-spacing: 0.85px;
    text-transform: uppercase;
}

.mbpc-promo-copy h3 {
    max-width: 165px;
    margin: 0 !important;

    color: #132b57 !important;

    font-size: clamp(22px, 2vw, 30px) !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
    letter-spacing: -1px;
}

.mbpc-promo-copy p {
    max-width: 180px;
    margin: 10px 0 0;

    color: #5b6c72;

    font-size: 7.5px;
    line-height: 1.55;
}

.mbpc-promo-art {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    width: 100%;
    min-height: 190px;
    margin-top: 5px;
}

.mbpc-promo-art svg {
    display: block;

    width: 100%;
    max-width: 235px;
    height: auto;
}

.mbpc-promo-panel.has-image {
    padding-bottom: 0;
}

.mbpc-promo-image {
    position: relative;
    z-index: 2;

    display: block;

    width: calc(100% + 34px);
    max-width: none;
    height: 205px;
    margin: 8px -17px 0;

    object-fit: contain;
    object-position: center bottom;
}

/* =========================================================
   PRODUCT GRID
========================================================= */

.mbpc-products-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    overflow: hidden;
}

/* =========================================================
   PRODUCT CARD
========================================================= */

.mbpc-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 356px;
    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid var(--mbpc-border);
    border-radius: 15px;

    box-shadow: 0 4px 15px rgba(45, 38, 31, 0.025);

    transition:
        transform 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease;
}

.mbpc-card:hover {
    transform: translateY(-4px);

    border-color: rgba(168, 90, 10, 0.27);

    box-shadow: 0 13px 27px rgba(45, 38, 31, 0.075);
}

.mbpc-card-media {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 217px;
    padding: 27px 12px 10px;

    overflow: hidden;

    background: #ffffff;
}

.mbpc-card-badges {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 4;

    display: flex;
    align-items: center;
    gap: 4px;
}

.mbpc-discount,
.mbpc-featured,
.mbpc-out-stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 21px;
    padding: 4px 6px;

    border-radius: 5px;

    font-size: 6px;
    font-weight: 700;
}

.mbpc-discount {
    color: #ffffff;
    background: #ee3d38;
}

.mbpc-featured {
    color: #76430f;
    background: #fff1dc;

    border: 1px solid #e5c799;
}

.mbpc-out-stock {
    color: #8b3d34;
    background: #fff0ee;

    border: 1px solid #e9c3bd;
}

.mbpc-save {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 29px;
    height: 29px;
    padding: 0;

    color: #70777b;
    background: #ffffff;

    border: 1px solid #e1e3e4;
    border-radius: 50%;
    outline: none;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.mbpc-save:hover,
.mbpc-save.is-saved {
    color: #ffffff;
    background: var(--mbpc-primary);
    border-color: var(--mbpc-primary);

    transform: translateY(-2px);
}

.mbpc-save svg {
    width: 14px;
    height: 14px;

    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.mbpc-save.is-saved svg {
    fill: currentColor;
}

.mbpc-image-link {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 184px;

    text-decoration: none !important;
}

.mbpc-image {
    display: block;

    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 178px !important;
    margin: 0 !important;

    object-fit: contain;

    filter: drop-shadow(0 9px 10px rgba(39, 31, 24, 0.12));

    transition:
        transform 0.28s ease,
        filter 0.28s ease;
}

.mbpc-card:hover .mbpc-image {
    transform: translateY(-3px) scale(1.018);

    filter: drop-shadow(0 13px 12px rgba(39, 31, 24, 0.16));
}

.mbpc-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;

    min-width: 0;
    padding: 10px 11px 12px;
}

.mbpc-sales-count {
    display: block;

    margin-bottom: 2px;

    color: var(--mbpc-muted);

    font-size: 6px;
    line-height: 1.35;
}

.mbpc-category {
    display: block;

    margin-bottom: 4px;

    overflow: hidden;

    color: var(--mbpc-primary);

    font-size: 6px;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mbpc-card-title {
    min-height: 40px;
    margin: 0 !important;
    padding: 0 !important;

    font-size: 9.5px !important;
    font-weight: 500 !important;
    line-height: 1.48 !important;
}

.mbpc-card-title a {
    display: -webkit-box;

    overflow: hidden;

    color: var(--mbpc-dark) !important;

    text-decoration: none !important;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.mbpc-card-title a:hover {
    color: var(--mbpc-primary) !important;
}

.mbpc-rating-row {
    display: flex;
    align-items: center;
    gap: 5px;

    min-height: 20px;
    margin-top: 6px;
}

.mbpc-rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;

    min-height: 19px;
    padding: 3px 6px;

    color: #59452b;
    background: #fff4dc;

    border-radius: 50px;

    font-size: 6.5px;
    font-weight: 600;
}

.mbpc-rating-pill svg {
    width: 10px;
    height: 10px;

    fill: #f2b827;
    stroke: #f2b827;
    stroke-width: 1.2;
}

.mbpc-review-count {
    overflow: hidden;

    color: var(--mbpc-muted);

    font-size: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mbpc-price {
    min-height: 31px;
    margin-top: auto;
    padding-top: 8px;

    color: var(--mbpc-dark);

    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.35;
}

.mbpc-price .price {
    margin: 0 !important;
}

.mbpc-price del {
    display: inline-block;

    margin-right: 4px;

    color: #aaa5a1;

    font-size: 7px;
    font-weight: 400;
    opacity: 0.75;
}

.mbpc-price ins {
    color: var(--mbpc-primary);
    text-decoration: none;
}

.mbpc-price .woocommerce-Price-amount {
    font-size: inherit;
}

/* =========================================================
   EMPTY STATE
========================================================= */

.mbpc-empty {
    padding: 25px;

    color: #655e58;
    background: #fff9f3;

    border: 1px dashed #d9c6b4;
    border-radius: 12px;

    font-family: "Poppins", Arial, sans-serif;
    font-size: 10px;
    text-align: center;
}

/* =========================================================
   DESKTOP MENENGAH
========================================================= */

@media screen and (max-width: 1280px) {
    .mbpc-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .mbpc-promo-panel {
        min-height: 356px;
        grid-row: span 2;
    }
}

/* =========================================================
   TABLET
========================================================= */

@media screen and (max-width: 900px) {
    .mbpc-showcase-layout {
        grid-template-columns: 1fr;
    }

    .mbpc-promo-panel {
        display: grid;
        grid-template-columns: minmax(0, 0.75fr) minmax(190px, 0.55fr);
        align-items: center;
        gap: 15px;

        min-height: 225px;
        padding: 22px;
    }

    .mbpc-promo-copy h3 {
        max-width: 320px;
    }

    .mbpc-promo-copy p {
        max-width: 430px;
    }

    .mbpc-promo-art {
        min-height: 180px;
        margin: 0;
    }

    .mbpc-promo-image {
        width: 100%;
        height: 185px;
        margin: 0;
    }

    .mbpc-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media screen and (max-width: 650px) {
    .mbpc-showcase {
        padding: 8px 0 18px;
    }

    .mbpc-heading {
        align-items: flex-start;
        gap: 15px;

        margin-bottom: 13px;
    }

    .mbpc-eyebrow {
        font-size: 6px;
    }

    .mbpc-heading h2 {
        font-size: 22px !important;
    }

    .mbpc-heading p {
        font-size: 7.5px;
    }

    .mbpc-view-all {
        margin-top: 6px;
        font-size: 7px;
    }

    .mbpc-promo-panel {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(120px, 0.65fr);
        gap: 6px;

        min-height: 180px;
        padding: 17px 13px;

        border-radius: 14px;
    }

    .mbpc-promo-copy > span {
        font-size: 5.5px;
    }

    .mbpc-promo-copy h3 {
        font-size: 22px !important;
    }

    .mbpc-promo-copy p {
        margin-top: 7px;
        font-size: 6.5px;
    }

    .mbpc-promo-art {
        min-height: 145px;
    }

    .mbpc-promo-image {
        height: 145px;
    }

    .mbpc-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .mbpc-card {
        min-height: 313px;
        border-radius: 12px;
    }

    .mbpc-card-media {
        min-height: 185px;
        padding: 24px 8px 7px;
    }

    .mbpc-image-link {
        height: 154px;
    }

    .mbpc-image {
        max-height: 149px !important;
    }

    .mbpc-save {
        top: 6px;
        right: 6px;

        width: 27px;
        height: 27px;
    }

    .mbpc-card-badges {
        top: 6px;
        left: 6px;
    }

    .mbpc-discount,
    .mbpc-featured,
    .mbpc-out-stock {
        min-height: 19px;
        padding: 3px 5px;

        font-size: 5.5px;
    }

    .mbpc-card-body {
        padding: 9px;
    }

    .mbpc-sales-count,
    .mbpc-category {
        font-size: 5.5px;
    }

    .mbpc-card-title {
        min-height: 37px;
        font-size: 8.5px !important;
    }

    .mbpc-price {
        font-size: 10.5px;
    }
}

/* =========================================================
   MOBILE KECIL
========================================================= */

@media screen and (max-width: 390px) {
    .mbpc-promo-panel {
        grid-template-columns: minmax(0, 1fr) 105px;
    }

    .mbpc-products-grid {
        gap: 7px;
    }

    .mbpc-card-media {
        min-height: 168px;
    }

    .mbpc-image-link {
        height: 139px;
    }

    .mbpc-image {
        max-height: 134px !important;
    }

    .mbpc-card-title {
        font-size: 8px !important;
    }
}
