/*.active-category {
    background: var(--primary-green, #4caf50);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s;
}
.active-category a {
    text-decoration: underline;
    color: #fff !important;
}*/

/* 
 * Card CSS styles
 *
 * Version: 1.0
 * Description: Styles for card layout and image gallery
 * Tags: card, gallery, responsive, flexbox, grid
 * responsive screen size breakpoints
 *  - phones: 600px
 *  - tablets: 768px
 *  - laptops: 992px
 *  - large: 1200px
*/
.text-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 100%;
}
.all-ads-section {
    /* background-color: var(--bg-light); */
    width: 100%;
    min-height: 100vh;
    padding-top: .5rem;
    padding-bottom: 2rem;
}
.categories-mobil {
    appearance: none; 
    display: none;
}
.ads-container {
    max-width: var(--large-width, 1200px);
    margin: 0 auto;
    padding: 2rem 1rem;
    /* background-color: var(--bg-light); */
    border: 0px solid var(--border-400);
    /* background-color: var(--bs-debug-color, red); */
    .breadcrumbs {
        position: relative;
        width: 100% !important;
        font-size: .9rem;
        color: var(--font-dark, #2d3748);
    }
}

.container-header {
    max-width: var(--large-width, 1200px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding: 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--font-dark);
    /* background-color: red; */

    .logo {
        padding-left: 1rem;
    }
}
.pagination-values {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.pagination-values label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--font-dark);
}

.pagination-values select {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-500, #ccc);
    border-radius: 6px;
    background-color: white;
    color: var(--font-dark);
    cursor: pointer;
    width: 80px;
    max-width: 80px;
    text-align: center;
    box-sizing: border-box;
}

