
/* Natural Fresh custom WooCommerce shop — fully scoped, native scrolling only. */
#nfShopPage,
#nfShopPage * { box-sizing: border-box; }

body.nf-admin-portal-page .nf-admin-generated-page:has(#nfShopPage) {
    background: #f5f8f6;
}

#nfShopPage {
    direction: rtl;
    min-height: 70vh;
    padding: clamp(18px, 4vw, 54px) 16px 70px;
    color: #173126;
    font-family: Cairo, Tahoma, Arial, sans-serif;
}

#nfShopPage .nf-shop-shell {
    width: min(1380px, 100%);
    margin: 0 auto;
}

#nfShopPage .nf-shop-filter-toggle {
    position: sticky;
    z-index: 30;
    top: 16px;
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 0 14px auto;
    padding: 0;
    place-items: center;
    cursor: pointer;
    color: #fff;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, #075438, #0b744c);
    box-shadow: 0 14px 30px rgba(7,84,56,.24);
    transition: transform .22s ease, box-shadow .22s ease;
}

#nfShopPage .nf-shop-filter-toggle:hover,
#nfShopPage .nf-shop-filter-toggle[aria-expanded="true"] {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(7,84,56,.30);
}

#nfShopPage .nf-shop-filter-toggle svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

#nfShopPage .nf-shop-filters {
    display: grid;
    grid-template-columns: minmax(150px, 1.3fr) repeat(6, minmax(120px, 1fr)) auto;
    gap: 10px;
    max-height: 0;
    margin: 0;
    padding: 0 14px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    border: 1px solid transparent;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(7,84,56,.08);
    transition: max-height .35s ease, opacity .25s ease, transform .35s ease, padding .35s ease, margin .35s ease, border-color .35s ease;
}

#nfShopPage .nf-shop-filters.is-open {
    max-height: 220px;
    margin-bottom: 22px;
    padding: 14px;
    opacity: 1;
    transform: translateY(0);
    border-color: #dce8e1;
}

#nfShopPage .nf-shop-filters input,
#nfShopPage .nf-shop-filters select,
#nfShopPage .nf-shop-filters button {
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0;
    padding: 0 12px;
    color: #173126;
    border: 1px solid #d9e5de;
    border-radius: 12px;
    outline: 0;
    background: #f9fbfa;
    font: inherit;
    font-size: 13px;
}

#nfShopPage .nf-shop-filters input:focus,
#nfShopPage .nf-shop-filters select:focus {
    border-color: #0b744c;
    box-shadow: 0 0 0 3px rgba(11,116,76,.10);
}

#nfShopPage .nf-shop-reset {
    cursor: pointer;
    color: #fff !important;
    border-color: #173126 !important;
    background: #173126 !important;
    font-weight: 800 !important;
}

#nfShopPage .nf-shop-results {
    position: relative;
    min-height: 240px;
    transition: opacity .18s ease;
}

#nfShopPage .nf-shop-results.is-loading {
    opacity: .45;
    pointer-events: none;
}

#nfShopPage .nf-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 24px);
}

#nfShopPage .nf-shop-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #dfe9e3;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(7,84,56,.07);
    transition: transform .25s ease, box-shadow .25s ease;
}

#nfShopPage .nf-shop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(7,84,56,.13);
}

#nfShopPage .nf-shop-card__image {
    display: block;
    aspect-ratio: 1 / .86;
    overflow: hidden;
    background: #edf5f0;
}

#nfShopPage .nf-shop-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform .45s ease;
}

#nfShopPage .nf-shop-card:hover .nf-shop-card__image img {
    transform: scale(1.045);
}

#nfShopPage .nf-shop-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 13px;
    padding: 18px;
}

#nfShopPage .nf-shop-card__name {
    min-height: 54px;
    color: #173126;
    text-decoration: none;
    font-size: clamp(16px, 1.5vw, 20px);
    font-weight: 900;
    line-height: 1.65;
}

#nfShopPage .nf-shop-card__price {
    min-height: 32px;
    color: #d97706;
    font-size: 18px;
    font-weight: 900;
}

#nfShopPage .nf-shop-card__price del {
    color: #7a8881;
    font-size: 13px;
    opacity: .7;
}

#nfShopPage .nf-shop-card__price ins {
    color: #d97706;
    text-decoration: none;
}

#nfShopPage .nf-shop-variation {
    width: 100%;
    height: 44px;
    padding: 0 11px;
    border: 1px solid #d9e5de;
    border-radius: 12px;
    background: #f9fbfa;
    font: inherit;
    font-size: 13px;
}

#nfShopPage .nf-shop-quantity {
    display: grid;
    grid-template-columns: 46px minmax(60px, 1fr) 46px;
    gap: 6px;
    direction: ltr;
    margin-top: auto;
}

#nfShopPage .nf-shop-quantity button,
#nfShopPage .nf-shop-quantity input {
    height: 45px;
    margin: 0;
    padding: 0;
    text-align: center;
    border: 1px solid #d5e2da;
    border-radius: 12px;
    background: #f6faf8;
    font: inherit;
    font-weight: 900;
}

