/* Override битого layout-fixes.css: .catalog/.product { visibility:hidden !important } */
.content .container .page_catalog .catalog,
.content .container .page_catalog .catalog #catalog-items-container,
.content .container .page_catalog .catalog .product,
.content .container .page_catalog .catalog #catalog-items-container > [class*="col-"] {
  visibility: visible !important;
}
.content .container .page_catalog .catalog {
  display: block !important;
}
@media (max-width: 768px) {
  .desktop-filter-bar-wrap { display: none !important; }
}
@media (max-width: 767px) {
  .page_catalog .catalog #catalog-items-container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .page_catalog .catalog #catalog-items-container > [class*="col-"] {
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
  }
}
@media (min-width: 769px) {
  .mobile-filter-fields,
  .mobile-filter-stack { display: none !important; }
  body.desktop-filter-bar-active .page_catalog .catalog-filter-section,
  body.desktop-filter-bar-active .page_catalog .row.catalog_filters {
    display: none !important;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .page_catalog .catalog #catalog-items-container {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch;
  }
  .page_catalog .catalog #catalog-items-container > [class*="col-"] {
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
  }
}
@media (min-width: 992px) {
  .page_catalog .catalog #catalog-items-container {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch;
  }
  .page_catalog .catalog #catalog-items-container > [class*="col-"] {
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
  }
}

