/* MediRoyal — All Products page */

/* ── HERO — light split, centered (matches reference .ap-hero) ── */
.log-ap-hero {
    background: linear-gradient(145deg, var(--paper-50) 0%, #f5eef8 40%, #eee6f5 70%, #f0ebe3 100%);
    position: relative;
    overflow: hidden;
}

.log-hero-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.log-hb-a {
    width: 560px;
    height: 560px;
    background: rgba(29, 219, 149, .08);
    filter: blur(110px);
    top: -160px;
    left: -100px;
}

.log-hb-b {
    width: 420px;
    height: 420px;
    background: rgba(122, 31, 110, .07);
    filter: blur(100px);
    bottom: -80px;
    right: -60px;
}

.log-hb-c {
    width: 300px;
    height: 300px;
    background: rgba(201, 168, 76, .05);
    filter: blur(90px);
    top: 60px;
    right: 30%;
}

.log-hero-top {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 44px 48px 40px;
    max-width: 860px;
    margin: 0 auto;
}

.log-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--sage-600);
    margin-bottom: 20px;
}

.log-hero-kicker::before,
.log-hero-kicker::after {
    content: '';
    flex: 0 0 18px;
    height: 2px;
    background: var(--sage-600);
}

.log-ap-hero h1 {
    font-family: var(--display);
    font-size: clamp(40px, 5vw, 72px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.025em;
    color: var(--ink-900);
    margin-bottom: 16px;
}

.log-ap-hero h1 em {
    font-style: italic;
    color: var(--plum-700);
}

.log-ap-hero p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.72;
    max-width: 520px;
    margin: 0 auto 32px;
}

/* Search — centered, wide */
.log-hero-search {
    position: relative;
    max-width: 540px;
    margin: 0 auto 32px;
}

.log-hero-search input {
    width: 100%;
    padding: 15px 58px 15px 22px;
    border-radius: var(--r-pill);
    border: 1.5px solid var(--line);
    background: var(--white);
    font-family: var(--body);
    font-size: 14px;
    color: var(--ink-900);
    outline: none;
    box-shadow: 0 4px 24px rgba(31, 14, 28, .08);
    transition: all .25s;
}

.log-hero-search input:focus {
    border-color: var(--sage-500);
    box-shadow: 0 0 0 4px rgba(29, 219, 149, .1);
}

.log-hero-search-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg, var(--plum-800), var(--plum-700));
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all .2s !important;
}

.log-hero-search-btn:hover {
    background: linear-gradient(135deg, var(--plum-700), var(--plum-600));
    transform: translateY(-50%) scale(1.06);
}

.log-hero-search-btn .icon {
    width: 15px;
    height: 15px;
    color: #fff;
}

/* Stat pills row */
.log-hero-stat-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.log-hstat {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--r-pill);
    padding: 10px 20px;
    box-shadow: var(--shadow-sm);
    transition: all .25s;
}

.log-hstat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(31, 14, 28, .12);
}

.log-hstat-light {
    background: var(--white);
    border: 1.5px solid var(--line);
}

.log-hstat-plum {
    background: linear-gradient(135deg, var(--plum-800), var(--plum-700));
    border: 1.5px solid transparent;
}

.log-hstat-num {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.log-hstat-lbl {
    font-size: 11.5px;
    font-weight: 600;
}

.log-hstat-light .log-hstat-num {
    color: var(--plum-700);
}

.log-hstat-light .log-hstat-lbl {
    color: var(--gray-600);
}

.log-hstat-plum .log-hstat-num {
    color: var(--mr-gold-light);
}

.log-hstat-plum .log-hstat-lbl {
    color: rgba(255, 255, 255, .6);
}

.log-hstat-div {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, .3);
}

.log-hstat-light .log-hstat-div {
    background: var(--line);
}

/* Trust strip — dark plum, full width */
.log-hero-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: linear-gradient(135deg, var(--plum-950), var(--plum-900));
}

.log-hs-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 22px 24px;
    border-right: 1px solid rgba(255, 255, 255, .08);
    transition: background .22s;
}

.log-hs-item:last-child {
    border-right: none;
}

.log-hs-item:hover {
    background: rgba(255, 255, 255, .05);
}

.log-hs-ico {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex-shrink: 0;
    background: rgba(29, 219, 149, .12);
    border: 1px solid rgba(29, 219, 149, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sage-400);
}

.log-hs-ico .icon {
    width: 16px;
    height: 16px;
}

.log-hs-item strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.log-hs-item span {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, .45);
    margin-top: 2px;
}

@media (max-width: 960px) {
    .log-hero-top {
        padding: 52px 28px 40px;
    }

    .log-hero-strip {
        grid-template-columns: 1fr 1fr;
    }

    .log-hs-item {
        border-bottom: 1px solid rgba(255, 255, 255, .07);
    }
}

@media (max-width: 560px) {
    .log-hero-top {
        padding: 40px 20px 32px;
    }

    .log-hstat {
        padding: 8px 14px;
    }

    .log-hstat-num {
        font-size: 17px;
    }

    .log-hstat-lbl {
        font-size: 10.5px;
    }
}

