/* =========================================================
   RAIN SPREE — SHOP MASTER CATALOG
   File: assets/css/shop-archive.css
   ========================================================= */

.rs-shop-page {
    --rs-shop-green: #1F5E2F;
    --rs-shop-green-dark: #174A25;
    --rs-shop-green-soft: #EFF7EF;
    --rs-shop-purple: #6F3AC8;
    --rs-shop-orange: #F57A20;
    --rs-shop-text: #1F2A22;
    --rs-shop-muted: #6B746D;
    --rs-shop-border: rgba(31, 94, 47, .10);
    --rs-shop-glass: rgba(255, 255, 255, .72);
    color: var(--rs-shop-text);
}

.rs-shop-container {
    width: min(1380px, calc(100% - 40px));
    margin: 0 auto;
}

/* =========================================================
   HERO
   ========================================================= */

.rs-shop-hero {
    position: relative;
    overflow: hidden;
    padding: 22px 0 30px;
    background:
        linear-gradient(135deg, rgba(248, 252, 247, .96), rgba(255, 255, 255, .88));
    border-bottom: 1px solid var(--rs-shop-border);
}

.rs-shop-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 13px;
    color: var(--rs-shop-muted);
}

.rs-shop-breadcrumb a {
    color: var(--rs-shop-green);
    text-decoration: none;
}

.rs-shop-breadcrumb a:hover {
    text-decoration: underline;
}

.rs-shop-hero-copy {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.rs-shop-hero-copy h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.05;
    color: #163C20;
}

.rs-shop-leaf {
    display: inline-block;
    margin-left: 6px;
    font-size: .65em;
    color: #7BA85B;
    transform: rotate(-12deg);
}

.rs-shop-hero-copy p {
    margin: 12px auto 0;
    max-width: 700px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--rs-shop-muted);
}

/* =========================================================
   LAYOUT
   ========================================================= */

.rs-shop-catalog {
    padding: 28px 0 70px;
}

.rs-shop-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.rs-shop-sidebar {
    position: sticky;
    top: 110px;
    border: 1px solid var(--rs-shop-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, .80);
    box-shadow: 0 10px 30px rgba(31, 94, 47, .05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

.rs-shop-filter-form {
    padding: 18px;
}

.rs-filter-block + .rs-filter-block {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--rs-shop-border);
}

.rs-filter-block h2 {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    color: #1B3A22;
}

.rs-filter-group h3 {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--rs-shop-green);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.rs-filter-all,
.rs-filter-category,
.rs-filter-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    color: #29322C;
    transition: .2s ease;
}

.rs-filter-all,
.rs-filter-category {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 13px;
}

.rs-filter-all {
    margin-bottom: 4px;
    background: #F5F8F3;
}

.rs-filter-all:hover,
.rs-filter-category:hover,
.rs-filter-category.is-active,
.rs-filter-all.is-active {
    color: var(--rs-shop-green);
    background: var(--rs-shop-green-soft);
}

.rs-filter-category {
    font-weight: 600;
}

.rs-filter-children {
    margin: 0 0 5px;
    padding: 2px 0 4px 10px;
    border-left: 1px solid rgba(31, 94, 47, .12);
}

.rs-filter-child {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
    color: #59635B;
}

.rs-filter-child:hover,
.rs-filter-child.is-active {
    color: var(--rs-shop-green);
    background: rgba(239, 247, 239, .70);
    border-radius: 7px;
}

.rs-filter-all span:last-child,
.rs-filter-category span:last-child,
.rs-filter-child span:last-child,
.rs-filter-check small {
    color: #778078;
    font-size: 11px;
}

.rs-filter-check {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 31px;
    font-size: 12px;
    cursor: pointer;
}

.rs-filter-check input {
    width: 14px;
    height: 14px;
    accent-color: var(--rs-shop-green);
}

.rs-filter-empty {
    margin: 0;
    color: var(--rs-shop-muted);
    font-size: 12px;
}