/* Стили карточки товара: раньше стояли <style> в теле itemview.tpl и tsvety_tiles.tpl. */

                    .custom-bouquet-card {
                      position: relative;
                      overflow: hidden;
                      margin: 0 0 14px;
                      width: 100%;
                      max-width: 100%;
                      padding: 16px;
                      border: 1px solid rgba(96, 150, 125, 0.22);
                      border-radius: 18px;
                      background:
                        radial-gradient(circle at top right, rgba(96, 150, 125, 0.16), transparent 34%),
                        linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
                      box-shadow: 0 14px 34px rgba(38, 70, 55, 0.1);
                    }
                    .custom-bouquet-card__top {
                      display: flex;
                      align-items: flex-start;
                      justify-content: space-between;
                      flex-wrap: wrap;
                      gap: 8px 10px;
                      margin-bottom: 14px;
                    }
                    .custom-bouquet-card__eyebrow {
                      margin-bottom: 3px;
                      color: #60967d;
                      font-size: 12px;
                      font-weight: 700;
                      letter-spacing: .04em;
                      text-transform: uppercase;
                    }
                    .custom-bouquet-card__title {
                      color: #24313a;
                      font-size: clamp(18px, 2.2vw, 20px);
                      font-weight: 800;
                      line-height: 1.2;
                    }
                    .custom-bouquet-card__badge {
                      max-width: 100%;
                      padding: 6px 9px;
                      border: 1px solid rgba(96, 150, 125, 0.2);
                      border-radius: 12px;
                      background: #eef8f3;
                      color: #3d6f5b;
                      font-size: 11px;
                      font-weight: 700;
                      line-height: 1.25;
                      white-space: normal;
                    }
                    .custom-bouquet-card__section {
                      margin: 0 0 14px;
                      padding: 0;
                      border: 0;
                    }
                    .custom-bouquet-card__section:last-child {
                      margin-bottom: 0;
                    }
                    .custom-bouquet-card__label {
                      display: block;
                      margin: 0 0 8px;
                      color: #2f3f37;
                      font-size: 13px;
                      font-weight: 800;
                    }
                    .custom-bouquet-card__section:first-of-type {
                      text-align: center;
                    }
                    .custom-bouquet-budget {
                      display: inline-flex;
                      align-items: center;
                      justify-content: center;
                      gap: 3px;
                      width: auto;
                      max-width: 170px;
                      min-height: 42px;
                      padding: 4px 10px;
                      border: 1px solid rgba(96, 150, 125, 0.26);
                      border-radius: 14px;
                      background: #fff;
                      box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
                    }
                    .custom-bouquet-budget__currency {
                      color: #6a7d73;
                      font-size: 13px;
                      font-weight: 700;
                    }
                    .custom-bouquet-budget__input {
                      width: 74px !important;
                      min-width: 0;
                      flex: 0 0 74px;
                      height: 32px !important;
                      padding: 0 !important;
                      border: 0 !important;
                      box-shadow: none !important;
                      background: transparent !important;
                      color: #25382f;
                      font-size: clamp(18px, 2.6vw, 22px) !important;
                      font-weight: 800;
                      line-height: 1;
                      text-align: right;
                    }
                    .custom-bouquet-budget__input:focus {
                      outline: none;
                    }
                    .custom-bouquet-chips {
                      display: flex;
                      flex-wrap: wrap;
                      gap: 7px;
                      margin-top: 10px;
                    }
                    .custom-bouquet-chip {
                      flex: 1 1 58px;
                      min-width: 0;
                      padding: 7px 8px;
                      border: 1px solid #d7ebe2;
                      border-radius: 999px;
                      background: #fff;
                      color: #3f5b4f;
                      cursor: pointer;
                      font-size: 13px;
                      font-weight: 800;
                      transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
                    }
                    .custom-bouquet-chip:hover,
                    .custom-bouquet-chip.active {
                      border-color: transparent;
                      background: linear-gradient(135deg, #60967d 0%, #4a7c59 100%);
                      color: #fff;
                      transform: translateY(-1px);
                    }
                    .custom-bouquet-hint,
                    .custom-bouquet-card__note {
                      margin: 8px 0 0;
                      color: #6b7b73;
                      font-size: 12px;
                      line-height: 1.4;
                    }
                    .custom-bouquet-card__textarea {
                      min-height: 96px;
                      resize: vertical;
                      border: 1px solid rgba(96, 150, 125, 0.24) !important;
                      border-radius: 14px !important;
                      background: #fff !important;
                      box-shadow: none !important;
                      font-size: 14px;
                      line-height: 1.45;
                    }
                    .custom-bouquet-card__textarea:focus,
                    .custom-bouquet-budget:focus-within {
                      border-color: #60967d !important;
                      box-shadow: 0 0 0 4px rgba(96, 150, 125, 0.13) !important;
                    }
                    @media (max-width: 575px) {
                      .custom-bouquet-card {
                        padding: 14px;
                        border-radius: 16px;
                      }
                      .custom-bouquet-card__badge {
                        display: inline-flex;
                        margin-top: 2px;
                      }
                      .custom-bouquet-card__title {
                        font-size: 18px;
                      }
                    }
                    @media (min-width: 576px) and (max-width: 1199px) {
                      .custom-bouquet-card__top {
                        display: block;
                      }
                      .custom-bouquet-card__badge {
                        display: inline-flex;
                        margin-top: 8px;
                      }
                    }
                    

.model-option-card:hover {
              border-color: #60967d !important;
              box-shadow: 0 4px 12px rgba(96, 150, 125, 0.15) !important;
              transform: translateY(-2px);
            }
            .model-radio-input:checked + .model-option-content .model-radio-custom {
              border-color: #60967d !important;
              background: #f0f7f3;
            }
            .model-radio-input:checked + .model-option-content .model-radio-dot {
              transform: translate(-50%, -50%) scale(1) !important;
            }
            .model-radio-input:checked ~ .model-option-content,
            .model-radio-input:checked ~ .model-option-price {
              color: #60967d;
            }
            .model-option-card:has(.model-radio-input:checked) {
              border-color: #60967d !important;
              background: #f8fbf9 !important;
              box-shadow: 0 4px 16px rgba(96, 150, 125, 0.2) !important;
            }

        #upsell-emotion{margin:16px 0 10px; text-align:center;}
        #upsell-emotion .hdr{display:flex;align-items:center;justify-content:center;margin-bottom:10px}
        #upsell-emotion .hdr .title{font-weight:700;font-size:20px}
        #upsell-emotion .upsell-card{
          background:#fff;border:1px solid #eef2ef;border-radius:12px;box-shadow:0 6px 20px rgba(96,150,125,.08);padding:10px;
          display:flex;flex-direction:column;height:100%;
        }
        #upsell-emotion .upsell-card .ph{width:100%;height:140px;background:#f6f8f7;border-radius:10px;background-size:cover;background-position:center}
        #upsell-emotion .upsell-card .nm{margin:8px 0 6px;font-weight:500;min-height:38px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-align:left;}
        #upsell-emotion .upsell-card .pr{color:#2e7d32;font-weight:700;margin-bottom:8px;text-align:left;}
        #upsell-emotion .upsell-card .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:linear-gradient(135deg,#60967d 0%, #4a7c59 100%);color:#fff;border:none;border-radius:10px;padding:8px 12px;cursor:pointer;margin-top:auto;width:100%;}
        #upsell-emotion .upsell-card .btn:hover{filter:brightness(.95)}
        

      #recent-viewed{margin:16px 0 10px; display:block !important; visibility:visible !important; position:relative; z-index:0; overflow:visible !important;}
      #recent-viewed:before{content:none;}
      #recent-viewed .row{margin-left:-15px !important; margin-right:-15px !important; display:flex !important; flex-wrap:wrap !important;}
      #recent-viewed .title{font-weight:800;font-size:20px;margin:8px 0 12px;text-align:left;color:#4a7c59;}
      #recent-viewed .title:after{content:none !important; display:none !important; width:0; height:0;}
      #recent-viewed .rv-card{
        position:relative;z-index:1;background:#fff;border:1px solid #eef2ef;border-radius:12px;box-shadow:0 6px 20px rgba(96,150,125,.08);padding:10px;
        display:flex;flex-direction:column;height:100%;
      }
      #recent-viewed .rv-card .ph{width:100%;height:140px;background:#f6f8f7;border-radius:10px;background-size:cover;background-position:center}
      #recent-viewed .rv-card .nm{margin:8px 0 6px;font-weight:500;min-height:38px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-align:left;color:#2b4a3c;transition:color .15s ease;}
      #recent-viewed .rv-card a:hover .nm,
      #recent-viewed .rv-card a:focus .nm{color:#28a745 !important;}
      #recent-viewed .rv-card .pr{color:#2e7d32;font-weight:800;margin-bottom:8px;text-align:left;}
      #recent-viewed .rv-card .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:#fff;color:#2e7d32;border:1px solid #cfe8da;border-radius:10px;padding:8px 12px;cursor:pointer;margin-top:auto;width:100%;min-width:0;}
      #recent-viewed .rv-card .btn:hover{background:linear-gradient(135deg,#60967d 0%, #4a7c59 100%);color:#fff;border-color:transparent}
      #recent-viewed .rv-card:before{content:'Недавно';position:absolute;top:8px;left:8px;background:#eaf6f0;color:#2e7d32;border:1px solid #cfe8da;border-radius:999px;font-size:11px;line-height:1;padding:3px 8px;font-weight:700;}
      

/* Компактные однотонные плитки в цвет сайта */
		.flower-tiles .chip a {
			display: inline-block; /* чип — ширина по контенту */
			border-radius: 12px;
			padding: 12px 18px;
			color: #28a745; /* фирменный зелёный текст */
			text-decoration: none;
			border: 1px solid rgba(40,167,69,.25);
			background: rgba(40,167,69,.08); /* светлый брендовый фон */
			transition: background-color .12s ease, border-color .12s ease;
			font-weight: 600; font-size: 16px; line-height: 1.35;
			min-height: 44px;
		}
		.flower-tiles .chip a:hover {
			background: rgba(40,167,69,.12);
			border-color: rgba(40,167,69,.35);
		}
		/* Контейнер чипов — перенос строк и компактные отступы */
		.tiles-wrap {
			display: flex; flex-wrap: wrap; gap: 8px;
		}
		.flower-tiles .chip { padding: 0; margin: 0; flex: 0 0 auto; width: auto !important; }
		/* Текст раздела */
		.catalog-text { margin: 10px; }
		.catalog-tiles-hub-wrap { position: relative; }
