/*
Theme Name: Adifier Child Theme
Author: SpoonThemes
Theme URI: http://demo.spoonthemes.net/themes/adifier/
Author URI: http://themeforest.net/user/spoonthemes
License: GPL 2.0
Template: adifier
License URI: license.txt
Description:  Adifier - Classified Ads WordPress Theme
Version: 1.0
Tags: four-columns
*/


/* 2 ads by row */ 

/* Phones & small tablets: force 2 cards/row for 3-up grids */
@media (max-width: 1024px) {
  .af-listing-grid.af-items-3 {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -6px !important;
    margin-right: -6px !important;
    box-sizing: border-box !important;
  }
  .af-listing-grid.af-items-3 > .af-item-wrap {
    width: 50% !important;       /* 2 columns */
    padding-left: 6px !important;
    padding-right: 6px !important;
    margin: 0 0 12px 0 !important;
    float: none !important;
    clear: none !important;
    box-sizing: border-box !important;
  }
  .af-listing-grid.af-items-3 > .af-item-wrap > .advert-item {
    width: 100% !important;
  }
  .af-listing-grid.af-items-3 .advert-media img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}

/* If something else still forces 1 column, add this tiny hammer: */
@media (max-width: 1024px) {
  .af-items-3 .af-item-wrap { width: 50% !important; }
}




/* Force 2 ads per row on ALL phones for this widget */




/* HOMEPAGE widget a7961ac → keep 2/row on phones */
.elementor-element.elementor-element-a7961ac .adverts-list.af-items-4 {
  display: flex !important;
  flex-wrap: wrap !important;
  margin: 0 -6px !important;
  box-sizing: border-box !important;
}

/* widths only on small screens so desktop stays normal */
@media (max-width: 1024px) {
  .elementor-element.elementor-element-a7961ac .adverts-list.af-items-4 > .af-item-wrap {
    width: 50% !important;
    padding: 0 6px !important;
    margin: 0 0 12px !important;
    float: none !important;
    clear: none !important;
    box-sizing: border-box !important;
  }

  /* tiny hammer in case a theme rule forces 100% */
  .adverts-list.af-items-4 .af-item-wrap { width: 50% !important; }

  /* last-resort: beat inline widths if any appear later */
  .elementor-element.elementor-element-a7961ac .adverts-list.af-items-4 .af-item-wrap[style] {
    width: 50% !important;
  }
}

/* keep inner card/image sane */
.elementor-element.elementor-element-a7961ac .adverts-list.af-items-4 > .af-item-wrap > .advert-item {
  width: 100% !important;
}
.elementor-element.elementor-element-a7961ac .adverts-list .advert-media img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}


/* end 2 ads by row */



/* Common Ribbon Style */
.single-advert-media {
    position: relative !important; /* Ensure parent container is positioned */
}

  

/* Wrapper for the corner ribbon */
.advert-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
	
}

/* The diagonal ribbon itself */
.advert-ribbon span {
    position: absolute;
    top: 30px;
    left: -35px;
    width: 160px;
    padding: 10px 0;
    background: red;
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	 background: red ;
}

/* SOLD version */
.sold-ribbon span {
    background: #333 !important;
}

/* EXPIRED version (red is default) */
.expired-ribbon span {
    background: red !important;
}
