/* =========================
   DOSTAVKA — Normal spacing + FREE block stretched
   Changes:
   - removed divider line inside free block
   - bigger text
   - free block stretches to bottom of route block (same bottom line)
   ========================= */

body.page-template-page-dostavka{
  --brand: var(--sez-accent);
  --brand-hover: var(--sez-dark);
  --ink: var(--sez-dark);
  --muted: rgba(29,36,51,.65);
  --line: rgba(0,0,0,.10);

  --radius-lg: 44px;
  --radius-md: 32px;
  --radius-sm: 20px;

  --space-section-top: 46px;
  --space-section-bottom: 18px;

  --space-between-blocks: 18px;
  --space-grid-gap: 18px;
  --box-pad: 26px;

  --title-mb: 18px;
  --text-mb: 14px;

  --pickup-note-mb: 16px;

  background:#fff;
}

body.page-template-page-dostavka hr{ display:none !important; }

/* Reset inside dostavka */
body.page-template-page-dostavka .sez-dostavka *{ box-sizing: border-box; }

body.page-template-page-dostavka .sez-dostavka h1,
body.page-template-page-dostavka .sez-dostavka h2,
body.page-template-page-dostavka .sez-dostavka h3,
body.page-template-page-dostavka .sez-dostavka p,
body.page-template-page-dostavka .sez-dostavka ul,
body.page-template-page-dostavka .sez-dostavka ol,
body.page-template-page-dostavka .sez-dostavka li{
  margin: 0;
  padding: 0;
}

/* HERO */
body.page-template-page-dostavka .page-title-section{
  padding: var(--space-section-top) 0 var(--space-section-bottom);
}

body.page-template-page-dostavka .page-title-section .hero-card.sez-dostavka-hero__card{
  position: relative;
  background:transparent;
  border-radius: 0;
  padding: 0;
  border: 0;
  box-shadow: none !important;
  overflow: hidden;
}

/* Map decor */
body.page-template-page-dostavka .sez-dostavka-hero__decor{
  position:absolute;
  inset:0;
  border-radius: 0;
  overflow:hidden;
  pointer-events:none;
  z-index:0;
}
body.page-template-page-dostavka .sez-dostavka-hero__decor::before{
  content:"";
  position:absolute;
  inset:-10% -6%;
  background-image: var(--sez-map);
  background-repeat:no-repeat;
  background-position:center;
  background-size: contain;
  opacity:.16;
  transform: translateX(1%);
}

/* layout */
body.page-template-page-dostavka .sez-dostavka-hero__layout{
  position: relative;
  z-index: 2;
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: 20px;
  align-items:end;
}
body.page-template-page-dostavka .sez-dostavka-hero__content{ min-width:0; }
body.page-template-page-dostavka .sez-dostavka-hero__media{
  display:flex;
  justify-content:flex-end;
  align-items:flex-end;
  min-width:0;
}
body.page-template-page-dostavka .sez-dostavka-hero__truck{
  width: 100%;
  max-width: 520px;
  height: auto;
  display:block;
}

/* typography hero */
body.page-template-page-dostavka .page-title-section .hero-card h1{
  font-size: clamp(30px, 3.6vw, 60px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--sez-ink);
  margin: 0 0 12px;
}
body.page-template-page-dostavka .page-title-section .hero-card p{
  font-size: 17px;
  line-height: 1.55;
  color: var(--sez-muted);
  max-width: 760px;
  margin: 0 0 var(--text-mb);
}

/* actions */
body.page-template-page-dostavka .sez-dostavka-hero__actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin: 0;
}

/* breadcrumbs */
body.page-template-page-dostavka .page-title-section .breadcrumbs{
  display:flex;
  gap:8px;
  flex-wrap: wrap;
  font-weight:700;
  color: var(--sez-muted);
  margin: 12px 0 0;
}
body.page-template-page-dostavka .page-title-section .breadcrumbs a{
  color: var(--sez-muted);
  text-decoration:none;
}
body.page-template-page-dostavka .page-title-section .breadcrumbs a:hover{ color: var(--brand); }

/* Buttons */
body.page-template-page-dostavka .sez-btn{
  border-radius: 0;
  transform:none !important;
  box-shadow:none !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease !important;
}
body.page-template-page-dostavka .sez-btn span{ padding-right: 0 !important; }
body.page-template-page-dostavka .sez-btn span:before,
body.page-template-page-dostavka .sez-btn span:after,
body.page-template-page-dostavka .sez-btn:before,
body.page-template-page-dostavka .sez-btn:after{
  display:none !important;
  content:none !important;
}

