/* сэрцакавярні.бел design fixes 2026-11-25 (pack 5) */

/* 1. cookie notice: solid site navy instead of 40% black over text; full-width bar on phones */
.cookie-modal { background: #3B2A20; box-shadow: 0 4px 24px rgba(0,0,0,.25); border-radius: 10px; }
@media (max-width: 767px) {
  .cookie-modal { left: 8px; right: 8px; bottom: 64px; max-width: none; width: auto; border-radius: 12px; padding: 12px 44px 12px 16px; font-size: 13px; }
  .cookie-modal .cookie-content { gap: 4px; }
  .cookie-modal .cookie-content br { display: none; }
  .cookie-modal .cookie-content button { margin-top: 8px; padding: 7px 36px; }
}

/* 2. home hero on phones: shorter, so the H1 and intro text start on the first screen */
@media (max-width: 767px) {
  div#index_slider, div#index_slider div.index_slide { height: 300px !important; min-height: 0 !important; }
  div#index_slider div#slide01 p.slide_header, div#index_slider div#slide01.show p.slide_header { bottom: 70px !important; }
}

/* 3. no full justification on phones (wide gaps between words in narrow columns) */
@media (max-width: 767px) {
  footer#footer div#one p, footer#footer div#two address, footer#footer div#two p, footer#footer div#two ul,
  footer#footer div#four ul, footer#footer div#five ul,
  section#content section#repair p, section#news_content p, div.news_list article p,
  section#index_content p, section#index_advantages p, section#index_advantages li p, section#index_reviews p,
  div#index_frame section#faq p, div#index_frame section.faq p, aside#index_news article.news_item p,
  div#description p, div#diagnostics p { text-align: left !important; }
}

/* 4. side icon menu: every icon is the same cup, so show the category name on hover/focus */
nav#left_menu li { position: relative; }
nav#left_menu a.icon[aria-label]::after {
  content: attr(aria-label); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  white-space: nowrap; background: #3B2A20; color: #fff; font-size: 14px; line-height: 1; padding: 8px 12px; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2); opacity: 0; visibility: hidden; transition: opacity .15s; z-index: 50; pointer-events: none;
}
nav#left_menu a.icon[aria-label]:hover::after, nav#left_menu a.icon[aria-label]:focus-visible::after { opacity: 1; visibility: visible; }

/* 5. images bigger than their block (2026-11-26, rule «фото в нужном размере") */
img[src$="/img/stars.svg"], img[src$="img/stars.svg"] { width: auto !important; max-width: 110px !important; height: auto !important; }
.message img[src*="not_found"] { max-width: 100%; height: auto; }

/* 6. CLS: cart.css loads late (in body) — keep the cart modal out of flow from the first paint (2026-11-26) */
.cart-modal { position: fixed; inset: 0; z-index: 1100; opacity: 0; visibility: hidden; }
.cart-modal.open { opacity: 1; visibility: visible; }

/* сэрцакавярні.бел UX pack 2026-11-26 (UX audit C1/H1/H2/H3/M1/M5/M6) */

/* C1: price table fits phones — hide delivery column, fixed layout, compact buttons */
@media (max-width:599px){table.products, table.products tbody{display:table!important;width:100%!important;min-width:0!important;table-layout:fixed} table.products tr{display:table-row!important} table.products th, table.products td{width:auto!important;min-width:0!important;padding:10px 4px!important;font-size:15px;overflow-wrap:break-word} table.products th:nth-child(1), table.products td.product-name{width:44%!important} table.products th:nth-child(2), table.products td.product-price{width:22%!important;white-space:nowrap} table.products th:nth-child(4), table.products td.button{width:34%!important} table.products button.to-order, table.products button.added{padding:8px 4px!important;font-size:14px!important;white-space:nowrap!important;overflow-wrap:normal!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box} table.products th:nth-child(3), table.products td.product-deadline{display:none!important}}

/* H2: cookie notice never covers order/cart dialogs */
#cookieModal { z-index: 1000; }
body:has(.cart-modal.open) #cookieModal, body:has(#cart-panel.open) #cookieModal, body:has(.popup-overlay.active) #cookieModal { display: none; }

