/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #151933;
    --bg-card: #1a1f3a;
    --accent-primary: #4f46e5;
    --accent-secondary: #7c3aed;
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --border-color: #2a2f4a;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --header-h: 80px;
}

html {
    scroll-padding-top: var(--header-h);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Шапка */
.header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.header.hidden {
    transform: translateY(-100%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Основной контент */
.main-content {
    margin-top: var(--header-h);
    min-height: calc(100vh - 350px);
}

/* Hero секция */
.hero-section {
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.hero-description p {
    margin-bottom: 1.5rem;
}

/* Секция действий */
.actions-section {
    padding: 3rem 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.action-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.3);
}

.action-card:hover::before {
    transform: scaleX(1);
}

.action-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.action-card h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.action-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    line-height: 1.5;
    vertical-align: middle;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: var(--gradient-2);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    max-width: 300px;
}

/* Страница с картой */
.card-section, .search-section, .gallery-section, .shop-section, .about-section {
    padding: 3rem 0;
}

.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.card-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
    position: relative;
}

.refresh-btn {
    position: absolute;
    top: 0;
    right: calc(50% - 175px - 50px);
    width: 45px;
    height: 45px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.refresh-btn:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
}

.refresh-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

.card-flip {
    width: 350px;
    height: 500px;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
}

.card-flip.flipped .card-front {
    transform: rotateY(180deg);
}

.card-flip.flipped .card-back {
    transform: rotateY(0deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s ease;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.card-front {
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(-180deg);
}

.card-front img, .card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    max-width: 700px;
    margin: 3rem auto;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.card-info h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.card-description, .card-guide {
    margin-bottom: 2rem;
}

.card-description h3, .card-guide h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.card-description p, .card-guide p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Общее руководство по работе с картой */
.card-guide-general {
    max-width: 900px;
    margin: 3rem auto;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
}

.card-guide-general h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--accent-primary);
}

.guide-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.guide-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.guide-section h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.guide-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.guide-section ul {
    color: var(--text-secondary);
    padding-left: 2rem;
    line-height: 1.8;
}

.guide-section li {
    margin-bottom: 0.8rem;
}

.guide-section.important {
    background: rgba(79, 70, 229, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--accent-primary);
}

.guide-section.important p {
    margin-bottom: 1rem;
}

/* Карусель */
.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
}

.carousel-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    transform: scale(1.1);
    border-color: var(--accent-primary);
}

.carousel-btn:hover:not(:disabled) .carousel-prev-icon {
    transform: translateX(-2px);
}

.carousel-btn:hover:not(:disabled) .carousel-next-icon {
    transform: translateX(2px);
}

.carousel-prev-icon,
.carousel-next-icon {
    transition: transform 0.25s ease;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.card-display {
    width: 350px;
    height: 500px;
}

.instructions {
    max-width: 700px;
    margin: 3rem auto;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.instructions h3 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.instructions ol {
    padding-left: 1.5rem;
}

.instructions li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.instructions strong {
    color: var(--text-primary);
}

/* Галерея */
.gallery-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    align-items: center;
    padding: 0.9rem 1rem;
    background: rgba(21, 25, 51, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    position: sticky;
    top: 88px;
    z-index: 50;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 0.5rem 0 1.2rem;
    transition: top 0.3s ease;
}

.gallery-section .page-subtitle {
    margin-bottom: 1.5rem;
}

/* Когда шапка сайта уезжает вверх — nav занимает её место,
   чтобы не было пустой полосы сверху. */
.header.hidden ~ main .gallery-nav {
    top: 8px;
}

.gallery-nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.gallery-nav-chip:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.gallery-nav-chip.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

.gallery-nav-chip .chip-count {
    padding: 0.05rem 0.45rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.gallery-nav-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.25);
}

.deck-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 170px;
}

.deck-header {
    text-align: center;
    margin: 1rem 0 1.2rem;
    padding: 0.6rem 1rem 1rem;
    border-bottom: 2px solid var(--border-color);
}

.deck-header h2 {
    font-size: 2.2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 0.2rem;
}

.deck-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 640px;
    margin: 0.2rem auto 0;
    line-height: 1.5;
}

