/* ==========================================================================
   PRODUCT + BANNER LAYOUT WIDGET
   ========================================================================== */

.mircato-pb-layout {
    display: grid;
    width: 100%;
}

/* --- PRESETS --- */

/* Left Banner (Banner | Products) */
/* Grid Columns set via Widget Control (e.g. 30% 1fr) */
.mircato-pb-layout--left-banner {
    /* grid-template-columns set inline */
}

/* Right Banner (Products | Banner) */
.mircato-pb-layout--right-banner {
    /* grid-template-columns set inline */
}

/* Top Banner (Banner / Products) */
.mircato-pb-layout--top-banner {
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Interspersed (Products / Banner / Products) */
.mircato-pb-layout--interspersed {
    display: block;
    /* Stack vertically naturally */
}

.mircato-pb-layout--interspersed .mircato-pb-banner {
    margin: 30px 0;
    width: 100%;
}


/* --- PRODUCT GRID --- */
.mircato-pb-products {
    display: grid;
    /* Columns set via Widget Control */
    gap: 20px;
    width: 100%;
}

.mircato-pb-products .product {
    margin-bottom: 0;
    /* Reset WC defaults */
}


/* --- BANNER STYLING --- */
.mircato-pb-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background-color: #f5f5f5;
    overflow: hidden;
    text-align: center;
    border-radius: 4px;
    /* Optional default */
}

.mircato-pb-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.mircato-pb-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    transition: background 0.3s;
}

.mircato-pb-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 400px;
    color: #fff;
}

.mircato-pb-subtitle {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.mircato-pb-title {
    margin: 0 0 20px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.mircato-pb-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    color: #000;
    font-weight: 600;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s;
}

.mircato-pb-btn:hover {
    background: #000;
    color: #fff;
}


/* --- RESPONSIVE --- */

@media (max-width: 768px) {

    /* Collapse Sidebar Layouts to Stack */
    .mircato-pb-layout {
        grid-template-columns: 1fr;
        /* Force Single Column */
        display: flex;
        flex-direction: column;
    }

    /* Reorder for Right Banner on Mobile (Banner usually goes last or first?) */
    .mircato-pb-layout--left-banner .mircato-pb-banner,
    .mircato-pb-layout--top-banner .mircato-pb-banner {
        order: -1;
        /* Banner First */
    }

    /* Products Grid Mobile Columns */
    .mircato-pb-products {
        grid-template-columns: repeat(2, 1fr);
        /* Default 2 cols mobile */
    }
}

@media (max-width: 480px) {
    .mircato-pb-products {
        grid-template-columns: 1fr;
        /* 1 col very small screens */
    }
}