body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f6f9fa;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main content wrapper for content area ONLY (not header/footer) */
.main-body {
    position: relative;
    min-height: 70vh;
    width: 100%;
    background: none;
    z-index: 1;
}

/* Banner */
.hero-gadgets {
    position: relative;
    height: min(25vw, 390px);
    background: url('1.jpg') center/cover no-repeat, #e9f2ee;
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 220px;
}
.hero-overlay {
    background: rgba(41, 64, 58, 0.49);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-content {
    color: #fff;
    text-align: center;
    padding: 2rem 5vw;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.1rem);
    margin-bottom: 1.1rem;
    letter-spacing: 0.05em;
}
.hero-content p {
    font-size: clamp(1rem, 2vw, 1.35rem);
    opacity: 0.90;
    margin: 0;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 1.01rem;
    padding: 1.05rem 0 0.7rem 3vw;
    color: #2e2e2e;
}
.breadcrumb a {
    color: #195b37;
    text-decoration: none;
    font-weight: 600;
}

/* Main flex: always adapts, for filter/cards ONLY */
.main-flex {
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    gap: clamp(1rem, 3vw, 2.6rem);
    box-sizing: border-box;
    justify-content: center;
    min-height: 60vh;
    position: relative;
    z-index: 2;
}

/* Sticky filter: sticks only within .main-flex/.main-body */
.filter-sidebar {
    min-width: clamp(220px, 25vw, 350px);
    max-width: clamp(260px, 32vw, 350px);
    background: #fff;
    border-radius: 1.15em;
    box-shadow: 0 4px 22px rgba(41,91,55,0.12);
    padding: 2em 1.3em 2.5em 2em;
    margin: 2.2em 0 0 2.5vw;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: -webkit-sticky;
    position: sticky;
    top: 110px; /* Adjust to below header+breadcrumb; never above body */
    left: 0;
    height: fit-content;
    z-index: 999;
    align-self: flex-start;
}
.filter-sidebar h3 {
    font-size: 1.22rem;
    font-weight: 700;
    color: #1e4732;
    margin: 0 0 1.3rem 0;
    letter-spacing: 0.03em;
}
.gadget-checkbox-list {
    list-style: none;
    padding: 0;
    margin: 1.2em 0 0 0;
    width: 100%;
}
.gadget-checkbox-list li {
    margin-bottom: 1.11em;
    font-size: 1.13rem;
    display: flex;
    align-items: center;
}
.gadget-checkbox-list input[type="checkbox"] {
    accent-color: #195b37;
    width: 1.18em; height: 1.18em;
    margin-right: 1em;
}
.gadget-checkbox-list label {
    cursor: pointer;
    color: #195b37;
    font-weight: 500;
}
.deselect-btn {
    background: linear-gradient(91deg, #195b37 0%, #21754a 100%);
    color: #fff;
    border: none;
    border-radius: 0.7em;
    font-weight: 600;
    font-size: 1.07rem;
    padding: 0.54em 1.25em;
    cursor: pointer;
    transition: background 0.13s, color 0.11s;
    margin-top: 0.33rem;
}
.deselect-btn:hover {
    background: linear-gradient(91deg, #21754a 0%, #195b37 100%);
    color: #e6fbe7;
}

/* Cards region: responsive and centered */
.categories-list {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    gap: clamp(1.3rem, 4vw, 3.2rem);
    margin: 2.3rem 2vw 0 0;
    align-items: center;
    width: 100%;
}

/* CARD SIZING */
.category-row {
    display: flex;
    align-items: center;
    background: #fff;
    padding: clamp(1.3em, 4vw, 3.2rem) clamp(1.2em, 4vw, 3.7rem);
    border-radius: 1.5em;
    box-shadow: 0 6px 40px rgba(41,91,55,0.11);
    min-width: 250px;
    max-width: 1200px;
    width: clamp(320px, 76vw, 1100px);
    gap: clamp(1.1em, 5vw, 3.6rem);
    margin-left: 0;
    transition: width 0.2s;
}

/* Responsive image and content */
.category-img-box img {
    width: clamp(120px, 25vw, 300px);
    height: clamp(130px, 28vw, 360px);
    object-fit: cover;
    border-radius: 1.1em;
    box-shadow: 0 6px 22px rgba(41,91,55,0.13);
}
.category-content {
    flex: 1;
    padding-left: clamp(1.1em, 3vw, 4rem);
    color: #232323;
}
.category-content h2 {
    font-size: clamp(1.2rem, 3vw, 2.1rem);
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-weight: 800;
    color: #163e2f;
}
.category-content p {
    font-size: clamp(1rem, 2vw, 1.33rem);
    margin-bottom: 2.1rem;
    margin-top: 0.16rem;
}
.cta-btn {
    display: inline-block;
    background: linear-gradient(92deg, #195b37 0%, #235d3c 100%);
    color: #fff;
    padding: 0.82em 2.3em;
    border-radius: 11px;
    font-weight: 700;
    font-size: 1.11rem;
    text-decoration: none;
    transition: background 0.16s, color 0.10s;
    box-shadow: 0 2px 12px 0 rgba(25,91,55,0.16);
    outline: none;
    border: none;
}
.cta-btn:hover {
    background: linear-gradient(92deg, #235d3c 0%, #195b37 100%);
    color: #c8f3d9;
}

.category-content p {
    font-size: clamp(1rem, 2vw, 1.33rem);
    margin-bottom: 2.1rem;
    margin-top: 0.16rem;
    max-width: 100%;
    word-break: break-word;
    white-space: pre-line;    /* respects manual newlines and wraps */
    overflow-wrap: anywhere;  /* aggressively break long single words */
    text-align: justify;      /* optionally, for justified text look */
}

/* Responsive: Stack filter and enlarge cards */
@media (max-width: 1200px) {
    .category-row { min-width: 75vw; width: 99vw; padding: 2rem 2vw; }
    .category-img-box img { width: clamp(100px, 24vw, 220px); height: clamp(100px, 26vw, 280px); }
    .filter-sidebar { min-width: 180px; max-width: 290px; }
}
@media (max-width: 900px) {
    .main-flex { flex-direction: column; gap: 0; align-items: center;}
    .filter-sidebar {
        width: 96vw;
        max-width: 98vw;
        position: static;
        margin: 1.1rem auto 0 auto;
        border-radius: 12px;
        top: auto;
    }
    .categories-list { gap: 1.2rem; margin: 0; align-items: stretch; }
    .category-row {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 1.2rem 0.8rem;
        min-width: unset; max-width: unset;
        gap: 1.1rem;
    }
    .category-img-box img { width: 90vw; max-width: 360px; height: auto; }
    .category-content { padding-left: 0; }
}
@media (max-width: 700px) {
    .hero-content h1 { font-size: 2.1rem; }
    .category-row { padding: 0.9rem 0.5rem; }
    .category-img-box img { max-width: 92vw; }
}
/* ===============================
   MOBILE FIXES (FINAL)
================================ */
@media (max-width: 768px) {

    .breadcrumb {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }

    .main-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .filter-sidebar {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        position: static;
        margin: 0.5rem 0;
        padding: 1.2rem 1rem;
        border-radius: 12px;
    }

    .categories-list {
        margin: 0;
        gap: 1rem;
        align-items: stretch;
    }

    .category-row {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 1rem;
        gap: 1rem;
        border-radius: 16px;
    }

    .category-img-box img {
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 14px;
    }

    .category-content {
        padding-left: 0;
        text-align: center;
    }

    .category-content p {
        text-align: left;
        font-size: 0.95rem;
    }

    .cta-btn {
        width: 100%;
        text-align: center;
        padding: 0.9rem 0;
        font-size: 1rem;
    }
}

/* Hero banner mobile fix */
@media (max-width: 768px) {
    .hero-gadgets {
        height: 180px;
        min-height: 180px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}
/* ===============================
   CENTER CARD CONTENT (MOBILE)
================================ */
@media (max-width: 768px) {

    .category-row {
        align-items: center;
        text-align: center;
    }

    .category-content {
        width: 100%;
        padding: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .category-content h2 {
        text-align: center;
        width: 100%;
    }

    .category-content p {
        text-align: center;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-btn {
        margin-top: 12px;
        align-self: center;
    }
}

