/* =====================================================================
   Listing pages — products (category / group / brand / tag), blog, brands.
   Loaded after herbal.css; uses the same tokens (--yh-*, --yp-*).
   ===================================================================== */

/* ---------- Hero ---------- */

.yl-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 16px;
    padding: 22px 18px;
    overflow: hidden;
    border-radius: 22px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='2'%3E%3Cpath d='M20 140c10-40 40-70 80-80-10 40-40 70-80 80zM20 140l50-50'/%3E%3Cpath d='M110 50c5-20 20-35 40-40-5 20-20 35-40 40z'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(ellipse at 85% 20%, #2e6b3d 0%, transparent 60%),
        linear-gradient(135deg, #1a4227 0%, #245733 55%, #173a23 100%);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(245, 184, 61, .35), 0 24px 44px -28px rgba(20, 50, 30, .8);
}

.yl-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    width: 40%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--yh-gold));
}

.yl-hero__text { position: relative; z-index: 1; min-width: 0; }

.yl-hero h1 { margin: 0 0 8px; color: #fff; font-size: 1.45rem; font-weight: 900; line-height: 1.5; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.yl-hero p { margin: 0 0 14px; max-width: 64ch; color: rgba(255, 255, 255, .9); font-size: .92rem; line-height: 1.95; }

.yl-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.yl-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}
.yl-pill svg { width: 16px; height: 16px; color: var(--yh-gold-2); }
.yl-pill--gold { background: rgba(245, 184, 61, .2); box-shadow: inset 0 0 0 1px rgba(245, 184, 61, .5); color: var(--yh-gold-2); }

.yl-hero__art { display: none; }

/* search field (hero) */
.yl-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    height: 52px;
    padding: 0 6px 0 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .6);
    transition: box-shadow .2s;
}
.yl-search:focus-within { box-shadow: 0 0 0 4px rgba(245, 184, 61, .5), 0 12px 24px -14px rgba(0, 0, 0, .6); }
.yl-search > svg { flex: none; width: 22px; height: 22px; color: #6b7a70; }
.yl-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1d2b22;
    font-size: 16px;
}
.yl-search input::placeholder { color: #7a857c; }
.yl-search button {
    flex: none;
    height: 40px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--yh-gold-2), var(--yh-gold));
    color: #2a1d05;
    font: inherit;
    font-weight: 800;
    font-size: .9rem;
    cursor: pointer;
    transition: filter .2s;
}
.yl-search button:hover { filter: brightness(1.06); }

@media (min-width: 768px) {
    .yl-hero { padding: 30px 34px; }
    .yl-hero h1 { font-size: 2rem; }
    .yl-hero.has-image { grid-template-columns: minmax(0, 1fr) 300px; align-items: center; }
    .yl-hero__art { display: block; }
    .yl-hero__art img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        border-radius: 18px;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, .2), 0 20px 36px -18px rgba(0, 0, 0, .7);
        transform: rotate(-2deg);
    }
}

/* ---------- Category chips ---------- */

