/**
 * Asuntokauppa Unified Listings - Tyylit v1.4 (FINAL)
 * 16:9 kuva, ilmavat välit (20px), pyöreät reunat (18px), avajaistarjous-overlay
 */

/* ==========================================================================
   Wrapper & Grid
   ========================================================================== */

.aku-wrapper {
    --aku-green: #06402b;
    --aku-green-dark: #052e1f;
    --aku-green-light: #9ad6a8;
    --aku-green-bg: #e8f0ec;
    --aku-bg: #fafaf7;
    --aku-border: rgba(0, 0, 0, 0.08);
    --aku-border-light: rgba(0, 0, 0, 0.05);
    --aku-text: #1a1a1a;
    --aku-text-muted: #888;
    --aku-text-secondary: #555;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--aku-text);
    box-sizing: border-box;
    width: 100%;
    padding: 0 24px; /* REUNAPADDING */
}

.aku-wrapper *,
.aku-wrapper *::before,
.aku-wrapper *::after {
    box-sizing: border-box;
}

.aku-cards-grid {
    display: grid;
    gap: 32px; /* ISOMPI VÄLI korttien välissä - oli 24px */
    margin-top: 24px;
}

.aku-cols-1 { grid-template-columns: 1fr; }
.aku-cols-2 { grid-template-columns: repeat(2, 1fr); }
.aku-cols-3 { grid-template-columns: repeat(3, 1fr); }
.aku-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .aku-cols-3, .aku-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .aku-cols-2, .aku-cols-3, .aku-cols-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Kortti - ILMAVAT VÄLIT & PYÖREÄT REUNAT
   ========================================================================== */

.aku-card {
    background: #fff;
    border-radius: 12px; /* PIENEMPI pyöristys - oli 14px */
    border: 0.5px solid var(--aku-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aku-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 64, 43, 0.08);
}

/* Kuva-alue - 16:9, täyttää yläreunan */
.aku-card-image {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(180deg, #e8efe5 0%, #d4e0d0 100%);
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.aku-card-image img {
    position: absolute;
    top: -1px; /* Negatiivinen positio peittää valkoisen tilan */
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    object-fit: cover;
    object-position: center center;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
}

.aku-card-image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.aku-card-image__placeholder {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: #9ab39a;
}

/* AVAJAISTARJOUS OVERLAY */
.aku-opening-offer-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(6, 64, 43, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 16px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 200px;
}

.aku-opening-ribbon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #9ad6a8;
}

.aku-opening-ribbon svg {
    width: 14px;
    height: 14px;
}

/* Alennus isolla numerolla (esim. -3 600 €) */
.aku-opening-discount {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    line-height: 1;
}

/* Uusi hinta pienempänä discountin alla */
.aku-opening-price {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
}

.aku-opening-old-price {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: line-through;
}

/* Badget */
.aku-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    padding: 5px 12px 5px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.6px;
    color: var(--aku-green);
}

.aku-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--aku-green);
}

.aku-status-varattu .aku-status-dot,
.aku-status-myyty .aku-status-dot {
    background: #999;
}

.aku-id-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--aku-green);
}

.aku-area-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--aku-green);
    color: #fff;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 13px;
    font-weight: 500;
}

.aku-source-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: var(--aku-green);
}

/* Sisältö */
.aku-card-content {
    padding: 10px 10px 8px; /* PIENEMPI padding - oli 12px 12px 10px */
    display: flex;
    flex-direction: column;
    gap: 7px; /* PIENEMPI gap - oli 8px */
}

/* Otsikko */
.aku-card-type {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.9px;
    color: var(--aku-green);
    margin-bottom: 2px;
}

.aku-card-title {
    font-size: 18px; /* PIENEMPI - oli 20px */
    font-weight: 500;
    color: var(--aku-text);
    margin: 0 0 2px;
    line-height: 1.15;
}

.aku-card-subline {
    font-size: 13px;
    color: var(--aku-text-muted);
    line-height: 1.3;
}

