/* ============================================================
   Магазин игрушек «Радуга» — оформление сайта на WordPress.
   Файл подключается как MU-плагин: wp-content/mu-plugins/raduga.css
   Приводит внешний вид CMS-сайта к дизайну задания 1.
   ============================================================ */

/* ---------- Общие настройки ---------- */

:root {
  --r-blue: #2B5B8F;
  --r-dark: #1A3550;
  --r-orange: #F39C12;
  --r-orange-dark: #D68910;
  --r-red: #E74C3C;
  --r-text: #2C3E50;
  --r-muted: #5D6D7E;
  --r-border: #D5D8DC;
  --r-bg: #F5F7FA;
}

body,
button, input, select, textarea,
.ast-button, .ast-custom-button {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
  font-size: 12pt;
  color: var(--r-text);
}

body {
  background: var(--r-bg) !important;
}

a {
  color: var(--r-blue);
}

a:hover, a:focus {
  color: var(--r-red);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
}

/* Контейнер: ограничиваем ширину, как у статического сайта */
.ast-container {
  max-width: 1040px;
}

/* Двухколоночный макет: контент + боковая колонка */
#content.site-content {
  padding-top: 22px;
}

.site-content > .ast-container {
  display: flex !important;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}

#primary.content-area.primary,
main#main.site-main {
  flex: 1 1 0;
  width: auto !important;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

#primary.content-area.primary {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 26px 30px 30px !important;
  box-shadow: 0 2px 10px rgba(43, 91, 143, 0.07);
}

#secondary.widget-area.secondary {
  flex: 0 0 280px;
  width: 280px !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  border: 0;
}

/* ---------- Шапка: логотип + название ---------- */

.site-header {
  background: #FFFFFF !important;
  border-bottom: 4px solid var(--r-orange) !important;
}

.site-header .ast-primary-header-bar {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Двухъярусная шапка: строка бренда, под ней синяя полоса меню */
.site-header .site-primary-header-wrap.ast-container {
  padding-left: 0;
  padding-right: 0;
}

.site-header .site-primary-header-wrap .ast-builder-grid-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center;
  column-gap: 0;
}

.site-header .site-header-primary-section-left {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  padding: 2px 24px 12px;
}

.site-header .site-header-primary-section-right {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  background: var(--r-blue);
  padding: 0;
}

.site-header .site-header-primary-section-right .main-navigation {
  width: 100%;
  justify-content: center;
}

.site-branding.ast-site-identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-logo-img .custom-logo,
img.custom-logo {
  height: 70px !important;
  width: auto !important;
  max-width: 260px !important;
}

.site-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 22pt !important;
  line-height: 1.15 !important;
  white-space: nowrap;
}

.site-title a {
  color: var(--r-blue) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px;
}

.site-description {
  display: none !important;
}

.site-header .ast-site-title-wrap {
  display: block;
}

.site-header-primary-section-left {
  flex: 0 0 auto;
}

.site-header-primary-section-right {
  flex: 1 1 auto;
  justify-content: flex-end;
}

/* ---------- Меню ---------- */

.main-header-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-header-menu > li {
  margin: 0 2px;
}

.main-header-menu > li > a.menu-link {
  display: block;
  padding: 11px 13px !important;
  color: #FFFFFF !important;
  font-size: 11pt;
  font-weight: 700;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  text-decoration: none;
}

.main-header-menu > li > a.menu-link:hover,
.main-header-menu > li:hover > a.menu-link {
  background: var(--r-orange);
  color: var(--r-dark) !important;
}

.main-header-menu > li.current-menu-item > a.menu-link,
.main-header-menu > li.current_page_item > a.menu-link {
  background: var(--r-orange);
  color: var(--r-dark) !important;
  border-bottom-color: var(--r-orange-dark);
}

/* ---------- Заголовки и текст ---------- */

.entry-title,
h1 {
  font-size: 20pt !important;
  color: var(--r-blue) !important;
  font-weight: 700 !important;
  border-bottom: 3px solid var(--r-orange);
  padding-bottom: 8px;
  margin: 0 0 16px !important;
  line-height: 1.25;
}

h2, .entry-content h2 {
  font-size: 16pt !important;
  color: var(--r-blue) !important;
  margin: 22px 0 10px !important;
  line-height: 1.3;
}

h3, .entry-content h3 {
  font-size: 13pt !important;
  color: #E67E22 !important;
  margin: 14px 0 6px !important;
}

h4, .entry-content h4 {
  font-size: 12pt !important;
  color: var(--r-text) !important;
  margin: 10px 0 4px !important;
}

.entry-content p,
.site-content p {
  font-size: 12pt;
  line-height: 1.5;
  margin: 0 0 10px;
  text-align: justify;
}

