/**
 *  Nolix Homepage Sections — CSS
 *  Categories, Best Sellers, Consult, Why, News, FAQ
 */

/* ---- Shared ---- */
.nox-sec { padding: 48px 0; }
.nox-wrap { max-width: 1320px; margin: 0 auto; padding: 0 28px; }

.nox-sec-head { text-align: center; margin-bottom: 40px; }
.nox-sec-head h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--nolix-brand-primary, #1D3A01);
}
.nox-rule {
    display: block;
    width: 60px;
    height: 4px;
    border-radius: 2px;
    background: var(--nolix-brand-accent, #5EAC12);
    margin: 12px auto 0;
}


/* ============================================================
   1) Categories
   ============================================================ */
.nox-cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

/* Center the main category row: it holds a fixed set of items but the base grid
   reserves 5 columns, leaving an empty column (looked right-shifted, not centered).
   Scoped with :not(.nox-morecat-grid) so the More-categories grid is untouched;
   min-width guard keeps the mobile 2-col layout intact. Card size preserved (max 226px). */
@media (min-width: 961px) {
    .nox-cat-grid:not(.nox-morecat-grid) {
        grid-template-columns: repeat(4, minmax(0, 226px));
        justify-content: center;
    }
}

.nox-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 8px 60px -5px rgba(0,0,0,.12);
    padding: 26px 18px 20px;
    text-decoration: none;
    transition: transform .18s;
}

.nox-cat-card:hover {
    transform: translateY(-5px);
}

