/* ============================================================================
   Цветомания — /delivery/
   Tilda Sans · #A11826 · namespace .dl-*
   ВАЖНО: id-селекторы #mapYandex, #priceOrder, #address, #resultLabel,
   #distance, #resultDiv — сохранены 1:1, т.к. они используются в
   deliveryZones.js. Меняем только внешность.
============================================================================ */

.delivery-page {
    --dl-primary: #A11826;
    --dl-primary-dark: #7d101b;
    --dl-primary-soft: #fbecee;
    --dl-accent: #F13A5F;
    --dl-zone1: #1bad03;
    --dl-zone2: #e8b400;
    --dl-text: #1a1a1a;
    --dl-text-muted: #5a5a5a;
    --dl-text-light: #8a8a8a;
    --dl-border: #ececec;
    --dl-border-soft: #f4f4f4;
    --dl-bg: #ffffff;
    --dl-bg-soft: #fafaf8;

    --dl-radius: 8px;
    --dl-radius-lg: 16px;
    --dl-radius-xl: 28px;

    --dl-shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04);
    --dl-shadow: 0 4px 24px rgba(26, 26, 26, 0.06);
    --dl-shadow-lg: 0 12px 40px rgba(26, 26, 26, 0.08);

    --dl-ease: cubic-bezier(0.22, 1, 0.36, 1);

    font-family: 'Tilda Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--dl-text);
    font-size: 16px;
    line-height: 1.5;
    background: var(--dl-bg);
    overflow-x: hidden;
}

.delivery-page *,
.delivery-page *::before,
.delivery-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.delivery-page ul,
.delivery-page ol {
    list-style: none;
}

.delivery-page a {
    color: var(--dl-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--dl-ease), color 0.2s var(--dl-ease);
}

.delivery-page a:hover {
    border-bottom-color: currentColor;
}

.delivery-page strong,
.delivery-page b {
    font-weight: 600;
    color: var(--dl-text);
}

.dl-container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 150px;
    width: 100%;
}

.dl-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------- EYEBROW --------------------------------- */
.dl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dl-primary);
    margin-bottom: 24px;
}

.dl-eyebrow__dash {
    width: 24px;
    height: 1px;
    background: var(--dl-primary);
    flex-shrink: 0;
}

/* ----------------------------- SECTION HEAD ----------------------------- */
.dl-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}

.dl-section-head .dl-eyebrow {
    justify-content: center;
}

.dl-section-head__title {
    font-family: inherit;
    font-size: clamp(30px, 3.6vw, 52px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--dl-text);
    margin-bottom: 16px;
}

.dl-section-head__lede {
    font-size: 17px;
    line-height: 1.55;
    color: var(--dl-text-muted);
}

/* ---------------------------------- HERO ---------------------------------- */
.dl-hero {
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.dl-hero::before {
    content: '';
    position: absolute;
    top: -280px;
    left: -200px;
    width: 720px;
    height: 720px;
    background: radial-gradient(circle, rgba(161, 24, 38, 0.04), transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.dl-hero__container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
    min-height: 560px;
}

.dl-hero__title {
    font-family: inherit;
    font-size: clamp(40px, 5.4vw, 88px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--dl-text);
    margin-bottom: 32px;
}

.dl-hero__title-accent {
    color: var(--dl-primary);
    font-style: italic;
    font-weight: 500;
}

.dl-hero__lede {
    font-size: clamp(16px, 1.1vw, 18px);
    line-height: 1.65;
    color: var(--dl-text-muted);
    margin-bottom: 20px;
    max-width: 560px;
}

.delivery-page .dl-hero__note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 20px;
    background: var(--dl-primary-soft);
    border-radius: 999px;
    font-size: 14px;
}

.delivery-page .dl-hero__note a {
    color: var(--dl-primary);
    font-weight: 500;
    border-bottom-color: transparent;
}

.delivery-page .dl-hero__note a:hover {
    border-bottom-color: currentColor;
}

.dl-hero__media {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.dl-hero__media-frame {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    max-height: 560px;
    border-radius: var(--dl-radius-xl);
    overflow: hidden;
    background: var(--dl-bg-soft);
}

.dl-hero__media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dl-hero__badge {
    position: absolute;
    left: -20px;
    bottom: 32px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    background: #fff;
    border-radius: var(--dl-radius-lg);
    box-shadow: var(--dl-shadow-lg);
}

.dl-hero__badge svg {
    flex-shrink: 0;
}

.dl-hero__badge-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dl-text-muted);
    margin-bottom: 2px;
}

.dl-hero__badge-value {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: var(--dl-text);
    letter-spacing: -0.01em;
}

/* ------------------------------- BLOCKS --------------------------------- */
/* Обёртка для bitrix-инклюдов — не меняем их содержимое, даём каркас-сетку */
.dl-blocks {
    padding: 40px 0 80px;
}