/* ── FILTER BAR ── */
.log-ap-filter-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 48px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.log-ap-cunter-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 48px 0;
    display: flex;
    align-items: center;
}

.log-ap-filter-tabs {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.log-ap-filter-tabs::-webkit-scrollbar {
    display: none;
}

.log-ap-ftab {
    padding: 9px 18px;
    border-radius: var(--r-pill);
    border: 1.5px solid var(--line);
    background: var(--white) !important;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-700);
    cursor: pointer;
    transition: all .22s;
    white-space: nowrap;
    outline: none;
}

.log-ap-ftab:hover,
.log-ap-ftab:focus {
    border-color: var(--mr-gold);
    color: var(--plum-700);
    background: var(--white) !important;
    outline: none;
}

.log-ap-ftab.active:hover,
.log-ap-ftab.active:focus {
    background: var(--plum-700) !important;
    color: #fff;
}

.log-ap-ftab.active {
    border-color: var(--plum-700);
    background: var(--plum-700) !important;
    color: #fff;
}

.log-ap-sort-select {
    /* Blocksy's global form reset sets select{width:var(--has-width,
       var(--theme-form-field-width,100%))} which balloons this to fill
       the flex row and squeezes .log-ap-filter-tabs to 0 — override. */
    width: auto;
    flex-shrink: 0;
    margin-left: auto;
    padding: 10px 30px 10px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm, 10px);
    background: var(--white);
    font-size: 12px;
    font-family: var(--body);
    color: var(--ink-700);
    outline: none;
    cursor: pointer;
    transition: border-color .2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237d6e79' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.log-ap-sort-select:focus {
    border-color: var(--sage-500);
}

.log-ap-results-count {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
}

.log-ap-results-count strong {
    color: var(--ink-900);
}

/* ── CATEGORY SECTIONS ── */
.log-ap-categories-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 48px 80px;
}

.log-ap-cat-section {
    margin-bottom: 52px;
}

.log-ap-cat-section:last-child {
    margin-bottom: 0;
}

.log-ap-cat-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.log-ap-cat-section-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.log-ap-cat-section-title {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 900;
    color: var(--ink-900);
}

.log-ap-cat-section-title em {
    font-style: italic;
    color: var(--plum-700);
}

.log-ap-cat-section-count {
    font-size: 12px;
    font-weight: 700;
    background: var(--mr-gold-pale);
    border: 1px solid var(--mr-gold);
    color: var(--plum-800);
    border-radius: var(--r-pill);
    padding: 3px 10px;
    margin-left: auto;
    text-decoration: none;
    transition: all .2s;
}

.log-ap-cat-section-count:hover {
    background: var(--plum-700);
    border-color: var(--plum-700);
    color: #fff;
}

/* ── CATEGORY GRID ── */
.log-ap-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Subcategory cards reuse the shared .log-prod-card component (see
   log-product-card.css / log-product-card-extra.css) for 100% consistent
   styling with real product cards — no separate .log-ap-cat-* card CSS.
   The .log-ap-cat-card class is kept only as a dual-class JS filter/sort
   hook (see log-all-products.js), not for styling. */

/* ── EMPTY STATE ── */
.log-ap-empty-state {
    text-align: center;
    padding: 80px 20px;
    display: none;
}

.log-ap-empty-state.show {
    display: block;
}

.log-ap-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.log-ap-empty-state h3 {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 900;
    color: var(--ink-900);
    margin-bottom: 8px;
}

.log-ap-empty-state p {
    font-size: 14px;
    color: var(--gray-600);
}

/* ── HIDE PARENT THEME TITLE + CONTAINER OVERRIDE ── */
body.log-all-products-page .entry-hero-container-inner {
    display: none !important;
}

body.log-all-products-page .site-content>.content-container,
body.log-all-products-page .site-content>.site-container,
body.log-all-products-page [class*="ct-container"],
body.log-all-products-page [class*="content-container"] {
    /* Blocksy sets `width: var(--container-max-width)` (90vw) on
       .ct-container, not max-width — must reset width itself, same
       fix as log-shop.css. */
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

body.log-all-products-page [class*="ct-container"][data-vertical-spacing] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ── RESPONSIVE ── */
@media(max-width:1024px) {
    .log-ap-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media(max-width:768px) {
    .log-ap-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .log-ap-filter-bar,
    .log-ap-categories-wrap {
        padding-left: 20px;
        padding-right: 20px;
    }

    .log-ap-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .log-ap-search-wrap {
        width: 100%;
        flex-shrink: 1;
    }

    .log-ap-filter-tabs {
        width: 100%;
    }

    .log-ap-sort-select {
        margin-left: 0;
    }

    .log-ap-results-count {
        white-space: normal;
    }
}

@media(max-width:480px) {
    .log-ap-cat-grid {
        grid-template-columns: 1fr;
    }
}