/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Фон для главной страницы */
body.main-page {
    background: #ffffff;
}

/* Фон для страницы спасибо */
body.thank-you-page {
    background: #f6f7f8;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .container {
        padding: 24px;
    }
}

/* Content blocks - light gray rounded containers */
.content-block {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: none;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Цвет блоков для главной страницы */
body.main-page .content-block {
    background: #f2f2f2;
}

/* Цвет блоков для страницы спасибо */
body.thank-you-page .content-block {
    background: #ffffff;
}

@media (min-width: 768px) {
    .content-block {
        border-radius: 20px;
        padding: 24px;
        margin-bottom: 16px;
    }
}

/* Image blocks - separate rounded images */
.image-block {
    width: 100%;
    max-width: 100%;
    margin-bottom: 16px;
    overflow: hidden;
}

.image-block img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

@media (min-width: 768px) {
    .image-block {
        margin-bottom: 16px;
    }
    
    .image-block img {
        border-radius: 20px;
    }
}

/* Hero section */
.hero-section .content-block {
    padding: 16px;
    margin-bottom: 16px;
}

body.main-page .hero-section .content-block {
    background: #f2f2f2;
}

body.thank-you-page .hero-section .content-block {
    background: #ffffff;
}

@media (min-width: 768px) {
    .hero-section .content-block {
        padding: 24px;
        margin-bottom: 16px;
    }
}

/* Price section */
.price-section .content-block {
    padding: 16px;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .price-section .content-block {
        padding: 20px;
        margin-bottom: 16px;
    }
}

/* Typography */
.main-title {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    font-weight: 300;
    color: #6e6e73;
    text-align: center;
    margin-bottom: 16px;
    text-transform: lowercase;
}

.section-title {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.3;
    color: #1d1d1f;
    margin-bottom: 20px;
    text-align: center;
}

.feature-title {
    font-size: 18px;
    font-weight: 400;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.description-text {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    color: #1d1d1f;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.highlight-text {
    font-size: 16px;
    font-weight: 300;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .main-title {
        font-size: 32px;
        margin-bottom: 16px;
    }
    
    .subtitle {
        font-size: 18px;
        margin-bottom: 32px;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 24px;
    }
    
    .feature-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .description-text {
        font-size: 16px;
        text-align: justify;
    }
    
    .highlight-text {
        font-size: 18px;
        margin-bottom: 32px;
    }
}

/* Feature lists */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    color: #1d1d1f;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    .feature-list li {
        font-size: 16px;
        margin-bottom: 16px;
    }
}

.feature-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #007AFF;
    font-weight: 700;
    font-size: 18px;
}

.feature-list li:last-child {
    margin-bottom: 0;
}

/* New Price Block */
.new-price-block {
    text-align: center;
    margin-bottom: 24px;
}

.current-price {
    position: relative;
    display: inline-block;
    font-size: 36px;
    font-weight: 900;
    color: #1d1d1f;
    margin-bottom: 4px;
    line-height: 1;
}

.discount-badge-new {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 8px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.old-price-text {
    font-size: 16px;
    color: #999;
    font-weight: 300;
    margin-top: 2px;
}

@media (min-width: 768px) {
    .current-price {
        font-size: 48px;
        margin-bottom: 6px;
    }
    
    .discount-badge-new {
        margin-left: 12px;
        padding: 8px 16px;
        border-radius: 16px;
        font-size: 16px;
    }
    
    .old-price-text {
        font-size: 18px;
        margin-top: 4px;
    }
}



/* CTA Button */
.cta-button {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FF8C00 0%, #FF6B00 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 400;
    text-align: center;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.4);
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: linear-gradient(135deg, #e67e00 0%, #d65a00 100%);
    box-shadow: 0 0 25px rgba(255, 140, 0, 0.6);
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .cta-button {
        margin: 12px 0;
        padding: 16px 24px;
        border-radius: 25px;
        font-size: 16px;
        letter-spacing: 0.5px;
        box-shadow: 0 0 25px rgba(255, 140, 0, 0.5);
    }
}

/* Reviews section */
.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 800px;
    max-height: 800px;
    overflow: hidden;
    position: relative;
}

/* Градиент снизу для эффекта исчезновения */
.reviews-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
    z-index: 10;
}

/* Reviews actions */
.reviews-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.reviews-actions .cta-button {
    flex: 1;
    min-width: 120px;
    max-width: 160px;
    padding: 10px 12px;
    font-size: 13px;
    box-shadow: none;
}

.reviews-actions .cta-button:hover {
    box-shadow: none;
}