/* Primary: red -> dark gray */
body.page-template-page-dostavka .theme-btn.btn-two.sez-btn.sez-btn--primary{
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color:#fff !important;
}
body.page-template-page-dostavka .theme-btn.btn-two.sez-btn.sez-btn--primary:hover{
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
  color:#fff !important;
}

/* Outline Contacts: hover red */
body.page-template-page-dostavka .sez-btn--outline{
  background:#fff !important;
  border:1px solid rgba(0,0,0,.14) !important;
  color: var(--ink) !important;
}
body.page-template-page-dostavka .sez-btn--outline:hover{
  border-color: var(--brand) !important;
  color: var(--brand) !important;
  background:#fff !important;
}

/* Page content */
body.page-template-page-dostavka .sez-dostavka{
  padding: 18px 0 34px;
}

body.page-template-page-dostavka .sez-box{
  border:1px solid var(--line);
  border-radius: 0;
  background:#fff;
  padding: var(--box-pad);
  box-shadow:none !important;
  margin: 0 0 var(--space-between-blocks);
}

/* Titles */
body.page-template-page-dostavka .sez-box > .sez-title,
body.page-template-page-dostavka .sez-box h2.sez-title{
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--title-mb) !important;
  padding: 0 !important;
  line-height: 1.15;
}

/* Grid */
body.page-template-page-dostavka .sez-dostavka__grid{
  display:grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: var(--space-grid-gap);
  align-items:stretch; /* IMPORTANT: stretch columns equally */
  margin: 0 0 var(--space-between-blocks);
}

body.page-template-page-dostavka .sez-dostavka__grid .sez-box{ margin-bottom: 0; }

/* Right column wrapper: stretch to full height */
body.page-template-page-dostavka .sez-dostavka__right{
  display:grid;
  grid-template-rows: auto 1fr; /* free block takes remaining height */
  gap: var(--space-between-blocks);
  height: 100%;
}

/* Route */
body.page-template-page-dostavka .sez-route{
  height: 100%;
  display:flex;
  flex-direction:column;
}
body.page-template-page-dostavka .sez-route__img{
  border:1px solid var(--line);
  border-radius: 0;
  overflow:hidden;
  background:#fff;
  max-width: 520px;
  aspect-ratio: 4 / 5;
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 0;
}
body.page-template-page-dostavka .sez-route__img img{
  width: 100%;
  height: 100%;
  display:block;
  object-fit: contain;
  object-position: center;
}
body.page-template-page-dostavka .sez-route__btn{
  width:100%;
  margin: var(--title-mb) 0 0;
  margin-top: auto; /* button pinned to bottom */
}

/* Conditions */
body.page-template-page-dostavka .sez-conditions{
  display:block;
}
body.page-template-page-dostavka .sez-conditions-list{
  list-style:none;
  display:grid;
  gap: 12px;
}
body.page-template-page-dostavka .sez-conditions-list li{
  border:1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  background:#fff;
}
body.page-template-page-dostavka .sez-conditions-list__t{
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 8px;
}
body.page-template-page-dostavka .sez-conditions-list__d{
  color: var(--muted);
  line-height: 1.65;
}

/* ===== Free delivery block (stretched) ===== */
body.page-template-page-dostavka .sez-free{
  background: var(--brand);
  border-color: transparent;
  color: #fff;
  overflow:hidden;
  padding: 0;
  height: 100%;                 /* fill remaining height */
  display:flex;
  flex-direction:column;
  justify-content:center;        /* center content vertically */
}

/* title: marquee ONLY, no divider line */
body.page-template-page-dostavka .sez-free__title{
  overflow:hidden;
}

body.page-template-page-dostavka .sez-free__track{
  display:flex;
  gap: 42px;
  white-space: nowrap;
  padding: 18px 18px 10px;       /* bigger */
  animation: sezFreeTitle 14s linear infinite;
  will-change: transform;
}

body.page-template-page-dostavka .sez-free__item{
  font-weight: 900;
  letter-spacing: .06em;
  font-size: 15px;               /* bigger */
}

/* description: bigger, regular weight, white like other descriptions */
body.page-template-page-dostavka .sez-free__text{
  padding: 10px 18px 20px;
  font-weight: 400;
  font-size: 18px;               /* bigger */
  line-height: 1.65;
  opacity: .98;
  max-width: 680px;
}

