/* ============================================
   Minimalist Redesign v3.0 — УК ДОГЭЭ 1
   ============================================ */

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #f39c12;
    --gold-dark: #e67e22;
    --gold-light: #f5b041;
    --black: #111;
    --dark: #1a1a2e;
    --text: #374151;
    --text-muted: #6b7280;
    --bg: #fafafa;
    --white: #fff;
    --vk-blue: #4C75A3;
    --vk-blue-dark: #3a5a7f;
    --green: #10b981;
    --red: #ef4444;
    --border: #e5e7eb;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --transition: 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ============= HEADER ============= */
header {
    background: var(--black);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.875rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.02em;
}

#auth-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vk-login-btn button {
    background: var(--vk-blue);
    color: var(--white);
    border: none;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all var(--transition);
}

.vk-login-btn button:hover {
    background: var(--gold);
}

#user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.07);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
}

#user-name {
    font-weight: 500;
    font-size: 0.85rem;
}

.logout-btn {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: inherit;
    transition: all var(--transition);
}

.logout-btn:hover {
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
}

/* ============= HERO ============= */
.hero {
    background: linear-gradient(165deg, rgba(10,10,10,0.8), rgba(100,80,30,0.65)), url('IMG_1448.png');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 6rem 2rem 5.5rem;
}

.hero-content {
    max-width: 650px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold-light);
    margin-bottom: 1.25rem;
}

.hero-main-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.65);
    font-weight: 400;
}

/* ============= SECTIONS ============= */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 0.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============= PRODUCTS ============= */
.products {
    padding: 5rem 2rem;
    background: var(--white);
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.product-card.featured {
    border-color: var(--gold);
}

.product-card.featured:hover {
    box-shadow: 0 8px 30px rgba(243, 156, 18, 0.12);
}

.product-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--gold);
    color: var(--white);
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.product-header {
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.product-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.55;
    font-size: 0.9rem;
}

.product-features {
    list-style: none;
    margin-bottom: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.product-features li {
    color: var(--text);
    font-size: 0.875rem;
    padding-left: 1.1rem;
    position: relative;
}

.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    background: var(--gold);
    border-radius: 50%;
}

.product-footer {
    padding: 1.25rem 1.5rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.price-block {
    text-align: left;
}

.price {
    font-size: 1.5rem;
    color: var(--dark);
    display: block;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.price-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============= BUTTONS ============= */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.btn-primary,
.btn-premium,
.btn-secondary {
    background: var(--gold);
    color: var(--white);
}

.btn-primary:hover,
.btn-premium:hover,
.btn-secondary:hover {
    background: var(--gold-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243,156,18,0.2);
}

/* ============= HOW IT WORKS ============= */
.how-it-works {
    padding: 5rem 2rem;
    background: var(--bg);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.steps-grid.steps-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
}

.step-item {
    text-align: center;
    padding: 2rem 1.25rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.step-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.step-icon {
    margin-bottom: 1.25rem;
}

.step-number {
    display: inline-flex;
    width: 44px;
    height: 44px;
    background: var(--black);
    color: var(--white);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
}

.step-item h4 {
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.step-item p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.85rem;
}

/* ============= FEATURES ============= */
.features {
    padding: 5rem 2rem;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 2rem 1.25rem;
}

.feature-icon {
    margin-bottom: 1rem;
    color: var(--gold);
    display: flex;
    justify-content: center;
}

.feature-item h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-item p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.875rem;
}

/* ============= FOOTER ============= */
footer {
    background: var(--black);
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 2rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

footer p {
    font-size: 0.8rem;
}

footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color var(--transition);
}

footer a:hover {
    color: var(--white);
}

footer p + p {
    margin-top: 0.4rem;
}

/* ============= LOADING ============= */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: var(--white);
}

.loading p {
    font-weight: 500;
    font-size: 0.9rem;
}

.spinner {
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top: 2px solid var(--white);
    width: 36px;
    height: 36px;
    animation: spin 0.7s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============= NOTIFICATIONS ============= */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-weight: 500;
    z-index: 20000;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
    max-width: 380px;
    font-size: 0.875rem;
}

.notification-success { background: var(--green); }
.notification-error { background: var(--red); }
.notification-info { background: var(--gold); }
.notification-warning { background: var(--gold); }

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    .hero {
        padding: 4rem 1.5rem 3.5rem;
    }

    .hero-main-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .products {
        padding: 3.5rem 1rem;
    }

    .products-container {
        grid-template-columns: 1fr;
    }

    .product-footer {
        flex-direction: column;
        text-align: center;
    }

    .price-block { text-align: center; }

    .btn {
        width: 100%;
        min-width: auto;
    }

    .how-it-works, .features {
        padding: 3.5rem 1rem;
    }

    .steps-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-main-title {
        font-size: 1.75rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.35rem;
    }
}