/* H3: readable hero text (dark overlay) + primary CTA «Выбрать кофе» (same .scroll positioning as «Оставьте заявку», which was opacity:0) */
#index_slider { box-shadow: inset 0 0 0 3000px rgba(0, 0, 0, .38); }
#index_slider p.slide_header { text-shadow: 0 2px 8px rgba(0, 0, 0, .55); }
#index_slider a.kava-cta.scroll { transform: translateY(-22px); background: #9E5E28; color: #fff; border-color: #9E5E28; }
#slide01 a.scroll { opacity: 1 !important; }
@media (min-width: 768px) { #slide01 a.scroll:not(.kava-cta) { transform: translateY(40px); } }
@media (max-width: 767px) {
  div#index_slider, div#index_slider div.index_slide { height: 360px !important; }
  div#index_slider div#slide01 p.slide_header, div#index_slider div#slide01.show p.slide_header { top: 34px !important; bottom: auto !important; }
  #slide01 a.scroll { top: auto !important; bottom: 34px !important; left: 0 !important; right: 0 !important; margin: 0 auto !important; }
  #index_slider a.kava-cta.scroll { height: 48px !important; min-height: 48px; transform: translateY(-58px); font-size: 17px; }
  #slide01 span.action-description { top: auto !important; bottom: 12px !important; height: auto !important; }
}

/* M1: phone in the short sticky PC header was clipped to 8 px */
#pc_header.short a[href^="tel"] { display: inline-block; height: auto !important; line-height: 1.3 !important; overflow: visible !important; }

/* M5: working-day labels readable on navy (was #B8742F, 2.85:1) */
.working_hours p, .working_hours li { color: #D9A066 !important; }

/* M6: /kofe sections list off the screen edge on phones */
@media (max-width: 767px) { #services { padding-left: 16px; padding-right: 16px; box-sizing: border-box; } }

/* H1: tablet 680–1023 px — mobile header with burger (ported from сэрцааўто.бел / кампутарная.бел) */
@media (min-width:680px) and (max-width:1023px){nav#device_header_nav.open div.first_sub_menu, nav#device_header_nav.open div.second_sub_menu { max-height: 3000px;transition: max-height .3s ease-in-out }
div#nav_list_wrapper div.first_sub_menu li a:hover, div#nav_list_wrapper li a:hover { border-bottom: 1px solid var(--white);color: var(--white) }
header#pc_header, nav#device_header_nav { display: none }
header#device_header { position: fixed;width: 100%;background: var(--white);z-index: 10 }
div#device_header_top { width: 100%;height: 90px;display: flex;justify-content: space-between;padding-bottom: 10px }
div#device_header_logo { min-width: 180px;max-width: 50%;margin-left: 10px;margin-top: 10px }
div#device_header_logo img { width: 100%;max-width: 200px;padding-top: 6px }
div.header_messengers { max-width: 130px;margin-right: 10px;height: 90px;display: flex;align-items: center;justify-content: center;flex-direction: column }
div.header_messengers a { width: 28px;height: 28px;display: block;margin-top: 5px }
div.header_messengers a img { width: 100%;height: 100% }
div#device_header_bottom { background: var(--dark-blue);width: 100%;height: 60px;display: flex;align-items: center;justify-content: space-between }
div#device_header_phone { height: 28px;width: 190px }
div#device_header_phone a { height: 28px;display: flex;align-items: center;font-size: 13px;color: var(--white);font-weight: 400 }
div#device_header_phone a img { height: 28px;width: 28px;margin-left: 10px;padding-right: 10px }
div#device_header_burger { height: 20px;width: 28px;margin-right: 10px;display: flex;flex-direction: column;justify-content: space-between;cursor: pointer }
div#device_header_burger span { height: 2px;width: 28px;display: block;transition: .3s;background: var(--white);position: relative }
div#device_header_burger.open span { opacity: 0 }
div#device_header_burger.open span:first-child, div#device_header_burger.open span:last-child { opacity: 1 }
div#device_header_burger.open span:first-child { transform: rotate(-45deg) translate(0, -50%);top: 50% }
div#device_header_burger.open span:last-child { transform: rotate(45deg) translate(0, 50%);bottom: 50% }
nav#device_header_nav.open { display: flex }
nav#device_header_nav.open div.first_sub_menu.closed, nav#device_header_nav.open div.second_sub_menu.closed { overflow: hidden;max-height: 0;transition: max-height .6s linear }
nav#device_header_nav.open div.second_sub_menu { margin-left: 10px;width: calc(100% - 10px) }
div#nav_list_wrapper li.firstParent::before, div#nav_list_wrapper li.secondParent::before { content: "";width: 15px;background: url(/img/arrow.svg);transition: .2s;position: relative;float: right;right: 0 }
div#nav_list_wrapper { background: var(--dark-blue);width: 100%;height: calc(100vh - 230px);overflow: hidden;overflow-y: auto;padding: 20px 20px 60px;scrollbar-width: thin;scrollbar-color: var(--white) var(--blue);animation: .3s linear forwards elementShow }
div#nav_list_wrapper::-webkit-scrollbar { width: 7px }
div#nav_list_wrapper::-webkit-scrollbar-track { background: var(--blue) }
div#nav_list_wrapper::-webkit-scrollbar-thumb { background-color: var(--white) }
div#nav_list_wrapper.hide { animation: .3s linear forwards elementHide }
div#nav_list_wrapper li { min-height: 40px;width: 100%;margin-left: 10px }
div#nav_list_wrapper a.hidden { transform: scaleX(0) }
div#nav_list_wrapper a.hidden.no { transform: scaleX(1) }
div#nav_list_wrapper li a { width: calc(100% - 20px);height: 40px;display: flex;align-items: center;transition: .3s;padding-left: 10px;font-size: 14px;color: var(--white2);font-weight: 600;text-transform: uppercase;border-bottom: 1px solid var(--white2) }
div#nav_list_wrapper li a:hover { width: calc(100% - 20px) }
div#nav_list_wrapper li.firstParent::before { height: 9px;transform: translate(-20px, 20px) }
div#nav_list_wrapper li.noParent { margin-top: 10px }
div#nav_list_wrapper div.first_sub_menu li.noParent { margin-top: 0 }
div#nav_list_wrapper li.firstParent.open { height: auto }
div#nav_list_wrapper li.firstParent.open a { text-shadow: 1px 1px 18px var(--blue) }
div#nav_list_wrapper li.firstParent.open div.first_sub_menu li a { text-shadow: none }
div#nav_list_wrapper li.firstParent.open::before { transform: rotate(-180deg) translate(20px, -20px) }
div#nav_list_wrapper div.first_sub_menu li { width: 100% }
div#nav_list_wrapper div.first_sub_menu li a { font-size: 12px;color: var(--white2);font-weight: 100;line-height: 18px;padding-left: 0;padding-top: 10px;padding-bottom: 10px;height: auto }
div#nav_list_wrapper div.second_sub_menu li { margin-left: 0 }
div#nav_list_wrapper li.secondParent.open a, div#nav_list_wrapper li.secondParent.open div.second_sub_menu a:hover { color: var(--white) }
div#nav_list_wrapper li.secondParent.open div.second_sub_menu a { color: var(--white2) }
div#nav_list_wrapper li.secondParent::before { height: 9px;transform: translate(-29px, 15px) }
div#nav_list_wrapper li.secondParent.open::before { transform: rotate(-180deg) translate(29px, -15px) }
main#main_content { scrollbar-width: thin;max-height: calc(100vh - 151px) }
.header_short main#main_content { max-height: calc(100vh - 160px) }
main#main_content::-webkit-scrollbar { width: 7px }
main#main_content::-webkit-scrollbar-thumb { border-top: 5px solid var(--white2);border-bottom: 5px solid var(--white2) }
div#pc_header_yandex, div#pc_header_yandex_mobile { height: 100px;background: initial;margin-left: 35px }
div#pc_header_yandex_mobile .container .title { margin-bottom: 0 }
div#device_header_locations { height: 50px;box-sizing: border-box; }
header#pc_header{display:none!important}
header#device_header{display:block!important;position:sticky!important;top:0}
}

/* 8. UX pack 2 (2026-11-27): callback form fields (M4) */
section#callback input[type="text"], section#callback input[type="tel"], section#callback input[name="phone"], section#callback input[name="name"] { min-height: 48px; font-size: 16px; box-sizing: border-box; }
section#callback button, section#callback input[type="submit"] { min-height: 48px; font-size: 16px; }

/* 9. article cards 2026-11-27 (scheme as on kompyuternaya.spb.ru): title = the only link, stretched over the card; «Подробнее» is a span with the old look */
section#reading .content .item, div.news_list article { position: relative; }
section#reading .content .item h4 a::after, div.news_list article a.news_header::after { content: ""; position: absolute; inset: 0; }
div.news_list article span.news_img { display: block; }
div.news_list article span.read_more {color: var(--white); background: var(--dark-blue3); transition: all .2s linear;
	display: flex; align-items: center; justify-content: center; border-radius:7px; border: 1px solid var(--dark-blue3);}
div.news_list article:hover span.read_more {color: var(--dark-blue3); background: var(--white);}
@media (min-width: 260px ) and (max-width: 420px) {
div.news_list article span.news_img {width: 144px;}
div.news_list article span.read_more {font-size: 14px; width: 140px; height: 25px; margin:10px;}
}
@media (min-width: 421px ) and (max-width: 679px) {
div.news_list article span.news_img {width: 80px; height: 80px; margin-right: 10px; margin-left: 10px;}
div.news_list article span.read_more {font-size: 14px; width: 140px; height: 25px; margin:10px;}
}
@media (min-width: 680px ) and (max-width: 1023px) {
div.news_list article span.news_img {width: 120px; height: 120px; margin-right: 15px; margin-left: 15px;}
div.news_list article span.read_more {font-size: 15px; width: 150px; height: 25px; margin-right: 15px; margin-bottom: 15px;}
}
@media (min-width: 1024px) and (max-width: 1439px) {
div.news_list article span.news_img {width: 144px; height: 144px; margin-right: 20px; margin-left: 20px;}
div.news_list article span.read_more {font-size: 15px; width: 180px; height: 30px; margin-right: 20px; margin-bottom: 20px;}
}
@media (min-width: 1440px) {
div.news_list article span.news_img {width: 144px; height: 144px; margin-right: 20px; margin-left: 20px;}
div.news_list article span.read_more {font-size: 16px; width: 180px; height: 30px; margin-right: 20px; margin-bottom: 20px;}
}
section#reading .content .item .text-container .button span {font-weight: 700;}
section#reading .content .item .text-container .button span {display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 25px;
    background: #3B2A20;
    border-radius: 5px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;}

/* 10. red buttons with white text: #9E5E28 (3.75:1) -> #9E5E28 (4.6:1), hover darker (2026-11-27, question 4) */
html .cookie-content button { background: #9E5E28; }
html .cookie-content button:hover { background: #7A4519; }
html div#cart-frame button#cart-add-form { background: #9E5E28; border-color: #9E5E28; }
html div#cart-frame button#cart-add-form:hover { background: #fff; color: #9E5E28; }
html section#first-container .left-block .button button, html #callback-button1, html section#content_frame div#callback form button { background: #9E5E28; }
html section#first-container .left-block .button button:hover, html #callback-button1:hover, html section#content_frame div#callback form button:hover { background: #7A4519; color: #fff; }
html section#content_frame table.products tr.selected, html section#content_frame table.products tr:hover { background-color: #9E5E28; }
html section#content_frame table.products tr.selected:hover { background-color: #7A4519; }
html .banner-btn:not(.blue) { background: #9E5E28; }

/* 11. order form: visible labels, optional e-mail, consent line (2026-11-27, question 3) */
div#order-wrapper form label.ord-f { display: flex; flex-direction: column; width: calc(100% - 15px); margin-top: 12px; text-align: left; }
div#order-wrapper form label.ord-f span { font-size: 13px; line-height: 16px; color: #3B2A20; margin-bottom: 4px; }
div#order-wrapper form label.ord-f input, div#order-wrapper form label.ord-f textarea { width: 100%; margin-top: 0; box-sizing: border-box; }
@media (min-width: 600px) { div#order-wrapper form label.ord-f.half { width: calc(50% - 15px); } }
div#order-wrapper form p.ord-consent { width: 100%; margin: 10px 0 0; font-size: 12px; line-height: 16px; color: #6B5A4E; text-align: center; }
div#order-wrapper form p.ord-consent a { color: #3B2A20; text-decoration: underline; }

/* 12. coffee palette extras (2026-11-27, as on serdcekofeyni.ru): light caramel accent on dark brown hero, red PNG advantage icons toned to coffee */
section#first-container .red-text, section#first-container a.red-text { color: #D9A066; }
section#index_advantages img { filter: sepia(1) saturate(1.8) hue-rotate(-12deg) brightness(.72); }

.cookie-modal a, .cookie-content a { color: #D9A066; }
section#index_reviews div.img-placeholder { color: #fff; }
html body section#index_reviews div.review:nth-child(n) div.img-placeholder { color: #fff; }
/* 13. /kofe hero background: was repair-site electronics photo */ html div#service_background { background-image: linear-gradient(to top, #fff, transparent), url('/image/Image_fx-2026-01-20T131015.693.webp'); }

/* 14. product page: number of packages before adding + live sum (2026-11-27) */
.pp-qty { display: inline-flex; align-items: center; height: 44px; border: 1px solid #3B2A20; border-radius: 6px; overflow: hidden; margin-right: 12px; vertical-align: middle; }
.pp-qty button { width: 40px; height: 100%; border: 0; background: #F5EDE3; color: #3B2A20; font-size: 20px; line-height: 1; cursor: pointer; }
.pp-qty button:hover { background: #E3D3C0; }
.pp-qty input { width: 48px; height: 100%; border: 0; text-align: center; font-size: 16px; color: #3B2A20; -moz-appearance: textfield; appearance: textfield; }
.pp-qty input::-webkit-inner-spin-button, .pp-qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pp-sum { display: block; width: 100%; font-size: 14px; color: #3B2A20; margin-top: 6px; }
.pp-sum:empty { display: none; }
.pp-buy:has(.cart-add-widget) .pp-qty { display: none; }

/* 15. product page buy row wraps on narrow screens; sum on its own line */
.pp-buy { flex-wrap: wrap; row-gap: 12px; }
.pp-buy .pp-sum { flex: 1 0 100%; margin-top: 0; }
