/* K79 (Димо, 11.11.2026) — редизайн на началната страница, етап 1 (категориите).
   Спецификацията: gcoolstore context/spravka/DIZAJN_etap1_spec_gpt_11-11-2026.md (gpt-6.1-sol). */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

.endy-catalog {
    --em-red: #ff080f;
    --em-red-hover: #df0008;
    --em-text: #101114;
    --em-muted: #505662;
    --em-count: #434a55;
    --em-border: #e9e4e1;
    --em-card: #faf7f5;
    --em-pink: #fff0f1;
    color: var(--em-text);
    background: #ffffff;
    font-family: "Roboto", Arial, sans-serif;
}

.endy-catalog, .endy-catalog *, .endy-catalog *::before, .endy-catalog *::after { box-sizing: border-box; }
.endy-catalog h1, .endy-catalog h2, .endy-catalog p { margin: 0; }
.endy-catalog a { text-decoration: none; }
.endy-catalog [hidden] { display: none !important; }

.endy-container { width: calc(100% - 48px); max-width: 1440px; margin-inline: auto; }

/* ── заглавие и чипове ─────────────────────────────────── */
.endy-category-intro { background: linear-gradient(180deg, #fcf9f7 0%, #ffffff 100%); padding: 20px 0 0; }
.endy-h1 { font-size: 40px; font-weight: 700; line-height: 44px; letter-spacing: -0.7px; color: var(--em-text); font-family: inherit; }
.endy-sub { margin-top: 4px !important; font-size: 18px; line-height: 26px; color: var(--em-muted); }
.endy-sub--sm { font-size: 17px; line-height: 24px; }

.endy-chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 18px; }
.endy-chip {
    height: 42px; padding: 0 24px; border-radius: 999px; border: 1px solid #dedad7; background: #ffffff;
    color: var(--em-text); font: 600 16px/20px "Roboto", Arial, sans-serif; cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.endy-chip[aria-pressed="true"] { background: var(--em-red); border-color: var(--em-red); color: #ffffff; }

/* ── шестте фото-карти ─────────────────────────────────── */
.endy-photo-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.endy-photo-card {
    display: flex; flex-direction: column; height: 190px; overflow: hidden;
    border: 1px solid var(--em-border); border-radius: 16px; background: var(--em-card); color: var(--em-text);
    box-shadow: 0 2px 4px rgba(35, 23, 18, .05);
}
.endy-photo-card__media { display: block; aspect-ratio: 1.85 / 1; flex: 0 0 auto; overflow: hidden; }
.endy-photo-card__img, .endy-photo-card__media .endy-img-prazno { display: block; width: 100%; height: 100%; object-fit: cover; }
.endy-img-prazno { background: linear-gradient(135deg, #f5eeea, #fbf7f4); }
.endy-photo-card__body { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 8px; flex: 1; min-height: 0; padding: 4px 12px; }
.endy-photo-card__text { min-width: 0; }
.endy-photo-card__name { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 18px; font-weight: 700; line-height: 20px; }
.endy-photo-card__count { display: block; color: var(--em-count); font-size: 14px; line-height: 18px; }
.endy-photo-card__arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--em-red); color: #ffffff; }

/* ── предимствата ──────────────────────────────────────── */
.endy-benefits { margin-top: 20px; }
.endy-benefits__list {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; min-height: 88px;
    margin: 0; padding: 0; list-style: none; border-top: 1px solid #f1eeec; border-bottom: 1px solid #f1eeec; background: #ffffff;
}
.endy-benefit { display: flex; align-items: center; gap: 12px; padding: 0 18px; position: relative; }
.endy-benefit + .endy-benefit::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 42px; margin-top: -21px; background: #dedfe3; }
.endy-benefit__icon { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; background: var(--em-pink); color: var(--em-red); display: grid; place-items: center; font-size: 20px; }
.endy-benefit__text { min-width: 0; }
.endy-benefit__title { display: block; font-size: 14px; font-weight: 700; line-height: 18px; text-transform: uppercase; }
.endy-benefit__sub { display: block; font-size: 14px; line-height: 18px; color: var(--em-muted); }

/* ── всички главни категории ───────────────────────────── */
.endy-main { padding: 28px 0 8px; }
.endy-main__head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.endy-main__badge { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; background: var(--em-pink); color: var(--em-red); display: grid; place-items: center; align-self: center; }
.endy-main__titles { flex: 1; min-width: 0; }
.endy-kicker { display: block; font-size: 13px; font-weight: 600; line-height: 18px; letter-spacing: .4px; text-transform: uppercase; color: var(--em-red); }
.endy-h2 { margin-top: 2px !important; font-size: 32px; font-weight: 700; line-height: 38px; letter-spacing: -0.7px; color: var(--em-text); font-family: inherit; }
.endy-main__all { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--em-red); font-size: 16px; font-weight: 500; line-height: 22px; white-space: nowrap; }
.endy-main__all:hover { color: var(--em-red-hover); text-decoration: underline; }

.endy-main-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.endy-compact-card {
    display: grid; grid-template-columns: 96px minmax(0, 1fr) 18px; align-items: center; gap: 12px; min-height: 96px;
    padding: 8px 14px; border: 1px solid var(--em-border); border-radius: 15px; background: var(--em-card); color: var(--em-text);
}
.endy-compact-card__image { display: block; width: 96px; height: 78px; object-fit: contain; }
.endy-compact-card__text { min-width: 0; }
.endy-compact-card__name { display: block; font-size: 20px; font-weight: 700; line-height: 23px; overflow-wrap: anywhere; }
.endy-compact-card__count { display: block; margin-top: 4px; color: var(--em-count); font-size: 16px; line-height: 20px; }
.endy-compact-card__arrow { display: grid; place-items: center; color: var(--em-text); }

/* ── посочване, фокус, анимация ────────────────────────── */
.endy-catalog a:focus-visible, .endy-catalog button:focus-visible { outline: 3px solid #a80012; outline-offset: 3px; }
.endy-photo-card, .endy-compact-card { transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease; }
.endy-photo-card__img, .endy-compact-card__arrow { transition: transform 180ms ease; }
@media (hover: hover) and (pointer: fine) {
    .endy-chip:hover:not([aria-pressed="true"]) { background: var(--em-pink); border-color: #ffb4b8; }
    .endy-photo-card:hover { color: var(--em-text); transform: translateY(-2px); border-color: #ffc4c7; box-shadow: 0 8px 20px rgba(35, 23, 18, .09); }
    .endy-photo-card:hover .endy-photo-card__img { transform: scale(1.025); }
    .endy-photo-card:hover .endy-photo-card__arrow { background: var(--em-red-hover); }
    .endy-compact-card:hover { color: var(--em-text); background: #fff3f2; border-color: #ffc4c7; }
    .endy-compact-card:hover .endy-compact-card__arrow { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
    .endy-catalog *, .endy-catalog *::before, .endy-catalog *::after { transition: none !important; animation: none !important; }
}

/* ── таблет 768–1199 ───────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1199px) {
    .endy-h1 { font-size: 32px; line-height: 36px; }
    .endy-sub { font-size: 16px; line-height: 23px; }
    .endy-chip { height: 40px; padding: 0 18px; }
    .endy-photo-card { height: 150px; }
    .endy-photo-card__body { grid-template-columns: minmax(0, 1fr) 24px; gap: 4px; padding: 4px 8px; }
    .endy-photo-card__name { font-size: 14px; line-height: 17px; }
    .endy-photo-card__count { font-size: 12px; line-height: 16px; }
    .endy-photo-card__arrow { width: 24px; height: 24px; }
    .endy-benefits__list { min-height: 92px; }
    .endy-benefit { gap: 8px; padding: 0 10px; }
    .endy-benefit__icon { flex-basis: 34px; width: 34px; height: 34px; font-size: 15px; }
    .endy-benefit__title, .endy-benefit__sub { font-size: 11px; line-height: 15px; }
    .endy-h2 { font-size: 28px; line-height: 34px; }
    .endy-compact-card { grid-template-columns: 64px minmax(0, 1fr) 16px; gap: 8px; min-height: 88px; padding: 8px; }
    .endy-compact-card__image { width: 64px; height: 64px; }
    .endy-compact-card__name { font-size: 16px; line-height: 19px; }
    .endy-compact-card__count { font-size: 14px; line-height: 18px; }
}

/* ── телефон до 767 ────────────────────────────────────── */
@media (max-width: 767px) {
    .endy-container { width: calc(100% - 32px); }
    .endy-category-intro { padding-top: 18px; }
    .endy-h1 { font-size: 28px; line-height: 31px; }
    .endy-sub { font-size: 14px; line-height: 20px; }
    .endy-chips { flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 14px -16px 14px; padding: 0 16px 4px; scrollbar-width: none; }
    .endy-chip { flex: 0 0 auto; height: 44px; padding: 0 18px; }
    .endy-photo-grid {
        grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 168px; gap: 10px;
        overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 4px; padding: 4px 4px 10px; margin-inline: -4px;
    }
    .endy-photo-card { height: 158px; scroll-snap-align: start; }
    .endy-photo-card__body { grid-template-columns: minmax(0, 1fr) 24px; gap: 4px; padding: 4px 8px; }
    .endy-photo-card__name { font-size: 14px; line-height: 17px; }
    .endy-photo-card__count { font-size: 12px; line-height: 16px; }
    .endy-photo-card__arrow { width: 24px; height: 24px; }
    .endy-benefits { margin-top: 10px; }
    .endy-benefits__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 220px; overflow-x: auto; min-height: 76px; }
    .endy-main { padding-top: 24px; }
    .endy-main__head { flex-wrap: wrap; align-items: center; }
    .endy-main__badge { flex-basis: 36px; width: 36px; height: 36px; }
    .endy-main__badge svg { width: 20px; height: 20px; }
    .endy-h2 { font-size: 24px; line-height: 28px; }
    .endy-sub--sm { font-size: 14px; line-height: 20px; }
    .endy-main__all { width: 100%; margin-top: 2px; }
    .endy-main-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .endy-compact-card { grid-template-columns: 44px minmax(0, 1fr) 12px; gap: 6px; min-height: 104px; padding: 8px; border-radius: 12px; }
    .endy-compact-card__image { width: 44px; height: 44px; }
    .endy-compact-card__name { font-size: 13px; line-height: 16px; }
    .endy-compact-card__count { font-size: 12px; line-height: 16px; }
    .endy-compact-card__arrow svg { width: 12px; height: 12px; }
}

/* ===================================================
   K79 — поправките след сравнението с референцията (gpt-6.1-sol, 11.11.2026; без „върнете измислените категории“
   и без отделния отстъп на заглавието — виж STATUS K79 т. 134).
   =================================================== */
.endy-container { width: calc(100% - 70px); }
.endy-chips { gap: 14px; }
.endy-chip { height: 40px; }
.endy-photo-grid { gap: 9px; }
.endy-photo-card { height: 175px; }
.endy-photo-card__body { padding: 2px 12px; }
.endy-benefits__list { min-height: 77px; }
.endy-main-grid { gap: 9px 10px; }
.endy-compact-card { min-height: 90px; }

@media (min-width: 768px) and (max-width: 1199px) {
    .endy-container { width: calc(100% - 48px); }
    .endy-h1 { font-size: 28px; line-height: 32px; }
    .endy-sub { font-size: 14px; line-height: 20px; }
    .endy-chips { gap: 10px; margin: 12px 0 14px; }
    .endy-chip { height: 30px; padding: 0 16px; font-size: 13px; line-height: 16px; }
    .endy-photo-grid { gap: 7px; }
    .endy-photo-card { height: 124px; }
    .endy-photo-card__body { grid-template-columns: minmax(0, 1fr) 20px; padding: 2px 8px 2px 10px; }
    .endy-photo-card__name { font-size: 12px; line-height: 15px; }
    .endy-photo-card__count { font-size: 11px; line-height: 14px; }
    .endy-photo-card__arrow { width: 20px; height: 20px; }
    .endy-photo-card__arrow svg { width: 13px; height: 13px; }
    .endy-benefits { margin-top: 10px; }
    .endy-benefits__list { min-height: 58px; }
    .endy-benefit__icon { flex-basis: 30px; width: 30px; height: 30px; font-size: 13px; }
    .endy-main { padding-top: 18px; }
    .endy-main__head { margin-bottom: 14px; gap: 10px; }
    .endy-main__badge { flex-basis: 34px; width: 34px; height: 34px; }
    .endy-main__badge svg { width: 19px; height: 19px; }
    .endy-h2 { font-size: 22px; line-height: 26px; }
    .endy-sub--sm { font-size: 13px; line-height: 18px; }
    .endy-main__all { font-size: 12px; min-height: 32px; }
    .endy-main-grid { gap: 6px 8px; }
    .endy-compact-card { grid-template-columns: 56px minmax(0, 1fr) 14px; min-height: 64px; padding: 6px 10px; }
    .endy-compact-card__image { width: 56px; height: 48px; }
    .endy-compact-card__name { font-size: 14px; line-height: 17px; }
    .endy-compact-card__count { font-size: 12px; line-height: 16px; margin-top: 2px; }
}

@media (max-width: 767px) {
    .endy-container { width: calc(100% - 32px); }
    .endy-chip { height: 36px; padding: 0 16px; font-size: 14px; }
    .endy-photo-card { height: 150px; }
    .endy-photo-card__body { padding: 2px 8px; }
    .endy-benefits__list {
        grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto;
        gap: 12px; padding: 12px 0; overflow: visible; min-height: 0;
    }
    .endy-benefit { padding: 0; gap: 8px; }
    .endy-benefit + .endy-benefit::before { display: none; }
    .endy-benefit:last-child { grid-column: 1 / -1; }
    .endy-benefit__icon { flex-basis: 32px; width: 32px; height: 32px; font-size: 14px; }
    .endy-benefit__title, .endy-benefit__sub { font-size: 11px; line-height: 14px; }
    .endy-h2 { font-size: 22px; line-height: 26px; }
    .endy-sub--sm { font-size: 13px; line-height: 18px; }
    .endy-main__head { gap: 12px; margin-bottom: 14px; }
    .endy-main__all { font-size: 14px; margin-top: 8px; min-height: 44px; }
}

/* ===================================================
   K79 (Димо, 11.11.2026: „направи втория ред“) — „Строителство и ремонт“: същите карти, студена палитра
   (сиво-синьо); червената стрелка остава — цветът на марката и на действието.
   =================================================== */
.endy-remont { margin-top: 22px; padding: 16px 16px 18px; border-radius: 18px; background: linear-gradient(180deg, #f1f4f8 0%, #f7f9fb 100%); }
.endy-remont__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }
.endy-remont__title { margin: 0; font-size: 24px; font-weight: 700; line-height: 28px; letter-spacing: -0.4px; color: #1d2b3a; font-family: inherit; }
.endy-remont__sub { margin: 0; font-size: 15px; line-height: 20px; color: #5b6b7c; }
.endy-photo-card--studen { background: #eef2f6; border-color: #d5dee8; }
.endy-photo-card--studen .endy-photo-card__name { color: #1d2b3a; }
.endy-photo-card--studen .endy-photo-card__count { color: #4a5a6b; }
@media (hover: hover) and (pointer: fine) {
    .endy-photo-card--studen:hover { border-color: #aebdcd; box-shadow: 0 8px 20px rgba(29, 43, 58, .12); }
}
@media (min-width: 768px) and (max-width: 1199px) {
    .endy-remont { margin-top: 14px; padding: 12px; }
    .endy-remont__title { font-size: 18px; line-height: 22px; }
    .endy-remont__sub { font-size: 13px; line-height: 18px; }
}
@media (max-width: 767px) {
    .endy-remont { margin: 14px -16px 0; padding: 14px 16px 6px; border-radius: 0; }
    .endy-remont__title { font-size: 20px; line-height: 24px; }
    .endy-remont__sub { font-size: 13px; line-height: 18px; }
}

/* ===================================================
   K79 (Димо, 11.11.2026, третата бележка) — „Строителство и ремонт“ под каталога, 3 промо карти, „Най-продавани
   продукти“, „Популярни марки“.
   =================================================== */
.endy-remont-sec { padding: 18px 0 4px; }
.endy-remont-sec .endy-remont { margin-top: 0; }
.endy-remont__title { font-size: 26px; line-height: 30px; }

.endy-promo { padding: 22px 0 6px; }
.endy-promo__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.endy-promo-card {
    position: relative; display: block; overflow: hidden; height: 170px; border-radius: 16px; border: 1px solid #e9e4e1;
    background: #faf7f5; color: #101114; isolation: isolate;
}
.endy-promo-card--studen { background: #eef2f6; border-color: #d5dee8; }
.endy-promo-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; z-index: -2; transition: transform 220ms ease; }
.endy-promo-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(250,247,245,.96) 0%, rgba(250,247,245,.85) 38%, rgba(250,247,245,0) 66%); }
.endy-promo-card--studen::before { background: linear-gradient(90deg, rgba(238,242,246,.96) 0%, rgba(238,242,246,.85) 38%, rgba(238,242,246,0) 66%); }
.endy-promo-card__text { position: absolute; left: 20px; top: 20px; right: 45%; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.endy-promo-card__kicker { padding: 4px 12px; border-radius: 999px; background: #ff080f; color: #fff; font-size: 12px; font-weight: 700; line-height: 16px; text-transform: uppercase; letter-spacing: .4px; }
.endy-promo-card__title { font-size: 24px; font-weight: 700; line-height: 27px; letter-spacing: -0.4px; }
.endy-promo-card__arrow { position: absolute; right: 16px; bottom: 16px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #ffffff; color: #101114; box-shadow: 0 2px 6px rgba(35, 23, 18, .15); }
.endy-promo-card:hover { color: #101114; }
@media (hover: hover) and (pointer: fine) { .endy-promo-card:hover .endy-promo-card__img { transform: scale(1.03); } }

.endy-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.endy-sec-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 26px; font-weight: 700; line-height: 30px; letter-spacing: -0.5px; color: #101114; font-family: inherit; }
.endy-sec-ic { color: #ff080f; font-size: 22px; }
.endy-best { padding: 26px 0 6px; background: transparent !important; }
.endy-best .css-home-carousel { margin: 0; }

.endy-brands { padding: 22px 0 30px; }
.endy-brands__list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.endy-brand {
    display: grid; place-items: center; height: 74px; padding: 10px 14px; border: 1px solid #e9e4e1; border-radius: 14px;
    background: #ffffff; color: #101114; transition: border-color 160ms ease, box-shadow 160ms ease;
}
.endy-brand__logo { max-width: 100%; max-height: 46px; object-fit: contain; }
.endy-brand__name { font-size: 19px; font-weight: 700; letter-spacing: .3px; text-align: center; line-height: 22px; color: #2a2f38; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .endy-brand:hover { border-color: #ffc4c7; box-shadow: 0 6px 16px rgba(35, 23, 18, .08); color: #101114; } }

@media (min-width: 768px) and (max-width: 1199px) {
    .endy-promo-card { height: 140px; }
    .endy-promo-card__title { font-size: 18px; line-height: 21px; }
    .endy-promo-card__text { left: 14px; top: 14px; }
    .endy-sec-title { font-size: 22px; line-height: 26px; }
    .endy-brands__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .endy-remont__title { font-size: 20px; line-height: 24px; }
}
@media (max-width: 767px) {
    .endy-promo__grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
    .endy-promo-card { height: 140px; scroll-snap-align: start; }
    .endy-promo-card__title { font-size: 19px; line-height: 22px; }
    .endy-sec-title { font-size: 21px; line-height: 25px; }
    .endy-brands__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .endy-brand { height: 60px; padding: 8px; }
    .endy-brand__name { font-size: 14px; line-height: 17px; }
    .endy-remont__title { font-size: 20px; line-height: 24px; }
}

/* K79 — по прегледа на gpt-6.1-sol (74/100): промо 1.87:1 и по-едър текст, марките в един ред по 7, място под
   двуредовите имена в „Строителство и ремонт“. */
.endy-promo__grid { gap: 18px; }
.endy-promo-card { height: auto; aspect-ratio: 1.87 / 1; }
.endy-promo-card__img { object-position: 60% 50%; }
.endy-promo-card__text { left: 26px; top: 26px; right: 50%; gap: 12px; }
.endy-promo-card__title { font-size: 32px; line-height: 34px; }
.endy-promo-card__arrow { right: 20px; bottom: 20px; width: 44px; height: 44px; }
.endy-brands__list { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.endy-remont .endy-photo-card { height: 185px; }
.endy-remont .endy-photo-card__body { padding: 6px 12px 8px; }
@media (min-width: 768px) and (max-width: 1199px) {
    .endy-promo__grid { gap: 10px; }
    .endy-promo-card__text { left: 14px; top: 14px; }
    .endy-promo-card__title { font-size: 20px; line-height: 23px; }
    .endy-promo-card__arrow { width: 34px; height: 34px; right: 12px; bottom: 12px; }
    .endy-brands__list { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
    .endy-brand__name { font-size: 14px; }
    .endy-remont .endy-photo-card { height: 134px; }
}
@media (max-width: 767px) {
    .endy-promo-card { aspect-ratio: auto; height: 150px; }
    .endy-promo-card__text { left: 16px; top: 16px; right: 45%; }
    .endy-promo-card__title { font-size: 20px; line-height: 23px; }
    .endy-promo-card__arrow { width: 36px; height: 36px; right: 12px; bottom: 12px; }
    .endy-brands__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 40%; overflow-x: auto; gap: 8px; padding-bottom: 6px; }
    .endy-remont .endy-photo-card { height: 160px; }
}

/* ===================================================
   K79 (Димо, 11.11.2026) — двете секции по магазин: „Дом и ежедневие“ (топла) и „Строителство и ремонт“
   (студена); във всяка — големи плочки за оборотните категории и малки за останалите.
   =================================================== */
.endy-intro__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.endy-sek { margin-top: 2px; }
.endy-sek__head, .endy-remont__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }
.endy-sek__title { margin: 0; font-size: 24px; font-weight: 700; line-height: 28px; letter-spacing: -0.4px; color: #101114; font-family: inherit; }
.endy-sek__sub { margin: 0; font-size: 15px; line-height: 20px; color: #505662; }
.endy-malki-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-top: 9px; }
.endy-malki-grid .endy-compact-card { grid-template-columns: 58px minmax(0, 1fr) 14px; gap: 8px; min-height: 68px; padding: 6px 10px; border-radius: 13px; }
.endy-malki-grid .endy-compact-card__image { width: 58px; height: 50px; }
.endy-malki-grid .endy-compact-card__name { font-size: 15px; line-height: 18px; }
.endy-malki-grid .endy-compact-card__count { font-size: 13px; line-height: 16px; margin-top: 2px; }
.endy-compact-card--studen { background: #eef2f6; border-color: #d5dee8; }
.endy-compact-card--studen .endy-compact-card__name { color: #1d2b3a; }
.endy-compact-card--studen .endy-compact-card__count { color: #4a5a6b; }
@media (hover: hover) and (pointer: fine) { .endy-compact-card--studen:hover { background: #e6ecf2; border-color: #aebdcd; } }
.endy-remont-sec { padding-top: 22px; }

@media (min-width: 768px) and (max-width: 1199px) {
    .endy-malki-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 7px; }
    .endy-sek__title { font-size: 19px; line-height: 23px; }
    .endy-sek__sub { font-size: 13px; line-height: 18px; }
}
@media (max-width: 767px) {
    .endy-intro__head { flex-wrap: wrap; align-items: flex-start; }
    .endy-intro__head .endy-main__all { width: auto; margin-top: 0; min-height: 36px; }
    .endy-malki-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .endy-malki-grid .endy-compact-card { grid-template-columns: 40px minmax(0, 1fr) 10px; gap: 6px; min-height: 60px; padding: 6px 8px; }
    .endy-malki-grid .endy-compact-card__image { width: 40px; height: 40px; }
    .endy-malki-grid .endy-compact-card__name { font-size: 13px; line-height: 16px; }
    .endy-malki-grid .endy-compact-card__count { font-size: 11px; line-height: 14px; }
    .endy-sek__title { font-size: 20px; line-height: 24px; }
    .endy-sek__sub { font-size: 13px; line-height: 18px; }
}

/* K79 — фото-картите растат по съдържанието (двуредово име + бройката), редът на мрежата ги изравнява */
.endy-photo-card, .endy-remont .endy-photo-card { height: auto !important; }
.endy-photo-card__body { min-height: 56px; padding: 6px 12px 8px !important; }
@media (min-width: 768px) and (max-width: 1199px) { .endy-photo-card__body { min-height: 44px; padding: 4px 8px 5px !important; } }
@media (max-width: 767px) { .endy-photo-card__body { min-height: 50px; padding: 4px 8px 6px !important; } }

/* K79 — всички категории — фото-карти: и вторият ред на мрежата — същото разстояние */
.endy-photo-grid { row-gap: 12px; }
@media (max-width: 767px) {
    /* на телефона — две колони вместо дълга лента с превъртане (11–12 карти) */
    .endy-sek .endy-photo-grid, .endy-remont .endy-photo-grid { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; padding: 0; margin: 0; gap: 10px; }
}

/* K79 — без блока „Пазарувай по категории“: секцията започва веднага; плочката „Промоции“ */
.endy-category-intro { padding-top: 22px; }
.endy-sek__title { font-size: 28px; line-height: 32px; }
.endy-photo-card--promo .endy-photo-card__media { position: relative; }
.endy-photo-card__badge { position: absolute; top: 10px; left: 10px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #ff080f; color: #fff; font-size: 20px; font-weight: 700; box-shadow: 0 3px 8px rgba(255, 8, 15, .3); }
.endy-photo-card--promo .endy-photo-card__name { color: #e00008; }
@media (max-width: 767px) { .endy-sek__title { font-size: 22px; line-height: 26px; } .endy-category-intro { padding-top: 14px; } }

/* K79 (Димо, 11.11.2026: „тези да бъдат със синя точка със стрелка и да е по средата на кръгчето“) */
.endy-photo-card__arrow, .endy-promo-card__arrow, .endy-sub-card__arrow { line-height: 0; }
.endy-photo-card__arrow svg, .endy-promo-card__arrow svg, .endy-compact-card__arrow svg { display: block; margin: 0; }
.endy-photo-card--studen .endy-photo-card__arrow { background: #2f6db5; }
@media (hover: hover) and (pointer: fine) { .endy-photo-card--studen:hover .endy-photo-card__arrow { background: #24578f; } }
/* K79 — празна лента „Промо продукти“ */
.endy-prazno { margin: 6px 0 10px; padding: 22px; border: 1px dashed #e3c9c5; border-radius: 14px; background: #fffaf9; color: #505662; text-align: center; font-family: "Roboto", Arial, sans-serif; }

/* K79 — „Виж всички марки“ на началната (секцията „Популярни марки“; страницата — css/pages/marki.css) */
.endy-sec-link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--em-red); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .endy-sec-link:hover { color: var(--em-red-hover); } }

/* ── K79 (Димо, 12.11.2026, макетът от ChatGPT — „това е, което искам“) — коледа: шапки и гирлянди (лентата — без украса, Димо) ── */
.endy-photo-card { position: relative; overflow: visible; }
.endy-photo-card__media { border-radius: 15px 15px 0 0; }
.endy-photo-card:has(.endy-shapka) { z-index: 3; }   /* над съседните — и при :hover (transform прави отделен слой) */
.endy-shapka {
    position: absolute; top: -32px; right: -6px; width: 72%; max-width: 205px; height: auto; z-index: 2;
    transform: rotate(2deg); transform-origin: 50% 50%; filter: drop-shadow(0 5px 6px rgba(40, 25, 20, .3)); pointer-events: none;
}
.endy-sek, .endy-remont { position: relative; }
.endy-girlyand { position: absolute; top: -30px; right: -20px; width: 58%; max-width: 940px; height: auto; z-index: 4; pointer-events: none;
    filter: drop-shadow(0 4px 5px rgba(40, 25, 20, .2)); }
.endy-girlyand--tehnika { top: -10px; right: 0; width: 36%; }
@media (max-width: 1599px) {   /* по-тесен екран — гирляндите не стигат подзаглавията */
    .endy-girlyand { width: 50%; right: -16px; }
    .endy-girlyand--tehnika { width: 32%; right: 0; }
}
@media (min-width: 1200px) and (max-width: 1379px) { .endy-girlyand { width: 45%; } .endy-girlyand--tehnika { width: 26%; } }
.endy-sek__head, .endy-remont__head { margin-bottom: 30px; }
@media (min-width: 768px) and (max-width: 1199px) {   /* таблет: гирляндът — в ивица над заглавието, не върху подзаглавието */
    .endy-sek { padding-top: 66px; }
    .endy-remont { padding-top: 100px; }
    .endy-girlyand, .endy-girlyand--tehnika { width: 60%; top: -6px; right: -4px; }
    .endy-girlyand--tehnika { top: 6px; }
}
@media (max-width: 767px) {
    .endy-photo-grid { padding-top: 26px; }
    .endy-shapka { width: 66%; top: -30px; right: -6px; }
    /* на телефон заглавието е през цялата ширина — гирляндът стои над него, в отделна ивица */
    .endy-sek { padding-top: 40px; }
    .endy-remont { padding-top: 76px; }
    .endy-girlyand, .endy-girlyand--tehnika { width: 92%; top: -4px; right: auto; left: 50%; transform: translateX(-50%); }   /* центрирани (Димо) */
    .endy-girlyand--tehnika { top: 6px; }
    .endy-sek__head, .endy-remont__head { margin-bottom: 18px; }
}

/* ── Брошурата (Димо, 12.11.2026, скица) — голяма вертикална плочка отпред, когато има брошура ── */
.endy-photo-grid--broshura .endy-broshura-karta { grid-column: 1; grid-row: span 2; }
.endy-broshura-karta {
    display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 14px 12px; min-height: 0;
    border-radius: 16px; background: linear-gradient(160deg, #ff2a24 0%, #e00008 60%, #b80006 100%); color: #fff; text-decoration: none;
    box-shadow: 0 6px 18px rgba(224, 0, 8, .25); position: relative; overflow: hidden;
}
.endy-broshura-karta:hover, .endy-broshura-karta:focus-visible { color: #fff; text-decoration: none; }
.endy-broshura-karta:focus-visible { outline: 3px solid #ffd2d3; outline-offset: 2px; }

/* отгъването (12.11.2026, Димо: „по-реалистично и плавно, задната страница да не е бяла“):
   --p 0…1 = колко е повдигнато ъгълчето; сгъвката е под 45°, страната s = --p × 34 % от ширината.
   Лицето (корицата) се изрязва по сгъвката → отдолу се вижда стр. 3; самият лист (гърбът = стр. 2, огледално,
   с хартиен тон и сянка към сгъвката) е триъгълникът, огледален на ъгъла спрямо сгъвката. */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }
.endy-broshura-karta__korica {
    --s: calc(var(--p) * 34cqw);
    container-type: inline-size;
    position: relative; display: block; flex: 1 1 0; min-height: 0; aspect-ratio: 1200 / 1752; max-width: 100%;
    border-radius: 6px; background: #f3efe8; box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
    animation: endy-prelisti 6s cubic-bezier(.45, .05, .35, 1) 1s infinite;
}
.endy-broshura-karta__korica img { display: block; width: 100%; height: 100%; object-fit: cover; }
.endy-broshura-karta__pod { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; }
.endy-broshura-karta__pod::after {   /* сянката на листа върху следващата страница — точно до сгъвката */
    content: ""; position: absolute; left: calc(100% - var(--s)); top: calc(100% - var(--s)); width: var(--s); height: var(--s);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    background: linear-gradient(to bottom right, transparent 49%, rgba(0, 0, 0, .45) 50.5%, rgba(0, 0, 0, .16) 60%, rgba(0, 0, 0, 0) 80%);
}
.endy-broshura-karta__lice {
    position: absolute; inset: 0; border-radius: 6px; overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--s)), calc(100% - var(--s)) 100%, 0 100%);
}
.endy-broshura-karta__list {   /* сянката на повдигнатия лист върху корицата */
    position: absolute; inset: 0; pointer-events: none;
    filter: drop-shadow(-3px -2px 4px rgba(0, 0, 0, calc(var(--p) * .45)));
}
.endy-broshura-karta__ugal {
    position: absolute; left: calc(100% - var(--s)); top: calc(100% - var(--s)); width: var(--s); height: var(--s);
    clip-path: polygon(0 0, 100% 0, 0 100%); overflow: hidden; border-top-left-radius: 22% 22%;
}
.endy-broshura-karta__ugal { background: linear-gradient(to top left, #d9cdb8, #f6efe3 45%, #ebe1d0); }
.endy-broshura-karta__ugal img {   /* гърбът: стр. 2, избледняла през хартията */
    position: absolute; right: 0; bottom: 0; width: 100cqw; height: auto; max-width: none; transform: rotate(180deg);
    opacity: .22; filter: sepia(.5) saturate(.6) blur(.6px);
}
.endy-broshura-karta__ugal::after {   /* извивката: сянка в сгъвката → светла ивица (изпъкналото) → по-тъмен връх */
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top left,
        rgba(70, 45, 20, .50) 0%, rgba(70, 45, 20, .15) 8%, rgba(255, 253, 248, .85) 30%,
        rgba(255, 253, 248, .35) 50%, rgba(90, 65, 35, .12) 75%, rgba(50, 32, 12, .32) 100%);
}
@keyframes endy-prelisti {
    0%, 52%  { --p: 0; }
    68%      { --p: .62; }
    76%      { --p: .66; }
    94%, 100% { --p: 0; }
}
.endy-broshura-karta:hover .endy-broshura-karta__korica { animation: none; --p: 1; transition: --p .45s cubic-bezier(.3, .1, .3, 1); }
.endy-broshura-karta__tekst { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.endy-broshura-karta__zaglavie { font-size: 16px; font-weight: 800; line-height: 19px; letter-spacing: .3px; text-transform: uppercase; }
.endy-broshura-karta__do { font-size: 13px; line-height: 16px; opacity: .9; }
@media (prefers-reduced-motion: reduce) { .endy-broshura-karta__korica { animation: none; --p: .35; } }
@media (min-width: 768px) and (max-width: 1199px) {
    .endy-broshura-karta { padding: 10px 10px 8px; gap: 6px; }
    .endy-broshura-karta__zaglavie { font-size: 12px; line-height: 15px; }
    .endy-broshura-karta__do { font-size: 11px; line-height: 14px; }
}
@media (max-width: 767px) {
    /* телефонът: широка ивица над категориите — корицата вляво, текстът вдясно */
    .endy-sek .endy-photo-grid--broshura .endy-broshura-karta { grid-column: 1 / -1; grid-row: auto; flex-direction: row; justify-content: flex-start; gap: 16px; padding: 12px 16px; }
    .endy-broshura-karta__korica { flex: 0 0 38%; }
    .endy-broshura-karta__tekst { align-items: flex-start; text-align: left; gap: 6px; }
    .endy-broshura-karta__zaglavie { font-size: 18px; line-height: 22px; }
    .endy-broshura-karta__tekst::after { content: "Разгледай →"; margin-top: 6px; padding: 8px 14px; border-radius: 10px; background: #fff; color: #e00008; font-size: 14px; font-weight: 700; }
}