/* ============= MODAL ============= */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 2.5rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 460px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h2 {
    color: var(--dark);
    margin-bottom: 0.35rem;
    font-size: 1.35rem;
    text-align: center;
    font-weight: 700;
}

.modal-description {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.modal-instruction-box {
    background: var(--bg);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1.25rem 0;
    border: 1px solid var(--border);
}

.modal-instruction-title {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--dark);
}

.btn-vk-community {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: var(--vk-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin: 0.5rem 0;
    transition: all var(--transition);
    font-size: 0.85rem;
}

.btn-vk-community:hover {
    background: var(--vk-blue-dark);
}

.modal-instruction-hint {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.phone-input-group {
    margin-bottom: 1.5rem;
}

.phone-input-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-family: inherit;
}

.phone-input-group input:focus {
    outline: none;
    border-color: var(--dark);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.phone-input-group input::placeholder {
    color: #9ca3af;
}

.consent-block {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--dark);
    text-decoration: underline;
}

.modal-buttons {
    display: flex;
    gap: 8px;
    margin-top: 1.25rem;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.modal-btn-primary {
    background: var(--black);
    color: var(--white);
}

.modal-btn-primary:not(:disabled):hover {
    background: #333;
}

.modal-btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.modal-btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.modal-btn-secondary:hover {
    background: #e5e7eb;
}

.error-message {
    background: #fef2f2;
    color: var(--red);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
    border: 1px solid #fecaca;
}

@media (max-width: 600px) {
    .modal-content {
        margin: 20% auto;
        padding: 1.75rem 1.25rem;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 1.2rem;
    }

    .modal-buttons {
        flex-direction: column;
    }
}

/* ============= SUCCESS POPUP ============= */
.success-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.success-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    max-width: 480px;
    width: 90%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: slideUp 0.3s ease;
}

.success-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.success-popup-content h2 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.success-message {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.redirect-countdown {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 1.25rem;
    animation: pulse 1s ease-in-out infinite;
}

.redirect-countdown span {
    font-size: 1.1rem;
    font-weight: 800;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.success-instructions {
    background: #f0fdf4;
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1.25rem 0;
    border-left: 3px solid var(--green);
    text-align: left;
}

.success-instructions p {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.6rem;
}

.success-instructions ol {
    list-style-position: inside;
    color: var(--text);
    font-size: 0.875rem;
    line-height: 1.9;
}

.success-instructions ol a {
    color: var(--vk-blue);
    text-decoration: underline;
}

.success-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.btn-vk-open {
    flex: 1;
    padding: 12px 20px;
    background: var(--vk-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.btn-vk-open:hover {
    background: var(--vk-blue-dark);
}

.btn-close-popup {
    flex: 1;
    padding: 12px 20px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-close-popup:hover {
    background: #e5e7eb;
}

@keyframes slideUp {
    from { transform: translate(-50%, -45%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

@media (max-width: 600px) {
    .success-popup-content {
        padding: 1.75rem 1.25rem;
        width: 95%;
    }

    .success-popup-content h2 {
        font-size: 1.25rem;
    }

    .success-buttons {
        flex-direction: column;
    }

    .btn-vk-open,
    .btn-close-popup {
        width: 100%;
    }
}