/* Review reactions - positioned like Telegram */
.review-reactions {
    display: flex;
    gap: 6px;
    position: absolute;
    bottom: 8px;
    right: 12px;
    z-index: 5;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reaction-btn.compact {
    padding: 4px 8px;
    gap: 3px;
    font-size: 11px;
    border-radius: 12px;
}

.reaction-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.reaction-btn.active {
    background: #fff3e0;
    border-color: #FF8C00;
    color: #FF8C00;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(255, 140, 0, 0.2);
}

.reaction-btn.active.like {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #4caf50;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.reaction-btn.active.dislike {
    background: #ffebee;
    border-color: #f44336;
    color: #f44336;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.2);
}

.reaction-emoji {
    font-size: 14px;
}

.reaction-count {
    font-weight: 500;
    min-width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.review-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px;
    padding-bottom: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 8px;
}

.review-item.new-review {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b3 100%);
    border: 2px solid #FF8C00;
    box-shadow: 0 4px 20px rgba(255, 140, 0, 0.3);
    animation: newReviewPulse 2s ease-in-out;
}

@keyframes newReviewPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 140, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 25px rgba(255, 140, 0, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 140, 0, 0.3);
    }
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.review-header {
    margin-bottom: 8px;
}

.review-info {
    width: 100%;
}

.review-name {
    font-size: 13px;
    font-weight: 400;
    color: #1d1d1f;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-date {
    font-size: 11px;
    font-weight: 300;
    color: #6e6e73;
    margin-left: 8px;
}

.review-text {
    font-size: 12px;
    font-weight: 300;
    line-height: 1.35;
    color: #1d1d1f;
    margin: 0;
    padding-bottom: 32px;
}

