/* PLAST KEY - Responsive Advertising Fix V1
   Keeps uploaded ad images inside marketplace banner areas.
*/

.pk-ad-wrap{
    width:min(1180px, calc(100% - 40px));
    margin:18px auto;
    padding:0;
    overflow:hidden;
}

.pk-ad-wrap .pk-ad-slot{
    width:100%;
    margin:0 !important;
    padding:0;
    overflow:hidden;
    border-radius:8px;
    background:#fff;
    border:1px solid #e1e6e9;
    box-sizing:border-box;
}

.pk-ad-wrap .pk-ad-slot a{
    display:flex;
    width:100%;
    height:120px;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    text-decoration:none;
}

.pk-ad-wrap .pk-ad-slot img{
    display:block !important;
    width:100% !important;
    height:120px !important;
    max-width:100% !important;
    max-height:120px !important;
    object-fit:cover !important;
    object-position:center center !important;
    margin:0 !important;
}

/* Generic ad slots on category/public pages */
.pk-ad-slot{
    overflow:hidden;
    max-width:100%;
}

.pk-ad-slot a{
    max-width:100%;
}

.pk-ad-slot img{
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    object-position:center;
}

/* Tablet */
@media (max-width:1199px){
    .pk-ad-wrap{
        width:min(100% - 32px, 1000px);
        margin:16px auto;
    }

    .pk-ad-wrap .pk-ad-slot a,
    .pk-ad-wrap .pk-ad-slot img{
        height:100px !important;
        max-height:100px !important;
    }
}

/* Mobile */
@media (max-width:767px){
    .pk-ad-wrap{
        width:calc(100% - 24px);
        margin:12px auto;
    }

    .pk-ad-wrap .pk-ad-slot{
        border-radius:6px;
    }

    .pk-ad-wrap .pk-ad-slot a,
    .pk-ad-wrap .pk-ad-slot img{
        height:78px !important;
        max-height:78px !important;
    }
}

/* Small phones */
@media (max-width:480px){
    .pk-ad-wrap .pk-ad-slot a,
    .pk-ad-wrap .pk-ad-slot img{
        height:66px !important;
        max-height:66px !important;
    }
}