/* Hinnat - EI TURHIA P-TAGEJA, suora grid */
.aku-card-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.aku-card-prices.aku-single-price {
    grid-template-columns: 1fr;
}

.aku-price-item {
    padding: 7px 9px;
    background: var(--aku-bg);
    border-radius: 12px;
    border: 0.5px solid var(--aku-border-light);
}

/* Alkuperäinen hinta yliviivattuna alennuksen yhteydessä */
.aku-price-original {
    opacity: 0.7;
}

.aku-price-strikethrough {
    text-decoration: line-through;
    color: var(--aku-text-secondary) !important;
}

/* Tarjoushinta korostettuna */
.aku-price-offer {
    border-color: var(--aku-green);
    background: var(--aku-green-bg);
}

.aku-price-highlight {
    color: var(--aku-green) !important;
    font-weight: 700 !important;
}

.aku-price-label {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.6px;
    color: #999;
    margin-bottom: 2px;
}

.aku-price-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--aku-green);
    line-height: 1;
}

/* Pillit */
.aku-card-pills {
    display: flex;
    gap: 5px;
}

.aku-pill {
    flex: 1;
    padding: 6px 10px;
    background: var(--aku-bg);
    border-radius: 999px;
    border: 0.5px solid var(--aku-border-light);
    font-size: 12px;
    color: #555;
    text-align: center;
}

/* Tuottolaskelma - EI TURHIA WRAPPEREITÄ */
.aku-yield-box {
    background: var(--aku-green);
    border-radius: 14px;
    padding: 12px 14px; /* ISOMPI PADDING */
}

.aku-yield-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.aku-yield-icon {
    width: 11px;
    height: 11px;
    color: var(--aku-green-light);
}

.aku-yield-header span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.8px;
    color: var(--aku-green-light);
}

.aku-yield-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.aku-yield-item {
    /* Ei turhia wrappereitä, suoraan grid */
}

.aku-yield-label {
    font-size: 9px;
    color: var(--aku-green-light);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.aku-yield-value {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    line-height: 1;
}

/* Ominaisuudet - EI TURHIA WRAPPEREITÄ */
.aku-features-box {
    background: var(--aku-bg);
    border-radius: 14px; /* PYÖREÄMPI */
    padding: 8px 10px;
    border: 0.5px solid var(--aku-border-light);
}

.aku-features-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.aku-features-icon {
    width: 11px;
    height: 11px;
    color: var(--aku-green);
}

.aku-features-header span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.8px;
    color: var(--aku-green);
}

.aku-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.aku-feature-item {
    /* Ei turhia wrappereitä */
}

.aku-feature-label {
    font-size: 9px;
    color: #999;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.aku-feature-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--aku-text);
    line-height: 1;
}

/* Toiminto-laatikko */
.aku-action-box {
    background: #fff;
    border-radius: 14px; /* PYÖREÄMPI */
    border: 1.5px solid var(--aku-green);
    padding: 8px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.aku-action-box:hover {
    background: var(--aku-green-bg);
}

.aku-action-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aku-action-icon-wrap {
    width: 26px;
    height: 26px;
    background: var(--aku-green-bg);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aku-green);
}

.aku-action-icon-wrap svg {
    width: 14px;
    height: 14px;
}

.aku-action-text {
    line-height: 1.1;
}

.aku-action-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--aku-green);
}

.aku-action-subtitle {
    font-size: 11px;
    color: var(--aku-green);
    opacity: 0.65;
    margin-top: 1px;
}

.aku-action-arrow {
    background: var(--aku-green);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.2s ease;
}

.aku-action-arrow svg {
    width: 10px;
    height: 10px;
}

.aku-docs-toggle.is-open .aku-action-arrow {
    transform: rotate(180deg);
}

/* Dokumenttilista */
.aku-docs-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 7px;
    background: var(--aku-bg);
    border-radius: 14px; /* PYÖREÄMPI */
    margin-top: -4px;
    border: 0.5px solid var(--aku-border-light);
}

