/* ═══════════════════════════════════════════════════════
   Double Sushi — японская визуальная тема
   Подключается в layouts/app.blade.php после wp-reference.css
═══════════════════════════════════════════════════════ */

/* ═══ 0. Минимальный фикс адаптивности ═══ */
html, body {
    overflow-x: clip;
}
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ═══ 1. Типографика: Noto Serif JP для заголовков ═══ */
.jp-heading,
h1.jp, h2.jp, h3.jp {
    font-family: 'Noto Serif JP', 'Rubik', serif !important;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Акцидентные иероглифы в подложке заголовков секций */
.section-kanji {
    position: relative;
    display: inline-block;
}
.section-kanji::before {
    content: attr(data-kanji);
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -45%);
    font-family: 'Noto Serif JP', serif;
    font-size: 2.8em;
    font-weight: 900;
    color: rgba(255, 190, 22, 0.06);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}
.section-kanji > * { position: relative; z-index: 1; }

/* ═══ 2. Seigaiha (青海波) — волновой паттерн ═══ */
.seigaiha-pattern {
    position: relative;
    height: 48px;
    background:
        radial-gradient(circle at 50% 100%, transparent 24px, rgba(255,190,22,0.12) 24.5px, rgba(255,190,22,0.12) 25px, transparent 25.5px),
        radial-gradient(circle at 50% 100%, transparent 18px, rgba(255,190,22,0.08) 18.5px, rgba(255,190,22,0.08) 19px, transparent 19.5px),
        radial-gradient(circle at 50% 100%, transparent 12px, rgba(255,190,22,0.06) 12.5px, rgba(255,190,22,0.06) 13px, transparent 13.5px),
        radial-gradient(circle at 50% 100%, transparent 6px, rgba(255,190,22,0.04) 6.5px, rgba(255,190,22,0.04) 7px, transparent 7.5px);
    background-size: 60px 30px;
    background-repeat: repeat-x;
    opacity: 0.9;
    pointer-events: none;
}
.seigaiha-pattern.flip { transform: scaleY(-1); }

.seigaiha-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 50px auto;
    max-width: 800px;
    padding: 0 24px;
}
.seigaiha-divider::before,
.seigaiha-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,190,22,0.3), transparent);
}
.seigaiha-divider .diamond {
    width: 10px; height: 10px;
    background: #FFBE16;
    transform: rotate(45deg);
    box-shadow: 0 0 16px rgba(255,190,22,0.5);
}

/* ═══ 3. Улучшенный hover на product-card ═══ */
.product-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 190, 22, 0.08) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}
.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: inherit;
    pointer-events: none;
    transition: border-color 0.4s ease;
    z-index: 2;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.55),
        0 4px 12px rgba(255, 190, 22, 0.12);
}
.product-card:hover::before { opacity: 1; }
.product-card:hover::after { border-color: rgba(255, 190, 22, 0.25); }

/* Изображение слегка приближается */
.product-card__image img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-card:hover .product-card__image img {
    transform: scale(1.08);
}

/* Кнопка «В корзину» — японский акцент (stroke) */
.product-card .add-btn {
    position: relative;
    overflow: hidden;
}
.product-card .add-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from 0deg, #FFBE16, #FFD84A, #FFBE16, transparent 60%);
    opacity: 0;
    animation: addBtnSpin 2s linear infinite;
    z-index: -1;
    transition: opacity 0.3s;
}
.product-card .add-btn:hover::before { opacity: 1; }
@keyframes addBtnSpin {
    to { transform: rotate(360deg); }
}

/* ═══ 4. Брушстрок-разделитель (SVG через data-URL) ═══ */
.brush-divider {
    height: 28px;
    margin: 40px auto;
    max-width: 240px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 28'%3E%3Cpath d='M8 14 Q60 5 120 14 T232 14' fill='none' stroke='%23FFBE16' stroke-width='3' stroke-linecap='round' opacity='0.45'/%3E%3Ccircle cx='220' cy='14' r='3' fill='%23FFBE16' opacity='0.6'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 0.85;
}

/* ═══ 5. Frosted-glass info-bar поверх hero ═══ */
.hero-frosted-bar {
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    background: rgba(27, 27, 27, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ═══ 6. Fade-in-up при скролле (observer-based с безопасным fallback) ═══ */
/* Активируется только если <html class="js-reveal"> — ставится JS'ом.
   Без JS элементы всегда видны (no broken layout). */
html.js-reveal .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
html.js-reveal .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ═══ 7. Анимация плавающего бейджа скидки ═══ */
.label.label-discount {
    animation: discountBobble 4s ease-in-out infinite;
    transform-origin: center center;
}
@keyframes discountBobble {
    0%, 100% { transform: rotate(-4deg) translateY(0); }
    50%      { transform: rotate(4deg) translateY(-2px); }
}

/* ═══ 8. Японская акцентная линия под заголовками ═══ */
.jp-accent {
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}
.jp-accent::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFBE16 50%, transparent);
}

/* ═══ 9. Японская палитра — CSS custom properties ═══ */
:root {
    --jp-ink:       #1A1A1A;    /* sumi — тушь */
    --jp-paper:     #F4EBD3;    /* washi — рисовая бумага */
    --jp-gold:      #D4AF37;    /* золото — премиум */
    --jp-indigo:    #2C3E63;    /* aizome — глубина */
    --jp-vermilion: #D72E30;    /* shu — киноварь */
    --jp-jade:      #4A7C59;    /* свежесть/бамбук */
    --jp-primary:   #FFBE16;    /* наш базовый жёлтый */
}