.rs-filter-actions {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.rs-filter-apply {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    background: var(--rs-shop-green);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.rs-filter-apply:hover {
    background: var(--rs-shop-green-dark);
    transform: translateY(-1px);
}

.rs-filter-clear {
    text-align: center;
    color: var(--rs-shop-muted);
    font-size: 11px;
    text-decoration: none;
}

.rs-filter-clear:hover {
    color: var(--rs-shop-green);
}

/* =========================================================
   TOOLBAR
   ========================================================= */

.rs-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 48px;
    margin-bottom: 16px;
}

.rs-shop-result-count {
    font-size: 13px;
    color: var(--rs-shop-muted);
}

.rs-shop-result-count strong {
    color: #29332D;
}

.rs-shop-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rs-sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--rs-shop-muted);
    font-size: 12px;
}

.rs-sort-select {
    min-width: 180px;
    min-height: 38px;
    padding: 0 34px 0 12px;
    border: 1px solid rgba(31, 94, 47, .12);
    border-radius: 9px;
    background: rgba(255, 255, 255, .88);
    color: #29332D;
    font-size: 12px;
}

/* =========================================================
   PRODUCT GRID
   ========================================================= */

.rs-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.rs-shop-product-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(31, 94, 47, .08);
    border-radius: 15px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 8px 24px rgba(31, 94, 47, .045);
    transition: transform .22s ease, box-shadow .22s ease;
}

.rs-shop-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(31, 94, 47, .09);
}

.rs-shop-product-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #F5F4F0;
    text-decoration: none;
}

.rs-shop-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

.rs-shop-product-card:hover .rs-shop-product-image img {
    transform: scale(1.025);
}

.rs-shop-placeholder {
    color: #8B928C;
    font-size: 13px;
}

.rs-shop-sale {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--rs-shop-green);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.rs-shop-product-body {
    padding: 12px 13px 14px;
}

.rs-shop-product-category {
    min-height: 16px;
    margin-bottom: 4px;
    color: #6D7B70;
    font-size: 10px;
}

.rs-shop-product-title {
    min-height: 38px;
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.rs-shop-product-title a {
    color: #29332D;
    text-decoration: none;
}

.rs-shop-product-title a:hover {
    color: var(--rs-shop-green);
}

.rs-shop-product-price {
    min-height: 26px;
    margin-top: 6px;
    color: var(--rs-shop-green);
    font-size: 14px;
    font-weight: 700;
}

.rs-shop-product-price del {
    margin-left: 5px;
    color: #8B928C;
    font-size: 11px;
    font-weight: 400;
}

.rs-shop-product-price ins {
    text-decoration: none;
}

.rs-shop-product-actions {
    margin-top: 8px;
}

.rs-shop-add-to-cart,
.rs-shop-view-product {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    box-sizing: border-box;
    padding: 0 10px !important;
    border: 1px solid var(--rs-shop-green) !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: var(--rs-shop-green) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: .2s ease;
}

.rs-shop-add-to-cart:hover,
.rs-shop-view-product:hover {
    background: var(--rs-shop-green) !important;
    color: #fff !important;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.rs-shop-pagination {
    margin-top: 28px;
}

.rs-shop-pagination ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rs-shop-pagination a,
.rs-shop-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    box-sizing: border-box;
    border: 1px solid rgba(31, 94, 47, .10);
    border-radius: 8px;
    color: var(--rs-shop-green);
    background: #fff;
    text-decoration: none;
    font-size: 12px;
}

.rs-shop-pagination .current {
    border-color: var(--rs-shop-green);
    background: var(--rs-shop-green);
    color: #fff;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.rs-shop-empty {
    padding: 70px 30px;
    text-align: center;
    border: 1px dashed rgba(31, 94, 47, .18);
    border-radius: 18px;
    background: rgba(248, 252, 247, .72);
}

