/* =========================================================================
   Архів категорії товарів — сучасна e-commerce сітка (.ric-shop).
   Грузиться на сторінках product_cat. Токени (--ric-orange) — з chrome.css.
   ========================================================================= */

.ric-shop { font-family: 'Open Sans', Helvetica, sans-serif; color: #333; padding-bottom: 20px; }
.ric-shop__container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---- Шапка категорії (темна брендова смуга) ---- */
.ric-shop__head {
    position: relative;
    overflow: hidden;
    padding: 48px 0 44px;
    margin-bottom: 8px;
    text-align: center;
    background: radial-gradient(120% 150% at 50% 0%, #34363b 0%, #1f2024 72%);
}
.ric-shop__head::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 20px 20px;
}
.ric-shop__head::after {
    content: ""; position: absolute; top: -55%; left: 50%; transform: translateX(-50%);
    width: 680px; height: 420px; pointer-events: none;
    background: radial-gradient(closest-side, rgba(243,124,34,.20), transparent 72%);
}
.ric-shop__head > * { position: relative; z-index: 1; }
.ric-shop__crumbs { font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 16px; }
.ric-shop__crumbs a { color: rgba(255,255,255,.55); text-decoration: none; }
.ric-shop__crumbs a:hover { color: var(--ric-orange); }
.ric-shop__title { margin: 0 0 14px; color: #fff; font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.ric-shop__title::after { content: ""; display: block; width: 60px; height: 3px; margin: 16px auto 0; background: var(--ric-orange); border-radius: 2px; }
.ric-shop__desc { max-width: 760px; margin: 0 auto; color: rgba(255,255,255,.72); font-size: 16px; line-height: 1.6; }
.ric-shop__desc p { margin: 0 0 8px; }

/* ---- Сітка (flex + центрування неповного останнього ряду) ---- */
.ric-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 20px; margin: 28px 0; }
.ric-grid--cats > .ric-card { flex: 0 1 100%; }
.ric-grid--products > .ric-card { flex: 0 1 calc((100% - 20px) / 2); }

/* ---- Картка ---- */
.ric-shop .ric-card { display: flex; background: #fff; border: 1px solid #e6e6e7; border-radius: 14px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.ric-shop .ric-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.09); }
.ric-shop .ric-card__inner { display: flex; flex-direction: column; width: 100%; height: 100%; text-decoration: none; color: inherit; }
.ric-shop .ric-card--cat { display: flex; flex-direction: column; width: 100%; text-decoration: none; color: inherit; }

/* media */
.ric-shop .ric-card__media { position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.ric-shop .ric-card__img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.ric-shop .ric-card__ph { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #cfd3d7; background: #f2f3f5; }
.ric-shop .ric-card__badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--ric-orange); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 4px 10px; border-radius: 20px; }

/* body */
.ric-shop .ric-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 16px 18px 18px; border-top: 1px solid #f0f0f0; }
.ric-shop .ric-card__name { margin: 0 0 14px; color: #1f2024; font-size: 17px; font-weight: 700; line-height: 1.25; }
.ric-shop .ric-card__price { color: var(--ric-orange); font-size: 18px; font-weight: 800; }
.ric-shop .ric-card__btn { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; padding: 11px 16px; background: var(--ric-orange); color: #fff; border-radius: 6px; font-size: 14px; font-weight: 700; transition: background-color .2s ease; }
.ric-shop .ric-card:hover .ric-card__btn { background: var(--ric-orange-dark); }
.ric-shop .ric-card__link { margin-top: auto; color: var(--ric-orange); font-weight: 700; font-size: 14px; }
.ric-shop .ric-card__link i { font-size: 12px; transition: transform .2s ease; }
.ric-shop .ric-card:hover .ric-card__link i { transform: translateX(4px); }

/* ---- Порожньо ---- */
.ric-shop__empty { text-align: center; color: #888; padding: 40px 0; }

/* ---- Пагінація (wp-pagenavi) ---- */
.ric-shop__pag { text-align: center; margin: 6px 0 30px; }
.ric-shop__pag .wp-pagenavi { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ric-shop__pag .wp-pagenavi a, .ric-shop__pag .wp-pagenavi span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid #e0e0e0; border-radius: 8px; color: #333; text-decoration: none; font-size: 14px; }
.ric-shop__pag .wp-pagenavi a:hover { border-color: var(--ric-orange); color: var(--ric-orange); }
.ric-shop__pag .wp-pagenavi span.current { background: var(--ric-orange); border-color: var(--ric-orange); color: #fff; }

/* ---- SEO-текст ---- */
.ric-shop__seo { padding: 16px 0 40px; }
.ric-shop__seo .entry-content { max-width: 1000px; margin: 0 auto; color: #555; line-height: 1.7; }

/* ---- Адаптив ---- */
@media (min-width: 600px) {
    .ric-shop__head { padding: 64px 0 56px; }
    .ric-grid--cats > .ric-card { flex-basis: calc((100% - 20px) / 2); }
    .ric-grid--products > .ric-card { flex-basis: calc((100% - 40px) / 3); }
}
@media (min-width: 1024px) {
    .ric-grid--cats > .ric-card { flex-basis: calc((100% - 40px) / 3); }
    .ric-grid--products > .ric-card { flex-basis: calc((100% - 60px) / 4); }
    .ric-shop .ric-card__name { font-size: 18px; }
}