.aku-doc-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 8px; /* PYÖREÄMPI */
    text-decoration: none;
    color: var(--aku-text);
    font-size: 13px;
    transition: background-color 0.15s ease;
}

.aku-doc-item:hover {
    background: var(--aku-green-bg);
}

.aku-doc-item svg {
    width: 13px;
    height: 13px;
    color: var(--aku-green);
    flex-shrink: 0;
}

.aku-doc-item span {
    flex: 1;
}

.aku-doc-external {
    opacity: 0.5;
}

/* CTA-napit - tiivis väli muiden korttielementtien kanssa */
.aku-card-cta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Vierekkäiset napit (PAKKO-GRID) */
.aku-cta-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
}

.aku-cta-row-single {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
}

.aku-btn-primary {
    background: var(--aku-green);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 11px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease, transform 0.1s ease;
    text-decoration: none;
    text-align: center;
    display: block;
}

.aku-btn-primary:hover {
    background: var(--aku-green-dark);
}

.aku-btn-primary:active {
    transform: scale(0.98);
}

.aku-btn-disabled {
    background: #d4d4d4 !important;
    color: #777 !important;
    cursor: not-allowed !important;
}

.aku-btn-secondary {
    background: transparent;
    color: var(--aku-green);
    border: 1px solid var(--aku-green);
    border-radius: 14px;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.15s ease;
}

.aku-btn-secondary:hover {
    background: var(--aku-green-bg);
}

.aku-btn-secondary svg {
    width: 10px;
    height: 10px;
}

/* Vertailunappi */
.aku-btn-compare {
    background: transparent;
    color: var(--aku-green);
    border: 1px solid var(--aku-green);
    border-radius: 14px;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.aku-btn-compare:hover {
    background: var(--aku-green-bg);
}

.aku-btn-compare.is-active {
    background: var(--aku-green);
    color: #fff;
}

.aku-btn-compare svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Filtterit
   ========================================================================== */

/* ==========================================================================
   Filtterit - MODERNI LAYOUT + LAJITTELU
   ========================================================================== */

.aku-filters {
    background: #fff;
    border-radius: 12px;
    border: 0.5px solid var(--aku-border);
    padding: 16px;
    margin-bottom: 24px;
}

/* Yläpalkki: Status-tabit + Lajittelu + Suodattimet-nappi (mobile) */
.aku-filters-top {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* Status-välilehdet yläpalkissa */
.aku-status-tabs {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    flex: 1;
}

.aku-search-wrap {
    flex: 1 1 300px;
    max-width: 400px;
    position: relative;
    min-width: 240px;
}

.aku-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #999;
    pointer-events: none;
}

.aku-search-input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    border: 1px solid var(--aku-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--aku-text);
    background: var(--aku-bg);
    transition: border-color 0.15s ease;
}

.aku-search-input:focus {
    outline: none;
    border-color: var(--aku-green);
    background: #fff;
}

/* LAJITTELU-dropdown */
.aku-sort-wrap {
    position: relative;
    flex: 0 0 auto;
    min-width: 180px;
}

