/* ==========================================================================
   5. CAMPANYES I FULLETS DESTACATS
   ========================================================================== */
.contenedor-campanyas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 10px 0;
}

.tarjeta-campanya {
    background-color: #FFFFFF;
    border: 1px solid var(--vora);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tarjeta-campanya:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

.tarjeta-campanya a {
    text-decoration: none;
}

.campanya-wrapper img {
    width: 100%;
    max-width: 260px;
    max-height: 280px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

.titulo-campanya {
    margin-top: 14px;
    font-size: 1rem;
    font-weight: 700;
    color: #0F172A;
    transition: color 0.2s;
}

.tarjeta-campanya a:hover .titulo-campanya {
    color: var(--taronja);
}

.enllaç-pdf {
    margin-top: 12px;
}

.enllaç-pdf a {
    display: inline-block;
    padding: 6px 14px;
    background-color: #FFF7ED;
    color: var(--taronja);
    border: 1px solid #FFEDD5;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.enllaç-pdf a:hover {
    background-color: var(--taronja);
    color: #FFFFFF;
}

/* ==========================================================================
   6. GRAELLA I TARGETES DE PRODUCTE (.ads / .products-grid)
   ========================================================================== */
.ads.products-grid,
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 10px 0;
    margin: 0;
}

.ads .card,
.product-card {
    position: relative;
    background-color: #FFFFFF;
    border: 1px solid var(--vora);
    border-radius: 10px;
    padding: 18px;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ads .card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    border-color: #CBD5E1;
}

/* Contenidor i imatge del producte */
.ads .card-image,
.product-card .card-image {
    position: relative;
    height: 185px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px 10px 10px 10px; /* Espai a dalt perquè les etiquetes de "Disponible" i "% dto" no tapin la foto */
    margin-bottom: 10px;
    background-color: #FFFFFF;
    border-radius: 6px;
}

.ads .card-image img,
.product-card .card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.ads .card:hover .card-image img {
    transform: scale(1.04);
}

/* Etiquetes flotants sobre la imatge */
.ads .card-notify-available {
    position: absolute;
    left: 0;
    top: 0;
    background-color: #DCFCE7;
    color: #166534;
    font-weight: 600;
    border-radius: 50px;
    padding: 3px 10px;
    font-size: 0.72rem;
    z-index: 2;
}

.ads .card-notify-year {
    display: none;
}

.ads .card-detail-dto {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #EF4444;
    color: #FFFFFF;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
    z-index: 2;
}

/* Bloc de preus */
.ads .card-prices-wrapper {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    margin: 4px 0 10px;
}

.ads .card-detail-pvp-old {
    color: #64748B;
    font-size: 0.9rem;
    text-decoration: line-through;
}

.ads .card-detail-oferta,
.ads .card-detail-pvp {
    color: #0F172A;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ads .card-detail-oferta {
    color: #DC2626;
}

/* Cos de la targeta, títol i botó */
.ads .card-body,
.product-card .card-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 0 auto;
    text-align: center;
}

.ads .ad-title,
.ads .card-body h5,
.product-card .card-body h5 {
    display: block;
    flex-shrink: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0F172A;
    line-height: 1.35;
    min-height: 2.7em; /* Espai garantit per a 2 línies */
    margin: 0 0 14px 0;
    overflow: visible;
}

.product-detail-btn,
.ads .ad-btn {
    display: block;
    flex-shrink: 0;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fosc);
    background-color: #F1F5F9;
    border: 1px solid var(--vora);
    border-radius: 6px;
    text-decoration: none;
    line-height: 1.4;
    margin-top: auto;
    transition: all 0.2s ease;
}

.product-detail-btn:hover,
.ads .ad-btn:hover {
    color: #FFFFFF;
    background-color: var(--taronja);
    border-color: var(--taronja);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.25);
}
