/* ========== Header ========== */
header {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 8px rgba(0,0,0,0.07);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    /* Скрытие при скролле вниз */
    transform: translateY(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s ease,
                box-shadow 0.3s ease;
}
/* Компактный режим после начала скролла */
header.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}
header.hidden {
    transform: translateY(-100%);
}

/* Плавающая кнопка корзины — появляется когда хедер скрыт */
.cart-btn-float {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px) scale(0.9);
    transition: opacity 0.25s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-btn-float.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}
/* Кнопка внутри float — крупнее чем в хедере */
.cart-btn-float .cart-btn {
    margin-left: 0;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 6px 28px rgba(233,30,99,0.45);
    gap: 9px;
}
/* Сдвиг контента чтобы не перекрывался хедером */
body { padding-top: var(--header-h, 56px); }

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    gap: 8px;
}
/* nav растягивается чтобы меню было по центру между лого и кнопкой */
.header-flex nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}
.logo-img {
    height: 54px;
    width: auto;
    display: block;
    object-fit: contain;
}
.footer-logo {
    height: 160px;      /* ~3× от 52px — крупно на десктопе */
    width: auto;
    display: block;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.4rem;
}
.nav-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
    position: relative;
    padding: 4px 2px;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--pink); }
.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--pink);
    border-radius: 2px;
}

.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}
.burger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 3px 0;
    transition: 0.3s;
    display: block;
}
.burger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ========== Кнопки ========== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}
.btn-primary {
    background: var(--pink);
    color: white;
    box-shadow: 0 4px 15px rgba(233,30,99,0.3);
    position: relative;
}
.btn-primary:hover {
    background: var(--pink-dark);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(233,30,99,0.4);
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    border: 2px solid var(--pink);
    animation: pulse-ring 2s ease-out infinite;
}

/* Hero CTA — большая и заметная */
.hero-cta-btn {
    padding: 18px 48px !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--pink), var(--pink-dark)) !important;
    box-shadow: 0 6px 24px rgba(233,30,99,0.45) !important;
    overflow: hidden;
    animation: heroBtnFloat 2.8s ease-in-out infinite;
}
.hero-cta-btn::before {
    animation: pulse-ring-strong 1.8s ease-out infinite !important;
    border-width: 3px !important;
}
/* Второе кольцо для двойного пульса */
.hero-cta-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    border: 2px solid var(--pink);
    animation: pulse-ring-strong 1.8s ease-out 0.9s infinite;
    pointer-events: none;
}
.hero-cta-btn:hover {
    transform: translateY(-3px) scale(1.06) !important;
    box-shadow: 0 10px 32px rgba(233,30,99,0.6) !important;
    animation-play-state: paused;
}
@keyframes pulse-ring-strong {
    0%   { transform: scale(0.85); opacity: 0.9; }
    100% { transform: scale(1.55); opacity: 0; }
}
@keyframes heroBtnFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
@media (max-width: 768px) {
    .hero-cta-btn { padding: 15px 38px !important; font-size: 1.05rem !important; }
}

/* ========== Footer ========== */
footer {
    background: #2d2d2d;
    color: #bbb;
    margin-top: 3rem;
    padding: 1.25rem 0 0.75rem;
}
.footer-top {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 1px solid #3d3d3d;
}
.footer-logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform 0.2s;
    align-self: center;
    /* Прижимаем вплотную к левому краю контейнера */
    margin-left: -8px;
}
.footer-logo-link:hover { transform: scale(1.02); }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 0.75rem 1.5rem;
    flex: 1;
    min-width: 0;
}
.footer-col-title {
    color: var(--pink);
    font-weight: 600;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li { margin-bottom: 0.35rem; }
.footer-col a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--pink); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.6rem;
    font-size: 0.75rem;
    color: #888;
}
.footer-legal { font-size: 0.75rem; color: #888; }
.footer-legal strong { color: #bbb; font-weight: 500; }
.footer-copy { font-size: 0.75rem; color: #777; }

.loading, .news-placeholder {
    text-align: center;
    padding: 2rem;
    color: #888;
}

#craft-pattern-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.08;
    display: none;
}
body.has-pattern #craft-pattern-bg {
    display: block;
}
#craft-pattern-bg img {
    position: absolute;
    object-fit: contain;
    user-select: none;
}

/* Scroll-to-top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: auto;
    min-width: 64px;
    height: 52px;
    border-radius: 50px;
    background: var(--pink);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(233,30,99,0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.2s, transform 0.2s, box-shadow 0.2s;
    z-index: 50;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 0 16px;
    letter-spacing: 0.3px;
}
.scroll-top .st-arrow {
    font-size: 1.1rem;
    line-height: 1;
    display: block;
    transition: transform 0.2s;
}
.scroll-top .st-label {
    font-size: 0.68rem;
    line-height: 1;
    opacity: 0.9;
}
.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    animation: scrollTopAppear 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scrollTopAppear {
    from { transform: translateY(20px) scale(0.8); opacity: 0; }
    to   { transform: translateY(0) scale(1);     opacity: 1; }
}
.scroll-top:hover {
    background: var(--pink-dark);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(233,30,99,0.45);
}
.scroll-top:hover .st-arrow { transform: translateY(-2px); }
.scroll-top:active { transform: translateY(-1px); }
