/* ==========================================================================
   INSTICK Israel — ЕДИНЫЙ ШАБЛОН инфо-страниц (info-page.css)
   Используется shipping.html и returns.html; подходит для будущих
   FAQ / תנאי שימוש / מדיניות פרטיות / הצהרת נגישות.
   Подключается ПОСЛЕ instick-home.css.
   ========================================================================== */

/* ---------- Компактный hero -------------------------------------------------- */
.ihero { padding-block: 2.2rem 1rem; }
.ihero__title { font-size: var(--step-3); font-weight: 600; color: #161016; }
:root[data-theme="dark"] .ihero__title { color: var(--ink); }
.ihero__lead { margin-block-start: .5rem; color: var(--ink-soft); font-weight: 300; font-size: var(--step-1); max-width: 56ch; }
.ihero__date { margin-block-start: .7rem; font-size: .8rem; color: var(--ink-soft); }

/* ---------- Каркас: sticky-оглавление + контент -------------------------------- */
.info { display: grid; gap: 2rem; align-items: start; padding-block: 1rem 3rem; }
.info.textpage {display: block;}
.info.textpage .isec p {max-width: 100%;}
@media (min-width: 940px) {
    .info { grid-template-columns: 230px 1fr; }
}
/* Оглавление (RTL: справа) */
.itoc {
  position: sticky; inset-block-start: 6rem;
  display: flex; flex-direction: column; gap: .1rem;
  padding: 1rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
}
.itoc h5 { margin: 0 0 .5rem; font-family: var(--font-display); font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.itoc a {
  padding: .5rem .6rem; border-radius: var(--radius);
  font-size: .88rem; font-weight: 500; color: var(--ink-soft);
  border-inline-start: 2px solid transparent;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.itoc a:hover { background: var(--ground-2); color: #161016; }
/* Активный пункт подсвечивает scrollspy (JS) */
.itoc a.is-active { color: #157A44; font-weight: 600; border-inline-start-color: #157A44; background: color-mix(in srgb, #157A44 7%, transparent); }
/* Мобила: оглавление — горизонтальная лента */
@media (max-width: 939px) {
  .itoc { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .itoc::-webkit-scrollbar { display: none; }
  .itoc h5 { display: none; }
  .itoc a { white-space: nowrap; border-inline-start: 0; border-block-end: 2px solid transparent; }
  .itoc a.is-active { border-block-end-color: #157A44; }
}

/* ---------- Контент: секции и типографика ---------------------------------------- */
.icontent { display: flex; flex-direction: column; gap: 2.2rem; min-width: 0; overflow: visible;}
.isec { scroll-margin-block-start: 6.5rem; display: flex; flex-direction: column; gap: 1rem; }
.isec h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); color: #161016; }
:root[data-theme="dark"] .isec h2 { color: var(--ink); }
.isec p { color: #4A4048; font-weight: 300; max-width: 68ch; }
:root[data-theme="dark"] .isec p { color: var(--ink-soft); }
.isec p b { color: #161016; font-weight: 600; }
:root[data-theme="dark"] .isec p b { color: var(--ink); }
/* Плейсхолдер, который заполнит заказчик, — слегка подсвечен */
[data-cfg] { color: #157A44; font-weight: 600; }

/* Карточки (способы доставки/оплаты, сценарии) */
.icards { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 640px) { .icards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .icards--3 { grid-template-columns: repeat(3, 1fr); } .icards--4 { grid-template-columns: repeat(4, 1fr); } }
.icard {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: 1.1rem 1.2rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.icard:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.icard__icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
    display: grid !important;place-items: center;
  border: 1.2px solid color-mix(in srgb, var(--ink) 20%, transparent); color: #161016;
}
:root[data-theme="dark"] .icard__icon { color: var(--ink); }
.icard__icon svg { width: 18px; height: 18px; }
.icard b { display: block; font-family: var(--font-display); font-weight: 600; color: #161016; margin-block-end: .15rem; }
:root[data-theme="dark"] .icard b { color: var(--ink); }
.icard span { display: block; font-size: .85rem; color: var(--ink-soft); }

/* Таблица */
.itable-wrap { overflow-x: auto; }
.itable { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .92rem; }
.itable th { text-align: start; padding: .7rem .8rem; font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); border-block-end: 1.5px solid var(--border); }
.itable td { padding: .8rem; border-block-end: 1px solid var(--border); color: #2B242B; }
:root[data-theme="dark"] .itable td { color: var(--ink); }
.itable td b { font-weight: 600; }

/* Заметный баннер (бесплатная доставка) */
.ibanner {
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
  padding: 1.1rem 1.3rem; border-radius: var(--radius-lg);
  background: color-mix(in srgb, #157A44 10%, var(--surface));
  border: 1.5px dashed #157A44; color: #157A44; font-weight: 600;
}
.ibanner span { font-size: 1.4rem; }

/* Шаги (возврат) */
.isteps { display: grid; grid-template-columns: 1fr; gap: .8rem; counter-reset: istep; }
@media (min-width: 760px) { .isteps { grid-template-columns: repeat(4, 1fr); } }
.istep { padding: 1.1rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.istep::before {
  counter-increment: istep; content: counter(istep);
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: #157A44; color: #fff;
  font-family: var(--font-display); font-weight: 600; margin-block-end: .6rem;
}
.istep b { display: block; font-weight: 600; color: #161016; margin-block-end: .2rem; }
:root[data-theme="dark"] .istep b { color: var(--ink); }
.istep span { font-size: .82rem; color: var(--ink-soft); }

/* Аккордеон (FAQ / детали) */
.iacc { display: flex; flex-direction: column; gap: .55rem; }
.iacc__item { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.iacc__q {
  width: 100%; text-align: start;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-0); color: #161016;
  transition: background-color .2s var(--ease);
}
:root[data-theme="dark"] .iacc__q { color: var(--ink); }
.iacc__q:hover { background: var(--ground-2); }
.iacc__q i { font-style: normal; color: #157A44; font-size: 1.2rem; transition: transform .3s var(--ease); }
.iacc__item.is-open .iacc__q i { transform: rotate(45deg); }
.iacc__a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.iacc__a p { padding: 0 1.15rem 1rem; font-size: .92rem; }

/* Юридический блок с плейсхолдером для юриста */
.ilegal {
  padding: 1.1rem 1.2rem; border-radius: var(--radius);
  background: var(--ground-2); border-inline-start: 3px solid #F6A609;
  font-size: .88rem; color: var(--ink-soft);
}

/* Блок «остались вопросы» */
.iquest {
  margin-block-start: .8rem;
  border-radius: var(--radius-lg);
  background: #120D14; color: #fff; text-align: center;
  padding: clamp(1.8rem, 4vw, 2.8rem);
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
}
.iquest b { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); color: #fff; }
.iquest p { color: rgba(255,255,255,.7); font-weight: 300; }
.iquest__btns { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }
.iquest__green {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9em 1.7em; border-radius: var(--radius);
  background: #157A44; color: #fff; font-family: var(--font-display); font-weight: 600;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.iquest__green:hover { background: #0F6236; transform: translateY(-2px); }
.iquest__ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9em 1.7em; border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,.65); color: #fff; font-family: var(--font-display); font-weight: 600;
}
.iquest__ghost:hover { background: #fff; color: #161016; }

/* Форма запроса возврата (returns.html) */
.irform { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: clamp(1.2rem, 2.5vw, 1.8rem); display: flex; flex-direction: column; gap: 1rem; }
.irgrid { display: grid; gap: .85rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .irgrid { grid-template-columns: 1fr 1fr; } .irgrid .irf--full { grid-column: 1 / -1; } }
.irf label { display: block; font-size: .85rem; font-weight: 500; margin-block-end: .3rem; color: #161016; }
:root[data-theme="dark"] .irf label { color: var(--ink); }
.irf input, .irf textarea, .irf select {
  width: 100%; padding: .8em 1em; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--ground-2); font: inherit; color: var(--ink);
}
.irf input:focus, .irf textarea:focus, .irf select:focus { outline: none; border-color: #157A44; }
.irf.is-error input, .irf.is-error select, .irf.is-error textarea { border-color: #B3352A; }
.irf__err { display: none; font-size: .78rem; color: #B3352A; margin-block-start: .25rem; }
.irf.is-error .irf__err { display: block; }
/* Стилизованная загрузка фото */
.irfile input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.irfile label.btnlike {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .7rem 1.2rem; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1.5px var(--border);
  font-family: var(--font-display); font-weight: 600; font-size: .85rem; cursor: pointer;
  margin-block-end: 0;
}
.irfile label.btnlike:hover { background: var(--ground-2); }
.irfile span { font-size: .8rem; color: var(--ink-soft); margin-inline-start: .6rem; }
.irsend {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9em 1.8em; border-radius: var(--radius);
  background: #157A44; color: #fff; font-family: var(--font-display); font-weight: 600;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.irsend:hover { background: #0F6236; transform: translateY(-2px); }
.irdone { display: none; text-align: center; flex-direction: column; align-items: center; gap: .6rem; padding-block: 1rem; }
.irdone.is-in { display: flex; }
.irdone b { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: #157A44; }


/* ---------- FetchIt / FormIt ----------------------------------------------- */
.irform button { border: 0; cursor: pointer; }
.irform .af-message:empty { display: none; }
.irform__message { margin-block-start: 1rem; padding: .85rem 1rem; border-radius: var(--radius); font-size: .88rem; }
.irform__message--error { color: #8f241c; background: color-mix(in srgb, #B3352A 10%, var(--surface)); border: 1px solid color-mix(in srgb, #B3352A 35%, var(--border)); }
.irform .irdone { margin-block-start: 1rem; border-radius: var(--radius); background: color-mix(in srgb, #157A44 10%, var(--surface)); border: 1px solid color-mix(in srgb, #157A44 35%, var(--border)); }
.ajax_form.af-loading .irsend { opacity: .65; pointer-events: none; }


/* FetchIt returns form */
.form-honeypot{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.returns-consent{cursor:pointer}
.returns-consent__line{display:flex;align-items:flex-start;gap:.65rem}
.returns-consent__line input{width:18px;height:18px;flex:0 0 18px;margin:.15rem 0 0;padding:0;accent-color:#157A44}
.returns-consent__line span{font-size:.85rem;line-height:1.55;color:var(--ink-soft)}
.returns-form.is-loading .irsend,.returns-form[data-fetchit-loading] .irsend{opacity:.65;pointer-events:none}

/* ==========================================================================
   Custom PDF pages viewer — server-rendered images
   One PDF page at a time, no inner horizontal scroll on mobile.
   ========================================================================== */

.pdf-pages {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #e9e9e9;
    box-shadow: var(--shadow-soft);
}

.pdf-pages__toolbar {
    position: relative;
    z-index: 5;
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    background: #000000;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.pdf-pages__nav,
.pdf-pages__actions {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.pdf-pages__nav {
    direction: ltr;
}

.pdf-pages__arrow,
.pdf-pages__action {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--radius);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color .2s var(--ease),
        border-color .2s var(--ease),
        color .2s var(--ease),
        opacity .2s var(--ease);
}

.pdf-pages__arrow:hover,
.pdf-pages__action:hover {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.28);
    color: #fff;
}

.pdf-pages__arrow:disabled {
    opacity: .32;
    cursor: default;
    pointer-events: none;
}

.pdf-pages__counter {
    min-width: 84px;
    height: 40px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    border-radius: var(--radius);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

.pdf-pages__counter b {
    color: #fff;
    font: inherit;
    font-weight: 600;
}

html[dir="ltr"] .pdf-pages__arrow--prev span::before { content: "←"; }
html[dir="ltr"] .pdf-pages__arrow--next span::before { content: "→"; }

html[dir="rtl"] .pdf-pages__arrow--prev span::before { content: "→"; }
html[dir="rtl"] .pdf-pages__arrow--next span::before { content: "←"; }

.pdf-pages__arrow span {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1;
    direction: ltr;
}

.pdf-pages__actions {
    flex: 0 0 auto;
}

.pdf-pages__stage {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 500px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 22px;
    overflow: hidden;
    background:
        linear-gradient(45deg, rgba(0,0,0,.018) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,.018) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,.018) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,.018) 75%),
        #e9e9e9;
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.pdf-pages__image {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 12px 36px rgba(0,0,0,.18);
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0;
    transition: opacity .2s var(--ease);
}

.pdf-pages.is-ready .pdf-pages__image {
    opacity: 1;
}

.pdf-pages__loading {
    position: absolute;
    z-index: 3;
    inset: 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(245,245,245,.9);
    color: #4a4048;
    text-align: center;
    font-size: .9rem;
}

.pdf-pages__loading::before {
    content: "";
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    margin-inline-end: 10px;
    border: 3px solid rgba(21,122,68,.2);
    border-top-color: #157A44;
    border-radius: 50%;
    animation: pdf-pages-spin .7s linear infinite;
}

@keyframes pdf-pages-spin {
    to { transform: rotate(360deg); }
}

.pdf-pages.is-ready .pdf-pages__loading {
    display: none;
}

.pdf-pages.is-error .pdf-pages__loading {
    color: #8f241c;
    background: #fff7f6;
}

:root[data-theme="dark"] .pdf-pages {
    background: #202020;
}

:root[data-theme="dark"] .pdf-pages__stage {
    background-color: #202020;
}

:root[data-theme="dark"] .pdf-pages__loading {
    background: rgba(25,25,25,.92);
    color: rgba(255,255,255,.75);
}

html[dir="rtl"] .pdf-pages__toolbar {
    direction: rtl;
}

html[dir="rtl"] .pdf-pages__actions {
    direction: rtl;
}

html[dir="rtl"] .pdf-pages__nav {
    direction: ltr;
}

html[dir="ltr"] .pdf-pages__toolbar,
html[dir="ltr"] .pdf-pages__actions {
    direction: ltr;
}

@media (max-width: 939px) {
    .pdf-pages__stage {
        padding: 16px;
    }
}

@media (max-width: 767px) {
    .pdf-pages {
        width: 100%;
        max-width: 100%;
        margin: 0;
        overflow: hidden;
        border-radius: var(--radius);
    }

    .pdf-pages__toolbar {
        width: 100%;
        min-height: 54px;
        padding: 8px;
        gap: 7px;
        overflow: hidden;
    }

    .pdf-pages__nav,
    .pdf-pages__actions {
        gap: 5px;
    }

    .pdf-pages__arrow,
    .pdf-pages__action {
        min-width: 38px;
        width: 38px;
        height: 38px;
        padding: 0;
    }

    .pdf-pages__action span {
        display: none;
    }

    .pdf-pages__counter {
        min-width: 74px;
        height: 38px;
        padding: 0 7px;
        gap: 4px;
        font-size: .78rem;
    }

    .pdf-pages__stage {
        display: block;
        width: 100%;
        max-width: 100%;
        min-height: 0;
        height: auto;
        max-height: none;
        padding: 8px;
        overflow: visible;
    }

    .pdf-pages__image {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        margin: 0;
        box-shadow: 0 6px 18px rgba(0,0,0,.16);
    }

    .pdf-pages__loading {
        min-height: 300px;
        padding: 16px;
        font-size: .82rem;
    }
}

@media (max-width: 480px) {
    .pdf-pages__toolbar {
        min-height: 52px;
        padding: 7px;
    }

    .pdf-pages__arrow,
    .pdf-pages__action {
        min-width: 36px;
        width: 36px;
        height: 36px;
    }

    .pdf-pages__counter {
        min-width: 68px;
        height: 36px;
        padding: 0 6px;
        font-size: .75rem;
    }

    .pdf-pages__stage {
        padding: 6px;
    }
}

@media (max-width: 360px) {
    .pdf-pages__toolbar {
        gap: 4px;
        padding: 6px;
    }

    .pdf-pages__nav,
    .pdf-pages__actions {
        gap: 4px;
    }

    .pdf-pages__arrow,
    .pdf-pages__action {
        min-width: 34px;
        width: 34px;
        height: 34px;
    }

    .pdf-pages__counter {
        min-width: 62px;
        height: 34px;
        padding: 0 4px;
        font-size: .72rem;
    }

    .pdf-pages__stage {
        padding: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pdf-pages__loading::before {
        animation-duration: 1.4s;
    }

    .pdf-pages__image,
    .pdf-pages__arrow,
    .pdf-pages__action {
        transition: none;
    }
}

html[dir="rtl"] .pdf-pages__arrow--prev span::before {
    content: "←";
}

html[dir="rtl"] .pdf-pages__arrow--next span::before {
    content: "→";
}