.nox-cat-pic {
    width: 100%;
    height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nox-cat-pic img {
    max-height: 100%;
    width: auto;
}

.nox-cat-ph {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    color: #93a487;
    background-image: repeating-linear-gradient(45deg,#eef1ec 0 11px,#e5eae0 11px 22px);
}

.nox-cat-lbl {
    font-size: 16px;
    font-weight: 500;
    color: var(--nolix-brand-primary, #1D3A01);
}

/* ---- More Categories (icon cards) ---- */
.nox-morecat-sec { padding-top: 8px; }
.nox-morecat-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    direction: rtl;
}
.nox-morecat-card {
    gap: 14px;
    padding: 22px 12px 18px;
    border-radius: 22px;
}
.nox-morecat-ico {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nolix-brand-accent-soft, #eef6e3);
    transition: background .18s;
}
.nox-morecat-ico svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: var(--nolix-brand-accent, #5EAC12);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nox-morecat-ico svg text {
    fill: var(--nolix-brand-accent, #5EAC12);
    stroke: none;
}
.nox-morecat-card:hover .nox-morecat-ico {
    background: var(--nolix-brand-accent, #5EAC12);
}
.nox-morecat-card:hover .nox-morecat-ico svg {
    stroke: #fff;
}
.nox-morecat-card:hover .nox-morecat-ico svg text {
    fill: #fff;
}
.nox-morecat-card .nox-cat-lbl { font-size: 15px; }


/* ============================================================
   2) Best Sellers
   ============================================================ */
/* Section title (panel removed — title now sits above the products) */
.nox-best-head {
    margin-bottom: 24px;
    text-align: center;
}

.nox-best-head h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--nolix-brand-primary, #1D3A01);
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.nox-best-head h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 4px;
    border-radius: 2px;
    background: var(--nolix-brand-accent, #5EAC12);
}

/* Products now span the full width */
.nox-best {
    display: block;
}

/* Tabs */
.nox-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nox-tabs button {
    background: #f3f3f3;
    border: 0;
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #555;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.nox-tabs button.on {
    background: var(--nolix-brand-accent, #5EAC12);
    color: #fff;
}

/* Tab panes */
.nox-tab-pane { display: none; }
.nox-tab-pane.active { display: block; }

/* Override WooCommerce product grid inside best sellers */
/* Full-width 4-up layout (panel removed). Keep Flatsome's native flex columns
   so the absolutely-positioned .box-image keeps a non-zero width — a custom
   CSS grid here collapses the image container to width:0 and hides the photo. */
.nox-best-main .products {
    display: flex !important;
    flex-wrap: wrap;
    margin: 0 -12px !important;
}

.nox-best-main .products .product {
    width: 25% !important;
    max-width: 25% !important;
    margin: 0 0 16px !important;
    padding: 0 12px !important;
    float: none !important;
    clear: none !important;
}

/* Product title — truncate long names to 2 lines */
.nox-best-main .products .product .product-title,
.nox-best-main .products .product .name,
.nox-best-main .products .product .woocommerce-loop-product__title {
    font-size: 12.5px !important;
    font-weight: 600;
    line-height: 1.5;
    /* fix the title block to 4 lines: fits the longest product name in full
       and keeps every card the same height */
    height: 6em;
    display: -webkit-box !important;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Flatsome gives .box-text a fixed height; let it grow so the 3-line title
   never spills out of the card and all cards in a row stay equal height. */
.nox-best-main .products .product .box-text {
    height: auto !important;
}

/* Flatsome also forces .price-wrapper to height:0, so multi-line (range) prices
   spilled out of the card. Let it grow, reserve 2 lines so single- and
   range-priced cards stay equal height, and add a gap below the title. */
.nox-best-main .products .product .price-wrapper {
    height: auto !important;
    min-height: 2.4em;
    margin-top: 10px;
}

/* Price styling */
.nox-best-main .products .product .price {
    font-size: 14px !important;
    font-weight: 700;
    color: var(--nolix-brand-accent, #5EAC12);
}

/* Range prices (variable products) render as:
   <amount> <span aria-hidden="true">–</span> <amount>
   Hide the dash separator but keep a clean gap between the two amounts.
   The separator is the only direct <span> child of .price that is NOT an
   .amount and is aria-hidden, so target it precisely. */
.nox-best-main .products .product .price > span[aria-hidden="true"]:not(.amount) {
    font-size: 0 !important;       /* hide the "–" glyph */
    margin: 0 5px;                 /* keep visual spacing between the two prices */
}

/* Equal-height cards: the grid cell already stretches to the tallest card, but
   Flatsome's inner .box only grows to its own content (so single-price cards
   ended up shorter than range-priced ones). Force the .box to fill the cell so
   every visible card is exactly the same size. */
.nox-best-main .products .product.col { display: flex; }
.nox-best-main .products .product .box {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.nox-best-main .products .product .box-text { flex: 1 1 auto; }

/* The .box is a flex column; its child .box-image (which sizes its height via
   padding-top and positions the photo absolutely) would otherwise collapse to
   width:0 and the product image disappears. Force it to take full width. */
.nox-best-main .products .product .box-image {
    width: 100% !important;
}


/* ============================================================
   3) Consultation Banner
   ============================================================ */
.nox-consult {
    background: linear-gradient(270deg, #1D3A01 0%, #38640C 60%, #5EAC12 120%);
    border-radius: 24px;
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.nox-consult-txt {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.7;
}

.nox-consult-right {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.nox-consult-socials {
    display: flex;
    gap: 10px;
}

.nox-consult-socials a {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.nox-consult-socials a:hover { background: rgba(255,255,255,.25); }

.nox-consult-socials .nox-icn {
    width: 20px; height: 20px;
    stroke: #fff; stroke-width: 1.8; fill: none;
    stroke-linecap: round; stroke-linejoin: round;
}

.nox-consult-phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #5EAC12;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Modam', 'Peyda', system-ui, sans-serif;
    border-radius: 14px;
    padding: 12px 24px;
    text-decoration: none;
    transition: background .2s;
    direction: ltr;
}

.nox-consult-phone:hover { background: #69bd16; color: #fff; }

.nox-phone-ring {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nox-phone-ring .nox-icn {
    width: 18px; height: 18px;
    stroke: #fff; stroke-width: 2; fill: none;
    stroke-linecap: round; stroke-linejoin: round;
}


/* ============================================================
   4) Why Nolix
   ============================================================ */
.nox-why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.nox-why-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px 16px;
}

.nox-why-ring {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 2px solid #e0edd4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5fbe9;
    transition: border-color .25s, background .25s;
}

.nox-why-card:hover .nox-why-ring {
    border-color: var(--nolix-brand-accent, #5EAC12);
    background: #ebf7d9;
}

.nox-why-ring .nox-icn {
    width: 30px; height: 30px;
    stroke: var(--nolix-brand-accent, #5EAC12);
    stroke-width: 1.8; fill: none;
    stroke-linecap: round; stroke-linejoin: round;
}

.nox-why-lbl {
    font-size: 15px;
    font-weight: 600;
    color: var(--nolix-brand-primary, #1D3A01);
}

/* Clickable help/rules cards (anchors styled like why-cards) */
.nox-help-card {
    text-decoration: none;
    border: 1px solid #eef1ea;
    border-radius: 16px;
    background: #fff;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}
.nox-help-card:hover {
    border-color: var(--nolix-brand-accent, #5EAC12);
    box-shadow: 0 8px 20px rgba(94, 172, 18, .12);
    transform: translateY(-3px);
}
.nox-help-card .nox-why-lbl {
    transition: color .25s;
}
.nox-help-card:hover .nox-why-lbl {
    color: var(--nolix-brand-accent, #5EAC12);
}


/* ============================================================
   5) News
   ============================================================ */
.nox-news {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

.nox-news-panel {
    padding: 24px 0;
}

.nox-news-panel h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--nolix-brand-primary, #1D3A01);
}

.nox-news-panel p {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.nox-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--nolix-brand-accent, #5EAC12);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 100px;
    padding: 10px 20px;
    margin-top: 20px;
    text-decoration: none;
    transition: background .2s;
}

.nox-btn-pill:hover { background: #69bd16; color: #fff; }

.nox-btn-pill .ar {
    width: 14px; height: 14px;
    stroke: #fff; stroke-width: 2; fill: none;
}

/* Override Flatsome blog grid */
.nox-news-cards .row { margin: 0 !important; }


/* ============================================================
   6) FAQ
   ============================================================ */
.nox-faq-head {
    margin-bottom: 36px;
}

.nox-dotline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.nox-dotline i {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--nolix-brand-accent, #5EAC12);
    display: inline-block;
}

.nox-dotline span {
    width: 40px;
    height: 2px;
    background: var(--nolix-brand-accent, #5EAC12);
    border-radius: 2px;
    display: inline-block;
}

.nox-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.nox-faq-item {
    border: 1.5px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color .25s;
}

.nox-faq-item.open { border-color: var(--nolix-brand-accent, #5EAC12); }

.nox-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    background: none;
    border: 0;
    padding: 18px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--nolix-brand-primary, #1D3A01);
    cursor: pointer;
    text-align: right;
}

.nox-faq-chev {
    width: 18px; height: 18px;
    stroke: #888; stroke-width: 2; fill: none;
    stroke-linecap: round; stroke-linejoin: round;
    flex: none;
    transition: transform .25s;
}

.nox-faq-item.open .nox-faq-chev { transform: rotate(180deg); }

.nox-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
    padding: 0 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #555;
}

.nox-faq-item.open .nox-faq-a {
    max-height: 200px;
    padding: 0 20px 18px;
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
    .nox-morecat-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 960px) {
    .nox-cat-grid { grid-template-columns: repeat(2, 1fr); }
    .nox-morecat-grid { grid-template-columns: repeat(3, 1fr); }
    .nox-why-grid { grid-template-columns: repeat(2, 1fr); }
    .nox-faq-grid { grid-template-columns: 1fr; }

    .nox-best-head h2 {
        font-size: 24px;
    }

    /* The .products container is flexbox (see rule ~202), not grid, so the old
       grid-template-columns had no effect and cards stayed at width:25% (4-up)
       on mobile. Override the per-card width instead to get a clean 2-up grid. */
    .nox-best-main .products .product {
        width: 50% !important;
        max-width: 50% !important;
    }

    /* Equal-size tabs: 2×2 grid, every tab the same width */
    .nox-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .nox-tabs button {
        width: 100%;
        text-align: center;
        padding: 12px 8px;
        white-space: nowrap;
    }

    .nox-news {
        grid-template-columns: 1fr;
    }

    .nox-news-panel {
        text-align: center;
    }

    .nox-consult {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }

    .nox-consult-right {
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .nox-sec { padding: 32px 0; }
    .nox-wrap { padding: 0 16px; }

    .nox-cat-grid { gap: 12px; }
    .nox-cat-card { padding: 22px 12px; border-radius: 26px; }
    .nox-morecat-grid { grid-template-columns: repeat(2, 1fr); }
    .nox-morecat-card { padding: 18px 10px; border-radius: 20px; }
    .nox-morecat-ico { width: 56px; height: 56px; }
    .nox-morecat-ico svg { width: 28px; height: 28px; }

    .nox-consult-txt { font-size: 18px; }
    .nox-consult-phone { font-size: 16px; padding: 10px 18px; }

    .nox-sec-head h2 { font-size: 22px; }

    /* Tighten the 2-up product cards on narrow phones so the (sometimes
       two-line range) price never spills past the card edge. */
    .nox-best-main .products { margin: 0 -6px !important; }
    .nox-best-main .products .product { padding: 0 6px !important; }
    .nox-best-main .products .product .price { font-size: 12px !important; }
    .nox-best-main .products .product .price-wrapper { min-height: 2.8em; }
}


/* ---- r3 (2026-07-10): bestseller cards — price hugs the card bottom,
   no dead strip under the price on mobile ---- */
.nox-best-main .products .product .box-text{display:flex;flex-direction:column;}
.nox-best-main .products .product .price-wrapper{margin-top:auto;}
@media(max-width:560px){
  .nox-best-main .products .product .product-title,
  .nox-best-main .products .product .name,
  .nox-best-main .products .product .woocommerce-loop-product__title{height:auto;min-height:4.2em;}
}