/* ─────────────────────────────────────────────
   Block: Suositut tuotteet -ruudukko (fp_products_grid)
   ───────────────────────────────────────────── */

.fp-pg-section {
    padding: 56px 24px;
    background: #f8f8f8;
}

.fp-pg-inner {
    max-width: 1280px;
    margin: 0 auto;
}

/* ── Section header ── */
.fp-pg-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.fp-pg-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    color: #2e2e2d;
}

.fp-pg-viewall {
    color: #b51f1f;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.fp-pg-viewall:hover {
    gap: 8px;
    color: #911919;
}

.fp-pg-viewall svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ── Product grid ── */
.fp-pg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ── Product card ── */
.fp-pg-card {
    background: #fff;
    border: 1px solid #d5dce1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.fp-pg-card:hover {
    border-color: #b51f1f;
    box-shadow: 0 0 0 1px #b51f1f;
    transform: translateY(-2px);
}

/* Inner link wraps image + body */
.fp-pg-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: #2e2e2d;
}

.fp-pg-card-link:hover {
    text-decoration: none;
    color: #2e2e2d;
}

/* Image area */
.fp-pg-card-img {
    height: 190px;
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
}

.fp-pg-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

.fp-pg-card:hover .fp-pg-card-img img {
    transform: scale(1.04);
}

/* Body must also grow inside the inner link */
.fp-pg-card-link .fp-pg-card-body {
    flex: 1;
}

.fp-pg-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #b51f1f;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    z-index: 2;
}

/* Body */
.fp-pg-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fp-pg-brand {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.fp-pg-card-body h3 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px;
    padding: 0;
    color: #2e2e2d;
    text-transform: none;
    transition: color 0.15s;
}

.fp-pg-card:hover .fp-pg-card-body h3 {
    color: #b51f1f;
}

.fp-pg-short-desc {
    font-size: 0.73rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
    flex: 1;
}

.fp-pg-price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.35rem;
    color: #b51f1f;
    line-height: 1;
}

.fp-pg-price small {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    color: #666;
    font-weight: 400;
    margin-left: 4px;
}

/* Footer / actions */
.fp-pg-card-footer {
    padding: 0 16px 16px;
    display: flex;
    gap: 8px;
}

.fp-pg-btn-cart {
    flex: 1;
    background: #b51f1f;
    color: #fff !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fp-pg-btn-cart:hover {
    background: #911919;
    color: #fff;
    text-decoration: none;
}

/* "+ Asennus" secondary button */
.fp-pg-btn-service {
    background: transparent;
    color: #2e2e2d;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.74rem;
    font-weight: 500;
    padding: 10px 12px;
    border: 1px solid #d5dce1;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    transition: border-color 0.15s, color 0.15s;
}

.fp-pg-btn-service:hover {
    border-color: #b51f1f;
    color: #b51f1f;
    text-decoration: none;
}


/* ── Responsive ── */
@media (max-width: 1024px) {
    .fp-pg-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .fp-pg-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .fp-pg-grid { grid-template-columns: repeat(2, 1fr); }
    .fp-pg-card-img { height: 150px; }
}
