/* ===== Кнопки ===== */
.btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.4;
  border: 1px solid transparent;
}
.btn-danger { background: #d9534f; color: #fff; border-color: #d43f3a; }
.btn-danger:hover { background: #c9302c; color: #fff; border-color: #ac2925; }
.btn-warning { background: #f0ad4e; color: #fff; border-color: #eea236; }
.btn-warning:hover { background: #ec971f; color: #fff; }
.btn-success { background: #5cb85c; color: #fff; border-color: #4cae4c; }
.btn-success:hover { background: #449d44; color: #fff; }
.btn-info { background: #5bc0de; color: #fff; border-color: #46b8da; }
.btn-info:hover { background: #31b0d5; color: #fff; }

.caret {
  display: inline-block;
  width: 0; height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-top: 5px solid #fff;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}

/* ===== Дропдаун ===== */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 6px 0;
  margin-top: 2px;
  z-index: 1500;
  display: none;
  text-align: left;
}
.dropdown-menu li { display: block; }
.dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.dropdown-menu li a:hover { background: #f5f5f5; color: #d9534f; }
.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu,
.dropdown.open > .dropdown-menu { display: block; }

/* ===== Panel ===== */
.panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.panel-primary { border-color: #007dc6; }
.panel-warning { border-color: #f0ad4e; }
.panel-danger { border-color: #d9534f; }
.panel-success { border-color: #5cb85c; }

.panel-heading {
  padding: 12px 18px;
  background: #007dc6;
  color: #fff;
  border-bottom: 1px solid #007dc6;
  border-radius: 5px 5px 0 0;
}
.panel-warning > .panel-heading { background: #f0ad4e; border-color: #f0ad4e; }
.panel-danger > .panel-heading { background: #d9534f; border-color: #d9534f; }
.panel-success > .panel-heading { background: #5cb85c; border-color: #5cb85c; }
.panel-heading .panel-title { margin: 0; font-size: 18px; line-height: 1.3; color: #fff; font-weight: 600; }
.panel-heading .panel-title a { color: #fff; }

.panel-body { padding: 18px; }
.panel-body img { max-width: 100%; height: auto; }

/* Контейнер карточки продукта (с фоном на одной из колонок) */
.panel-body-product {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  padding: 18px;
}
.panel-body-product > a,
.panel-body-product > img {
  display: inline-flex;
  align-items: flex-end;
}
.panel-body-product img {
  max-height: 200px;
  width: auto;
  height: auto;
  vertical-align: bottom;
}

/* Двухколоночная вёрстка карточки продукта */
.product-two-col {
  display: flex;
  flex-wrap: wrap;
}
.product-two-col .product-image-col {
  flex: 0 0 60%;
  max-width: 60%;
}
.product-two-col .product-image-col + .col-sm-6,
.product-two-col .product-image-col + .col-sm-4 {
  flex: 0 0 40%;
  max-width: 40%;
}

@media (max-width: 767px) {
  .product-two-col .product-image-col,
  .product-two-col .product-image-col + .col-sm-6,
  .product-two-col .product-image-col + .col-sm-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.product-image-col {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-around;
  align-items: flex-end;
  gap: 10px;
  padding: 30px 15px !important;
  min-height: 350px;
}
.product-image-col > a,
.product-image-col > img { display: inline-flex; align-items: flex-end; }
.product-image-col img {
  max-height: 380px;
  width: auto; height: auto;
  vertical-align: bottom;
}

/* Расширенный контейнер для страниц-продуктов */
.product-panel { max-width: 100%; }
.product-panel .panel-body { padding: 20px 30px; }
.product-panel .row > .col-sm-6[style*="background"],
.product-panel .row > .col-sm-8[style*="background"] {
  flex: 0 0 55%;
  max-width: 55%;
}
.product-panel .row > .col-sm-6:not([style*="background"]) {
  flex: 0 0 45%;
  max-width: 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 991px) {
  .product-panel .row > .col-sm-6[style*="background"],
  .product-panel .row > .col-sm-8[style*="background"],
  .product-panel .row > .col-sm-6:not([style*="background"]) {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Универсальная заливка-секция в карточке */
.row > [class*="col-sm"][style*="background"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 30px 15px;
  min-height: 350px;
}
.row > [class*="col-sm"][style*="background"] > a,
.row > [class*="col-sm"][style*="background"] > img {
  display: inline-flex;
  align-items: center;
}
.row > [class*="col-sm"][style*="background"] img {
  max-height: 420px;
  width: auto;
  height: auto;
}

/* ===== masonry-gallery (медали, сертификаты) ===== */
.masonry-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 10px 0;
}
.masonry-gallery.columns-2 { grid-template-columns: repeat(2, 1fr); }
.masonry-gallery.columns-3 { grid-template-columns: repeat(3, 1fr); }
.masonry-gallery.columns-4 { grid-template-columns: repeat(4, 1fr); }
.masonry-gallery.columns-5 { grid-template-columns: repeat(5, 1fr); }

.masonry-gallery a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform .2s, box-shadow .2s;
}
.masonry-gallery a:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.masonry-gallery img { width: 100%; height: auto; display: block; object-fit: contain; }

@media (max-width: 991px) {
  .masonry-gallery.columns-5 { grid-template-columns: repeat(3, 1fr); }
  .masonry-gallery.columns-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 575px) {
  .masonry-gallery,
  .masonry-gallery.columns-2,
  .masonry-gallery.columns-3,
  .masonry-gallery.columns-4,
  .masonry-gallery.columns-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Галерея наград внутри col-sm-6 (страница "О компании") */
.panel-body > .col-sm-6 > .masonry-gallery,
.awards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 10px 0;
}
.panel-body > .col-sm-6 > .masonry-gallery a,
.awards-grid a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform .2s, box-shadow .2s;
}
.panel-body > .col-sm-6 > .masonry-gallery a:hover,
.awards-grid a:hover { transform: scale(1.05); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.panel-body > .col-sm-6 > .masonry-gallery img,
.awards-grid img { width: 100%; height: auto; min-height: 110px; object-fit: contain; }

@media (max-width: 575px) {
  .panel-body > .col-sm-6 > .masonry-gallery,
  .awards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Лайтбокс ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  padding: 30px;
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  display: block;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.6);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { top: 50%; left: 24px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 24px; transform: translateY(-50%); }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.3); }

/* ===== Контакты ===== */
.contacts-block iframe { width: 100%; min-height: 500px; border: 0; }
.contacts-block .map-image { display: block; max-width: 100%; height: auto; margin: 12px 0; }

/* ===== Sweet drinks panel (компактный) ===== */
.sweet-drinks-panel { width: 100%; }
.sweet-drinks-panel .panel-body { padding: 30px; }
.sweet-drinks-card-image-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}
.sweet-drinks-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 991px) {
  .sweet-drinks-card-image-wrap { height: 200px; }
}