.deck-header .deck-count {
    display: inline-block;
    margin-top: 0.7rem;
    padding: 0.25rem 0.9rem;
    background: rgba(79, 70, 229, 0.15);
    color: var(--accent-primary);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1.2rem;
}

.gallery-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.3);
}

.gallery-card-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(
        90deg,
        rgba(42, 47, 74, 0.6) 25%,
        rgba(79, 70, 229, 0.12) 50%,
        rgba(42, 47, 74, 0.6) 75%
    );
    background-size: 200% 100%;
    animation: gallery-shimmer 1.6s linear infinite;
}

.gallery-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 39, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.3s ease;
}

.gallery-card-image img.loaded {
    opacity: 1;
}

/* Когда картинка загрузилась — скрываем shimmer, остаётся только img */
.gallery-card-image:has(img.loaded) {
    animation: none;
    background: var(--bg-secondary);
}

.gallery-card:hover .gallery-card-image img.loaded {
    transform: scale(1.05);
}

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

/* Модальное окно для просмотра картинок */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-title {
    color: #fff;
    text-align: center;
    font-size: 1.05rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Магазин */
.shop-content {
    max-width: 900px;
    margin: 2rem auto;
}

.shop-info {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.shop-info h2 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.shop-info p, .shop-info ul {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.shop-info ul {
    padding-left: 2rem;
}

.price-block {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.price-block h3 {
    font-size: 2rem;
    color: var(--accent-primary);
}

.divider {
    height: 2px;
    background: var(--border-color);
    margin: 2rem 0;
}

.discounts-block {
    margin-top: 2rem;
}

.discounts-block h2 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.discounts-block ul {
    color: var(--text-secondary);
    padding-left: 2rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.discount-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 1rem;
}

.info-block {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.info-block h2 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.info-block p, .info-block ul {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.info-block ul {
    padding-left: 2rem;
}

.contact-block {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

.contact-block h2 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.contact-methods {
    margin-top: 1.5rem;
}

.contact-item {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* О нас */
.about-intro {
    max-width: 800px;
    margin: 2rem auto 4rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin: 3rem 0;
}

.team-member {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.3);
}

.member-photo {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-primary);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.member-role {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: bold;
}

.member-info p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.mission-block {
    max-width: 800px;
    margin: 4rem auto;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.mission-block h2 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.mission-block p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.contact-info {
    margin-top: 1.5rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Футер */
.footer {
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    margin-top: 4rem;
    padding: 3rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-telegram {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-signature {
    margin-top: 0.5rem;
    font-style: italic;
}

/* Страница "Как заказать" */
.order-section {
    padding: 3rem 0;
}

.order-steps {
    max-width: 900px;
    margin: 3rem auto;
}

.order-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.order-step:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.3);
}

.step-number {
    min-width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h2 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.step-content ul {
    color: var(--text-secondary);
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.step-content li {
    margin-bottom: 0.5rem;
}

.contact-options {
    margin-top: 1rem;
}

.contact-option {
    background: rgba(79, 70, 229, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.contact-option .icon {
    margin-right: 0.5rem;
}

.inline-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.inline-link:hover {
    color: var(--text-primary);
}

.cta-block {
    max-width: 800px;
    margin: 3rem auto;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.cta-block h3 {
    color: var(--accent-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-block p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.btn-telegram {
    gap: 0.5rem;
}

.telegram-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Страницы оплаты и доставки */
.payment-section, .delivery-section {
    padding: 3rem 0;
}

.payment-content, .delivery-content {
    max-width: 1000px;
    margin: 3rem auto;
    display: grid;
    gap: 2rem;
}

.payment-method, .delivery-option {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.payment-method:hover, .delivery-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.3);
}

.delivery-option.highlighted {
    border: 2px solid var(--accent-primary);
    position: relative;
}

.delivery-option.special {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
}

.method-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.payment-method h2, .delivery-option h2 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.payment-method p, .delivery-option p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.payment-method ul, .delivery-option ul {
    color: var(--text-secondary);
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.payment-method li, .delivery-option li {
    margin-bottom: 0.5rem;
}

.method-note {
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.price-badge {
    background: var(--gradient-1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.price-badge.popular {
    background: var(--gradient-2);
}

.price-badge.free {
    background: var(--gradient-3);
}

.delivery-time {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.location-label {
    background: rgba(79, 70, 229, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    font-weight: bold;
}

.popular-label {
    display: inline-block;
    background: var(--gradient-2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.pickup-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.pickup-info p {
    margin-bottom: 0.5rem;
}

.info-box {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-left: 5px solid var(--accent-primary);
    border-radius: 16px;
    padding: 2rem;
}

.info-box h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.info-box p, .info-box ol {
    color: var(--text-secondary);
    line-height: 1.8;
}

.info-box ol {
    padding-left: 2rem;
}

.info-box li {
    margin-bottom: 0.5rem;
}

.back-link {
    text-align: center;
    margin-top: 3rem;
}

.action-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.action-buttons .btn-large {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.action-buttons-shop {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.action-buttons-shop .btn-large {
    width: 100%;
}

/* Юридические страницы */
.legal-section {
    padding: 3rem 0;
}

.legal-date {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
}

.legal-content {
    max-width: 1000px;
    margin: 2rem auto;
}

.legal-block {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.legal-block h2 {
    color: var(--accent-primary);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.legal-block h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
}

.legal-block p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-block ul {
    color: var(--text-secondary);
    padding-left: 2rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-block li {
    margin-bottom: 0.8rem;
}

.legal-block a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-block a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.legal-block.important {
    background: rgba(79, 70, 229, 0.1);
    border: 2px solid var(--accent-primary);
}

.legal-block.important p {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.contact-list {
    list-style: none;
    padding-left: 0;
}

.contact-list li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

/* Адаптивность */
@media (max-width: 768px) {
    :root {
        /* Fallback до того как JS замерит фактическую высоту шапки
           (лого + навигация в 2 строки ≈ 120-130px) */
        --header-h: 128px;
    }

    .header {
        padding-bottom: 0;
    }

    .header-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem 0 0.5rem 0;
    }

    .logo a {
        font-size: 1.2rem;
    }

    .nav {
        display: flex;
        flex-direction: row;
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.2rem 0;
    }

    .container {
        padding: 0 20px;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .actions-section {
        padding: 1.5rem 0;
    }

    .actions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer {
        margin-top: 2rem;
    }

    .card-section, .search-section, .gallery-section, 
    .shop-section, .about-section, .legal-section,
    .order-section, .payment-section, .delivery-section {
        padding: 1.5rem 0 0 0;
    }

    .page-subtitle {
        margin-bottom: 1rem;
        font-size: 1rem;
    }

    .card-container {
        margin: 1rem 0;
    }

    .refresh-btn {
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .refresh-btn svg {
        width: 20px;
        height: 20px;
    }

    .card-flip {
        width: 260px;
        height: 370px;
    }

    .card-guide-general, .card-info {
        margin: 1rem auto;
        padding: 1rem;
        max-width: 100%;
    }

    .card-guide-general h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .guide-section {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .guide-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .guide-section p {
        margin-bottom: 0.6rem;
        line-height: 1.6;
    }

    .guide-section ul {
        margin-bottom: 0.6rem;
        padding-left: 1.5rem;
    }

    .guide-section li {
        margin-bottom: 0.4rem;
    }

    .carousel-container {
        gap: 0.8rem;
        margin: 1rem 0;
    }

    .carousel-btn {
        width: 45px;
        height: 45px;
    }

    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }

    .card-display {
        width: 260px;
        height: 370px;
    }

    .card-display .card-flip {
        width: 260px;
        height: 370px;
    }

    .btn-large {
        padding: 0.9rem 1.5rem;
    }

    .instructions {
        margin: 0.8rem auto;
        padding: 0.8rem;
        max-width: 100%;
    }

    .instructions h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .instructions p {
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .card-display {
        cursor: pointer;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mission-block {
        margin: 2rem auto;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
        margin: 1.5rem 0;
    }

    .action-buttons .btn-large {
        width: 100%;
        max-width: 100%;
    }

    .action-buttons-shop {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        margin: 1rem 0 1.5rem;
    }

    .action-buttons-shop .btn-large {
        padding: 0.9rem 1.5rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    .btn-large {
        margin: 5px auto;
    }

    .page-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .shop-content, .payment-content, .delivery-content {
        margin: 1rem auto;
        max-width: 100%;
    }

    .shop-info {
        padding: 1.2rem 1.2rem 16px 1.2rem;
    }

    .shop-info h2 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .shop-info p {
        margin-bottom: 0.8rem;
    }

    .shop-info ul {
        margin-bottom: 0.8rem;
    }

    .price-block {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .price-block h3 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .divider {
        margin: 1rem 0;
    }

    .discounts-block {
        margin-top: 1rem;
    }

    .discounts-block h2 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .discounts-block ul {
        margin-bottom: 0.8rem;
    }

    .discount-note {
        margin-top: 0.8rem;
    }

    .payment-method, .delivery-option {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .payment-method h2, .delivery-option h2 {
        font-size: 1.4rem;
        line-height: 1.2;
        margin-bottom: 0.8rem;
    }

    .method-icon, .option-header {
        font-size: 2rem;
    }

    .info-block, .info-box {
        margin: 1rem auto;
        padding: 1rem;
    }

    .info-box h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .info-box ul, .info-box ol, .info-box p {
        margin-bottom: 0.8rem;
    }

    .info-box li {
        margin-bottom: 0.5rem;
    }

    .option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .order-steps {
        margin: 1rem auto;
    }

    .order-step {
        flex-direction: column;
        margin-bottom: 1rem;
        padding: 1rem;
        gap: 1rem;
    }

    .step-number {
        margin: 0 auto 0.5rem auto;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .step-content h2 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .step-content p {
        margin-bottom: 0.8rem;
    }

    .step-content ul {
        margin-bottom: 0.8rem;
        padding-left: 1.5rem;
    }

    .step-content li {
        margin-bottom: 0.5rem;
    }

    .contact-option {
        padding: 0.8rem;
        margin-bottom: 0.4rem;
    }

    .cta-block {
        margin: 1.5rem auto;
        padding: 1.2rem;
    }

    .cta-block h3 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .cta-block p {
        margin-bottom: 1.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 5px 0;
    }

    .legal-content {
        margin: 1.5rem auto;
    }

    .legal-block {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .legal-block h2 {
        font-size: 1.5rem;
    }

    .back-link {
        margin-top: 2rem;
    }

    .footer {
        padding: 1.5rem 0 0;
        margin-top: 1.5rem;
    }

    .footer-content {
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .footer-column h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .footer-links {
        font-size: 0.9rem;
    }

    .footer-links li {
        margin-bottom: 0.3rem;
    }

    .footer-bottom {
        padding: 0.8rem 0;
        font-size: 0.8rem;
    }

    .footer-bottom p {
        margin-bottom: 0.3rem;
    }

    .footer-signature {
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }

    /* Галерея на планшетах: 2 колонки, компактнее */
    .gallery-nav {
        top: 110px;
        padding: 0.7rem 0.8rem;
        gap: 0.4rem;
        margin: 0.8rem 0 1.5rem;
    }

    .gallery-nav-chip {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

    .deck-section {
        margin-bottom: 2.5rem;
        scroll-margin-top: 190px;
    }

    .deck-header {
        margin: 1.5rem 0 1rem;
        padding: 0.8rem 0 1rem;
    }

    .deck-header h2 {
        font-size: 1.6rem;
    }

    .deck-header p {
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 1rem;
    }

    .gallery-card-image {
        height: 240px;
    }
}

/* На узких мобилках — одна колонка */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-card-image {
        height: 320px;
    }
}

/* ===================== Колесо баланса жизни ===================== */

.balance-wheel-section {
    padding: 3rem 0 5rem;
}

.wheel-intro {
    max-width: 760px;
    margin: 1rem auto 2.5rem;
    padding: 1.2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.wheel-form-title {
    text-align: center;
    font-size: 1.4rem;
    margin: 2rem 0 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.wheel-form {
    max-width: 900px;
    margin: 0 auto;
}

.spheres-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
    margin-bottom: 2.5rem;
}

.sphere-item {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 1.2rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.sphere-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.sphere-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.sphere-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sphere-value {
    display: inline-block;
    min-width: 1.8rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-1);
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
    line-height: 1.3;
}

/* Кастомный range */
.sphere-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right,
        var(--accent-primary) 0%,
        var(--accent-primary) var(--fill, 50%),
        rgba(255, 255, 255, 0.08) var(--fill, 50%),
        rgba(255, 255, 255, 0.08) 100%);
    margin: 0;
}

.sphere-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.5);
    cursor: grab;
    transition: transform 0.15s ease;
}

.sphere-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.sphere-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.sphere-slider::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.sphere-slider::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    background: var(--accent-primary);
}

.sphere-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6366f1;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.5);
    cursor: grab;
    transition: transform 0.15s ease;
}

.sphere-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
}

.sphere-slider:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

.sphere-slider:focus-visible::-moz-range-thumb {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

.sphere-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: -0.1rem;
}

.wheel-submit {
    max-width: 320px;
    margin: 0.5rem auto 0;
}

/* --- Блок результатов --- */

.wheel-results {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    animation: wheelFadeIn 0.4s ease;
}

@keyframes wheelFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wheel-results-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.wheel-viz-wrap {
    max-width: 720px;
    margin: 0 auto 1.5rem;
    padding: 0.5rem;
}

.wheel-svg {
    width: 100%;
    height: auto;
    display: block;
    font-family: inherit;
    overflow: visible;
}

.wheel-grid-poly {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.wheel-grid-poly-outer {
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1.5;
}

.wheel-axis {
    stroke: rgba(255, 255, 255, 0.14);
    stroke-width: 1;
}

.wheel-polygon {
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.35));
    animation: wheelPolygonIn 0.5s ease both;
}

.wheel-vertex {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    animation: wheelPolygonIn 0.5s ease both;
}

@keyframes wheelPolygonIn {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

.wheel-polygon,
.wheel-vertex {
    transform-origin: 360px 360px;
    transform-box: view-box;
}

.wheel-label {
    font-size: 18px;
    font-weight: 600;
    fill: var(--text-primary);
    pointer-events: none;
}

.wheel-number {
    font-size: 14px;
    font-weight: 700;
    fill: #fff;
    pointer-events: none;
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.55);
    stroke-width: 3px;
}

.wheel-avg {
    text-align: center;
    margin: 1rem 0 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.wheel-avg-label {
    display: block;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
    margin-bottom: 0.3rem;
}

.wheel-avg-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    line-height: 1;
}

.wheel-avg-max {
    font-size: 1.5rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-left: 0.25rem;
}

.wheel-interpretation {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1.7rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
}

.wheel-interp-title {
    font-size: 1.35rem;
    color: var(--accent-primary);
    margin-bottom: 0.7rem;
}

.wheel-interp-body {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.wheel-interp-extra {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    color: var(--text-secondary);
    line-height: 1.7;
}

.wheel-interp-extra .sphere-num {
    display: inline-block;
    min-width: 1.5rem;
    text-align: center;
    padding: 0.05rem 0.45rem;
    background: var(--gradient-1);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
}

.wheel-gap {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

.wheel-extras {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Адаптив */
@media (max-width: 768px) {
    .balance-wheel-section { padding: 1.5rem 0 3rem; }

    .wheel-intro { padding: 1rem 1.1rem; font-size: 0.95rem; }

    .wheel-form-title {
        font-size: 1.15rem;
        margin: 1.5rem 0 1rem;
    }

    .spheres-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .sphere-item { padding: 0.9rem 1rem 0.8rem; }

    .wheel-results-title { font-size: 1.5rem; }

    .wheel-avg-value { font-size: 2.3rem; }

    .wheel-avg-max { font-size: 1.1rem; }

    .wheel-interpretation {
        padding: 1.2rem 1.2rem;
    }

    .wheel-interp-title { font-size: 1.15rem; }

    .wheel-label { font-size: 20px; }

    .wheel-number { font-size: 17px; }
}