.yl-cats { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.yl-cats__title { flex: none; color: var(--yp-muted); font-size: .82rem; font-weight: 800; }
.yl-cats__list { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.yl-cats__list::-webkit-scrollbar { display: none; }

.yl-cat {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 16px 0 8px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #fffcf6);
    box-shadow: 0 0 0 1px #efe4cd, 0 8px 16px -14px rgba(90, 60, 20, .6);
    color: var(--yp-text);
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s var(--yp-ease), box-shadow .2s, color .2s;
}
.yl-cat:not(:has(img)) { padding-inline-start: 16px; }
.yl-cat img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.yl-cat:hover { transform: translateY(-2px); color: var(--yh-green-2); box-shadow: 0 0 0 1.5px var(--yh-gold), 0 12px 20px -14px rgba(140, 95, 20, .6); }
.yl-cat.is-active { background: linear-gradient(135deg, var(--yh-green-2), var(--yh-green)); color: #fff; box-shadow: 0 10px 20px -12px var(--yh-green); }

/* ---------- Filters (sidebar) ---------- */

@media (min-width: 992px) {
    .yl-filters { top: 140px; border-radius: 20px; background: linear-gradient(180deg, #fff, #fffcf6); box-shadow: 0 0 0 1px #efe4cd, 0 16px 30px -24px rgba(90, 60, 20, .6); }
}
.yl-filters .yp-filters__head strong { display: inline-flex; align-items: center; gap: 8px; color: var(--yh-green); font-weight: 900; }
.yl-filters .yp-filters__head strong svg { width: 20px; height: 20px; color: var(--yh-gold); }
.yl-filters .yp-filter { border-top-color: #f0e6d0; }
.yl-filters .yp-toggle.is-on .yp-toggle__track,
.yl-filters .yp-check-link.is-on .yp-check-box { background-color: var(--yh-green-2); }
.yl-filters .yp-price .yp-btn { background: linear-gradient(135deg, var(--yh-green-2), var(--yh-green)); }
.yl-filters .yp-check-link:hover, .yl-filters .yp-toggle:hover { color: var(--yh-green-2); }

/* ---------- Toolbar ---------- */

.yl-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #fffcf6);
    box-shadow: 0 0 0 1px #efe4cd;
}

.yl-filterbtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--yh-green-2), var(--yh-green));
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: .88rem;
}
.yl-filterbtn svg { width: 18px; height: 18px; }
.yl-filterbtn i { width: 8px; height: 8px; border-radius: 50%; background: var(--yh-gold); box-shadow: 0 0 0 2px var(--yh-green); }

.yl-sorts { display: flex; flex: 1; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; font-size: .85rem; }
.yl-sorts::-webkit-scrollbar { display: none; }
.yl-sorts > span { margin-inline-end: 4px; color: var(--yp-muted); white-space: nowrap; font-weight: 700; }
.yl-sorts a { flex: none; padding: 8px 13px; border-radius: 10px; color: var(--yp-muted); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.yl-sorts a:hover { color: var(--yp-text); background: #f6efdc; }
.yl-sorts a.is-active { background: linear-gradient(135deg, #fdecbf, #f8d77f); color: #5b3b05; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(184, 130, 20, .35); }
@media (max-width: 991.98px) { .yl-sorts { flex: 1 1 100%; order: 2; } }

/* normal pages / infinite scroll switch */
.yl-mode { display: inline-flex; padding: 3px; border-radius: 12px; background: #f3ead4; gap: 2px; }
.yl-mode button { height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #7a6a47; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.yl-mode button.is-active { background: #fff; color: var(--yh-green); box-shadow: 0 2px 6px rgba(60, 40, 10, .18); }
.yl-mode--center { display: flex; width: fit-content; margin: 8px auto 0; }
.yl-mode[hidden] { display: none; }

.yl-range { margin: 0 4px 12px; color: var(--yp-muted); font-size: .8rem; }

/* active filter chips */
.yl-active { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.yl-active a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 12px;
    border-radius: 999px;
    background: #eef5e6;
    box-shadow: inset 0 0 0 1px #cfe3bd;
    color: var(--yh-green);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
}
.yl-active a svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: rgba(31, 74, 44, .14); }
.yl-active a:hover { background: #fde8e8; box-shadow: inset 0 0 0 1px #f3c0c0; color: #9b2030; }
.yl-active a.yl-active__clear { background: transparent; box-shadow: none; color: var(--yp-muted); text-decoration: underline; }

/* ---------- Product grid ---------- */

.yl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .yl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1200px) { .yl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }

.yl-grid .yp-hcard { height: 100%; }
.yl-grid .yp-hcard__foot { flex-wrap: wrap; }

.yp-hcard__img { position: relative; }
.yp-hcard__off {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yh-wine-2), var(--yh-wine));
    color: #fff;
    font-size: .75rem;
    font-weight: 900;
    box-shadow: 0 6px 12px -6px var(--yh-wine);
}

/* ---------- Load more / pager ---------- */

.yl-pager a, .yl-pager span { border-radius: 12px; }
.yl-pager a.is-active { background: linear-gradient(135deg, var(--yh-green-2), var(--yh-green)); }
.yl-pager a:hover { box-shadow: 0 0 0 1.5px var(--yh-gold); color: var(--yh-green-2); }
.yl-pager[hidden], .yl-more[hidden] { display: none !important; }

.yl-more { display: grid; justify-items: center; gap: 8px; margin: 22px 0 6px; }
.yl-more__btn {
    min-width: 220px;
    height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--yh-green-2), var(--yh-green));
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 24px -14px var(--yh-green);
    transition: transform .2s, filter .2s;
}
.yl-more__btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.yl-more.is-loading .yl-more__btn { opacity: .7; pointer-events: none; }
.yl-more__end { margin: 0; color: var(--yp-muted); font-size: .85rem; font-weight: 700; }

/* ---------- Empty state ---------- */

.yl-empty { display: grid; justify-items: center; gap: 10px; padding: 44px 20px; border-radius: 22px; background: linear-gradient(180deg, #fff, #fffcf6); box-shadow: 0 0 0 1px #efe4cd; text-align: center; }
.yl-empty > svg { width: 54px; height: 54px; padding: 12px; border-radius: 50%; background: #eef5e6; color: var(--yh-green-2); }
.yl-empty h2 { margin: 0; font-size: 1.15rem; font-weight: 900; color: var(--yp-text); }
.yl-empty p { margin: 0; max-width: 46ch; color: var(--yp-muted); line-height: 1.9; }
.yl-empty__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.yl-empty__links a { padding: 7px 14px; border-radius: 999px; background: #f6efdc; color: var(--yp-text); font-size: .85rem; text-decoration: none; }

/* ---------- Related links / about ---------- */

.yl-related { margin: 30px 0 10px; }
.yl-related h2 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 900; color: var(--yp-text); }
.yl-related div { display: flex; flex-wrap: wrap; gap: 8px; }
.yl-related a { padding: 8px 16px; border-radius: 999px; background: linear-gradient(180deg, #fff, #fffcf6); box-shadow: 0 0 0 1px #efe4cd; color: var(--yp-text); font-size: .85rem; font-weight: 600; text-decoration: none; transition: box-shadow .2s, color .2s, transform .2s; }
.yl-related a:hover { color: var(--yh-green-2); box-shadow: 0 0 0 1.5px var(--yh-gold); transform: translateY(-2px); }

.yl-about { padding: 18px; border-radius: 20px; background: linear-gradient(180deg, #fff, #fffcf6); box-shadow: 0 0 0 1px #efe4cd; }
.yl-about > summary { cursor: pointer; }
.yl-about h2 { display: inline; margin: 0; font-size: 1.1rem; font-weight: 900; color: var(--yh-green); }
.yl-about .yp-prose { margin-top: 12px; line-height: 2.1; }

/* ---------- Blog ---------- */

.yl-pills { display: flex; gap: 8px; margin-bottom: 18px; padding: 2px 2px 8px; overflow-x: auto; scrollbar-width: none; }
.yl-pills::-webkit-scrollbar { display: none; }
.yl-pills a { flex: none; height: 40px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 999px; background: linear-gradient(180deg, #fff, #fffcf6); box-shadow: 0 0 0 1px #efe4cd; color: var(--yp-text); font-size: .86rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .2s var(--yp-ease), box-shadow .2s; }
.yl-pills a:hover { transform: translateY(-2px); box-shadow: 0 0 0 1.5px var(--yh-gold); }
.yl-pills a.is-active { background: linear-gradient(135deg, var(--yh-green-2), var(--yh-green)); color: #fff; box-shadow: 0 10px 18px -12px var(--yh-green); }

.yl-posts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .yl-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .yl-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }

.yl-post {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #fffcf6);
    box-shadow: 0 0 0 1px #efe4cd, 0 14px 28px -22px rgba(90, 60, 20, .6);
    transition: transform .25s var(--yp-ease), box-shadow .25s;
}
@media (hover: hover) { .yl-post:hover { transform: translateY(-4px); box-shadow: 0 0 0 1.5px var(--yh-gold), 0 24px 36px -22px rgba(140, 95, 20, .55); } }

.yl-post__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #f3ecdb; }
.yl-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--yp-ease); }
.yl-post:hover .yl-post__img img { transform: scale(1.06); }

.yl-post__body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.yl-post__cat { align-self: flex-start; padding: 3px 11px; border-radius: 999px; background: #eef5e6; color: var(--yh-green-2); font-size: .74rem; font-weight: 800; text-decoration: none; }
.yl-post h2 { margin: 0; font-size: 1.02rem; font-weight: 900; line-height: 1.8; }
.yl-post h2 a { color: var(--yp-text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yl-post h2 a:hover { color: var(--yh-green-2); }
.yl-post p { margin: 0; color: var(--yp-muted); font-size: .86rem; line-height: 2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.yl-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: auto; padding-top: 10px; border-top: 1px dashed #eadfca; color: var(--yp-muted); font-size: .76rem; }
.yl-post__more { margin-inline-start: auto; color: var(--yh-green-2); font-weight: 800; text-decoration: none; }

@media (min-width: 992px) {
    .yl-post--big { grid-column: span 2; flex-direction: row; }
    .yl-post--big .yl-post__img { flex: 1.15; aspect-ratio: auto; min-height: 280px; }
    .yl-post--big .yl-post__body { flex: 1; justify-content: center; padding: 24px; gap: 12px; }
    .yl-post--big h2 { font-size: 1.35rem; }
    .yl-post--big p { -webkit-line-clamp: 5; font-size: .92rem; }
}

/* ---------- Brands ---------- */

.yl-brandgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 8px; padding: 0; list-style: none; }
@media (min-width: 640px) { .yl-brandgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .yl-brandgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1200px) { .yl-brandgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.yl-brandgrid > li[hidden] { display: none; }

.yl-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 22px 14px 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #fffcf6);
    box-shadow: 0 0 0 1px #efe4cd, 0 14px 26px -22px rgba(90, 60, 20, .6);
    color: var(--yp-text);
    text-align: center;
    text-decoration: none;
    transition: transform .25s var(--yp-ease), box-shadow .25s;
}
.yl-brand:hover { transform: translateY(-4px); box-shadow: 0 0 0 1.5px var(--yh-gold), 0 22px 34px -20px rgba(140, 95, 20, .55); color: var(--yp-text); }
.yl-brand__logo { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #fff, #f1e9d3); box-shadow: inset 0 0 0 1px #eadfca, 0 8px 16px -10px rgba(90, 60, 20, .5); overflow: hidden; }
.yl-brand__logo img { width: 72%; height: 72%; object-fit: contain; }
.yl-brand__logo b { font-size: 2rem; color: var(--yh-green-2); }
.yl-brand strong { font-size: 1rem; font-weight: 900; }
.yl-brand__desc { color: var(--yp-muted); font-size: .78rem; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yl-brand__count { margin-top: auto; padding: 3px 12px; border-radius: 999px; background: #eef5e6; color: var(--yh-green-2); font-size: .76rem; font-weight: 800; }
.yl-empty-filter { padding: 30px; text-align: center; color: var(--yp-muted); }

/* =====================================================================
   Dark theme: same structure, glowing boxes
   ===================================================================== */

:root[data-theme="dark"] .yl-hero { box-shadow: 0 0 0 1px rgba(245, 184, 61, .4), 0 0 50px -16px rgba(46, 140, 75, .55), 0 30px 60px -30px #000; }

:root[data-theme="dark"] .yl-cat,
:root[data-theme="dark"] .yl-toolbar,
:root[data-theme="dark"] .yl-filters,
:root[data-theme="dark"] .yl-empty,
:root[data-theme="dark"] .yl-about,
:root[data-theme="dark"] .yl-related a,
:root[data-theme="dark"] .yl-pills a,
:root[data-theme="dark"] .yl-post,
:root[data-theme="dark"] .yl-brand {
    background: var(--yh-box);
    box-shadow: var(--yh-box-shadow);
    color: var(--yp-text);
}

@media (hover: hover) {
    :root[data-theme="dark"] .yl-cat:hover,
    :root[data-theme="dark"] .yl-post:hover,
    :root[data-theme="dark"] .yl-brand:hover,
    :root[data-theme="dark"] .yl-related a:hover,
    :root[data-theme="dark"] .yl-pills a:hover { box-shadow: var(--yh-glow-gold); }
}

:root[data-theme="dark"] .yl-cat.is-active,
:root[data-theme="dark"] .yl-pills a.is-active { background: linear-gradient(135deg, #2c6a3d, #1f4a2c); color: #fff; box-shadow: 0 0 0 1px rgba(150, 230, 175, .5), 0 0 22px -6px rgba(124, 196, 143, .6); }

:root[data-theme="dark"] .yl-filters .yp-filters__head strong,
:root[data-theme="dark"] .yl-about h2 { color: #a8e3b6; }
:root[data-theme="dark"] .yl-filters .yp-filter { border-top-color: rgba(150, 230, 175, .16); }

:root[data-theme="dark"] .yl-sorts a:hover { background: rgba(124, 196, 143, .1); color: #fff; }
:root[data-theme="dark"] .yl-sorts a.is-active { background: linear-gradient(135deg, #5a4210, #3d2d0a); color: var(--yh-gold-2); box-shadow: inset 0 0 0 1px rgba(245, 184, 61, .55), 0 0 16px -6px rgba(245, 184, 61, .5); }
:root[data-theme="dark"] .yl-mode { background: rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .yl-mode button { color: #b5c8bb; }
:root[data-theme="dark"] .yl-mode button.is-active { background: #2c6a3d; color: #fff; box-shadow: none; }

:root[data-theme="dark"] .yl-active a { background: rgba(124, 196, 143, .14); box-shadow: inset 0 0 0 1px rgba(124, 196, 143, .35); color: #b9ecc7; }
:root[data-theme="dark"] .yl-active a svg { background: rgba(255, 255, 255, .14); }
:root[data-theme="dark"] .yl-active a:hover { background: rgba(200, 60, 90, .2); box-shadow: inset 0 0 0 1px rgba(232, 120, 145, .5); color: #f6b6c4; }
:root[data-theme="dark"] .yl-active a.yl-active__clear { background: transparent; box-shadow: none; color: var(--yp-muted); }

:root[data-theme="dark"] .yl-empty > svg,
:root[data-theme="dark"] .yl-post__cat,
:root[data-theme="dark"] .yl-brand__count { background: rgba(124, 196, 143, .16); color: #a8e3b6; }
:root[data-theme="dark"] .yl-empty__links a { background: rgba(255, 255, 255, .07); color: var(--yp-text); }

:root[data-theme="dark"] .yl-post h2 a,
:root[data-theme="dark"] .yl-brand strong { color: #f7fbf8; }
:root[data-theme="dark"] .yl-post__meta { border-top-color: rgba(150, 230, 175, .18); }
:root[data-theme="dark"] .yl-post__more { color: var(--yh-gold-2); }
:root[data-theme="dark"] .yl-post__img { background: #101813; }

:root[data-theme="dark"] .yl-brand__logo { background: radial-gradient(circle at 30% 25%, #fff, #e9e2cf); box-shadow: 0 0 0 3px rgba(150, 230, 175, .25), 0 8px 18px -8px #000; }
:root[data-theme="dark"] .yl-brand__logo b { color: #1f4a2c; }

:root[data-theme="dark"] .yl-pager a { background: var(--yh-box); box-shadow: var(--yh-box-shadow); }
:root[data-theme="dark"] .yl-pager a.is-active { background: linear-gradient(135deg, #2c6a3d, #1f4a2c); box-shadow: 0 0 0 1px rgba(150, 230, 175, .5); }
:root[data-theme="dark"] .yl-pager a:hover { box-shadow: var(--yh-glow-gold); color: #fff; }
:root[data-theme="dark"] .yl-more__btn { box-shadow: 0 0 0 1px rgba(150, 230, 175, .4), 0 0 24px -8px rgba(124, 196, 143, .6); }

/* the hero search stays a white field in both themes (global dark input styles must not leak in) */
.yl-search input, :root[data-theme="dark"] .yl-search input {
    background: transparent !important;
    color: #1d2b22 !important;
    box-shadow: none !important;
    border: 0 !important;
}

/* ---------- Live update (no reload) ---------- */

[data-yl-swap="results"], [data-yl-swap="filters"] { transition: opacity .15s; }
.yl-busy [data-yl-swap="results"] { opacity: .45; pointer-events: none; }
.yl-busy [data-yl-swap="results"]::before {
    content: "";
    position: fixed;
    top: 50%;
    inset-inline-start: 50%;
    z-index: 5;
    width: 34px;
    height: 34px;
    margin: -17px;
    border: 4px solid rgba(47, 122, 59, .25);
    border-top-color: var(--yh-green-2);
    border-radius: 50%;
    animation: yl-spin .7s linear infinite;
}
@keyframes yl-spin { to { transform: rotate(360deg); } }
[data-yl-swap="results"] { scroll-margin-top: 150px; }
@media (prefers-reduced-motion: reduce) { .yl-busy [data-yl-swap="results"]::before { animation-duration: 2s; } }

/* ---------- Phones ---------- */

@media (max-width: 575.98px) {
    .yl-hero { gap: 10px; margin-bottom: 12px; padding: 16px 14px; border-radius: 18px; }
    .yl-hero h1 { margin-bottom: 6px; font-size: 1.25rem; }
    .yl-hero p { margin-bottom: 10px; font-size: .84rem; line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .yl-hero__meta { margin-bottom: 12px; }
    .yl-search { height: 46px; border-radius: 14px; }
    .yl-search button { height: 36px; padding: 0 16px; }

    .yl-cats { margin-inline: -16px; padding-inline: 16px; }
    .yl-cats__title { display: none; }
    .yl-pills { margin-inline: -16px; padding-inline: 16px; }

    /* toolbar: wide filter button, sorts scroll sideways with a soft edge */
    .yl-toolbar { padding: 8px; gap: 8px; }
    .yl-filterbtn { flex: 1 1 100%; justify-content: center; height: 44px; }
    .yl-sorts { -webkit-mask-image: linear-gradient(to left, #000 88%, transparent); mask-image: linear-gradient(to left, #000 88%, transparent); }

    /* product cards: a little tighter */
    .yl-grid { gap: 8px; }
    .yl-grid .yp-hcard { padding: 6px 6px 10px; border-radius: 14px; }
    .yp-hcard__title { margin-inline: 2px; font-size: .82rem; min-height: 3.2em; }
    .yp-hcard__price strong { font-size: .84rem; }
    .yp-hcard__cart { width: 34px; height: 34px; }

    /* blog: first post big, others as compact rows */
    .yl-posts { gap: 10px; }
    .yl-post:not(.yl-post--big) { flex-direction: row; align-items: stretch; border-radius: 16px; }
    .yl-post:not(.yl-post--big) .yl-post__img { flex: 0 0 38%; aspect-ratio: auto; min-height: 118px; }
    .yl-post:not(.yl-post--big) .yl-post__body { padding: 10px 12px; gap: 5px; }
    .yl-post:not(.yl-post--big) h2 { font-size: .92rem; line-height: 1.7; }
    .yl-post:not(.yl-post--big) p { display: none; }
    .yl-post:not(.yl-post--big) .yl-post__meta { padding-top: 6px; border-top: 0; }
    .yl-post:not(.yl-post--big) .yl-post__more { display: none; }

    .yl-brandgrid { gap: 10px; }
    .yl-brand { padding: 16px 10px 12px; border-radius: 16px; }
    .yl-brand__logo { width: 76px; height: 76px; }
    .yl-more__btn { width: 100%; }
}

/* mobile filter drawer */
@media (max-width: 991.98px) {
    .yl-filters { border-radius: 22px 0 0 22px; background: #fffdf8; }
    .yl-filters .yp-filters__head { position: sticky; top: -12px; z-index: 1; margin: -12px -16px 4px; padding: 12px 16px; background: #fffdf8; border-bottom: 1px solid #f0e6d0; }
    .yl-filters > .yp-btn { position: sticky; bottom: 0; margin-top: auto; box-shadow: 0 -10px 18px -10px rgba(0, 0, 0, .15); }
    :root[data-theme="dark"] .yl-filters, :root[data-theme="dark"] .yl-filters .yp-filters__head { background: #131d17; }
}
