/* Site-wide additions injected on every page by functions/_middleware.js (owner, 2026-11-02).
   1. buy box under the H1 of product articles / city / district pages (functions/_buybox.js)
   2. phone sticky order bar
   3. phone footer: brand row centered, columns 2 per row, Contact alone, legal line on one row */

/* ---------- 1. buy box ---------- */
.rv-buybox{display:grid;grid-template-columns:120px 1fr;gap:14px 16px;align-items:center;margin:18px 0 26px;padding:18px;border:1px solid #dfe5ff;border-radius:20px;background:linear-gradient(180deg,#f6f8ff,#fff);box-shadow:0 10px 30px rgba(11,24,87,.08);text-align:start;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif;max-width:720px}
.rv-buybox a{text-decoration:none !important}
.rv-buybox__img{width:120px;height:120px;object-fit:cover;border-radius:14px;background:#fff;display:block}
.rv-buybox__name{font-size:19px;font-weight:800;color:#0b1857;line-height:1.25}
.rv-buybox__sub{font-size:13px;color:#6c7080;margin-top:2px}
.rv-buybox__price{font-size:22px;font-weight:800;color:#1C3FCB;margin-top:8px;line-height:1.3}
.rv-buybox__price s{color:#c8102e;font-weight:600;font-size:16px;margin-inline-end:6px}
.rv-buybox__off{display:inline-block;background:#e3262b;color:#fff;font-size:12px;font-weight:800;padding:2px 8px;border-radius:999px;vertical-align:middle}
.rv-buybox__rating{font-size:13px;font-weight:700;color:#B8902A;margin-top:4px}
.rv-buybox__list{grid-column:1/-1;list-style:none;margin:2px 0 0;padding:0;display:grid;gap:6px}
.rv-buybox__list li{display:block;font-size:14px;font-weight:600;color:#111425;padding-inline-start:26px;position:relative;margin:0;line-height:1.45}
.rv-buybox__list li::before{content:"✓";position:absolute;inset-inline-start:0;top:1px;width:18px;height:18px;line-height:18px;text-align:center;border-radius:50%;background:#1C3FCB;color:#fff;font-size:11px}
.rv-buybox__wa,.rv-buybox__prod{grid-column:1/-1;display:block;text-align:center;border-radius:999px;padding:15px 20px;font-size:16px;font-weight:700;line-height:1.3}
.rv-buybox__wa{background:#25D366;color:#fff !important;box-shadow:0 8px 20px rgba(37,211,102,.3)}
.rv-buybox__prod{background:#1C3FCB;color:#fff !important;margin-top:-4px;box-shadow:0 8px 20px rgba(28,63,203,.25)}
.rv-buybox__note{grid-column:1/-1;text-align:center;font-size:12px;color:#6c7080}
@media (max-width:560px){.rv-buybox{grid-template-columns:96px 1fr;padding:14px}.rv-buybox__img{width:96px;height:96px}.rv-buybox__name{font-size:17px}.rv-buybox__price{font-size:19px}}

/* ---------- 2. phone sticky order bar ---------- */
.rv-sticky{display:none}
@media (max-width:720px){
  .rv-sticky{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:900;align-items:center;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e6e8ef;box-shadow:0 -8px 24px rgba(11,24,87,.12);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif}
  .rv-sticky__info{flex:1;min-width:0}
  .rv-sticky__name{font-size:13px;font-weight:700;color:#0b1857;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .rv-sticky__price{font-size:16px;margin:0;color:#1C3FCB;font-weight:800}
  .rv-sticky__price s{font-size:12px}
  .rv-sticky__price .rv-buybox__off{font-size:10px;padding:1px 6px}
  .rv-sticky__wa{flex:none;background:#25D366;color:#fff !important;text-decoration:none !important;font-weight:800;font-size:15px;padding:13px 20px;border-radius:999px;box-shadow:0 6px 16px rgba(37,211,102,.3)}
  body:has(.rv-sticky){padding-bottom:78px}
  body:has(.rv-sticky) .wa-float{display:none !important}
}

/* ---------- 3. phone footer (every page) ---------- */
@media (max-width:720px){
  .footer .footer__grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:28px 12px !important;justify-items:center;text-align:center}
  .footer .footer__grid > div{width:100%;text-align:center;min-width:0}
  .footer .footer__grid > div:first-child{grid-column:1/-1;display:flex;flex-direction:column;align-items:center}
  .footer .footer__grid > div:has(a[href^="mailto:"]){grid-column:1/-1}
  .footer .footer__grid a{display:block}
  .footer .brand--footer{align-items:center;margin-inline:auto;text-align:center}
  .footer .footer__about{margin:12px auto 0;max-width:330px;width:100%;text-align:center}
  .footer .footer__grid h4{text-align:center}
  .footer .footer__compliance{text-align:center}
  .footer .footer__copy{white-space:nowrap;font-size:11px;text-align:center;overflow:hidden;text-overflow:ellipsis}
  .footer .footer__copy a{display:inline !important}
  .footer{padding-bottom:84px}
}

/* sticky "Order now" button pulses (owner, 2026-11-02) */
@keyframes rvPulse{0%,100%{transform:scale(1);box-shadow:0 6px 16px rgba(37,211,102,.3),0 0 0 0 rgba(37,211,102,.55)}50%{transform:scale(1.06);box-shadow:0 6px 16px rgba(37,211,102,.35),0 0 0 10px rgba(37,211,102,0)}}
@media (max-width:720px){.rv-sticky__wa{animation:rvPulse 1.4s ease-in-out infinite}}
@media (prefers-reduced-motion:reduce){.rv-sticky__wa{animation:none}}

/* article tables fit the phone screen, no sideways scrolling (owner, 2026-11-02) */
@media (max-width:720px){
  article table,.post table,.qa table,.rv-blog table,main table,.table-scroll table{display:table !important;width:100% !important;max-width:100%;table-layout:fixed;white-space:normal !important;overflow:visible !important;border-collapse:collapse}
  article table th,article table td,.post table th,.post table td,.qa table th,.qa table td,main table th,main table td{white-space:normal !important;overflow-wrap:anywhere;word-break:normal;font-size:12.5px;line-height:1.35;padding:8px 6px !important;vertical-align:top}
  .table-scroll{overflow-x:visible !important}
}

/* phone: every content table fits the screen — overrides blog.css .blog__table-wrap/.table-scroll/.qa scrolling (owner, 2026-11-02) */
@media (max-width:720px){
  .blog__table-wrap,.table-scroll{overflow-x:visible !important}
  table{min-width:0 !important;width:100% !important;max-width:100% !important;table-layout:fixed !important;display:table !important;white-space:normal !important}
  table th,table td{white-space:normal !important;overflow-wrap:anywhere;word-break:normal;font-size:12.5px !important;line-height:1.35;padding:8px 6px !important;vertical-align:top;min-width:0 !important}
}

/* buy box picture: wider frame, whole pack visible (owner, 2026-11-02) */
.rv-buybox{grid-template-columns:150px 1fr}
.rv-buybox__img{width:150px;height:120px;object-fit:contain;background:#fff;padding:4px;box-sizing:border-box}
@media (max-width:560px){.rv-buybox{grid-template-columns:128px 1fr}.rv-buybox__img{width:128px;height:104px}}

/* buy box: struck price, sale price and -25% badge on ONE line (owner, 2026-11-02) */
.rv-buybox__price{white-space:nowrap;display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.rv-buybox__price s{margin:0}
@media (max-width:560px){.rv-buybox__price{font-size:17px;gap:5px}.rv-buybox__price s{font-size:12px}.rv-buybox__off{font-size:10px;padding:2px 6px}}
.rv-sticky__price{display:flex;align-items:center;gap:5px;white-space:nowrap}

/* sticky bar: product thumbnail + button kept off the screen edges (owner, 2026-11-02) */
@media (max-width:720px){
  .rv-sticky{padding:10px 18px calc(12px + env(safe-area-inset-bottom));gap:12px}
  .rv-sticky__img{flex:none;width:48px;height:48px;object-fit:contain;border-radius:10px;background:#f6f8ff;border:1px solid #e6e8ef;padding:2px;box-sizing:border-box}
  .rv-sticky__wa{margin-inline-end:4px;padding:12px 18px}
}
@media (max-width:720px){
  .rv-sticky__info{overflow:hidden}
  .rv-sticky__price .rv-buybox__off{display:none}
  .rv-sticky__wa{padding:11px 16px;font-size:14px}
}
/* pages with the sticky bar: no extra empty space under the legal line (body padding already clears the bar) */
@media (max-width:720px){ body:has(.rv-sticky) .footer{padding-bottom:16px !important} }

/* round WhatsApp button on sticky-bar pages, above the bar (owner, 2026-11-02) */
.rv-wa-fab{position:fixed;right:18px;bottom:24px;z-index:901;width:56px;height:56px;border-radius:50%;background:#25D366;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 22px rgba(37,211,102,.4)}
[dir="rtl"] ~ .rv-wa-fab,html[dir="rtl"] .rv-wa-fab{right:auto;left:18px}
@media (max-width:720px){.rv-wa-fab{bottom:calc(88px + env(safe-area-inset-bottom));width:52px;height:52px}}
/* WhatsApp icon locked to the centre of its circle (iPhone/WebKit safe) */
.rv-wa-fab{padding:0 !important;margin:0 !important;line-height:0 !important;box-sizing:border-box;overflow:hidden;text-decoration:none !important;border:0}
.rv-wa-fab svg{display:block;position:absolute;top:50%;left:50%;width:28px !important;height:28px !important;margin:0 !important;transform:translate(-50%,-50%)}
/* the WhatsApp disc + logo are ONE svg now: the anchor is just a transparent frame */
.rv-wa-fab{background:transparent !important;width:56px !important;height:56px !important;border-radius:50%;box-shadow:0 8px 22px rgba(37,211,102,.4)}
.rv-wa-fab svg{position:static !important;transform:none !important;width:56px !important;height:56px !important;display:block}
@media (max-width:720px){.rv-wa-fab{width:52px !important;height:52px !important}.rv-wa-fab svg{width:52px !important;height:52px !important}}

/* sale prices on ONE line everywhere: struck price + sale price + -25% (owner, 2026-11-02) */
.ppd__price{display:inline-flex !important;align-items:center;gap:8px;flex-wrap:nowrap !important;white-space:nowrap}
.ppd__price .fs-was{font-size:clamp(14px,4vw,20px) !important;margin:0 !important}
.ppd__price .fs-now{font-size:clamp(28px,8vw,44px)}
.ppd__price .fs-off{font-size:11px !important;flex:none}
.ppd__price-row{flex-wrap:nowrap !important;white-space:nowrap}
.product__price-row{display:flex;align-items:center;gap:6px;flex-wrap:nowrap !important;white-space:nowrap}
.product__price-row .fs-was{font-size:12px !important;margin:0 !important}
.product__price-row .fs-off{font-size:10px !important;padding:2px 6px !important;flex:none}
.fs-was + .fs-now,.fs-was + .fx{white-space:nowrap}
/* price stays on one line; the stock label may drop below it instead of running off the screen */
.ppd__price-row{flex-wrap:wrap !important;white-space:normal;row-gap:8px}
.ppd__price{white-space:nowrap !important;flex-wrap:nowrap !important}

/* ---------- related research ring (EN blog pages, 2026-11-02) ---------- */
.rv-related{max-width:860px;margin:36px auto 28px;padding:0 20px;box-sizing:border-box}
.rv-related__h{font-size:20px;font-weight:800;color:#0b1857;margin:0 0 14px;text-align:center}
.rv-related__list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.rv-related__list li{margin:0}
.rv-related__list a{display:flex;align-items:center;height:88px;box-sizing:border-box;padding:14px 16px;border:1px solid #dfe5ff;border-radius:16px;background:#f7f9ff;color:#0b1857;font-size:15px;font-weight:600;line-height:1.35;text-decoration:none}
.rv-related__list a span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.rv-related__list a:hover{border-color:#9fb1ff;background:#eef2ff}
@media (max-width:560px){.rv-related__list{grid-template-columns:1fr}.rv-related__list a{height:84px;font-size:14.5px}}

/* "Bestseller · 426+ sold" badges (owner, 2026-11-02; filled by /js/sold.js). Loud on purpose: navy pill, gold flame + number, light sweep. */
.rv-sold{position:relative;display:inline-flex;align-items:center;gap:5px;margin:6px 0 2px;padding:5px 12px 5px 10px;border-radius:999px;overflow:hidden;
  background:linear-gradient(135deg,#0B1640 0%,#1A2F86 55%,#0B1640 100%);color:#fff;font-size:12px;font-weight:800;line-height:1.2;letter-spacing:.02em;white-space:nowrap;
  box-shadow:0 0 0 1px rgba(212,165,44,.55),0 4px 14px rgba(26,47,134,.35),0 0 18px rgba(212,165,44,.28);animation:rv-sold-glow 2.4s ease-in-out infinite}
.rv-sold[hidden]{display:none!important}
.rv-sold::after{content:"";position:absolute;top:0;bottom:0;left:-60%;width:45%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.38),transparent);transform:skewX(-20deg);animation:rv-sold-sweep 3.2s ease-in-out infinite;pointer-events:none}
.rv-sold__ic{flex:none;color:#FFB627;filter:drop-shadow(0 0 4px rgba(255,140,0,.75));animation:rv-sold-flame 1.1s ease-in-out infinite alternate}
.rv-sold__t{text-transform:uppercase}
[dir="rtl"] .rv-sold__t,html[lang^="ar"] .rv-sold__t{text-transform:none}
.rv-sold__dot{color:#D4A52C;font-weight:900}
.rv-sold__n{color:#FFD45C;font-size:1.22em;font-weight:900;letter-spacing:0;text-shadow:0 0 10px rgba(255,190,40,.55)}
.rv-sold__w{color:#E8ECFF;font-weight:700}
@keyframes rv-sold-sweep{0%,55%{left:-60%}100%{left:130%}}
@keyframes rv-sold-glow{0%,100%{box-shadow:0 0 0 1px rgba(212,165,44,.55),0 4px 14px rgba(26,47,134,.35),0 0 12px rgba(212,165,44,.2)}50%{box-shadow:0 0 0 1px rgba(212,165,44,.9),0 4px 14px rgba(26,47,134,.35),0 0 22px rgba(212,165,44,.45)}}
@keyframes rv-sold-flame{from{transform:scale(1) rotate(-4deg)}to{transform:scale(1.15) rotate(4deg)}}
@media (prefers-reduced-motion:reduce){.rv-sold,.rv-sold::after,.rv-sold__ic{animation:none}}
.rv-sold--card{display:flex;width:max-content;max-width:100%;margin:4px auto 6px;font-size:11px;padding:4px 10px 4px 8px}
.rv-sold--pp{display:flex;width:max-content;max-width:100%;margin:-6px 0 16px;font-size:13.5px;padding:7px 15px 7px 12px}
.rv-sold--sticky{display:inline-flex;margin:2px 0 0;padding:2px 8px 2px 6px;font-size:10px;gap:3px}
.rv-sold--sticky .rv-sold__ic{width:11px;height:11px}

/* card ribbon ABOVE the photo with a small gap, never over the product (owner, 2026-11-02) */
.product .product__flag{position:static!important;transform:none!important;top:auto!important;left:auto!important;align-self:center;width:max-content;max-width:100%;margin:0 auto 6px;line-height:1.2;min-height:20px;box-sizing:border-box}
.product .product__flag--empty{visibility:hidden;background:none!important;box-shadow:none!important;padding:4px 0;width:1px}

/* product pages (owner, 2026-11-02): title one size smaller; less space between the picture and the text under it */
.ppd__h1{font-size:clamp(26px,3.4vw,40px)!important}
@media (max-width:820px){.ppd__hero{gap:10px!important}.ppd__img-wrap{padding:0!important}}
/* product pages on phones: title, price row and the Bestseller · sold row centred (owner, 2026-11-02) */
@media (max-width:820px){
  .ppd__h1{text-align:center}
  .ppd__price-row{justify-content:center!important}
  .rv-sold--pp{margin-left:auto!important;margin-right:auto!important}
}
/* product page box: plain white with a hairline border, no grey (owner, 2026-11-02) */
.ppd__hero{background:#FFFFFF!important;border:1px solid #E3E6EE!important;box-shadow:none!important}
.ppd__img{filter:none!important}
