/* ============================================================
   SMART GRID v1.2 – CORE WRAPPER
   ============================================================ */
.he-smart-grid {
    display: grid;
    width: 100%;
    gap: 20px;
    grid-template-columns: repeat(4, 1fr); /* Desktop default */
}

/* ============================================================
   RESPONSIVE COLUMN SYSTEM
   ============================================================ */

/* Large Tablet – 3 kolumner */
@media (max-width: 1200px) {
    .he-smart-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 26px;
    }
}

/* Tablet – 2 kolumner */
@media (max-width: 900px) {
    .he-smart-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

/* Mobil – 1 kolumn */
@media (max-width: 600px) {
    .he-smart-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}


/* ============================================================
   Animering av cards vid laddning av sidan
   ============================================================ */
.he-smart-grid__card {
    opacity: 0;
    transform: translateY(8px);
    animation: heFadeIn 0.45s ease-out forwards;
}

/* Universell stagger – funkar i alla kolumnantal */
.he-smart-grid__card:nth-child(1)  { animation-delay: 0.00s; }
.he-smart-grid__card:nth-child(2)  { animation-delay: 0.05s; }
.he-smart-grid__card:nth-child(3)  { animation-delay: 0.10s; }
.he-smart-grid__card:nth-child(4)  { animation-delay: 0.15s; }
.he-smart-grid__card:nth-child(5)  { animation-delay: 0.20s; }
.he-smart-grid__card:nth-child(6)  { animation-delay: 0.25s; }
.he-smart-grid__card:nth-child(7)  { animation-delay: 0.30s; }
.he-smart-grid__card:nth-child(8)  { animation-delay: 0.35s; }
.he-smart-grid__card:nth-child(9)  { animation-delay: 0.40s; }
.he-smart-grid__card:nth-child(10) { animation-delay: 0.45s; }

/* Animation keyframes */
@keyframes heFadeIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filteknapp Gratis - Kostnad */
.he-filter-bar {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Dölj checkboxen */
.he-toggle-checkbox {
    display: none;
}

/* Knappen */
.he-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #d4d4d4;
    border-radius: 22px;
    background: #ffffff;
    color: #999;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    position: relative;
}

/* Ikon – default (tom cirkel) */
.he-toggle-label::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid #bcbcbc;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.18s ease;
}

/* Hover */
.he-toggle-label:hover {
    border-color: #db991e;
}

/* Aktiv stil */
.he-toggle-checkbox:checked + .he-toggle-label {
    background: #db991e;
    border-color: #db991e;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* Aktiv ikon – fylld cirkel med kryss */
.he-toggle-checkbox:checked + .he-toggle-label::before {
    content: "✓";
    font-size: 12px;
    font-weight: 700;
    color: #db991e;
    background: #fff;
    border-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobilanpassning knapp */
@media (max-width: 600px) {
    .he-filter-bar {
        margin-bottom: 18px;
    }
    .he-toggle-label {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* ============================================================
   CARD WRAPPER (INGEN SKUGGA, INGEN RUNDNING)
   ============================================================ */
.he-smart-grid__card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

/* ============================================================
   IMAGE WRAPPER (DETTA ÄR SJÄLVA "CARD"-KÄNSLAN)
   ============================================================ */
.he-smart-grid__image-wrapper {
    position: relative; 
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* HOVER – endast bilden lyfts */
.he-smart-grid__image-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 22px rgba(0,0,0,0.12);
}

/* ============================================================
   IMAGE CONTAINER
   ============================================================ */
.he-smart-grid__image {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f3f3f3;
}

/* BILDEN */
.he-smart-grid__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.he-smart-grid__image-wrapper {
    position: relative;
}

/* DATE BADGE – refined white glass */
.he-smart-grid__date-badge {
    position: absolute;
    top: 14px;
    left: 14px;

    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    width: 72px;
    height: 70px;          
    padding: 6px 0;
    border-radius: 12px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #111;
    pointer-events: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);

    font-family: inherit;
    line-height: 1.1;
}

/* DAG – huvudfokus */
.he-date-day {
    display: block;
    font-size: 0.90rem;
    font-weight: 700;         /* fet */
    letter-spacing: 0.2px;
    margin-bottom: 1px;       /* dag + månad hör ihop */
}

/* MÅNAD – sekundär men fortfarande fet */
.he-date-month {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;         /* också fet */
    opacity: 0.9;
    margin-bottom: 4px;       /* luft innan år */
}

/* ÅR – metadata */
.he-date-year {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;         /* inte fet */
    opacity: 0.65;
}


/* Prisbadge – Fritt eller pris */
.he-price-tag {
    position: absolute;
    top: 30px;
    right: 0;
    background: #db991e;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px 0 0 4px;
    z-index: 6;
    pointer-events: none;
    line-height: 1.2;

    /* Diskret droppis */
    box-shadow: 0 2px 4px rgba(0,0,0,0.18);
}


/* ============================================================
   CONTENT AREA (REN, INGEN SKUGGA)
   ============================================================ */
.he-smart-grid__content {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.he-smart-grid__title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: #111;
}

/* TITLE – no underline */
.he-smart-grid__title-link {
    text-decoration: none !important;
    color: inherit;
    transition: color 0.25s ease;
}

.he-smart-grid__title-link:hover {
    color: #db991e;
}

.he-smart-grid__title-link {
    display: inline-block !important;
}

/* Metainformation Kategori och ort */
.he-smart-grid__meta {
    font-size: 0.875rem;
	font-weight: 300;
    color: #666;
}

.he-smart-grid__meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.he-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.he-meta-icon img {
    width: 14px;
    height: 14px;
    display: block;
}


.he-smart-grid__date {
    font-weight: 500;
}