.dl-blocks__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.dl-block {
    padding: 36px 32px;
    background: #fff;
    border: 1px solid var(--dl-border);
    border-radius: var(--dl-radius-xl);
    transition: transform 0.3s var(--dl-ease), box-shadow 0.3s var(--dl-ease),
                border-color 0.3s var(--dl-ease);
    position: relative;
    overflow: hidden;
}

.dl-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--dl-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--dl-ease);
}

.dl-block:hover {
    transform: translateY(-3px);
    box-shadow: var(--dl-shadow-lg);
    border-color: transparent;
}

.dl-block:hover::before {
    transform: scaleX(1);
}

/* Типографика внутри инклюдов — чтобы встроенный контент выглядел аккуратно */
.dl-block h1,
.dl-block h2,
.dl-block h3,
.dl-block h4 {
    font-family: inherit;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--dl-text);
    margin-bottom: 14px;
    letter-spacing: -0.005em;
}

.dl-block p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--dl-text-muted);
    margin-bottom: 10px;
}

.dl-block img {
    max-width: 100%;
    height: auto;
    margin-bottom: 18px;
    border-radius: var(--dl-radius);
}

.dl-block ul,
.dl-block ol {
    padding-left: 8px;
    margin-bottom: 12px;
}

.dl-block ul li,
.dl-block ol li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--dl-text-muted);
}

.dl-block ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dl-primary);
}

/* ------------------------------- PAYMENT -------------------------------- */
.dl-payment {
    padding: 80px 0;
    background: var(--dl-bg-soft);
}

.dl-payment__container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
}

.dl-payment__media-frame {
    border-radius: var(--dl-radius-xl);
    overflow: hidden;
    background: #fff;
    aspect-ratio: 4 / 3;
}

.dl-payment__media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dl-payment__title {
    font-family: inherit;
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--dl-text);
    margin-bottom: 20px;
}

.dl-payment__title-accent {
    color: var(--dl-primary);
    font-style: italic;
    font-weight: 500;
}

.dl-payment__lede {
    font-size: 17px;
    line-height: 1.6;
    color: var(--dl-text-muted);
    margin-bottom: 32px;
    max-width: 520px;
}

.dl-payment__methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.dl-payment__method {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: flex-start;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--dl-border);
    border-radius: var(--dl-radius-lg);
    transition: border-color 0.2s var(--dl-ease), box-shadow 0.2s var(--dl-ease);
}

.dl-payment__method:hover {
    border-color: var(--dl-primary-soft);
    box-shadow: var(--dl-shadow);
}

.dl-payment__method-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--dl-primary-soft);
    color: var(--dl-primary);
    border-radius: 12px;
    flex-shrink: 0;
}

.dl-payment__method-title {
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--dl-text);
    margin-bottom: 4px;
    letter-spacing: -0.005em;
}

.dl-payment__method-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--dl-text-muted);
}

.dl-payment__brands {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dl-payment__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--dl-border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dl-text-muted);
    letter-spacing: 0.02em;
}

/* ===================================================================
   CALCULATOR — оформление формы калькулятора доставки.
   Сохраняем только id-селекторы (#mapYandex, #priceOrder, #address,
   #resultLabel, #distance, #resultDiv) — их использует deliveryZones.js.
   Классы .delivAndMap и .infoDeliv из оригинальной вёрстки удалены —
   в JS они не используются.
=================================================================== */
.dl-calc {
    padding: 80px 0 120px;
}

.dl-calc__grid {
    display: grid;
    grid-template-columns: minmax(0, 420px) 1fr;
    gap: 32px;
    align-items: start;
}

.dl-calc__form {
    background: #fff;
    border: 1px solid var(--dl-border);
    border-radius: var(--dl-radius-xl);
    padding: 32px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.dl-calc__form-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.dl-calc__field {
    margin-bottom: 18px;
    min-width: 0;
}

.dl-calc__label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--dl-text-muted);
}

.delivery-page .dl-calc__form .dl-calc__input,
.delivery-page .dl-calc__form #address,
.delivery-page .dl-calc__form input[type="text"] {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 51px;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: var(--dl-text);
    background: var(--dl-bg-soft);
    border: 1px solid var(--dl-border);
    border-radius: var(--dl-radius);
    transition: border-color 0.2s var(--dl-ease), background 0.2s var(--dl-ease);
    outline: none;
    box-sizing: border-box;
}

.delivery-page .dl-calc__form .dl-calc__input:focus,
.delivery-page .dl-calc__form #address:focus {
    background: #fff;
    border-color: var(--dl-primary);
}

/* Кастомный select */
.dl-calc__select-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}

.delivery-page .dl-calc__form .dl-calc__select,
.delivery-page .dl-calc__form #priceOrder {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 51px;
    padding: 14px 44px 14px 18px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: var(--dl-text);
    background: var(--dl-bg-soft);
    border: 1px solid var(--dl-border);
    border-radius: var(--dl-radius);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    margin-left: 0px;
    transition: border-color 0.2s var(--dl-ease), background 0.2s var(--dl-ease);
    box-sizing: border-box;
}