/* animation */
@keyframes sezFreeTitle{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-50%); }
}

/* Pickup */
body.page-template-page-dostavka .sez-pickup-note{
  color: rgba(29,36,51,.80);
  line-height: 1.65;
  margin: 0 0 var(--pickup-note-mb) !important;
}
body.page-template-page-dostavka .sez-pickup-info{
  border:1px solid var(--line);
  border-radius: 0;
  background:#fff;
  padding: 16px;
}
body.page-template-page-dostavka .sez-pickup-row{
  display:grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
body.page-template-page-dostavka .sez-pickup-row:last-child{ border-bottom:0; }
body.page-template-page-dostavka .sez-pickup-label{
  font-weight:900;
  color: var(--ink);
}
body.page-template-page-dostavka .sez-pickup-value{
  color: rgba(29,36,51,.80);
  line-height:1.55;
}

/* FAQ */
body.page-template-page-dostavka .sez-nku-faq{ margin: 0; }
body.page-template-page-dostavka .sez-nku-faq details{
  border:1px solid var(--line);
  border-radius: 0;
  background:#fff;
  overflow:hidden;
  margin: 0 0 12px;
}
body.page-template-page-dostavka .sez-nku-faq details:last-child{ margin-bottom: 0; }
body.page-template-page-dostavka .sez-nku-faq summary{
  list-style:none;
  cursor:pointer;
  padding: 16px 16px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  font-weight: 900;
  color: var(--ink);
  margin: 0;
}
body.page-template-page-dostavka .sez-nku-faq summary::-webkit-details-marker{ display:none; }
body.page-template-page-dostavka .sez-nku-faq .sez-nku-faq-arrow{ color: rgba(29,36,51,.55); }
body.page-template-page-dostavka .sez-nku-faq summary:hover .sez-nku-faq-arrow{ color: var(--brand); }
body.page-template-page-dostavka .sez-nku-faq .sez-nku-faq-arrow svg{
  transition: transform .15s ease;
  transform: rotate(0deg);
}
body.page-template-page-dostavka .sez-nku-faq details[open] .sez-nku-faq-arrow svg{
  transform: rotate(180deg);
}
body.page-template-page-dostavka .sez-nku-faq .sez-nku-faq-body{
  padding: 0 16px 16px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* Mobile */
@media (max-width: 991px){
  body.page-template-page-dostavka{
    --radius-lg: 28px;
    --radius-md: 24px;
    --radius-sm: 18px;

    --space-section-top: 34px;
    --space-section-bottom: 14px;

    --space-between-blocks: 14px;
    --space-grid-gap: 14px;
    --box-pad: 18px;

    --title-mb: 14px;
    --text-mb: 12px;

    --pickup-note-mb: 14px;
  }

  body.page-template-page-dostavka .page-title-section .hero-card.sez-dostavka-hero__card{
    padding: 20px 18px 18px;
  }

  body.page-template-page-dostavka .sez-dostavka-hero__layout{
    grid-template-columns: 1fr;
    gap: 12px;
    align-items:start;
  }

  body.page-template-page-dostavka .page-title-section .hero-card h1{
    font-size: 30px;
    margin-bottom: 10px;
  }

  body.page-template-page-dostavka .page-title-section .hero-card p{
    font-size: 15.5px;
    margin-bottom: var(--text-mb);
  }

  body.page-template-page-dostavka .sez-dostavka{
    padding: 16px 0 28px;
  }

  body.page-template-page-dostavka .sez-dostavka__grid{
    grid-template-columns: 1fr;
    gap: var(--space-grid-gap);
    margin: 0 0 var(--space-between-blocks);
  }

  /* on mobile: free block has normal height */
  body.page-template-page-dostavka .sez-dostavka__right{
    grid-template-rows: auto auto;
  }

  body.page-template-page-dostavka .sez-route__img{
    max-width: 100%;
    aspect-ratio: 3 / 4;
  }

  body.page-template-page-dostavka .sez-pickup-row{
    grid-template-columns: 1fr;
  }

  body.page-template-page-dostavka .sez-free{
    height: auto;
    justify-content:flex-start;
  }

  body.page-template-page-dostavka .sez-free__track{
    padding: 16px 16px 8px;
    animation-duration: 12s;
  }
  body.page-template-page-dostavka .sez-free__item{
    font-size: 14px;
  }
  body.page-template-page-dostavka .sez-free__text{
    padding: 8px 16px 16px;
    font-size: 16px;
  }
}
