/* ========================================
   DivaRoza Showcase — Витрина, табы, карточки
   v2.8.0
   ======================================== */

.bouquet-showcase { padding: 40px 0 64px; background: var(--color-light); }
.showcase-header { text-align: center; margin-bottom: 36px; }
.showcase-title { font-size: clamp(28px, 4vw, 42px); font-weight: 700; margin-bottom: 8px; letter-spacing: -0.5px; }
.showcase-subtitle { font-size: 16px; color: var(--color-gray); }

/* Табы */
.showcase-tabs-wrapper { display: flex; align-items: center; gap: 4px; margin-bottom: 40px; }
.showcase-tabs { display: flex; gap: 4px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; flex-wrap: nowrap; padding: 5px; background: var(--color-light); border-radius: var(--radius-full); flex: 1; }
.showcase-tabs::-webkit-scrollbar { display: none; }
.tabs-arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-white); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; transition: all var(--transition-fast); }
.tabs-arrow:hover { border-color: var(--color-primary); color: var(--color-primary); }
.showcase-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; background: transparent; border: none; border-radius: var(--radius-full); font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--color-gray); cursor: pointer; transition: all var(--transition-base); white-space: nowrap; outline: none; line-height: 1; }
.showcase-tab .ph { font-size: 18px; color: inherit; transition: inherit; }
.showcase-tab:hover { color: var(--color-dark); }
.showcase-tab.active { background: var(--color-white); color: var(--color-dark); font-weight: 600; box-shadow: var(--shadow-md); }
.showcase-tab.active .ph { color: var(--color-primary); }

/* Сетка */
.showcase-grid { display: grid; gap: 12px; transition: opacity 0.3s ease; }
.showcase-grid[data-per-row="6"] { grid-template-columns: repeat(6, 1fr); }
.showcase-grid[data-per-row="5"] { grid-template-columns: repeat(5, 1fr); }
.showcase-grid[data-per-row="4"] { grid-template-columns: repeat(4, 1fr); }
.showcase-grid[data-per-row="3"] { grid-template-columns: repeat(3, 1fr); }
.showcase-grid.is-loading { opacity: 0.5; pointer-events: none; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Карточка */
.petal-card { background: var(--color-white); border-radius: var(--radius-md); overflow: visible; display: flex; flex-direction: column; position: relative; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease; animation: petalBloom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; transform-origin: center bottom; height: 100%; }
.petal-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-lg); z-index: 2; }
@keyframes petalBloom { from { opacity: 0; transform: scale(0.7) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.petal-card:nth-child(1) { animation-delay: 0.03s; } .petal-card:nth-child(2) { animation-delay: 0.06s; } .petal-card:nth-child(3) { animation-delay: 0.09s; } .petal-card:nth-child(4) { animation-delay: 0.12s; } .petal-card:nth-child(5) { animation-delay: 0.15s; } .petal-card:nth-child(6) { animation-delay: 0.05s; } .petal-card:nth-child(7) { animation-delay: 0.08s; } .petal-card:nth-child(8) { animation-delay: 0.11s; } .petal-card:nth-child(9) { animation-delay: 0.14s; } .petal-card:nth-child(10) { animation-delay: 0.17s; }
.petal-card-image { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--color-light); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.petal-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.petal-card:hover .petal-card-image img { transform: scale(1.08); }
.petal-badge { position: absolute; top: 10px; left: 10px; background: #FF6B8A; color: var(--color-white); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; font-size: 16px; line-height: 1; }
.petal-category { position: absolute; bottom: 8px; left: 8px; background: rgba(30,30,30,0.7); backdrop-filter: blur(6px); color: var(--color-white); font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: var(--radius-xs); letter-spacing: 0.3px; text-transform: uppercase; z-index: 2; }
.petal-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; justify-content: space-between; }
.petal-card-title { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--color-dark); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; min-height: 34px; }
.petal-card-title a { color: inherit; } .petal-card-title a:hover { color: var(--color-primary); }
.petal-card-price { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--color-dark); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.petal-price-old { font-size: 14px; color: var(--color-gray-light); text-decoration: line-through; font-weight: 400; margin-right: 4px; }
.petal-price-new { color: var(--color-primary); }
.petal-card-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 100%; padding: 8px 10px; background: #E65476 !important; color: var(--color-white) !important; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 12px; font-weight: 600; transition: all var(--transition-base); margin-top: auto; border: none; cursor: pointer; text-decoration: none !important; box-shadow: 0 2px 8px rgba(230,84,118,0.15); }
.petal-card-btn:hover { background: var(--color-primary-hover) !important; box-shadow: 0 4px 14px rgba(230,84,118,0.3); transform: translateY(-1px); color: var(--color-white) !important; }
.petal-card-btn.loading { opacity: 0.7; pointer-events: none; }
.petal-card-btn.in-cart { background: var(--color-green) !important; padding: 0 !important; cursor: default; }
.qty-controls { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 36px; }
.qty-btn-card { width: 32px; height: 36px; background: transparent; border: none; color: var(--color-white); font-size: 18px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.qty-btn-card:hover { background: rgba(255,255,255,0.2); }
.qty-value-card { flex: 1; text-align: center; font-size: 14px; font-weight: 700; color: var(--color-white); }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.petal-card-btn .ph-circle-notch { animation: spin 0.8s linear infinite; }

/* Спиннер */
.showcase-loader, .catalog-loader { text-align: center; padding: 32px 0; }
.flower-spinner { position: relative; width: 48px; height: 48px; margin: 0 auto; }
.flower-spinner .petal { position: absolute; width: 16px; height: 16px; background: var(--color-primary); border-radius: 50% 0 50% 0; top: 50%; left: 50%; opacity: 0.4; animation: flowerSpin 1.5s ease-in-out infinite; }
.flower-spinner .petal:nth-child(1) { transform: translate(-50%,-50%) rotate(0deg) translateY(-14px); animation-delay: 0s; }
.flower-spinner .petal:nth-child(2) { transform: translate(-50%,-50%) rotate(60deg) translateY(-14px); animation-delay: 0.1s; }
.flower-spinner .petal:nth-child(3) { transform: translate(-50%,-50%) rotate(120deg) translateY(-14px); animation-delay: 0.2s; }
.flower-spinner .petal:nth-child(4) { transform: translate(-50%,-50%) rotate(180deg) translateY(-14px); animation-delay: 0.3s; }
.flower-spinner .petal:nth-child(5) { transform: translate(-50%,-50%) rotate(240deg) translateY(-14px); animation-delay: 0.4s; }
.flower-spinner .petal:nth-child(6) { transform: translate(-50%,-50%) rotate(300deg) translateY(-14px); animation-delay: 0.5s; }
@keyframes flowerSpin { 0%, 100% { opacity: 0.3; transform: rotate(0deg) translateY(-14px) scale(0.8); } 50% { opacity: 1; transform: rotate(180deg) translateY(-14px) scale(1.2); } }
.showcase-more, .catalog-more { text-align: center; margin-top: 32px; }

/* Каталог */
.catalog-page { padding: 0 0 64px; }
.catalog-header { padding-top: 32px; margin-bottom: 16px; }
.catalog-title { font-size: clamp(24px, 3vw, 36px); font-weight: 700; }
.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }

/* Сайдбар */
.catalog-sidebar { position: sticky; top: 140px; background: var(--color-white); padding: 24px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.sidebar-widget { margin-bottom: 28px; }
.sidebar-widget:last-child { margin-bottom: 0; }
.sidebar-title { font-family: var(--font-body); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-dark); margin: 0 0 14px; }
.sidebar-cats { list-style: none; padding: 0; margin: 0; }
.sidebar-cats li { margin-bottom: 2px; }
.sidebar-cats a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: var(--radius-xs); font-size: 14px; color: var(--color-gray); transition: all var(--transition-fast); }
.sidebar-cats a:hover { background: var(--color-light); color: var(--color-dark); }
.sidebar-cats a.active { background: var(--color-primary-light); color: var(--color-primary); font-weight: 600; }
.cat-count { font-size: 12px; color: var(--color-gray-light); background: var(--color-light); padding: 2px 8px; border-radius: var(--radius-full); }
.sidebar-cats a.active .cat-count { background: var(--color-primary); color: var(--color-white); }