.small {
  font-size: 10pt;
  color: var(--r-muted);
}

strong, b {
  color: var(--r-dark);
}

em, i {
  color: var(--r-muted);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border: 0;
}

/* ---------- Таблицы (прайс-лист, характеристики) ---------- */

.entry-content table,
.site-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0 16px;
  font-size: 11pt;
}

.entry-content table th,
.entry-content table td {
  border: 1px solid var(--r-border);
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}

.entry-content table th {
  background: var(--r-blue);
  color: #FFFFFF;
  font-weight: 700;
}

.entry-content table tr:nth-child(even) td {
  background: #F4F6F7;
}

/* ---------- Слайдер на главной ---------- */

#slider {
  position: relative;
  margin: 0 0 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  background: #F4F6F7;
}

#slider img#slide {
  display: block;
  width: 100% !important;
  height: 300px !important;
  object-fit: cover;
  margin: 0;
}

#slider button {
  position: absolute;
  top: 50%;
  margin-top: -24px;
  width: 48px;
  height: 48px;
  font-size: 16pt;
  line-height: 1;
  color: #FFFFFF;
  background: rgba(26, 53, 80, 0.55);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  padding: 0;
}

#slider button:hover {
  background: var(--r-orange);
  color: var(--r-dark);
}

#prev { left: 12px; }
#next { right: 12px; }

/* ---------- Преимущества ---------- */

.benefits {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0 8px;
}

.benefit {
  flex: 1 1 180px;
  background: #F4F6F7;
  border-top: 4px solid var(--r-orange);
  border-radius: 8px;
  padding: 14px 16px;
}

.benefit h3 {
  margin-top: 0 !important;
}

.benefit p {
  font-size: 10.5pt;
  margin-bottom: 0;
}

/* ---------- Карточки товаров ---------- */

.products {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.card {
  width: 296px;
  max-width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--r-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card img {
  display: block;
  width: 100% !important;
  height: 200px !important;
  object-fit: cover;
  margin: 0;
}

.card .card-body {
  padding: 12px 14px 14px;
}

.card h3 {
  margin: 0 0 6px !important;
  font-size: 12.5pt !important;
}

.card h3 a {
  color: var(--r-blue);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--r-red);
}

.card .price {
  font-weight: 700;
  color: var(--r-red);
  font-size: 12pt;
  margin: 4px 0 0;
}

/* ---------- Каталог: строки категорий ---------- */

.cat-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid #E5E7E9;
  border-radius: 8px;
  background: #FBFCFD;
}

.cat-row img {
  width: 200px !important;
  height: 150px !important;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--r-border);
  margin: 0;
}

.cat-row h3 {
  margin: 0 0 6px !important;
}

/* ---------- Новости ---------- */

.news-item {
  display: flex;
  gap: 20px;
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--r-border);
}

.news-item img {
  width: 320px !important;
  height: 190px !important;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--r-border);
  margin: 0;
}

.news-item .date {
  font-size: 10pt;
  color: #E67E22;
  font-weight: 700;
  margin-bottom: 4px;
}

/* ---------- Фотогалерея ---------- */

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.gallery .item {
  width: 292px;
  max-width: 100%;
  background: #F4F6F7;
  border: 1px solid var(--r-border);
  border-radius: 8px;
  padding: 8px;
}

.gallery .item img {
  display: block;
  width: 100% !important;
  height: 170px !important;
  object-fit: cover;
  border-radius: 6px;
  margin: 0;
  cursor: zoom-in;
}

.gallery .item p {
  font-size: 10pt;
  text-align: center;
  margin: 6px 0 2px;
  color: var(--r-muted);
}

/* ---------- Товар (подробная страница) ---------- */

.product-detail {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.product-detail .product-photo {
  width: 400px;
  max-width: 100%;
  border: 1px solid var(--r-border);
  border-radius: 8px;
  overflow: hidden;
}

.product-detail .product-photo img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  margin: 0;
}

.product-detail .product-info {
  flex: 1;
  min-width: 260px;
}

.product-detail .price-big {
  font-size: 16pt;
  font-weight: 700;
  color: var(--r-red);
  margin: 8px 0 14px;
}

/* ---------- Кнопки ---------- */

.btn,
.entry-content a.btn,
.wpcf7 input[type="submit"],
.wpcf7 button[type="submit"] {
  display: inline-block;
  background: var(--r-orange);
  color: var(--r-dark) !important;
  padding: 9px 22px;
  font-size: 11pt;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  border: 0;
  border-bottom: 3px solid var(--r-orange-dark);
  cursor: pointer;
}

.btn:hover,
.wpcf7 input[type="submit"]:hover,
.wpcf7 button[type="submit"]:hover {
  background: #F5B041;
  color: var(--r-dark) !important;
}