.aku-sort-select {
    width: 100%;
    padding: 9px 32px 9px 14px;
    border: 1px solid var(--aku-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--aku-text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.15s ease;
}

.aku-sort-select:focus {
    outline: none;
    border-color: var(--aku-green);
}

/* Suodattimet-toggle (vain mobiilissa) */
.aku-filters-toggle {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: var(--aku-green);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.aku-filters-toggle:hover {
    background: var(--aku-green-dark);
}

.aku-filters-toggle svg {
    width: 15px;
    height: 15px;
}

.aku-filters-count {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    display: none;
}

.aku-filters-count.is-active {
    display: inline-block;
}

/* Filtterien pääalue - DESKTOPILLA AINA NÄKYVISSÄ */
.aku-filters-main {
    /* Desktop: ei hidden */
}

/* Status ja Source välilehdet - KOMPAKTIMMAT */
.aku-source-tabs {
    display: none; /* Ei käytössä */
}

.aku-tab,
.aku-tab-source {
    padding: 8px 15px;
    background: var(--aku-bg);
    border: 0.5px solid var(--aku-border-light);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--aku-text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.aku-tab:hover,
.aku-tab-source:hover {
    background: var(--aku-green-bg);
    color: var(--aku-green);
}

.aku-tab.aku-tab-active,
.aku-tab-source.aku-tab-active {
    background: var(--aku-green);
    color: #fff;
    border-color: var(--aku-green);
}

/* Laajennetut filtterit */
.aku-filters-expanded {
    border-top: 0.5px solid var(--aku-border);
    padding-top: 16px;
    margin-top: 8px;
}

.aku-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px 20px;
    align-items: start;
}

.aku-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Label-rivi: teksti vasemmalla, arvo oikealla samalla rivillä */
.aku-filter-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--aku-text-secondary);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    white-space: nowrap; /* Estää label-tekstin rivittymisen */
}

/* Arvo (esim "450 000 €") ei saa rivittyä */
.aku-range-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--aku-green);
    white-space: nowrap; /* KRIITTINEN: estää "450 000\n€" -rivityksen */
    flex-shrink: 0;      /* Ei kutiste vaikka tila loppuu */
    background: var(--aku-green-bg);
    padding: 2px 7px;
    border-radius: 6px;
}

.aku-filter-select {
    padding: 9px 12px;
    border: 1px solid var(--aku-border);
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: var(--aku-text);
    cursor: pointer;
    transition: border-color 0.15s ease;
    width: 100%;
}

.aku-filter-select:focus {
    outline: none;
    border-color: var(--aku-green);
    box-shadow: 0 0 0 3px rgba(15, 90, 61, 0.08);
}

/* Slider-raita */
.aku-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--aku-border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    /* Vihreä täyttö vasemmalta nappiin asti */
    background: linear-gradient(to right, var(--aku-green) 0%, var(--aku-green) var(--range-pct, 0%), var(--aku-border) var(--range-pct, 0%));
}

.aku-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: 2.5px solid var(--aku-green);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s ease;
}

.aku-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.aku-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: 2.5px solid var(--aku-green);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.aku-filters-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 0.5px solid var(--aku-border-light);
    flex-wrap: wrap;
    gap: 10px;
}

.aku-btn-reset {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--aku-border);
    border-radius: 10px;
    color: var(--aku-text-secondary);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.aku-btn-reset:hover {
    background: var(--aku-bg);
    color: var(--aku-green);
    border-color: var(--aku-green);
}

.aku-btn-reset svg {
    width: 13px;
    height: 13px;
}

.aku-results-count {
    font-size: 13px;
    color: var(--aku-text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   RESPONSIIVISUUS - Mobiilissa filtterit napin takana
   ========================================================================== */

@media (max-width: 768px) {
    /* Näytä Suodattimet-nappi */
    .aku-filters-toggle {
        display: flex;
    }
    
    /* Piilota filtterit defaulttina */
    .aku-filters-main {
        display: none;
    }
    
    /* Näytä kun expanded */
    .aku-filters-main[aria-hidden="false"] {
        display: block;
        margin-top: 16px;
    }
    
    /* Kapeampi grid mobiilissa */
    .aku-filters-grid {
        grid-template-columns: 1fr;
    }
    
    /* Lajittelu täysleveä */
    .aku-sort-wrap {
        order: 3;
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Haku täysleveä */
    .aku-search-wrap {
        width: 100%;
        order: 1;
    }
    
    /* Suodattimet-nappi täysleveä */
    .aku-filters-toggle {
        width: 100%;
        order: 2;
        justify-content: center;
    }
}
    color: var(--aku-text-muted);
}

/* ==========================================================================
   Tyhjä tila
   ========================================================================== */

.aku-empty-state,
.aku-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--aku-text-muted);
    background: var(--aku-bg);
    border-radius: 14px; /* PYÖREÄMPI */
}