.pagination-values select:focus {
    outline: 2px solid var(--primary-green, #4caf50);
    outline-offset: 2px;
}

.pagination-values.mobil-mode {
    display: none;
    margin-top: 2rem;
}
.ads-categories-wrapper {
    position: relative;
    width: 100%;

    padding-top: 0rem;
    padding-bottom: 0rem;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    background-color: var(--bg-dark);
    overflow-x: auto;
    scroll-behavior: smooth;
    /* z-index: 1  !important; */
    background-color: var(--bg-dark);
    visibility: hidden;
    height: 0px;
}

.ads-categories-wrapper::-webkit-scrollbar {
  display: none;
}

.slider-btn {
    position: absolute;
    top: 50% !important;
    translate: 0 -50%;

    border: 1px solid #888;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100 !important;
    overflow-x: visible !important;
}

/* Slider kategori horisontal scroll */
.slider-btn.left,
.slider-btn.right {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.9;
    background-color: var(--primary-green, #447904);
    border-radius: 50%;
    border: 1px solid #888;
    padding: 0;
}

.slider-btn.left { left: 6px; }
.slider-btn.right { right: 6px; }

.slider-btn.left svg,
.slider-btn.right svg {
    width: 16px;
    height: 16px;
    fill: var(--bg-light, #f8f9fa);
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.slider-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
    padding-top: 0;
}
.filter-categories {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--font-dark);
    margin-bottom: 0.5rem;
    text-align: left;
}

.kategori-slider {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    /* padding: 0.5rem 2.5rem 1rem 2.5rem;
    padding-top: 2.5rem; */
    padding: 1rem 2.5rem;
    box-sizing: border-box;
}
.kategori-slider::-webkit-scrollbar {
  display: none;
}

.category-box {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: first baseline;
    /* min-width: 100px; */
    width: 110px;
    color: var(--font-dark);
}
.category-box svg {
    width: 32px;
    height: 32px;
    padding: 0;
    font-weight: 400;
    fill: var(--font-dark);
}
.category-box img {
    width: 32px;
    height: 32px;
    padding: 0;
    object-fit: cover;
}
.category-box a {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    color: var(--font-dark);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
}
.category-box a:hover {
    text-decoration: underline;
} 

.display-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin-left: auto;
    color: var(--font-dark);
    margin: 2rem 0;

    span > svg {
        width: 24px;
        height: 24px;
        fill: var(--font-dark);
        cursor: pointer;
    }
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: var(--bs-gray-600, #6c757d);
}

.view-toggle-btn:hover {
    background-color: var(--bs-gray-400, #ddd);
    color: var(--font-dark);
}

.view-toggle-btn.active {
    background-color: var(--primary-green, #447904);
    color: var(--font-light, #fff);
}

.view-toggle-btn.active svg {
    fill: var(--font-light, #fff);
}

/* Default: Show listview, hide grid */
.ads-grid {
    display: none;
}

.ads-listview {
    display: block;
}

/* When grid mode is active */
.ads-container.grid-mode .ads-grid {
    display: grid;
}

.ads-container.grid-mode .ads-listview {
    display: none;
}

.all-ads-section > .container {
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
}
.ads-of-same-category {
    width: var(--large-width, 1200px);
    margin: 0 auto;
    margin-top: 2rem;
    > h1 {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 1rem;
        color: var(--font-dark)
    }
   
}
.ads-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 0 auto;
    width: max(320px, 100%);
    height: auto;
    padding: 2rem 0;
    color: var(--font-color);

    >.all-ads-header {
        grid-column: 1 / -1;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--font-dark);
        margin-bottom: 1rem;
    }
}

/* forbehold annoncerne på show_ads side */
.card-wrapper {
    position: relative;
    background-color: var(--bs-light);
    width: 100%;
    min-height: 320px;
    border-radius: var(--box-border-radius);
    border: 1px solid var(--border-500);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0rem; 
    box-sizing: border-box;
    overflow: hidden;

    .favorite-ad {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        background-color: rgba(255, 255, 255, 1);
        background-color: transparent;
        border-radius: 50%;

        display: flex;
        align-items: center;
        justify-content: center;
        
        cursor: pointer;
        transition: background-color 0.3s;
        z-index: 10;

        &:hover {
            background-color: var(--bs-yellow, yellow);
            & > svg {
                fill: var(--bs-danger, #ac0587) !important; 
            }
        }

        & > svg {
            width: 18px;
            height: 18px;
            fill: var(--bs-danger, #ac0587);
        }
    }
    .favorited {
        background-color: var(--bs-yellow, yellow);
        & > svg {
            width: 18px;
            height: 18px;
            fill: var(--bs-danger, #ac0587) !important; 
        }
    }

    .ad-image {
        width: 100%;
        height: 200px;
        overflow: hidden;
        border-radius: 8px 8px 0 0;
    }
    .ad-image > img {
        width: 100%;
        height: 100%;
        object-position: top;
        object-fit: cover;
    }
    .ad-details {
        padding: .25rem .75rem;

        .title {
            font-size: 1rem;
            font-weight: 400;
            color: var(--font-dark);
            margin: 0.5rem 0;
        }
        .description {
            font-size: 0.9rem;
            margin: 0.25rem 0;
        }
        .price {
            font-size: 0.9rem;
            font-weight: 500;
            margin: 0.25rem 0;
        }
        .city {
            font-size: 0.9rem;
            margin: 0.25rem 0;
        }
    }
}

#icons-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
 }

/* Email subscription section styles */
.email-subscription {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 2rem;
    background: var(--bs-gray-400);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.email-section, .subcription-img {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.email-section {
    align-items: flex-start;
    padding: 1rem 2rem 1rem 1rem;
}
.email-section h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    color: var(--font-dark, #222);
}
.email-section p {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: var(--font-dark, #222);
}

/* Ny stil for at placere knap inde i input */
.business-form {
    position: relative;
    width: 100%;
    max-width: 350px;
    display: block;
}
.subscription-form {
    position: relative;
    width: 100%;
    max-width: 450px;
    display: block;
    margin-top: 1rem;
}
.message-wrapper {
    min-width: 100%;
    margin: .5rem 0;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.5rem;
    color: var(--font-dark);
    flex-direction: column;
    textarea {
        width: 100%;
        min-height: 80px;
        padding: 0.6rem 1rem;
        border: 1px solid var(--border-500, #ccc);
        border-radius: var(--button-border-radius);
        font-size: 1rem;
        outline: none;
        box-sizing: border-box;
        resize: vertical;
    }
}
.email-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    button {
        margin-top: 0.74rem;
        margin-right: 2px;
    }
}

.business-form input[type="email"],
.subscription-form input[type="email"] {
    position: relative;
    width: 100%;
    padding: 0.6rem 5.5rem 0.6rem 1rem;
    border: 1px solid var(--border-500, #ccc);
    border-radius: var(--button-border-radius);
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
}
.business-form button,
.subscription-form button {
    position: absolute;
    top: 50%;
    /* right: 0.3rem; */
    right: 0rem;
    transform: translateY(-50%);
    height: 2.2rem;
    padding: 0 1.2rem;
    background: var(--primary-green, #447904);
    color: var(--font-color, #eee);
    border: none;
    border-radius: 0 var(--button-border-radius) var(--button-border-radius) 0;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 2;
}
.business-form button:hover,
.subscription-form button:hover {
    opacity: .8;
}

.business-image,
.subcription-img {
    display: flex;
    align-items: center;
    justify-content: center;
}
.business-image img,
.subcription-img img {
    width: 100%;
    height: 225px;
    object-fit: cover;
    border-radius: 0x;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* displaying ads as listview */
.ads-listview {
    display: block;
    width: 100%;
    height: auto;
}
.listview-card-wrapper:hover {
    background-color: var(--bs-gray-200, #f8f9fa);
}

.listview-card-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: 180px 1fr 200px;
    gap: 1.5rem;
    align-items: flex-start;
    max-height: 180px;
    width: 100%;
    padding: 1px;
    box-sizing: border-box;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    background: var(--bs-light, #fff);
    border: 1px solid var(--border-500, #e0e0e0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);

    > .favorite-ad {
        position: absolute;
        top: 10px;
        left: 130px;
        width: 32px;
        height: 32px;
        background-color: rgba(255, 255, 255, 1);
        background-color: transparent;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background-color 0.3s;
        z-index: 10;

        &:hover {
            /* background-color: rgba(255, 255, 255, 1); */
            background-color: var(--bs-yellow, yellow);
            & > svg {
                fill: var(--bs-danger, red) !important; 
            }
        }

        > svg {
            width: 20px;
            height: 20px;
            fill: var(--bs-gray-500, #ac0587);
        }
    }
    .favorited {
        /* fill: var(--bs-dangerE, yellow) !important;  */
        background-color: var(--bs-yellow, yellow);
        > svg {
            fill: var(--bs-danger, red) !important; 
        }
    }
}

.listview-ad-image {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    width: 170px;
    overflow: hidden;
    border-radius: 8px;
}
.listview-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    border-radius: 8px;
}

.listview-ad-details {
    position: relative;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1rem 0;

    &::hover {
        background-color: var(--bs-gray-200, #f8f9fa);
    }
}

.listview-ad-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--font-dark);
    margin-bottom: 0.25rem;
    > a {
        color: inherit;
        text-decoration: underline;
        &:hover {
            text-decoration: underline;
        }
    }
}
.listview-ad-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
    line-height: 1.4em;
    font-size: 0.95rem;
    color: var(--font-dark);
    margin-bottom: 0.25rem;
    opacity: 0.85;
}
.listview-ad-price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-green, #447904);
    margin-bottom: 0.25rem;
}
.listview-ad-user {
    font-size: 0.9rem;
    color: var(--font-dark);
    opacity: 0.7;
}
.listview-ad-details-extra {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1rem 0.5rem;

    /* p {
        display: flex;
        align-items: center;
        justify-self: start;
        gap: 0.25rem;
        font-weight: 500;
    } */
}
.listview-ad-viewed span{
    font-size: 0.9rem;
    color: var(--font-dark);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
    font-weight: 500;
}

.listview-ad-meta {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
    justify-content: flex-start;
    font-size: 0.92rem;
    color: var(--font-dark);
    opacity: 0.85;
    text-align: right;
}

.arrow {
    font-size: 2em;
    cursor: pointer;
    padding: 10px;
    /* user-select: none; */
    color: var(--bs-light, #eee);
 }
#icon-panel {
    display: flex;
    overflow-x: auto;
    width: 1000px; /* Juster bredde efter behov */
    scroll-behavior: smooth; /* tilføjet til glidende rulle */
 }

.icon-item {
    flex: 0 0 auto;
    width: 80px; /* bredde af hvert ikon, tilpas efter behov */
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
    border: 1px solid #ccc;
    font-size: 2em;
    color: #eee;
}

/* image gallery */
.gallery {
    width: 900px;
    display: flex;
    overflow-x: scroll;
}
.gallery div {
    width: 100%;
    display: grid;
    grid-template-columns: auto auto auto;
    grid-gap: 20px;
    padding: 10px;
    flex: none;
}

.gallery div img {
    width: 100%;
    filter: grayscale(100%);
    transition: transform 0.5s;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.gallery-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10% auto;
}

#backbtn,
#nextbtn {
    cursor: pointer;
    width: 50px;
    margin: 40px;
}
.gallery div img:hover {
    filter: grayscale(0);
    transform: scale(1.1);
    cursor: pointer;
}

/*  - phones: 600px
 *  - tablets: 768px
 *  - laptops: 992px
 *  - large: 1200px */

/* Mobilvisning: billede til venstre, tekst til højre */
@media (max-width: 600px) {
    .pagination-values {
        display: none;
    }
    
    .display-mode-toggle {
        display: flex !important;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    /* Respect user's view mode choice on mobile too */
    .ads-listview {
        display: block;
        width: 100% !important;
        height: auto !important;    
    }
    
    .ads-container.grid-mode .ads-listview {
        display: none !important;
    }
    
    .ads-grid {
        display: none;
        width: 100% !important;
        height: auto !important;    
    }
    
    .ads-container.grid-mode .ads-grid {
        display: block !important;
    }

    /* Mobile styling for listview cards - billede til venstre, tekst til højre */
    .listview-card-wrapper {
        display: grid;
        grid-template-columns: 110px 1fr;
        grid-template-rows: auto;
        max-height: none;
        padding: 0.75rem;
        margin-bottom: 1rem;
        gap: 0.75rem;
    }

    .listview-ad-image {
        grid-column: 1;
        grid-row: 1;
        width: 110px;
        height: 110px;
        border-radius: 8px;
    }

    .listview-ad-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }

    .listview-ad-details {
        grid-column: 2;
        grid-row: 1;
        padding: 0;
        gap: 0.5rem;
    }

    .listview-ad-title {
        font-size: 1.05rem !important;
        font-weight: 600 !important;
        margin: 0;
        line-height: 1.3;
    }

    .listview-ad-description {
        font-size: 0.9rem !important;
        margin: 0;
        line-height: 1.4;
    }

    .listview-ad-price {
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: var(--primary-green, #4caf50);
        margin: 0.25rem 0 0 0;
    }

    .listview-ad-details-extra {
        display: none !important;
    }

    .listview-card-wrapper > .favorite-ad {
        top: 0.75rem;
        left: 70px;
    }
    
    /* Grid view styling for mobile - billede over tekst */
    .listview-ad-wrapper {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem 0.1rem;
    }
    .listview-ad-meta {
        align-items: flex-start;
        text-align: left;
    }
    .card-wrapper {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
        padding: 0;
        margin-bottom: 1.5rem;
        box-sizing: border-box;
    }
    .ad-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px 8px 0 0;
        overflow: hidden;
    }
    .ad-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .ad-details {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 1rem !important;
        min-width: 0;
    }
    
    /* Fix nested ad-details padding issue */
    .ad-details .ad-details {
        padding: 0 !important;
    }
    
    /* Link around title should have no margin/padding */
    .ad-details a.view-ad-button:has(.title) {
        margin: 0 !important;
        padding: 0 !important;
        text-decoration: none;
        display: block;
    }
    
    .ad-details .title {
        font-size: 1.15rem !important;
        font-weight: 600 !important;
        color: var(--font-dark);
        margin: 0 0 0.5rem 0 !important;
        padding: 0 !important;
        line-height: 1.3;
    }
    
    .ad-details .description {
        font-size: 0.9rem !important;
        margin: 0 0 0.5rem 0 !important;
        padding: 0 !important;
        line-height: 1.4;
    }
    
    .ad-details .price {
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: var(--primary-green, #4caf50);
        margin: 0 0 0.35rem 0 !important;
        padding: 0 !important;
    }
    
    .ad-details .city {
        font-size: 0.9rem !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Button "Se annonce" at bottom should have proper styling */
    .ad-details a.view-ad-button:not(:has(.title)) {
        margin: 0.75rem 0 0 0 !important;
        padding: 0.6rem 1.25rem !important;
        font-size: 0.95rem !important;
        font-weight: 500;
        display: inline-block;
        align-self: flex-start;
        background-color: var(--primary-green, #4caf50);
        color: white;
        border-radius: 6px;
        text-decoration: none;
        transition: background-color 0.3s ease;
    }
    
    .ad-details a.view-ad-button:not(:has(.title)):hover {
        background-color: var(--primary-green-dark, #45a049);
    }
    
    .favorite-ad {
        position: absolute;
        right: 0.75rem;
        top: 0.75rem;
    }
    .categories-mobil{
        background-color: var(--bs-gray-200);  
        color: var(--font-dark);
        display: block;
    }
    .categories-mobil > label { 
        -webkit-text-fill-color: var(--font-dark) !important;
    }
    
    /* Footer email subscription - vist på mobil, men med tilpasset layout */
    section .email-subscription {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Hide email subscription image on mobile for better space */
    section .email-subscription .subcription-img {
        display: none !important;
    }
}


 /* *  - phones: 600px
 *  - tablets: 768px
 *  - laptops: 992px
 *  - large: 1200px */

    /* for phones/tablets */
@media (min-width: 601px) and (max-width: 768px) {
    .pagination-wrapper {
        flex-wrap: wrap;
        margin: 0!important;
        padding: 0 !important;
    }
    .pagination-values, .display-mode-toggle {
        display: none!important ;
    }
    .pagination-values.mobil-mode {
        display: block!important;
        margin-top: 0;
        margin-bottom: 1.5rem;
        padding-top: 1rem;
    }
    
    .pagination-values.mobil-mode label {
        font-size: 1rem;
        font-weight: 500;
        color: var(--font-dark);
        margin-right: 0.5rem;
    }
    
    .pagination-values.mobil-mode select {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--border-500, #ccc);
        border-radius: 6px;
        background-color: white;
        color: var(--font-dark);
        cursor: pointer;
        width: 80px;
        max-width: 80px;
        text-align: center;
        box-sizing: border-box;
    }
    
    .pagination-values.mobil-mode select:focus {
        outline: 2px solid var(--primary-green, #4caf50);
        outline-offset: 2px;
    }
    
    .pagination-values.mobil-mode > span:first-child{
        display: none !important;
    }

    /* Respect user's view mode choice on tablet too */
    .ads-listview {
        display: block;
        width: 100% !important;
        height: auto !important;    
    }
    
    .ads-container.grid-mode .ads-listview {
        display: none !important;
    }
    
    .ads-grid {
        display: none;
        height: auto !important;    
        width: 100% !important;   
        margin: 0 !important; 
        padding-bottom: 0 !important;
    }
    
    .ads-container.grid-mode .ads-grid {
        display: block !important;
    }

    /* Tablet styling for listview cards */
    .listview-card-wrapper {
        display: grid;
        grid-template-columns: 140px 1fr;
        grid-template-rows: auto auto;
        max-height: none;
        padding: 0.75rem;
        margin-bottom: 1rem;
        gap: 0.75rem;
    }

    .listview-ad-image {
        grid-column: 1;
        grid-row: 1 / 3;
        width: 140px;
        height: 140px;
    }

    .listview-ad-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .listview-ad-details {
        grid-column: 2;
        grid-row: 1;
        padding: 0;
        gap: 0.35rem;
    }

    .listview-ad-details-extra {
        grid-column: 2;
        grid-row: 2;
        padding: 0;
        gap: 0.35rem;
        font-size: 0.85rem;
    }

    .listview-card-wrapper > .favorite-ad {
        top: 0.75rem;
        left: 100px;
    }

    /* Grid view styling for tablet */
    .card-wrapper {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        height: 160px !important;
        width: 100%;
        padding: .1rem 0;
        box-sizing: border-box;
        margin-bottom: 1rem;
        border-radius: 0;
    }
    .ad-image {
        flex: 0 0 140px;
        max-width: 140px;
        height: 100% !important;
        margin-right: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .ad-image img {
        object-fit: cover;
        /* border-radius: var(--box-border-radius); */
    }
    .ad-details {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: fit-content !important;
        margin: 0 !important;
        padding: 0 !important;
        /* background-color: red; */
    }

    .ad-details > p.title  {
        font-size: 1.15rem!important;
        font-weight: 500!important;
        padding: .25rem !important; 
        margin: 0 !important;
        color: var(--font-dark);
    }
    .ad-details > p.description {
        font-size: 0.9rem;
        padding: .1rem .25rem!important; 
        margin: 0 !important;
    }
    .ad-details > p.price {
        font-size: 0.9rem;
        font-weight: 500;
        padding: 0 .25rem!important; 
        margin: 0 !important;
    }
    .ad-details > p.city {
        font-size: 0.9rem;
        padding: 0 .25rem!important; 
        margin: 0 !important;
    }
    .favorite-ad {
        position: absolute;
        right: 0.5rem;
        top: 0.5rem;
    }

    .all-ads-section {
        min-width: 100vw !important;
        margin: 0;
        padding: 0 !important; 
    }
    
    .filter-categories {
        display: none; 
    }
    .ads-categories-wrapper {
        visibility: visible;
        height: inherit !important;
        display: block;
        padding: 0rem 0.5rem !important;
    }
    .slider-container > button{
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 100 !important;
    }
    .slider-container > button.slider-btn.left {
        left: 0rem !important;
    }
    .slider-container > button.slider-btn.right {
        right: 0rem !important;
    }

    .ads-categories-wrapper .kategori-slider{
        padding: 1rem 0 !important;
    }
    .categories-mobil{
        background-color: var(--bs-gray-200);  
        color: var(--font-dark);
        display: block;
    }
    .categories-mobil > label { 
        -webkit-text-fill-color: var(--font-dark) !important;
    }

    .email-subscription {
        flex-direction: column;
        padding: 0 !important;
        margin: 2rem 0 0 0 !important;
        width: 100% !important;
        overflow: hidden;
    }
    .email-section {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 1rem 1rem !important;
        box-sizing: border-box;
    }
    .email-section h3 {
        margin: 1rem 0 0.5rem 0 !important;
        font-size: 1.05rem !important;
    }
    .email-section p {
        margin: 0 !important;
        padding: 0 !important;
        padding-bottom: .5rem !important;
    }
    .subcription-img {
        width: 100% !important;
        padding-bottom: 0rem;
        display: flex;
        overflow: hidden;
    }
    .subcription-img img {
        width: 100% !important;
        max-width: 100%;
        height: auto;
        display: block;
    }
    .subscription-form {
        max-width: 100% !important;
        box-sizing: border-box;
    }
    .ads-container {
        width: 100% !important;
        max-width: 100%;
    }
}
 /* for laptops */
@media (min-width: 769px) and (max-width: 900px) {
    .display-mode-toggle {
        display: block;
    }
    .listview-ad-wrapper {
        grid-template-columns: 80px 1fr 100px;
        gap: 0.75rem;
        padding: 0.5rem 0.25rem;
    }
    .listview-ad-image {
        height: 60px;
        width: 60px;
    }

    .email-subscription {
        flex-direction: column;
        width: 100% !important;
        padding: 0 !important;
        margin: 2rem 0 0 0 !important;
        overflow: hidden;
    }
    
    .email-section {
        width: 100% !important;
        box-sizing: border-box;
        padding: 1rem !important;
    }
    
    .email-section h3 {
        margin: 1rem 0 0.5rem 0 !important;
        font-size: 1.15rem !important;
    }
    
    .subcription-img {
        width: 100% !important;
        overflow: hidden;
        display: flex;
    }
    
    .subcription-img img {
        width: 100% !important;
        max-width: 100%;
        height: auto;
        display: block;
        padding: 0 !important;
    }
    
    .subscription-form {
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .ads-container {
        width: 100% !important;
        max-width: 100%;
    }

    .categories-mobil {
        appearance: none; 
        display: block;
    }
}

/* for large screens */
@media (min-width: 901px) and (max-width: 1200px) {
    .pagination-values.mobil-mode {
        display: none!important;
    }
    .ads-container {
        padding: 1.5rem 1rem;
    }

}

