
/* ======================================================
CSS for [cardata_offers] shortcode
====================================================== */

/* General container for cards */
.offers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
    margin: 40px auto;
    max-width: 1200px;
}

/* Each individual card */
.offer-card {
    width: 360px; /* With this and gap adjusted, 3 cards per row */
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    display: flex;
    flex-direction: column;     
}

.offer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.offer-img {
    width: 100% !important;
    height: 210px !important; /* Force equal heights */
    object-fit: cover !important;
    display: block;
    background-color: #f5f5f5;
}

/* When there is no image */
.offer-img span {
    display: inline-block;
    text-align: center;
    color: #666;
    font-weight: 600;
    font-size: 18px;
}

.offer-media {
    position: relative;
}

.offer-emissions-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 54px;    
    height: auto;
    z-index: 2;
    pointer-events: none;
}

.offer-content {
    padding: 15px 20px;
    text-align: left;

    display: flex;
    flex-direction: column; 
    flex: 1; 
}

.offer-content h4 {
    margin-bottom: 4px;
    font-size: 18px;
    color: #222;
}

.offer-content h5 {
    margin-top: 0;
    font-size: 22px;
    color: #444;
}

.offer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 12px 0;
}

.offer-tag {
    background: #f9f9f9;      
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 13px;
    color: #333;
    display: inline-flex;            
    align-items: center;             
    gap: 6px;    
}

/* Icons */
.offer-tag svg {
    width: 16px;
    height: 16px;
    fill: #333;
    flex-shrink: 0; 
}

/* Price */
.offer-from {
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
}

.offer-price {
    font-size: 22px;
    font-weight: 700;
    margin-top: 0;
    color: #222;
}

.offer-tax {
    font-size: 13px;
    color: #888;
    margin-top: 0;
    line-height: 1.2;
    margin-bottom: 16px;
}

.lead-popup {
    cursor: pointer;
}

/* Button */
.btn-offer,     
.btn-offer:visited,
.btn-offer:active,
button.btn-offer {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #f8d904;    
    color: #1c2434;  
    font-weight: 600;
    border-radius: 6px;
    padding: 10px 0;
    text-decoration: none;
    margin-top: 17px;
    transition: background-color 0.2s ease;
    border: none;              
    cursor: pointer;  
    
    margin-top: auto;     
}

.btn-offer:hover {
    background-color: #1c2434;
    color: #f8d904;     
}

/* ======================================================
RESPONSIVE
====================================================== */

/* Tablet: 2 columnas */
@media (max-width: 900px) {
  .offers-grid {
    padding: 0 16px;
    margin: 24px auto;
    justify-content: center;
  }

  .offer-card {
    width: calc(50% - 10px); /* 2 columnas con gap 20px */
  }

  .offer-img {
    height: 200px !important;
  }
}

/* Móvil: 1 columna */
@media (max-width: 600px) {
  .offers-grid {
    padding: 0 14px;
    gap: 16px;
    margin: 18px auto;
  }

  .offer-card {
    width: 100%;
  }

  .offer-img {
    height: 190px !important;
  }

  .offer-content h4 {
    font-size: 16px;
  }

  .offer-content h5 {
    font-size: 20px;
  }

  .offer-emissions-badge {
    width: 48px;
    top: 8px;
    left: 8px;
  }
}

/* Muy pequeño */
@media (max-width: 380px) {
  .offers-grid {
    padding: 0 12px;
  }

  .offer-tag {
    font-size: 12px;
    padding: 4px 8px;
  }

  .offer-price {
    font-size: 20px;
  }
}