/* Тулбар */
.catalog-toolbar { display: flex; justify-content: flex-end; margin-bottom: 20px; padding: 12px 16px; background: var(--color-white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.catalog-sort { display: flex; align-items: center; gap: 10px; }
.sort-label { font-size: 13px; color: var(--color-gray); white-space: nowrap; }
.filter-select { min-width: 180px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-xs); font-family: var(--font-body); font-size: 13px; background: var(--color-white); outline: none; }

/* Ценовой ползунок */
.price-slider-values { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: var(--color-dark); margin-bottom: 12px; }
.price-slider-track { position: relative; height: 6px; background: var(--color-border); border-radius: 3px; margin: 0 0 16px; }
.price-slider-range { position: absolute; top: 0; height: 100%; background: var(--color-primary); border-radius: 3px; left: 0%; right: 0%; }
.price-slider-input { position: absolute; top: -7px; width: 100%; height: 20px; -webkit-appearance: none; background: transparent; pointer-events: none; }
.price-slider-input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--color-white); border: 2px solid var(--color-primary); cursor: pointer; pointer-events: all; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }

/* Теги */
.product-tag { position: absolute; top: 10px; left: 44px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-xs); z-index: 2; text-transform: uppercase; letter-spacing: 0.3px; }
.tag-hit { background: #FF6B8A; color: #fff; } .tag-new { background: #5B8C5A; color: #fff; } .tag-recommend { background: #C4A35A; color: #fff; }
.wishlist-btn { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-white); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; z-index: 3; box-shadow: var(--shadow-sm); transition: all var(--transition-fast); }
.wishlist-btn:hover, .wishlist-btn.active { color: var(--color-primary); }