/* ═══ 10. Автоматическая стилизация WP-заголовков секций ═══ */
.elementor-heading-title {
    font-family: 'Noto Serif JP', 'Rubik', serif !important;
    font-weight: 700;
    letter-spacing: 0.03em;
    position: relative;
    display: inline-block;
}
/* Брушстрок-линия под заголовками секций */
.elementor-heading-title::after {
    content: '';
    position: absolute;
    left: 50%; bottom: -12px;
    transform: translateX(-50%);
    width: 72px;
    height: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 6'%3E%3Cpath d='M2 3 Q18 1 36 3 T70 3' fill='none' stroke='%23FFBE16' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 0.7;
    pointer-events: none;
}
/* На узких контейнерах — увеличить визуальное расстояние */
.elementor-widget-heading .elementor-heading-title {
    padding-bottom: 6px;
}

/* ═══ 11. Frosted-glass hero info-bar ═══ */
.premium-carousel-wrapper .info-bar,
.premium-carousel-wrapper [class*="info"][class*="bar"],
[class*="elementor-element-48fd1db"] > .e-con-inner {
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    background: rgba(27, 27, 27, 0.5) !important;
    border-top: 1px solid rgba(255, 190, 22, 0.15);
    border-bottom: 1px solid rgba(255, 190, 22, 0.15);
}

/* ═══ 12. Кнопки — акцентная тень + underline при hover ═══ */
.btn-primary,
.elementor-button-link.elementor-button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.btn-primary::after,
.elementor-button-link.elementor-button::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.6s ease;
}
.btn-primary:hover,
.elementor-button-link.elementor-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 190, 22, 0.3);
}
.btn-primary:hover::after,
.elementor-button-link.elementor-button:hover::after {
    left: 100%;
}

/* ═══ 13. Плавная анимация появления hero content ═══ */
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.premium-carousel-wrapper .slick-active .elementor-heading-title,
.premium-carousel-wrapper .slick-active .elementor-widget-button {
    animation: heroFadeIn 0.8s ease 0.3s backwards;
}

/* ═══ 14. Footer — торий-силуэт + washi-текстура ═══ */
footer {
    position: relative;
    overflow: hidden;
}
footer::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -40px;
    width: 280px;
    height: 240px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 160' fill='%23FFBE16'%3E%3Cpath d='M10 40 L30 30 L170 30 L190 40 L180 46 L180 60 L190 70 L10 70 L20 60 L20 46 Z M40 70 L40 150 L60 150 L60 70 Z M140 70 L140 150 L160 150 L160 70 Z M35 85 L165 85 L165 95 L35 95 Z' opacity='0.04'/%3E%3C/svg%3E") center/contain no-repeat;
    pointer-events: none;
    z-index: 0;
}
footer > * { position: relative; z-index: 1; }

/* ═══ 15. Скролл-индикатор в hero (опционально) ═══ */
.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,190,22,0.4);
    border-radius: 14px;
    z-index: 10;
    pointer-events: none;
}
.scroll-hint::before {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 3px; height: 8px;
    background: #FFBE16;
    border-radius: 2px;
    animation: scrollHintPulse 2s ease-in-out infinite;
}
@keyframes scrollHintPulse {
    0%, 100% { top: 6px; opacity: 1; }
    50%      { top: 22px; opacity: 0.3; }
}

/* ═══ 16. Badges — более изящные формы ═══ */
.label {
    font-family: 'Noto Serif JP', 'Rubik', sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 3px;
    text-transform: uppercase;
    font-size: 10px;
    position: relative;
    backdrop-filter: blur(4px);
}
.label.label-new {
    background: linear-gradient(135deg, var(--jp-jade), #3d6349);
    color: #fff;
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.35);
}
.label.label-discount {
    background: linear-gradient(135deg, var(--jp-vermilion), #b0242a);
    color: #fff;
    box-shadow: 0 2px 8px rgba(215, 46, 48, 0.4);
}
.label.label-popular {
    background: linear-gradient(135deg, var(--jp-gold), #b09023);
    color: #1a1a1a;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}
.label.label-spicy {
    background: linear-gradient(135deg, #E83B29, #a52118);
    color: #fff;
    box-shadow: 0 2px 8px rgba(232, 59, 41, 0.35);
}

/* ═══ 17. Price — акцентная типографика ═══ */
.product-card__price {
    font-family: 'Noto Serif JP', 'Rubik', sans-serif;
    font-weight: 700;
    color: var(--jp-gold);
    text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}

/* ═══ 18. Форма/инпуты — японский минимализм ═══ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #FFBE16 !important;
    box-shadow: 0 0 0 3px rgba(255, 190, 22, 0.15) !important;
    outline: none;
}

/* ═══ 19. Шапка — золотая тонкая полоска под scroll ═══ */
.wp-header.is-scrolled {
    border-bottom: 1px solid rgba(255, 190, 22, 0.25);
}

/* ═══ 20. Полезные утилиты ═══ */
.jp-text-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}
