/* === Modern Bouquets Widget v3 === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0077ff;
    --green: #00c853;
    --pink: #ff4081;
    --dark: #1a1a2e;
    --gray: #6b7280;
    --light: #f3f4f6;
    --white: #fff;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

.bq-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: var(--light);
    min-height: 100vh;
}

/* Header */
.bq-header {
    text-align: center;
    padding: 30px 0;
}

.bq-logo {
    height: 50px;
    margin-bottom: 16px;
}

.bq-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 8px;
}

.bq-header p {
    color: var(--gray);
    font-size: 16px;
    margin: 0;
}

/* Filters */
.bq-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.bq-filter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 10px 20px;
    border: none;
    background: var(--white);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bq-filter:hover {
    color: var(--primary);
}

.bq-filter.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(0,119,255,0.3);
}

.bq-filter-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.bq-filter.active .bq-filter-count {
    background: rgba(255,255,255,0.2);
}

/* Grid */
.bq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Card */
.bq-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.bq-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.bq-card-img {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    cursor: pointer;
    overflow: hidden;
}

.bq-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.bq-card:hover .bq-card-img img {
    transform: scale(1.08);
}

.bq-card-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    opacity: 0.3;
}

/* Заглушка для букетов без фото - 50% прозрачность */
.bq-placeholder-img {
    opacity: 0.5;
    filter: grayscale(20%);
}

/* Badges */
.bq-badge {
    position: absolute;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
}

.bq-badge.ready {
    top: 12px;
    left: 12px;
    background: var(--green);
}

.bq-badge.sale {
    top: 12px;
    right: 12px;
    background: var(--pink);
}

/* Card body */
.bq-card-body {
    padding: 16px;
}

.bq-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.bq-card-location {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bq-card-location::before {
    content: '📍';
    font-size: 12px;
}

.bq-card-prices {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}

.bq-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
}

.bq-old-price {
    font-size: 16px;
    color: #bbb;
    text-decoration: line-through;
}

.bq-btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.bq-btn:hover {
    background: #0066dd;
    transform: scale(1.02);
}

/* Modal */
.bq-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.bq-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bq-modal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 340px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.bq-modal-overlay.active .bq-modal {
    transform: scale(1);
}

.bq-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.2s;
}

.bq-modal-close:hover {
    background: #e5e7eb;
}

.bq-modal-name {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 4px;
}

.bq-modal-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.bq-modal-text {
    color: var(--gray);
    margin-bottom: 24px;
}

/* Messengers - круглые кнопки */
.bq-messengers {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.bq-soc {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    background-size: 32px;
    background-position: center;
    background-repeat: no-repeat;
}

.bq-soc:hover {
    transform: scale(1.15);
}

.bq-soc.whatsapp {
    background-color: #25D366;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
    box-shadow: 0 8px 24px rgba(37,211,102,0.4);
}

.bq-soc.telegram {
    background-color: #2AABEE;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z'/%3E%3C/svg%3E");
    box-shadow: 0 8px 24px rgba(42,171,238,0.4);
}

.bq-soc.max {
    background-color: #168ACD;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z'/%3E%3C/svg%3E");
    box-shadow: 0 8px 24px rgba(22,138,205,0.4);
}

/* Photo modal */
.bq-photo-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    cursor: zoom-out;
}

.bq-photo-modal.active {
    opacity: 1;
    visibility: visible;
}

.bq-photo-modal img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
}

/* Skeleton loading */
.bq-card.skeleton .bq-card-img {
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.sk-line {
    height: 16px;
    background: #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
}

.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; }
.sk-line.w100 { width: 100%; height: 44px; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty */
.bq-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray);
}

.bq-empty span {
    font-size: 80px;
    display: block;
    margin-bottom: 20px;
}

/* Mobile */
@media (max-width: 640px) {
    .bq-widget { padding: 15px; }
    .bq-header { padding: 20px 0; }
    .bq-header h1 { font-size: 24px; }
    .bq-logo { height: 40px; }
    
    .bq-filters { gap: 8px; }
    .bq-filter { padding: 8px 14px; font-size: 13px; }
    
    .bq-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .bq-card { border-radius: 12px; }
    .bq-card-body { padding: 12px; }
    .bq-card-name { font-size: 14px; }
    .bq-price { font-size: 18px; }
    .bq-btn { padding: 12px; font-size: 13px; }
    .bq-badge { padding: 4px 10px; font-size: 10px; }
    
    .bq-modal { padding: 30px 20px; }
    .bq-soc { width: 56px; height: 56px; }
    .bq-messengers { gap: 16px; }
}

/* Бегущая строка */
.bq-marquee-wrapper {
    background: linear-gradient(90deg, #ff6b6b, #ff8e53, #ffb347, #ff6b6b);
    background-size: 300% 100%;
    animation: gradientMove 8s ease infinite;
    padding: 14px 0;
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bq-marquee {
    display: flex;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

.bq-marquee span {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-right: 50px;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Мобильная версия */
@media (max-width: 640px) {
    .bq-marquee-wrapper {
        padding: 10px 0;
        margin-bottom: 16px;
    }
    
    .bq-marquee span {
        font-size: 13px;
        letter-spacing: 1px;
    }
}
