/* ── PRODUCTS PAGE ── */

/* ── PAGE INTRO ── */

.products-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 120px 40px;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
}

.products-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 25px;
    font-weight: 400;
    color: #000;
    margin: 0 0 35px;
    text-align: center;
}

.products-intro-body {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 60px;
    width: 90%;
    padding: 50px 0 70px 0;
}

.products-intro-img {
    width: 260px;
    height: 260px;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}

.products-intro-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.products-title-line {
    width: 500px;
    height: 1px;
    background: #000;
    margin: 0 auto 30px;
}

.products-desc {
    font-family: Montserrat, sans-serif;
    font-size: 18px;
    font-weight: 300;
    color: #000;
    line-height: 1.5;
    letter-spacing: -0.3px;
    text-align: left;
    margin: 0;
    width: 80%;
}

/* ── FILTER TABS ── */

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 120px;
    margin: 0 auto 50px;
}

.filter-btn {
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: #000;
    background: none;
    border: none;
    padding: 12px 28px;
    cursor: pointer;
    position: relative;
    transition: color 0.25s;
    letter-spacing: 0.2px;
    background: #F0956A;
    transition: color 0.2s, border-left-color 0.2s, background 0.2s;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background: #000;
    transition: width 0.25s;
}

.filter-btn.active::after,
.filter-btn:hover::after {
    width: 100%;
}

.filter-btn.active {
    font-weight: 500;
    background: #F0956A;
}

.filter-btn:hover {
    color: #000;
}

.filter-btn-sale {
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: #c0392b;
}

.filter-btn-sale::after {
    background: #c0392b;
}

.filter-btn-sale:hover {
    color: #c0392b;
    border-left-color: #c0392b;
    background: #fdf2f2;
}

.filter-btn-sale.active {
    color: #c0392b;
    background: #fdf2f2;
    font-weight: 600;
}

.brand-heading-sale {
    color: #c0392b;
    letter-spacing: 1.5px;
}

/* ── SEARCH BAR ── */

.search-wrapper {
    margin-left: 32px;
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.search-input {
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #000;
    background: none;
    border: none;
    border-bottom: 1px solid #000;
    padding: 10px 24px 10px 0;
    width: 170px;
    outline: none;
    letter-spacing: 0.2px;
    transition: width 0.3s ease;
}

.search-input::placeholder {
    color: #aaa;
    font-weight: 300;
}

.search-input:focus {
    width: 210px;
}

.search-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #000;
}

.search-icon {
    display: block;
    color: inherit;
}

/* ── CURRENCY SWITCHER ── */

.currency-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
    background: #f5ece9;
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
    position: relative;
}

.currency-thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    background: #F0956A;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.25s ease, width 0.25s ease;
    pointer-events: none;
}

.currency-btn {
    position: relative;
    z-index: 1;
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: black;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.currency-btn:hover {
    color: #000;
}

.currency-btn.active {
    color: #fff;
    font-weight: 500;
}

/* ── FILTER SELECT (mobile only) ── */

.filter-select {
    display: none;
}

/* ── BRAND SECTIONS ── */

.brand-section {
    padding: 0 120px 60px;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
}

.brand-heading {
    font-family: 'Times New Roman', Times, serif;
    font-size: 20px;
    font-weight: 400;
    color: #000;
    margin: 0 0 30px;
    letter-spacing: 0.5px;
}

/* ── PRODUCT GRID ── */

.products-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 19px;
}

.product-card-link {
    display: block;
    text-decoration: none;
    color: #000;
    cursor: pointer;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 245px;
}

.product-card img {
    width: 245px;
    height: 245px;
    object-fit: contain;
    padding: 22px;
    display: block;
    transition: opacity 0.2s;
}

.product-card:hover img {
    opacity: 0.5;
}

.product-card .product-name, .product-card .product-price {
    text-align: center;
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    font-weight: 300;
    letter-spacing: -0.45px;
    margin: 12px 0 4px;
    color: #000;
}

.product-card .product-divider {
    display: block;
    width: 20px;
    height: 1px;
    background: #000;
    margin: 4px auto 8px;
    padding: 0;
    font-size: 0;
    line-height: 0;
}

/* ── PAGINATION ── */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 0 30px;
}

.page-btn {
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #000;
    background: none;
    border: 1px solid #000;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s, background 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: #F0956A;
    color: #F0956A;
}

.page-btn.active {
    background: #F0956A;
    border-color: #F0956A;
    color: #fff;
    font-weight: 500;
}

.page-btn.page-arrow {
    font-size: 18px;
    font-weight: 300;
}

/* ── BRAND SIDEBAR LAYOUT (DuoLife, Sanct Bernhard & Sale) ── */