.delivery-page .dl-calc__form .dl-calc__select:focus,
.delivery-page .dl-calc__form #priceOrder:focus {
    border-color: var(--dl-primary);
    background: #fff;
}

.dl-calc__select-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dl-text-muted);
    pointer-events: none;
}

/* Подсказки под полями */
.dl-calc__hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--dl-text-light);
}

/* Результат */
.delivery-page #resultDiv,
.delivery-page .dl-calc__result {
    margin: 20px 0 0;
    min-height: 1px;
}

.delivery-page #resultLabel,
.delivery-page .dl-calc__result-label {
    display: none;
    width: 100%;
    padding: 16px 20px;
    background: var(--dl-primary-soft);
    border-left: 3px solid var(--dl-primary);
    border-radius: 0 var(--dl-radius) var(--dl-radius) 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--dl-primary-dark);
    box-sizing: border-box;
}

/* jQuery .show() ставит style="display: inline;" — перебиваем через
   атрибутный селектор: если style содержит display, значит показан. */
.delivery-page #resultLabel[style*="display"] {
    display: block !important;
}

/* Легенда зон */
.dl-calc__legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--dl-border-soft);
}

.dl-calc__legend-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.dl-calc__legend-swatch {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    margin-top: 4px;
}

.dl-calc__legend-swatch--green {
    background: var(--dl-zone1);
    opacity: 0.85;
}

.dl-calc__legend-swatch--yellow {
    background: var(--dl-zone2);
}

.dl-calc__legend-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--dl-text);
    margin-bottom: 2px;
    letter-spacing: -0.005em;
}

.dl-calc__legend-text {
    display: block;
    font-size: 13px;
    color: var(--dl-text-muted);
    line-height: 1.45;
}

/* Карта */
.dl-calc__map {
    position: relative;
    min-height: 520px;
    border-radius: var(--dl-radius-xl);
    overflow: hidden;
    border: 1px solid var(--dl-border);
    background: var(--dl-bg-soft);
}

.delivery-page #mapYandex {
    width: 100% !important;
    height: 520px !important;
    min-height: 520px !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    border-radius: var(--dl-radius-xl);
    overflow: hidden;
}

/* Стилизация suggestions-jquery поверх дефолта */
.suggestions-wrapper {
    width: 100% !important;
}

.suggestions-suggestions {
    border: 1px solid var(--dl-border) !important;
    border-radius: var(--dl-radius-lg) !important;
    box-shadow: var(--dl-shadow-lg) !important;
    font-family: inherit !important;
    overflow: hidden;
    margin-top: 4px !important;
}

.suggestions-suggestion {
    padding: 12px 16px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    border-bottom: 1px solid var(--dl-border-soft) !important;
    transition: background 0.15s var(--dl-ease);
}

.suggestions-suggestion:last-child {
    border-bottom: none !important;
}

.suggestions-selected,
.suggestions-suggestion:hover {
    background: var(--dl-primary-soft) !important;
    color: var(--dl-primary-dark) !important;
}

/* ============================== RESPONSIVE =============================== */

@media (max-width: 1440px) {
    .dl-container {
        padding: 0 80px;
    }
}

@media (max-width: 1200px) {
    .dl-container {
        padding: 0 40px;
    }

    .dl-hero__container,
    .dl-payment__container {
        grid-template-columns: 1fr;
        gap: 48px;
        min-height: auto;
    }

    .dl-hero__media-frame {
        min-height: 360px;
        max-height: 480px;
    }

    .dl-blocks__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dl-calc__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .delivery-page #mapYandex {
        height: 440px !important;
        min-height: 440px !important;
    }
}

@media (max-width: 768px) {
    .dl-container {
        padding: 0 20px;
    }

    .dl-hero {
        padding: 32px 0 56px;
    }

    .dl-hero__title {
        margin-bottom: 24px;
    }

    .dl-hero__badge {
        left: auto;
        right: 20px;
        bottom: 20px;
        padding: 12px 16px;
    }

    .dl-blocks {
        padding: 24px 0 56px;
    }

    .dl-block {
        padding: 28px 24px;
        border-radius: var(--dl-radius-lg);
    }

    .dl-payment {
        padding: 56px 0;
    }

    .dl-payment__method {
        padding: 16px;
    }

    .dl-calc {
        padding: 56px 0 72px;
    }

    .dl-calc__form {
        padding: 28px 24px;
        border-radius: var(--dl-radius-lg);
    }

    .delivery-page #mapYandex {
        height: 380px !important;
        min-height: 380px !important;
        border-radius: var(--dl-radius-lg);
    }

    .dl-calc__map {
        min-height: 380px;
        border-radius: var(--dl-radius-lg);
    }
}

@media (max-width: 480px) {
    .dl-container {
        padding: 0 16px;
    }

    .dl-payment__method {
        grid-template-columns: 1fr;
    }
}