.rs-shop-empty-icon {
    font-size: 34px;
    color: var(--rs-shop-green);
}

.rs-shop-empty h2 {
    margin: 10px 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    color: #1B3A22;
}

.rs-shop-empty p {
    margin: 0 auto 18px;
    max-width: 480px;
    color: var(--rs-shop-muted);
    font-size: 13px;
}

.rs-shop-empty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 9px;
    background: var(--rs-shop-green);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .rs-shop-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 18px;
    }

    .rs-shop-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

/* =========================================================
   MOBILE / TABLET
   ========================================================= */

@media (max-width: 767px) {

    .rs-shop-container {
        width: min(100% - 24px, 1380px);
    }

    .rs-shop-hero {
        padding: 16px 0 24px;
    }

    .rs-shop-breadcrumb {
        margin-bottom: 15px;
        font-size: 11px;
    }

    .rs-shop-hero-copy h1 {
        font-size: 34px;
    }

    .rs-shop-hero-copy p {
        font-size: 13px;
    }

    .rs-shop-catalog {
        padding-top: 18px;
    }

    .rs-shop-layout {
        display: block;
    }

    .rs-shop-sidebar {
        position: static;
        margin-bottom: 18px;
    }

    .rs-shop-filter-form {
        padding: 14px;
    }

    .rs-filter-children {
        display: none;
    }

    .rs-shop-toolbar {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 14px;
    }

    .rs-shop-toolbar-right,
    .rs-sort-control,
    .rs-sort-select {
        width: 100%;
    }

    .rs-sort-control {
        justify-content: space-between;
    }

    .rs-shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .rs-shop-product-body {
        padding: 10px;
    }

    .rs-shop-product-title {
        font-size: 12px;
    }

    .rs-shop-product-price {
        font-size: 13px;
    }
}

@media (max-width: 430px) {

    .rs-shop-grid {
        grid-template-columns: 1fr 1fr;
    }

    .rs-shop-product-category {
        font-size: 9px;
    }

    .rs-shop-product-title {
        min-height: 34px;
        font-size: 11px;
    }

    .rs-shop-add-to-cart,
    .rs-shop-view-product {
        min-height: 34px;
        font-size: 10px !important;
    }
}


/* =========================================================
   FILTER EXTENSION — PRICE RANGE
   ========================================================= */

.rs-price-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.rs-price-fields label {
    display: grid;
    gap: 5px;
}

.rs-price-fields label span {
    color: #6B746D;
    font-size: 10px;
    font-weight: 600;
}

.rs-price-fields input {
    width: 100%;
    min-height: 34px;
    box-sizing: border-box;
    padding: 0 8px;
    border: 1px solid rgba(31, 94, 47, .12);
    border-radius: 8px;
    background: #fff;
    color: #29332D;
    font-size: 11px;
    outline: none;
}

.rs-price-fields input:focus {
    border-color: rgba(31, 94, 47, .40);
    box-shadow: 0 0 0 3px rgba(31, 94, 47, .07);
}