.duolife-layout,
.sanct-layout,
.sale-layout {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.duolife-sidebar,
.sanct-sidebar,
.sale-sidebar {
    width: 190px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    padding-top: 4px;
}

.sale-main {
    flex: 1;
    min-width: 0;
}

.brand-sidebar-title {
    font-family: Montserrat, sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: black;
    margin: 0 0 12px 12px;
}

.subcat-btn {
    display: block;
    width: 100%;
    text-align: left;
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: black;
    background: none;
    border: none;
    border-left: 2px solid transparent;
    padding: 7px 12px;
    cursor: pointer;
    transition: color 0.2s, border-left-color 0.2s, background 0.2s;
    letter-spacing: 0.1px;
    line-height: 1.4;
}

.subcat-btn:hover {
    color: #000;
    border-left-color: #F0956A;
    background: #ffe8de;
    font-weight: 500;
}

.subcat-btn.active {
    color: #000;
    font-weight: 500;
    border-left-color: #F0956A;
    background: #ffe8de;
}

.subcat-btn.sale-btn {
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: #c0392b;
}

.subcat-btn.sale-btn:hover {
    color: #c0392b;
    border-left-color: #c0392b;
    background: #fdf2f2;
}

.subcat-btn.sale-btn.active {
    color: #c0392b;
    border-left-color: #c0392b;
    background: #fdecea;
}

.sidebar-group + .sidebar-group {
    margin-top: 22px;
}

.product-img-wrap {
    position: relative;
    display: block;
}

.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c0392b;
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 3px 8px;
    pointer-events: none;
}

/* Badge intensity scales with discountPct from products.json */
.sale-badge--low {
    background: #8a8f98;
    font-size: 11.5px;
    padding: 4px 9px;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.35);
}

.sale-badge--mid {
    background: #c0392b;
    font-size: 11.5px;
    padding: 4px 9px;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.35);
}

.sale-badge--high {
    background: linear-gradient(135deg, #ff8a1e, #c0392b);
    font-size: 11.5px;
    padding: 4px 9px;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.35);
}

/* Bundle promo badge (e.g. "2+1", "3+2") from products.json's `promo` field */
.sale-badge-promo {
    position: absolute;
    bottom: 30px;
    left: 10px;
    background: #1f2937;
    color: #f4d35e;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 13px;
    pointer-events: none;
}

.product-price--sale {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-price-old {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
}

.product-price-new {
    color: #c0392b;
    font-weight: 500;
}

.duolife-main,
.sanct-main {
    flex: 1;
    min-width: 0;
}

/* ── RESPONSIVE ── */

@media (max-width: 1095px) {
    .products-intro {
        padding: 40px 20px 30px;
    }

    .products-intro-img {
        width: 180px;
        height: 180px;
    }

    .products-title-line {
        width: 80%;
    }

    .products-desc {
        width: 100%;
        font-size: 16px;
    }

    /* swap buttons → select */
    .filter-btn {
        display: none;
    }

    .filter-bar {
        padding: 0 20px;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        margin-bottom: 30px;
    }

    .filter-select {
        display: block;
        order: 2;
        flex: 1;
        font-family: Montserrat, sans-serif;
        font-size: 14px;
        font-weight: 300;
        color: #000;
        background-color: transparent;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23000' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 2px center;
        border: none;
        border-bottom: 1px solid #000;
        padding: 10px 20px 10px 0;
        margin-top: 20px;
        outline: none;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        max-width: 130px;
    }

    .currency-switcher {
        order: 3;
        margin-left: 8px;
        margin-top: 20px;
    }

    /* search: full-width row below, always expanded */
    .search-wrapper {
        order: 1;
        width: 100%;
        margin-left: 0;
        margin-top: 12px;
        position: relative;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .search-toggle {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
    }

    .search-input {
        width: 100%;
        opacity: 1;
        padding: 10px 24px 10px 0;
        border-bottom-color: #000;
        pointer-events: all;
        transition: none;
        order: unset;
    }

    .search-input:focus {
        width: 100%;
}

    .search-wrapper.is-open .search-input {
        width: 100%;
        opacity: 1;
        padding: 10px 24px 10px 0;
        border-bottom-color: #000;
        pointer-events: all;
    }

    .currency-btn {
        padding: 5px 7px;
        font-size: 10px;
    }

    .brand-section {
        padding: 0 20px 40px;
    }

    .products-grid {
        justify-content: center;
        gap: 12px;
    }

    .product-card {
        width: calc(50% - 6px);
    }

    .product-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
}

@media (max-width: 1095px) {
    .duolife-layout,
    .sanct-layout,
    .sale-layout {
        flex-direction: column;
        gap: 0;
    }

    .duolife-sidebar,
    .sanct-sidebar,
    .sale-sidebar {
        width: 100%;
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0 0 20px;
    }

    .brand-sidebar-title {
        width: 100%;
        margin: 0 0 4px 0;
    }

    .sidebar-group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }

    .sidebar-group + .sidebar-group {
        margin-top: 10px;
    }

    .subcat-btn {
        width: auto;
        border-left: none;
        border: 1px solid #ddd;
        border-radius: 20px;
        padding: 5px 13px;
        font-size: 12px;
    }

    .subcat-btn:hover {
        background: #f5f8f3;
        border-color: #9CAF88;
    }

    .subcat-btn.active {
        background: #F0956A;
        border-color: #F0956A;
        color: #fff;
        font-weight: 500;
    }

    .subcat-btn.sale-btn {
        border-color: #c0392b;
        color: #fdf2f2;
    }

    .subcat-btn.sale-btn:hover {
        border-color: #c0392b;
        background: #fdf2f2;
    }

    .subcat-btn.sale-btn.active {
        background: #fdf2f2;
        border-color: #c0392b;
        color: #c0392b;
    }
}

@media (max-width: 1095px) {
    .products-intro-body {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 28px;
        width: 100%;
        padding: 30px 0 50px;
    }

    .products-intro-text {
        align-items: center;
    }

    .products-desc {
        text-align: center;
    }
}