/* ==========================================================================
   Karuselli
   ========================================================================== */

.aku-uusimmat-wrapper {
    position: relative;
}

.aku-section-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--aku-text);
    margin: 0 0 20px;
    text-align: center;
}

/* ==========================================================================
   Karuselli - PODIUM EFEKTI
   ========================================================================== */

.aku-carousel {
    position: relative;
    overflow: visible; /* Muutettu visible jotta korostus näkyy */
    margin: 8px -10px 20px; /* MINIMOIDUT marginaalit */
    padding: 5px 0 10px; /* MINIMOIDUT paddingit */
}

.aku-carousel-track {
    display: flex;
    gap: 32px; /* ISOMPI VÄLI - oli 20px */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 5px 10px 10px; /* MINIMOIDUT paddingit */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.aku-carousel-track::-webkit-scrollbar {
    display: none;
}

.aku-carousel-slide {
    flex: 0 0 calc(33.333% - 22px);
    scroll-snap-align: center; /* Muutettu center jotta keskittyy */
    min-width: 280px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Pehmeä animaatio */
    transform: scale(0.88); /* Sivukortit pienempiä */
    opacity: 0.6; /* Sivukortit himmeämpiä */
}

/* PODIUM - Keskimmäinen kortti */
.aku-carousel-slide.aku-carousel-center {
    transform: scale(1.0); /* Täysikokoinen */
    opacity: 1; /* Täysin näkyvä */
    z-index: 10;
}

@media (max-width: 1024px) {
    .aku-carousel-slide {
        flex: 0 0 calc(50% - 16px);
        transform: scale(0.90);
    }
    
    .aku-carousel-slide.aku-carousel-center {
        transform: scale(1.0);
    }
}

@media (max-width: 640px) {
    .aku-carousel-slide {
        flex: 0 0 85%;
        transform: scale(0.92);
    }
    
    .aku-carousel-slide.aku-carousel-center {
        transform: scale(1.0);
    }
}

.aku-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid var(--aku-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aku-green);
    z-index: 15;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.15s ease;
}

.aku-carousel-btn:hover {
    background: var(--aku-green);
    color: #fff;
    border-color: var(--aku-green);
}

.aku-carousel-btn svg {
    width: 19px;
    height: 19px;
}

.aku-carousel-prev { left: -10px; }
.aku-carousel-next { right: -10px; }

@media (max-width: 640px) {
    .aku-carousel-prev { left: 0; }
    .aku-carousel-next { right: 0; }
}

/* ==========================================================================
   Piilotettu kortti
   ========================================================================== */

.aku-card-hidden {
    display: none !important;
}

/* ==========================================================================
   Vertailupalkki (kelluva alhaalla)
   ========================================================================== */

.aku-compare-bar {
    --aku-green: #06402b;
    --aku-green-dark: #052e1f;
    --aku-bg: #fafaf7;
    --aku-border: rgba(0, 0, 0, 0.08);
    --aku-text: #1a1a1a;
    --aku-text-muted: #888;
    --aku-text-secondary: #555;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 12px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aku-compare-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.aku-compare-cards {
    display: flex;
    gap: 12px;
    flex: 1;
    overflow-x: auto;
}

.aku-compare-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--aku-bg);
    border: 1px solid var(--aku-border);
    border-radius: 14px;
    padding: 8px 12px 8px 8px;
    min-width: 280px;
    position: relative;
}

.aku-compare-card-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-color: #e8efe5;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #9ab39a;
}

.aku-compare-card-info {
    flex: 1;
    min-width: 0;
}

.aku-compare-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--aku-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aku-compare-card-meta {
    font-size: 12px;
    color: var(--aku-text-muted);
    margin-top: 2px;
}

.aku-compare-card-remove {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.aku-compare-card-remove:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #e74c3c;
}