@media (max-width: 767px) {
    .rs-price-fields {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================================
   MASTER CATALOG REFINEMENTS
   ========================================================= */

/* The Rain Spree header/announcement is sticky. Keep this page content
   below it without touching the header CSS. */
.rs-shop-page {
    padding-top: 92px;
}

.rs-shop-hero {
    padding-top: 24px;
}

/* Only the three customer-facing top categories are rendered in PHP. */
.rs-filter-children {
    max-height: none;
    overflow: visible;
}

.rs-filter-children .rs-filter-child:nth-child(n + 4) {
    display: none;
}

.rs-filter-children.is-expanded .rs-filter-child:nth-child(n + 4) {
    display: flex;
}

.rs-filter-more {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin: 0 0 7px 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rs-shop-green);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.rs-filter-more:hover {
    color: var(--rs-shop-green-dark);
    text-decoration: underline;
}

.rs-shop-toolbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.rs-view-control {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid rgba(31, 94, 47, .10);
    border-radius: 9px;
    background: rgba(255, 255, 255, .78);
}

.rs-view-button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #69736B;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.rs-view-button.is-active,
.rs-view-button:hover {
    background: var(--rs-shop-green-soft);
    color: var(--rs-shop-green);
}

/* Optional list view controlled entirely by the shop page JS. */
.rs-shop-grid.is-list-view {
    grid-template-columns: 1fr;
}

.rs-shop-grid.is-list-view .rs-shop-product-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
}

.rs-shop-grid.is-list-view .rs-shop-product-image {
    aspect-ratio: auto;
    min-height: 180px;
}

@media (max-width: 767px) {
    .rs-shop-page {
        padding-top: 74px;
    }

    .rs-shop-toolbar-right {
        justify-content: space-between;
        width: 100%;
    }

    .rs-shop-grid.is-list-view .rs-shop-product-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .rs-shop-grid.is-list-view .rs-shop-product-image {
        min-height: 120px;
    }
}

/* =========================================================
   CHECKBOX CATEGORY FILTERS
   ========================================================= */

.rs-category-filter-group {
    margin-top: 18px;
}

.rs-checkbox-category-list {
    display: grid;
    gap: 2px;
}

.rs-filter-category-check {
    min-height: 32px;
    padding: 3px 6px;
    border-radius: 7px;
}

.rs-filter-category-check:hover {
    background: rgba(239, 247, 239, .65);
}

.rs-filter-category-check input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--rs-shop-green);
}

.rs-filter-category-check span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rs-filter-category-check.rs-filter-extra {
    display: none;
}

.rs-checkbox-category-list.is-expanded .rs-filter-category-check.rs-filter-extra {
    display: grid;
}

.rs-filter-more {
    margin-left: 6px;
}

@media (max-width: 767px) {
    .rs-category-filter-group {
        margin-top: 16px;
    }
}


/* =========================================================
   V8 — UNIVERSAL SEARCH + SMART FILTER UX
   ========================================================= */
.rs-shop-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 860px;
    margin: 0 auto 28px;
    padding: 8px;
    border: 1px solid rgba(31, 94, 47, .14);
    border-radius: 18px;
    background: rgba(255, 255, 255, .64);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 35px rgba(31, 94, 47, .08);
}

.rs-shop-search-icon {
    width: 42px;
    display: grid;
    place-items: center;
    font-size: 22px;
    color: #1F5E2F;
}

.rs-shop-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #29332D;
    font-size: 14px;
    padding: 12px 4px;
}

.rs-shop-search input[type="search"]::placeholder {
    color: #7B857E;
}

.rs-shop-search button {
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    background: #1F5E2F;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.rs-filter-radio input[type="radio"] {
    border-radius: 50%;
}

.rs-filter-check input[type="checkbox"],
.rs-filter-radio input[type="radio"] {
    accent-color: #1F5E2F;
}

.rs-filter-category {
    position: relative;
    padding-right: 28px;
}

.rs-category-chevron {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #1F5E2F;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.rs-main-category.is-open .rs-category-chevron {
    transform: translateY(-50%) rotate(180deg);
}

.rs-filter-children {
    display: none;
}

.rs-filter-children.is-expanded {
    display: grid;
}

.rs-filter-extra {
    display: none !important;
}

.rs-filter-children.is-expanded .rs-filter-extra {
    display: grid !important;
}

.rs-filter-check,
.rs-filter-all {
    cursor: pointer;
}

.rs-filter-more {
    margin-top: 5px;
    border: 0;
    background: transparent;
    color: #1F5E2F;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 5px 0;
}

@media (max-width: 767px) {
    .rs-shop-search {
        margin-bottom: 20px;
        border-radius: 14px;
    }

    .rs-shop-search button {
        padding: 10px 13px;
    }
}
