/* Catalog pages. Built on the BuildPress grid; accent color matches the theme's buttons. */
.ec-grid { display: flex; flex-wrap: wrap; }
.ec-grid::before, .ec-grid::after { display: none; }
.ec-grid__cell { display: flex; margin-bottom: 30px; }
.ec-grid__cell > * { flex: 1; min-width: 0; }
.ec-tile .page-box__content, .ec-section__body { min-width: 0; overflow-wrap: anywhere; }

.ec-section-title { font-size: 20px; margin: 10px 0 20px; }
.ec-section-title small { font-size: 13px; color: #999; font-weight: normal; margin-left: 8px; }


/* Section tiles */
.ec-tile { height: 100%; background: #fff; border: 1px solid #eee; transition: box-shadow .2s; }
.ec-tile:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.ec-tile__picture { display: flex; align-items: center; justify-content: center; height: 180px; padding: 10px; background: #fff; border-bottom: 1px solid #eee; overflow: hidden; }
.ec-tile__picture img { max-height: 160px; width: auto !important; height: auto; max-width: 100%; margin: 0; object-fit: contain; }
.ec-tile .page-box__content { padding: 15px; }
.ec-tile .page-box__title { font-size: 15px; line-height: 1.3; margin-bottom: 6px; }
.ec-tile__count { color: #999; font-size: 13px; margin: 0 0 8px; }
.ec-tile__subs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; line-height: 1.3; }
.ec-tile__subs li { padding: 0; min-width: 0; max-width: 100%; }
.ec-tile__subs a, .ec-section__subs a { display: inline-block; padding: 3px 9px; border: 1px solid #e3eef1; border-radius: 10px; background: #f6fbfc; color: #2a9fb8; max-width: 100%; overflow-wrap: anywhere; }
.ec-tile__subs a:hover, .ec-section__subs a:hover { background: #45c8e4; border-color: #45c8e4; color: #fff; text-decoration: none; }

/* Product cards */
.ec-card { display: flex; flex-direction: column; border: 1px solid #eee; border-radius: 2px; background: #fff; transition: box-shadow .2s; }
.ec-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.ec-card__picture { display: flex; align-items: center; justify-content: center; height: 200px; padding: 10px; background: #fff; border-bottom: 1px solid #eee; }
.ec-card__picture img { max-height: 180px; width: auto; max-width: 100%; margin: 0; object-fit: contain; }
.ec-card__noimg { display: block; width: 100%; height: 100%; min-height: 120px; background: #f7f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23c5ccd0' stroke-width='2.5' stroke-linejoin='round'%3E%3Cpath d='M32 6 56 18v28L32 58 8 46V18z'/%3E%3Cpath d='M8 18l24 12 24-12M32 30v28'/%3E%3Cpath d='M20 12l24 12'/%3E%3C/svg%3E") center / 56px no-repeat; }
.ec-card__content { display: flex; flex-direction: column; flex: 1; padding: 15px; }
.ec-card__title { font-size: 14px; line-height: 1.35; margin: 0 0 10px; letter-spacing: 0; }
.ec-card__title a { color: #333; }
.ec-card__params { list-style: none; padding: 0; margin: 0 0 12px; font-size: 12px; color: #666; }
.ec-card__params span { color: #999; }
.ec-card__actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ec-card__actions .read-more { font-size: 12px; }

/* Product page */
.ec-gallery__main { display: flex; align-items: center; justify-content: center; min-height: 280px; border: 1px solid #eee; padding: 10px; background: #fff; }
.ec-gallery__main img { max-width: 100%; height: auto; max-height: 420px; width: auto; margin: 0; }
.ec-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ec-gallery__thumbs a { width: 64px; height: 64px; border: 1px solid #eee; display: flex; align-items: center; justify-content: center; }
.ec-gallery__thumbs a.is-active { border-color: #45c8e4; }
.ec-gallery__thumbs img { max-width: 100%; max-height: 100%; width: auto; height: auto; margin: 0; }

.ec-params { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 14px; }
.ec-params th, .ec-params td { padding: 7px 10px; border-bottom: 1px solid #eee; vertical-align: top; text-align: left; }
.ec-params th { width: 45%; color: #888; font-weight: normal; }

.ec-buy { background: #f5f5f5; padding: 20px; border-radius: 2px; }
.ec-buy__price { font-size: 20px; font-weight: bold; color: #333; margin-bottom: 6px; }
.ec-buy__note { font-size: 13px; color: #777; }

.ec-description { margin-bottom: 20px; }
.ec-description table { width: 100%; margin-bottom: 15px; border-collapse: collapse; }
.ec-description td, .ec-description th { border: 1px solid #e5e5e5; padding: 6px 10px; }

.ec-order { background: #f5f5f5; padding: 25px; margin: 30px 0; border-top: 3px solid #45c8e4; }
.ec-order .wpcf7 input[type="text"], .ec-order .wpcf7 input[type="tel"], .ec-order .wpcf7 input[type="email"], .ec-order .wpcf7 textarea { width: 100%; max-width: 520px; }
.ec-order .wpcf7 textarea { height: 110px; }

.ec-cta-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: #f5f5f5; border-left: 3px solid #45c8e4; padding: 20px 25px; margin: 10px 0 30px; }
.ec-cta-banner p { margin: 0; flex: 1; min-width: 240px; }

.ec-pagination { margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 6px; }
.ec-pagination .page-numbers { display: inline-block; min-width: 36px; padding: 6px 10px; text-align: center; border: 1px solid #e5e5e5; color: #333; }
.ec-pagination .page-numbers.current { background: #45c8e4; border-color: #45c8e4; color: #fff; }

/* Section text */
.ec-intro { position: relative; margin: 0 0 10px; line-height: 1.65; }
.ec-intro h3 { font-size: 17px; margin: 22px 0 10px; letter-spacing: 0; text-transform: none; }
.ec-intro p { margin: 0 0 12px; }
.ec-list { margin: 0 0 14px; padding-left: 22px; }
.ec-list li { margin-bottom: 5px; }
.ec-list li::marker { color: #45c8e4; }
.ec-list ul { margin: 6px 0 4px; padding-left: 20px; list-style: circle; }
.ec-intro--collapsed { max-height: 230px; overflow: hidden; }
.ec-intro--collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.ec-intro__more { margin: 0 0 30px; }

.ec-product__title { font-size: 26px; line-height: 1.3; color: #333; margin: 0 0 25px; letter-spacing: 0; text-transform: none; }
@media (max-width: 767px) { .ec-product__title { font-size: 21px; } }

/* Home page: section boxes (theme "Featured Page" markup) with fixed picture frames */
.page-box--block .ec-featured__picture { display: flex; align-items: center; justify-content: center; height: 220px; background: #fff; }
.page-box--block .ec-featured__picture img { max-height: 200px; width: auto; max-width: 100%; object-fit: contain; }
.page-box--inline .ec-featured__picture { display: flex; align-items: center; justify-content: center; width: 100px; height: 75px; background: #fff; }
.page-box--inline .ec-featured__picture img { max-width: 100px; max-height: 75px; width: auto; height: auto; object-fit: contain; }

/* Home page: products with photos */
.ec-grid--home { margin-top: 10px; }
.ec-mini { display: flex; flex-direction: column; width: 100%; border: 1px solid #eee; background: #fff; color: #333; transition: box-shadow .2s; }
.ec-mini:hover, .ec-mini:focus { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); text-decoration: none; color: #333; }
.ec-mini__picture { display: flex; align-items: center; justify-content: center; height: 170px; padding: 10px; border-bottom: 1px solid #eee; }
.ec-mini__picture img { max-height: 150px; width: auto; max-width: 100%; margin: 0; object-fit: contain; }
.ec-mini__cat { display: block; padding: 12px 12px 0; font-size: 11px; text-transform: uppercase; color: #45c8e4; letter-spacing: .5px; }
.ec-mini__title { display: block; padding: 4px 12px 14px; font-size: 13px; line-height: 1.35; }
.ec-home-all { text-align: center; margin: 5px 0 0; }

/* Sidebar tree: the theme highlights every link inside the current item; keep it to the current one. */
.sidebar .widget_nav_menu .menu-ec-catalog-container li.current-menu-item li:not(.current-menu-item) > a { background: #eee; color: #999; }
.sidebar .widget_nav_menu .menu-ec-catalog-container li.current-menu-item li:not(.current-menu-item) > a:hover { background: #57d8f2; color: #454545; }
.panel-grid .widget_ec_products .widget-title { color: #333; }

/* Home page: section grid */
.ec-sections { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin: 10px 0 20px; }
.ec-section { display: flex; flex-direction: column; background: #fff; border: 1px solid #eee; transition: box-shadow .2s, border-color .2s; }
.ec-section:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .08); border-color: #45c8e4; }
.ec-section__picture { display: flex; align-items: center; justify-content: center; height: 150px; padding: 15px; border-bottom: 1px solid #eee; }
.ec-section__picture img { max-height: 120px; width: auto; max-width: 100%; margin: 0; object-fit: contain; transition: transform .25s; }
.ec-section:hover .ec-section__picture img { transform: scale(1.05); }
.ec-section__picture .ec-card__noimg { min-height: 120px; }
.ec-section__body { display: flex; flex-direction: column; flex: 1; padding: 14px 15px 16px; }
.ec-section__title { font-family: "Montserrat", sans-serif; font-weight: bold; font-size: 14px; line-height: 1.3; text-transform: uppercase; color: #333; }
.ec-section__title:hover, .ec-section__title:focus { color: #45c8e4; text-decoration: none; }
.ec-section__count { display: block; margin: 6px 0 8px; font-size: 12px; color: #999; }
.ec-section__subs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; font-size: 12px; line-height: 1.3; }
@media (max-width: 1199px) { .ec-sections { gap: 14px; } .ec-section__title { font-size: 13px; } }
@media (max-width: 991px) { .ec-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .ec-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .ec-section__picture { height: 120px; } .ec-section__picture img { max-height: 95px; } }

/* Title band: product pages show the section name in a div (the H1 is in the content); give it the theme's h1 look.
   The theme's grey subtitle is unreadable on the blue photo background. */
.main-title div.main-title__primary { color: #fff; font-family: Montserrat, Helvetica, Arial, sans-serif; font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; }
.main-title .main-title__secondary { color: rgba(255, 255, 255, .85); border-top-color: rgba(255, 255, 255, .2); }

/* "Наши клиенты" page: uniform logo grid */
.ec-clients__lead { max-width: 820px; margin: 0 0 30px; font-size: 16px; line-height: 1.65; color: #555; }
.ec-clients { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
.ec-client { display: flex; align-items: center; justify-content: center; height: 130px; padding: 16px; background: #fff; border: 1px solid #eee; border-radius: 2px; transition: box-shadow .2s, border-color .2s; }
.ec-client:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .08); border-color: #45c8e4; }
.ec-client img { display: block; max-width: 100%; max-height: 96px; width: auto; height: auto; margin: 0; object-fit: contain; }
@media (max-width: 1199px) { .ec-clients { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 991px) { .ec-clients { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) { .ec-clients { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .ec-client { height: 100px; padding: 10px; } .ec-client img { max-height: 76px; } }
@media (max-width: 479px) { .ec-clients { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