.aku-compare-card-remove svg {
    width: 16px;
    height: 16px;
}

.aku-compare-btn-action {
    background: var(--aku-green);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.aku-compare-btn-action:not([disabled]):hover {
    background: var(--aku-green-dark);
}

.aku-compare-btn-action[disabled] {
    background: #d4d4d4;
    color: #777;
    cursor: not-allowed;
}

.aku-compare-btn-action svg {
    width: 18px;
    height: 18px;
}

.aku-compare-btn-clear {
    background: transparent;
    color: var(--aku-text-secondary);
    border: 1px solid var(--aku-border);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.aku-compare-btn-clear:hover {
    background: var(--aku-bg);
    border-color: var(--aku-green);
    color: var(--aku-green);
}

.aku-compare-btn-clear svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Vertailumodal
   ========================================================================== */

.aku-compare-modal {
    --aku-green: #06402b;
    --aku-green-dark: #052e1f;
    --aku-bg: #fafaf7;
    --aku-border: rgba(0, 0, 0, 0.08);
    --aku-text: #1a1a1a;
    --aku-text-muted: #888;
    --aku-text-secondary: #555;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aku-compare-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.aku-compare-modal-content {
    position: relative;
    background: #fff;
    border-radius: 14px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.aku-compare-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--aku-border);
}

.aku-compare-modal-header h2 {
    font-size: 22px;
    font-weight: 500;
    color: var(--aku-text);
    margin: 0;
}

.aku-compare-modal-close {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.aku-compare-modal-close:hover {
    background: var(--aku-bg);
    color: var(--aku-text);
}

.aku-compare-modal-close svg {
    width: 20px;
    height: 20px;
}

.aku-compare-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 20px 24px; /* EI top paddingöä, jotta header on kiinni ylhäällä */
}

.aku-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0; /* Ei marginaalia */
}

.aku-compare-table th {
    background: var(--aku-bg);
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    color: var(--aku-text);
    border-bottom: 2px solid var(--aku-border);
    position: sticky;
    top: 0;
    z-index: 10;
    vertical-align: middle; /* Keskitetään sisältö pystysuunnassa */
}

.aku-compare-table th:first-child {
    background: #fff;
    font-weight: 600;
    width: 180px;
}

.aku-compare-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--aku-border-light);
}

.aku-compare-table td.aku-compare-label {
    font-weight: 500;
    color: var(--aku-text-secondary);
    background: var(--aku-bg);
}

.aku-compare-table td.aku-compare-diff {
    background: #fff5f5;
    color: #e74c3c;
    font-weight: 500;
}

.aku-compare-table tr:hover td:not(.aku-compare-label) {
    background: var(--aku-green-bg);
}

@media (max-width: 768px) {
    .aku-compare-bar {
        padding: 10px;
    }
    
    .aku-compare-bar-inner {
        flex-direction: column;
        gap: 10px;
    }
    
    .aku-compare-btn-action,
    .aku-compare-btn-clear {
        width: 100%;
        justify-content: center;
    }
    
    .aku-compare-modal {
        padding: 0;
    }
    
    .aku-compare-modal-content {
        border-radius: 0;
        max-height: 100vh;
    }
    
    .aku-compare-table th:first-child {
        position: sticky;
        left: 0;
        z-index: 11;
    }
    
    .aku-compare-table td.aku-compare-label {
        position: sticky;
        left: 0;
        z-index: 10;
    }
}

/* ==========================================================================
   Hidden-attribuutin tuki (vertailupalkille)
   ========================================================================== */

[hidden] {
    display: none !important;
}

/* ==========================================================================
   Overlay-tyypit (Avajais & Viimeinen = PUNAINEN, Alennus = KELTAINEN)
   ========================================================================== */

/* AVAJAISTARJOUS - PUNAINEN */
.aku-offer-avajais {
    background: rgba(211, 47, 47, 0.95) !important; /* Punainen */
}