#nfShopPage .nf-shop-quantity button {
    cursor: pointer;
    color: #075438;
    font-size: 22px;
}

#nfShopPage .nf-shop-quantity input {
    -moz-appearance: textfield;
    color: #173126;
}

#nfShopPage .nf-shop-quantity input::-webkit-inner-spin-button,
#nfShopPage .nf-shop-quantity input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

#nfShopPage .nf-shop-add-button {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 11px 16px;
    cursor: pointer;
    color: #fff;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #075438, #0b744c);
    box-shadow: 0 12px 24px rgba(7,84,56,.19);
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    transition: transform .2s ease, opacity .2s ease, background .2s ease;
}

#nfShopPage .nf-shop-add-button:hover:not(:disabled) {
    transform: translateY(-2px);
}

#nfShopPage .nf-shop-add-button.is-success {
    background: #198754;
}

#nfShopPage .nf-shop-add-button.is-error {
    background: #dc3545;
}

#nfShopPage .nf-shop-add-button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

#nfShopPage .nf-shop-alert {
    position: fixed;
    z-index: 999999;
    top: 22px;
    left: 50%;
    min-width: min(92vw, 360px);
    padding: 13px 18px;
    color: #0f5132;
    border: 1px solid #badbcc;
    border-radius: 12px;
    background: #d1e7dd;
    box-shadow: 0 15px 40px rgba(0,0,0,.15);
    text-align: center;
    font-weight: 800;
    transform: translateX(-50%);
}

#nfShopPage .nf-shop-alert.is-error {
    color: #842029;
    border-color: #f5c2c7;
    background: #f8d7da;
}

#nfShopPage .nf-shop-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

#nfShopPage .nf-shop-pagination button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    cursor: pointer;
    color: #075438;
    border: 1px solid #d7e4dc;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-weight: 900;
}

#nfShopPage .nf-shop-pagination button.is-active {
    color: #fff;
    border-color: #075438;
    background: #075438;
}

@media (max-width: 1180px) {
    #nfShopPage .nf-shop-filters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    #nfShopPage .nf-shop-filters.is-open { max-height: 300px; }
}

@media (max-width: 980px) {
    #nfShopPage .nf-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    #nfShopPage { padding-inline: 12px; }
    #nfShopPage .nf-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    #nfShopPage .nf-shop-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #nfShopPage .nf-shop-filters.is-open { max-height: 520px; }
    #nfShopPage .nf-shop-card__body { padding: 13px; }
    #nfShopPage .nf-shop-card__name { min-height: 48px; font-size: 15px; }
}

@media (max-width: 430px) {
    #nfShopPage .nf-shop-grid { grid-template-columns: 1fr; }
    #nfShopPage .nf-shop-filters { grid-template-columns: 1fr; }
    #nfShopPage .nf-shop-filters.is-open { max-height: 720px; }
    #nfShopPage .nf-shop-card__image { aspect-ratio: 1 / .78; }
}

@media (prefers-reduced-motion: reduce) {
    #nfShopPage * { transition: none !important; animation: none !important; }
}

/* V26 — fast native rendering and two products per mobile row. */
#nfShopPage .nf-shop-card {
    content-visibility: auto;
    contain: layout paint style;
    contain-intrinsic-size: 410px;
}

@media (hover: none), (pointer: coarse) {
    #nfShopPage .nf-shop-card,
    #nfShopPage .nf-shop-card:hover,
    #nfShopPage .nf-shop-card__image img,
    #nfShopPage .nf-shop-card:hover .nf-shop-card__image img {
        transform: none !important;
        transition: none !important;
    }
}

@media (max-width: 430px) {
    #nfShopPage { padding-inline: 7px; }
    #nfShopPage .nf-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    #nfShopPage .nf-shop-card { border-radius: 15px; }
    #nfShopPage .nf-shop-card__body { gap: 8px; padding: 9px 7px 10px; }
    #nfShopPage .nf-shop-card__image { aspect-ratio: 1 / .82; }
    #nfShopPage .nf-shop-card__name { min-height: 42px; font-size: 13px; line-height: 1.55; }
    #nfShopPage .nf-shop-card__price { min-height: 24px; font-size: 14px; }
    #nfShopPage .nf-shop-quantity { grid-template-columns: 32px minmax(34px, 1fr) 32px; gap: 3px; }
    #nfShopPage .nf-shop-quantity button,
    #nfShopPage .nf-shop-quantity input { height: 36px; border-radius: 9px; font-size: 14px; }
    #nfShopPage .nf-shop-add-button { min-height: 41px; padding: 7px 5px; border-radius: 10px; font-size: 12px; }
    #nfShopPage .nf-shop-filters { grid-template-columns: 1fr; }
    #nfShopPage .nf-shop-filters.is-open { max-height: 720px; }
}