/* ---------- Яндекс-карта ---------- */

.map-frame iframe {
  display: block;
  width: 100% !important;
  height: 420px !important;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* ---------- Боковая колонка (виджеты) ---------- */

#secondary .widget {
  background: #FFFFFF;
  border: 1px solid #E5E7E9;
  border-top: 4px solid var(--r-orange);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(43, 91, 143, 0.07);
}

#secondary .widget-title,
#secondary .wp-block-heading {
  font-size: 12pt !important;
  color: var(--r-blue) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px !important;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--r-orange);
}

#secondary .widget p,
#secondary .widget li {
  font-size: 10.5pt;
  line-height: 1.5;
}

/* Виджет поиска */
#secondary .wp-block-search__label {
  display: none;
}

#secondary .wp-block-search__inside-wrapper {
  display: flex;
  gap: 6px;
}

#secondary .wp-block-search__input,
#secondary input[type="search"],
#secondary input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 12pt;
  border: 1px solid #AAB7C4;
  border-radius: 6px;
  background: #FFFFFF;
  box-sizing: border-box;
}

#secondary .wp-block-search__button,
#secondary input[type="submit"] {
  background: var(--r-blue);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 11pt;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

#secondary .wp-block-search__button:hover,
#secondary input[type="submit"]:hover {
  background: var(--r-orange);
  color: var(--r-dark);
}

/* Форма обратной связи (Contact Form 7) */
.wpcf7 p,
.wpcf7 label {
  font-size: 10.5pt;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 12pt;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--r-text);
  border: 1px solid #AAB7C4;
  border-radius: 6px;
  background: #FFFFFF;
  box-sizing: border-box;
  margin-top: 4px;
}

.wpcf7 textarea {
  height: 110px;
  resize: vertical;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: 2px solid var(--r-orange);
  border-color: var(--r-orange);
}

.wpcf7 input[type="submit"],
.wpcf7 button[type="submit"] {
  width: auto;
  margin-top: 6px;
}

/* ---------- Подвал сайта ---------- */

.site-footer,
#colophon,
.site-below-footer-wrap {
  display: none !important;
}

#raduga-footer {
  background: var(--r-dark);
  color: #D6EAF8;
  font-size: 10pt;
  margin-top: 34px;
  padding: 24px 24px 0;
}

#raduga-footer .raduga-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

#raduga-footer .raduga-footer-col {
  flex: 1 1 260px;
  min-width: 220px;
  line-height: 1.55;
}

#raduga-footer .raduga-footer-title {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 11pt;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px;
}

#raduga-footer p {
  margin: 0 0 6px;
  text-align: left;
}

#raduga-footer a {
  color: #F5B041;
  text-decoration: none;
}

#raduga-footer a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

#raduga-footer .raduga-footer-counter {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed #5D8DBF;
  border-radius: 6px;
  padding: 8px 10px;
  color: #F1C40F;
}

#raduga-footer .raduga-footer-clock {
  color: #9FB7CC;
  font-size: 10pt;
}

#raduga-footer .raduga-footer-bottom {
  max-width: 1040px;
  margin: 18px auto 0;
  padding: 10px 0 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  color: #9FB7CC;
}

/* ---------- Лайтбокс ---------- */

#raduga-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 100000;
  text-align: center;
  padding: 20px;
  cursor: pointer;
}

#raduga-lightbox img {
  max-width: 92%;
  max-height: 82%;
  margin-top: 1%;
  border: 4px solid #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
}

#raduga-lightbox .raduga-lb-caption {
  color: #FFFFFF;
  font-size: 13pt;
  margin-top: 12px;
}

#raduga-lightbox .raduga-lb-hint {
  color: #BDC3C7;
  font-size: 10pt;
  margin-top: 4px;
}

/* ---------- Адаптивность ---------- */

@media (max-width: 921px) {
  .site-content > .ast-container {
    flex-direction: column;
  }

  #secondary.widget-area.secondary {
    flex: 1 1 auto;
    width: 100% !important;
  }

  /* мобильное меню: возвращаем обычные цвета */
  .site-header .site-header-primary-section-right {
    background: transparent;
  }

  .site-header .site-header-primary-section-left {
    padding-left: 16px;
    padding-right: 16px;
  }

  .main-header-menu > li > a.menu-link {
    color: var(--r-blue) !important;
  }

  .site-title {
    font-size: 16pt !important;
    white-space: normal;
  }

  .news-item,
  .cat-row,
  .product-detail {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-item img,
  .cat-row img,
  .product-detail .product-photo {
    width: 100% !important;
  }

  .benefits {
    flex-direction: column;
  }
}