.aku-offer-avajais .aku-opening-ribbon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffcdd2;
}

.aku-offer-avajais .aku-opening-ribbon svg {
    stroke: #ffcdd2;
}

.aku-offer-avajais .aku-opening-price,
.aku-offer-avajais .aku-opening-old-price {
    color: #fff;
}

/* ALENNUS - KELTAINEN */
.aku-offer-alennus {
    background: rgba(255, 193, 7, 0.95) !important; /* Keltainen */
}

.aku-offer-alennus .aku-opening-ribbon {
    background: rgba(0, 0, 0, 0.15);
    color: #000;
}

.aku-offer-alennus .aku-opening-ribbon svg {
    stroke: #000;
}

.aku-offer-alennus .aku-opening-price {
    color: #1a1a1a;
}

.aku-offer-alennus .aku-opening-old-price {
    color: rgba(0, 0, 0, 0.6);
}

/* VIIMEINEN MAHDOLLISUUS - PUNAINEN */
.aku-offer-viimeinen {
    background: rgba(211, 47, 47, 0.95) !important; /* Punainen */
}

.aku-offer-viimeinen .aku-opening-ribbon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffcdd2;
}

.aku-offer-viimeinen .aku-opening-ribbon svg {
    stroke: #ffcdd2;
}

.aku-offer-viimeinen .aku-opening-price,
.aku-offer-viimeinen .aku-opening-old-price {
    color: #fff;
}

/* ==========================================================================
   Responsiivisuus - varmistukset
   ========================================================================== */

/* Tabletit (max 1024px) */
@media (max-width: 1024px) {
    .aku-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobiili (max 640px) */
@media (max-width: 640px) {
    .aku-grid-2,
    .aku-grid-3,
    .aku-grid-4 {
        grid-template-columns: 1fr !important;
    }
    
    .aku-card-prices {
        flex-direction: column;
        gap: 8px;
    }
    
    .aku-yield-grid,
    .aku-features-grid {
        grid-template-columns: 1fr !important;
    }
    
    .aku-compare-bar-inner {
        flex-direction: column;
        gap: 10px;
    }
    
    .aku-compare-modal-content {
        width: 95%;
        max-height: 90vh;
        padding: 16px;
    }
    
    .aku-compare-table {
        font-size: 13px;
    }
}

/* ==========================================================================
   Pakotetaan napinrivien välit yhtenäisiksi (themat lisäävät joskus margineja)
   ========================================================================== */

.aku-card-cta > * {
    margin: 0 !important;
}

.aku-card-cta button,
.aku-card-cta a {
    margin: 0 !important;
}

.aku-card-cta > div {
    margin: 0 !important;
    padding: 0 !important;
}

.aku-card-cta > div > button,
.aku-card-cta > div > a {
    margin: 0 !important;
}

/* ==========================================================================
   Pakotetaan kuva tasan kortin yläreunaan (ei valkoista rajaa)
   ========================================================================== */

.aku-card {
    padding: 0 !important;
}

.aku-card-image {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Estetään teema-tyylit */
.aku-card > .aku-card-image:first-child {
    margin-top: 0 !important;
}

.aku-card > *:first-child {
    margin-top: 0 !important;
}

/* ==========================================================================
   Linear: Tutustu kohteeseen -nappi (sama tyyli kuin Dokumentit)
   ========================================================================== */

.aku-action-link {
    text-decoration: none;
    color: inherit;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    border: none !important; /* Ei borderia Linear-linkille */
}

.aku-action-link:hover {
    background: var(--aku-bg);
}

.aku-action-link:hover .aku-action-arrow svg {
    transform: translateX(2px);
    transition: transform 0.15s ease;
}

/* ==========================================================================
   Vertailumodal: Kuvat täyttävät ylätilan (ei padding)
   ========================================================================== */

.aku-compare-table th:not(:first-child) {
    vertical-align: middle !important;
}

.aku-compare-table th img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px 8px 0 0;
}