.review-photos {
    margin: 8px 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.review-photos img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.review-photos img:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.photo-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.photo-more:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .review-item {
        padding: 20px;
        border-radius: 16px;
    }
    

    
    .review-header {
        margin-bottom: 16px;
    }
    
    .review-name {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .review-date {
        font-size: 14px;
    }
    
    .review-text {
        font-size: 15px;
        line-height: 1.6;
    }
}

/* Order section - dark theme */
.order-section {
    width: 100%;
    max-width: 100%;
    background: linear-gradient(135deg, #1d1d1f 0%, #2d2d30 100%);
    border-radius: 16px;
    padding: 20px 16px;
    margin-bottom: 16px;
    color: white;
    overflow: hidden;
}

.order-title {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.3;
    color: white;
    text-align: center;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.order-subtitle {
    font-size: 15px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 24px;
    text-transform: lowercase;
    word-wrap: break-word;
}

@media (min-width: 768px) {
    .order-section {
        border-radius: 20px;
        padding: 40px 32px;
        margin-bottom: 24px;
    }
    
    .order-title {
        font-size: 32px;
        margin-bottom: 16px;
    }
    
    .order-subtitle {
        font-size: 18px;
        margin-bottom: 32px;
    }
}

.order-section .new-price-block {
    margin-bottom: 16px;
}

.order-section .current-price {
    color: white;
}

.order-section .old-price-text {
    color: rgba(255, 255, 255, 0.7);
}



@media (min-width: 768px) {
    .order-section .new-price-block {
        margin-bottom: 20px;
    }
}



/* Form styles */
.order-form {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.order-section .order-form button.cta-button[type="submit"] {
    width: auto !important;
    display: inline-block !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 60px;
    padding-right: 60px;
}

.form-field {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: none;
    border-radius: 20px;
    background: white;
    color: #333;
    font-size: 15px;
    font-weight: 300;
    font-family: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

@media (min-width: 768px) {
    .order-form {
        max-width: 400px;
    }
    
    .form-field {
        padding: 16px 24px;
        margin-bottom: 20px;
        border-radius: 25px;
        font-size: 16px;
    }
}

.form-field::placeholder {
    color: #999;
}

.form-field:focus {
    outline: none !important;
    border: 2px solid #FF8C00 !important;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.2) !important;
}

/* Убираем стандартную подсветку браузера */
.form-field:focus-visible {
    outline: none !important;
}

input:focus {
    outline: none !important;
}

/* Убираем подсказки и автозаполнение */
.form-field::-webkit-contacts-auto-fill-button,
.form-field::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    height: 0;
    width: 0;
    margin: 0;
}

.form-field:-webkit-autofill,
.form-field:-webkit-autofill:hover,
.form-field:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
    -webkit-text-fill-color: #333;
}

/* Checkbox styles */
.checkbox-container {
    margin: 12px 0 0;
    text-align: center;
}

.custom-checkbox {
    display: inline-flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 11px;
    font-weight: 300;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
    max-width: 100%;
}

@media (min-width: 768px) {
    .checkbox-container {
        margin: 16px 0 0;
    }
    
    .custom-checkbox {
        font-size: 12px;
        max-width: 400px;
    }
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    flex-shrink: 0;
    position: relative;
    margin-top: 1px;
    margin-right: 8px;
}

.custom-checkbox input:checked ~ .checkmark {
    background: #FF8C00;
    border-color: #FF8C00;
}

.custom-checkbox input:checked ~ .checkmark:after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 6px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.custom-checkbox a {
    color: #FF8C00;
    text-decoration: underline;
}



.products-count {
    text-align: center;
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 20px;
    font-style: italic;
}

@media (min-width: 768px) {
    .products-count {
        font-size: 16px;
        margin-top: 24px;
    }
}

/* Footer */
.footer {
    background: transparent;
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 11px;
    font-weight: 300;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .footer {
        padding: 20px;
        font-size: 12px;
    }
}

.footer a {
    color: #FF8C00;
    text-decoration: none;
}



/* Utility classes */
.text-center {
    text-align: center;
}

/* Prevent horizontal scroll */
.container > * {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Additional responsive adjustments */
@media (min-width: 1200px) {
    .container {
        padding: 32px;
    }
}

/* Fix for very small screens */
@media (max-width: 320px) {
    .container {
        padding: 8px;
    }
    
    .content-block {
        padding: 12px;
    }
    
    .price-item {
        padding: 12px 4px;
    }
    
    .discount-badge {
        right: 4px;
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .cta-button {
        font-size: 14px;
        padding: 12px 8px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Phone error styles */
.phone-error {
    color: #FF3B30;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}

/* Loading states */
.cta-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus styles for accessibility */
.cta-button:focus,
.form-field:focus {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

.custom-checkbox:focus-within {
    outline: none;
}

.custom-checkbox input:focus ~ .checkmark {
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.3);
}



/* Promo badge styles */
.promo-badge {
    display: inline-block;
}

/* Центрирование бейджа */
.badge-stamp {
    display: block !important;
    width: fit-content;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Promo stock number animation - FINAL VERSION */
.promo-stock-number {
    display: inline-block !important;
    font-size: 56px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    color: #ff5226 !important;
    animation: stockPulse 2s ease-in-out infinite !important;
    /* DEBUG: If you see orange, check browser cache */
}

@keyframes stockPulse {
    0% {
        transform: scale(1);
        color: #ff5226;
    }
    50% {
        transform: scale(1.1);
        color: #ff0000;
    }
    100% {
        transform: scale(1);
        color: #ff5226;
    }
}

/* Адаптивность для счетчика акции */
@media (max-width: 768px) {
    .promo-stock-number {
        font-size: 48px !important;
    }
}

@media (max-width: 480px) {
    .promo-stock-number {
        font-size: 42px !important;
    }
}

/* Subtle uniqueness layer */
:root {
    --ux-card-bg: #f3f4f6;
    --ux-card-radius: 14px;
    --ux-card-gap: 15px;
    --ux-primary-a: #ff8700;
    --ux-primary-b: #ff5d00;
    --ux-primary-shadow: rgba(255, 122, 0, 0.42);
    --ux-text-main: #232326;
}

body.main-page {
    background: #ffffff;
}

.container {
    padding: 15px;
}

.content-block,
.image-block,
.hero-section .content-block,
.order-section {
    margin-bottom: var(--ux-card-gap);
}

body.main-page .content-block,
body.main-page .hero-section .content-block {
    background: var(--ux-card-bg);
}

.content-block {
    border-radius: var(--ux-card-radius);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.image-block img {
    border-radius: var(--ux-card-radius);
}

.section-title,
.feature-title,
.description-text,
.highlight-text,
.review-name,
.review-text {
    color: var(--ux-text-main);
}

.description-text {
    letter-spacing: 0.01em;
}

.cta-button {
    background: linear-gradient(138deg, var(--ux-primary-a) 0%, var(--ux-primary-b) 100%);
    border-radius: 18px;
    box-shadow: 0 6px 20px var(--ux-primary-shadow);
}

.cta-button:hover {
    background: linear-gradient(138deg, #ea7a00 0%, #d85800 100%);
    box-shadow: 0 8px 24px rgba(240, 104, 0, 0.5);
}

.order-section {
    border-radius: 15px;
    background: linear-gradient(140deg, #1f2023 0%, #2a2b2f 62%, #303238 100%);
}

.form-field {
    border-radius: 18px;
}

@media (min-width: 768px) {
    .container {
        padding: 22px;
    }

    .content-block,
    .image-block,
    .hero-section .content-block,
    .order-section {
        margin-bottom: 18px;
    }

    .content-block,
    .image-block img {
        border-radius: 18px;
    }

    .cta-button {
        border-radius: 22px;
    }

    .form-field {
        border-radius: 22px;
    }
}

/* Print styles */
@media print {
    .cta-button,
    .order-section {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .content-block {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