/* Товары не в наличии */
.out-of-stock-badge { position: absolute; top: 10px; right: 10px; background: #6B6B6B; color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: var(--radius-sm); z-index: 3; text-transform: uppercase; }
.petal-price-out-of-stock { font-size: 14px; color: var(--color-gray-light); font-weight: 500; }
.petal-card-btn.out-of-stock-btn { background: var(--color-gray) !important; opacity: 0.7; }

/* SEO-блок */
.seo-block { padding: 48px 0 64px; background: var(--color-white); }
.seo-content { max-width: 100%; margin: 0 0 24px; overflow: hidden; max-height: 240px; position: relative; }
.seo-content.expanded { max-height: none; }
.seo-content::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 80px; background: linear-gradient(transparent, var(--color-white)); pointer-events: none; }
.seo-content.expanded::after { opacity: 0; }
.seo-content h2 { font-size: 24px; margin: 20px 0 12px; }
.seo-content h3 { font-size: 18px; margin: 18px 0 10px; }
.seo-content p { font-size: 14px; color: var(--color-gray); line-height: 1.7; margin-bottom: 14px; }
.seo-content ul { padding-left: 20px; margin-bottom: 16px; }
.seo-content li { font-size: 14px; color: var(--color-gray); margin-bottom: 6px; }
.seo-toggle { display: inline-flex; margin: 0; }

/* Ничего не найдено */
.no-products-found { text-align: center; padding: 80px 20px; grid-column: 1 / -1; }
.no-products-icon { font-size: 64px; display: block; margin-bottom: 24px; }
.no-products-found h2 { font-size: 28px; margin-bottom: 12px; }
.no-products-found p { font-size: 16px; color: var(--color-gray); }
.no-products-found a { color: var(--color-primary); text-decoration: underline; }

/* Поиск */
.search-page .blog-card { background: var(--color-white); border-radius: var(--radius-md); overflow: hidden; text-decoration: none; color: var(--color-dark); transition: all var(--transition-base); }
.search-page .blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.search-page .blog-card-content { padding: 16px; }
.search-page .blog-card-content h2 { font-size: 16px; margin-bottom: 8px; }

/* ===== МОБИЛЬНОЕ МЕНЮ ФИЛЬТРОВ ===== */
.mobile-filters-btn { display: none; align-items: center; gap: 6px; padding: 8px 14px; background: var(--color-light); border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--color-gray); cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; line-height: 1; }
.mobile-filters-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-white); }
.mobile-filters-btn .ph { font-size: 15px; color: var(--color-gray-light); }

.mobile-filters-menu { position: fixed; top: 0; left: 0; bottom: 0; width: 100%; max-width: 360px; z-index: 10000; background: #fff; display: flex; flex-direction: column; transform: translateX(-100%); transition: transform 0.3s ease; box-shadow: 2px 0 20px rgba(0,0,0,0.15); }
.mobile-filters-menu.active { transform: translateX(0); }
.mobile-filters-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; flex-shrink: 0; }
.mobile-filters-header h3 { margin: 0; font-size: 18px; font-family: var(--font-body); }
.mobile-filters-close { width: 36px; height: 36px; border-radius: 50%; border: none; background: #f5f5f5; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.mobile-filters-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 20px; }
.mobile-filters-body .sidebar-widget { margin-bottom: 24px; }
.mobile-filters-body .sidebar-title { font-size: 14px; margin-bottom: 12px; }
.mobile-filters-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.mobile-filters-overlay.active { opacity: 1; visibility: visible; }

/* ===== АДАПТИВ ===== */
@media (max-width: 1200px) { .showcase-grid[data-per-row="6"] { grid-template-columns: repeat(4, 1fr); } .catalog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .showcase-grid[data-per-row="6"] { grid-template-columns: repeat(3, 1fr); } .catalog-layout { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    .showcase-tabs { justify-content: flex-start; border-radius: var(--radius-md); gap: 2px; }
    .showcase-tab { padding: 8px 16px; font-size: 13px; gap: 6px; } .showcase-tab .ph { font-size: 16px; }
    .showcase-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .catalog-sidebar { display: none !important; }
    .mobile-filters-btn { display: inline-flex !important; }
    .catalog-toolbar { justify-content: space-between; gap: 8px; padding: 10px 12px; }
    .sort-label { display: none; }
    .filter-select { min-width: 140px; font-size: 12px; padding: 6px 10px; }
    .seo-block { padding: 32px 0 48px; } .seo-content { max-height: 180px; }
    .seo-content h2 { font-size: 20px; } .seo-content h3 { font-size: 16px; }
}

@media (max-width: 480px) {
    .petal-card-title {
        font-size: 13px;
        line-height: 1.3;
    }
    .petal-card-title a {
        font-size: 13px;
    }
    .petal-price-current {
        font-size: 14px;
    }
    .petal-price-old {
        font-size: 12px;
    }
    .petal-price-new {
        font-size: 14px;
    }
    .petal-category {
        font-size: 12px;
        padding: 2px 6px;
    }
    .petal-card-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    .catalog-grid {
        gap: 8px;
    }
}