/* =========================================================================
   Сторінка товару (.ric-product) — сучасний e-commerce шаблон.
   Грузиться на is_singular('product'). Токени (--ric-orange) — з chrome.css.
   ========================================================================= */

.ric-product { font-family: 'Open Sans', Helvetica, sans-serif; color: #333; }
.ric-product__container { max-width: 1200px; margin: 0 auto; padding: 0 20px 50px; }
.ric-product__crumbs { padding: 22px 0 12px; font-size: 13px; color: #8a8c93; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ric-product__crumbs a { color: #8a8c93; text-decoration: none; }
.ric-product__crumbs a:hover { color: var(--ric-orange); }
.ric-product__crumbs .ric-sep { color: #c9ccd1; }
.ric-product__crumbs .ric-current { color: #333; font-weight: 600; }

/* ---- Верх: галерея + інфо ---- */
.ric-product__top { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 10px; }

/* галерея */
.ric-product__stage { position: relative; aspect-ratio: 1 / 1; background: #fff; border: 1px solid #ececec; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ric-product__main-img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; padding: 22px; }
.ric-product__noimg { font-size: 46px; color: #cfd3d7; }
.ric-product__video-btn { position: relative; width: 100%; height: 100%; border: 0; background: none; padding: 0; cursor: pointer; }
.ric-product__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 70px; height: 70px; border-radius: 50%; background: rgba(243,124,34,.92); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; padding-left: 4px; }
.ric-product__stage iframe { width: 100%; height: 100%; border: 0; }

.ric-product__thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ric-product__thumb { position: relative; width: 74px; height: 74px; padding: 4px; background: #fff; border: 2px solid #e6e6e7; border-radius: 10px; cursor: pointer; overflow: hidden; transition: border-color .2s ease; }
.ric-product__thumb img { width: 100%; height: 100%; object-fit: contain; }
.ric-product__thumb:hover { border-color: #f7d9bd; }
.ric-product__thumb.is-active { border-color: var(--ric-orange); }
.ric-product__thumb-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: rgba(243,124,34,.92); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; padding-left: 2px; }

/* інфо */
.ric-product__cat { display: inline-block; margin-bottom: 8px; color: var(--ric-orange); font-size: 14px; font-weight: 600; text-decoration: none; }
.ric-product__cat:hover { text-decoration: underline; }
.ric-product__title { margin: 0 0 14px; color: #1f2024; font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.ric-product__lead { color: #555; font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.ric-product__lead p { margin: 0 0 8px; }

.ric-product__buybox { background: #faf9f7; border: 1px solid #ececec; border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; }
.ric-product__price-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.ric-product__price { font-size: 30px; font-weight: 800; color: #1f2024; letter-spacing: -.02em; }
.ric-product__badge { display: inline-flex; align-items: center; gap: 6px; background: var(--ric-orange); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 5px 12px; border-radius: 20px; }
.ric-product__instal { margin: 0 0 16px; color: #6b6c6e; font-size: 13px; }
.ric-product__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ric-product__btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 26px; border: 2px solid var(--ric-orange); border-radius: 8px; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .2s ease, color .2s ease, transform .15s ease; flex: 1 1 auto; }
.ric-product__btn--primary { background: var(--ric-orange); color: #fff; }
.ric-product__btn--primary:hover { background: var(--ric-orange-dark); border-color: var(--ric-orange-dark); color: #fff; transform: translateY(-2px); }
.ric-product__btn--outline { background: #fff; color: var(--ric-orange); }
.ric-product__btn--outline:hover { background: var(--ric-orange); color: #fff; }

.ric-product__usp { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.ric-product__usp li { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 600; color: #333; }
.ric-product__usp i { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #fff3e9; color: var(--ric-orange); font-size: 14px; }

.ric-product__pricelist { display: inline-flex; align-items: center; gap: 8px; color: var(--ric-orange); font-weight: 700; font-size: 14px; text-decoration: none; }
.ric-product__pricelist:hover { text-decoration: underline; }

.ric-product__manager { margin-top: 18px; padding: 16px 18px; border: 1px solid #ececec; border-left: 4px solid var(--ric-orange); border-radius: 8px; }
.ric-product__manager-title { font-weight: 700; margin-bottom: 8px; }
.ric-product__manager .pr-soc-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ric-orange); color: #fff; margin-right: 8px; text-decoration: none; }

/* ---- Контентні блоки ---- */
.ric-product__content { margin-top: 44px; }
.ric-product__sec { margin-bottom: 40px; }
.ric-product__h2 { margin: 0 0 20px; color: #1f2024; font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -.01em; padding-bottom: 12px; position: relative; }
.ric-product__h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; background: var(--ric-orange); border-radius: 2px; }
.ric-product__rich { color: #444; font-size: 15px; line-height: 1.7; }
.ric-product__rich p { margin: 0 0 12px; }
.ric-product__rich ul, .ric-product__rich ol { padding-left: 22px; margin: 0 0 12px; }
.ric-product__rich li { margin-bottom: 6px; }
.ric-product__rich table { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.ric-product__rich table th, .ric-product__rich table td { padding: 10px 14px; border: 1px solid #ececec; text-align: left; font-size: 14px; }
.ric-product__rich table th { background: #f7f7f7; font-weight: 700; }
.ric-product__rich table tr:nth-child(even) td { background: #fafafa; }

.ric-product__display { display: grid; gap: 24px; }

.ric-product__gridcards { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.ric-product__card { margin: 0; background: #fff; border: 1px solid #ececec; border-radius: 12px; overflow: hidden; }
.ric-product__card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 12px; background: #fff; }
.ric-product__card figcaption { padding: 10px 14px 14px; font-size: 13px; color: #555; line-height: 1.45; border-top: 1px solid #f0f0f0; }

.ric-product__pdfs { display: grid; gap: 12px; grid-template-columns: 1fr; }
.ric-product__pdf { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid #ececec; border-radius: 10px; text-decoration: none; color: #333; transition: border-color .2s ease, box-shadow .2s ease; }
.ric-product__pdf:hover { border-color: var(--ric-orange); box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.ric-product__pdf-ico { font-size: 22px; color: #d23; }
.ric-product__pdf-name { flex: 1; font-weight: 600; font-size: 14px; }
.ric-product__pdf-dl { color: var(--ric-orange); }

/* ---- Схожі товари ---- */
.ric-product__related { margin-top: 50px; padding-top: 8px; border-top: 1px solid #ececec; }
.ric-product__rel-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.ric-rel-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e6e6e7; border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.ric-rel-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.09); }
.ric-rel-card__media { position: relative; aspect-ratio: 1 / 1; background: #fff; }
.ric-rel-card__img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.ric-rel-card__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #cfd3d7; background: #f2f3f5; }
.ric-rel-card__body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; border-top: 1px solid #f0f0f0; }
.ric-rel-card__name { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: #1f2024; line-height: 1.25; }
.ric-rel-card__btn { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; background: var(--ric-orange); color: #fff; border-radius: 6px; font-size: 14px; font-weight: 700; }
.ric-rel-card:hover .ric-rel-card__btn { background: var(--ric-orange-dark); }

/* ---- Адаптив ---- */
@media (min-width: 600px) {
    .ric-product__gridcards { grid-template-columns: repeat(3, 1fr); }
    .ric-product__pdfs { grid-template-columns: repeat(2, 1fr); }
    .ric-product__rel-grid { grid-template-columns: repeat(4, 1fr); }
    .ric-product__display { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (min-width: 900px) {
    .ric-product__top { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: start; }
    .ric-product__usp { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
    .ric-product__gridcards { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Зображення «поле вишивки» (внизу опису) ---- */
.ric-product__fieldimg { padding: 0; }
.ric-product__fieldimg img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid #ececec; }
