:root {
    --cos-primary: #86198F;
    --cos-bg: #FDF4FF;
    --cos-border: #F0ABFC;
    --cos-hover: #FAE8FF;
    --cos-purple: #C026D3;
    --cos-pink: #EC4899;
    --cos-green: #10B981;
    --text-main: #1F2937;
}

.cosmetics-page {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

/* === HEADER & LAYOUT === */
.classic-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 24px;
}

.classic-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 12px 0;
    color: #111827;
}

.intro-lead {
    font-size: 18px;
    color: #4B5563;
    line-height: 1.6;
    max-width: 800px;
}

.back-link {
    font-size: 14px;
    color: #6B7280;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--cos-primary);
}

.classic-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
}

@media (min-width: 992px) {
    .classic-layout {
        grid-template-columns: 2fr 1fr;
    }
}

/* === CALCULATOR CARD === */
.calculator-box {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 64px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.calc-form {
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.section-label {
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 16px;
    color: #0F172A;
}

/* Product Selector */
.product-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.product-card {
    cursor: pointer;
    position: relative;
}

.product-card input {
    display: none;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s;
}

.product-card input:checked + .card-content {
    border-color: var(--cos-primary);
    background: var(--cos-bg);
    box-shadow: 0 4px 12px rgba(134, 25, 143, 0.15);
    transform: translateY(-2px);
}

.card-content .icon {
    font-size: 24px;
}

.card-content .title {
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

.card-content .sub {
    font-size: 11px;
    color: #6B7280;
}

/* Input Grid */
.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
    .product-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

.input-group {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    padding-right: 50px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.2s;
    box-sizing: border-box;
    background: #F8FAFC;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--cos-primary);
    box-shadow: 0 0 0 3px rgba(134, 25, 143, 0.1);
    background: #fff;
}

.suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 14px;
    color: #6B7280;
}

.helper-text {
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
    display: block;
    line-height: 1.4;
}

/* === RESULT SECTION === */
.calc-result {
    background: var(--cos-bg);
    border: 1px solid var(--cos-border);
    border-radius: 16px;
    padding: 32px;
}

.result-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px dashed var(--cos-border);
}

.result-header h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--cos-primary);
}

.total-amount {
    font-size: 48px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.2;
}

.total-caption {
    font-size: 14px;
    color: #6B7280;
    margin-top: 8px;
}

/* === KILLER FEATURE: TUBE VISUALIZER === */
.tube-visualizer {
    margin: 32px 0;
    padding: 32px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--cos-border);
}

.tube-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

/* ИСПРАВЛЕНО: Тюбик стоит на дне, крышка сверху */
.tube-body {
    width: 100px;
    height: 200px;
    border: 3px solid #E5E7EB;
    border-radius: 12px 12px 20px 20px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
}

.tube-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--cos-purple) 0%, var(--cos-pink) 100%);
    transition: height 1s ease-out;
    height: 100%;
}

/* Анимация волны жидкости */
.liquid-wave {
    position: absolute;
    top: -10px;
    left: 0;
    width: 200%;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: wave 3s ease-in-out infinite;
}

.liquid-wave.delay-1 {
    animation-delay: 0.5s;
}

.liquid-wave.delay-2 {
    animation-delay: 1s;
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-25%) translateY(3px);
    }
}

.tube-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tube-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 4px;
}

.tube-percent {
    font-size: 20px;
    font-weight: 800;
}

/* ИСПРАВЛЕНО: Крышка теперь сверху и синхронизирована по ширине */
.tube-cap {
    width: 100px; /* Синхронно с tube-body */
    height: 30px;
    background: linear-gradient(180deg, #E5E7EB 0%, #D1D5DB 100%);
    border-radius: 6px 6px 0 0;
    margin-bottom: -3px; /* Прижимаем к тюбику */
    border: 3px solid #E5E7EB;
    border-bottom: none;
}

.tube-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tube-stat {
    text-align: center;
    padding: 12px;
    background: var(--cos-bg);
    border-radius: 8px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 4px;
}

.tube-stat strong {
    font-size: 15px;
    color: var(--cos-primary);
    font-weight: 700;
}

/* Days Countdown - ИСПРАВЛЕНО для мобильных */
.days-countdown {
    margin-top: 24px;
}

.countdown-track {
    height: 12px;
    background: #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.countdown-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cos-green) 0%, var(--cos-purple) 50%, var(--cos-pink) 100%);
    border-radius: 6px;
    width: 0%;
    transition: width 1s ease-out;
}

/* ИСПРАВЛЕНО: Метки шкалы теперь всегда видны */
.countdown-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #6B7280;
    font-weight: 700;
    width: 100%;
}

.countdown-labels span {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.countdown-labels span:first-child {
    text-align: left;
}

.countdown-labels span:last-child {
    text-align: right;
}

/* Savings Tip */
.savings-tip {
    margin-top: 24px;
    padding: 16px;
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #92400E;
    font-size: 14px;
}

.savings-tip i {
    font-size: 20px;
    flex-shrink: 0;
}

/* Meta Stats */
.meta-stats {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--cos-border);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-row strong {
    color: var(--cos-primary);
    font-weight: 700;
}

/* === CONTENT STYLES === */
.content-article {
    margin-top: 64px;
    line-height: 1.8;
    color: #334155;
}

.content-article h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0F172A;
    margin-top: 0;
    margin-bottom: 24px;
}

.section-h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0F172A;
    margin-top: 64px;
    margin-bottom: 32px;
}

.article-lead {
    font-size: 18px;
    margin-bottom: 32px;
    color: #475569;
}

/* Meta Bar */
.content-meta-bar {
    display: flex;
    gap: 24px;
    margin-bottom: 48px;
    padding: 24px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 180px;
    min-width: 160px;
    padding: 12px 16px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #F3F4F6;
}

.meta-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cos-bg);
    border-radius: 10px;
    flex-shrink: 0;
}

.meta-icon i {
    font-size: 24px;
    color: var(--cos-primary);
}

.meta-item div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

.meta-item .label {
    font-size: 12px;
    text-transform: uppercase;
    color: #6B7280;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.meta-item .val {
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
}

/* Formulas Section */
.formulas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.formula-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-radius: 24px;
    padding: 24px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.formula-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.formula-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.formula-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.badge-blue {
    background: #2563EB;
    color: #fff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-green {
    background: var(--cos-green);
    color: #fff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.formula-card p {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

.math-expression {
    background: var(--cos-bg);
    border: 1px solid var(--cos-border);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--cos-primary);
    text-align: center;
    margin-bottom: 16px;
    font-size: 15px;
}

/* Divider */
.soft-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
    margin: 48px 0;
}

/* Description */
.calc-description p {
    font-size: 16px;
    line-height: 1.7;
    color: #6B7280;
    margin-bottom: 24px;
}

.calc-description strong {
    color: var(--text-main);
}

/* Icon Headings */
.icon-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    margin-top: -4px;
}

.header-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

.purple-icon svg {
    color: var(--cos-primary);
}

.green-icon svg {
    color: var(--cos-green);
}

.yellow-icon svg {
    color: #F59E0B;
}

.small-heading {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 20px;
}

.small-heading .header-icon {
    width: 40px;
    height: 40px;
}

.small-heading .header-icon svg {
    width: 20px;
    height: 20px;
}

/* FAQ */
.faq-section .faq-item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-section .faq-item[open] {
    border-color: var(--cos-primary);
    box-shadow: 0 4px 20px rgba(134, 25, 143, 0.15);
}

summary.faq-question {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    list-style: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary.faq-question:hover {
    background-color: #F9FAFB;
}

.faq-section .faq-item[open] summary.faq-question {
    color: var(--cos-primary);
    background: var(--cos-bg);
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    color: #6B7280;
    font-weight: 400;
    line-height: 1;
}

.faq-question .icon-plus {
    display: none;
}

.faq-section .faq-item[open] summary.faq-question::after {
    content: '−';
    color: var(--cos-primary);
}

.faq-answer {
    padding: 20px;
    color: #6B7280;
    line-height: 1.6;
    font-size: 15px;
}

/* === МОБИЛЬНАЯ АДАПТАЦИЯ (ПОЛНАЯ ОПТИМИЗАЦИЯ) === */
@media (max-width: 768px) {
    .calculator-box {
        padding: 24px;
    }
    
    .calc-result {
        padding: 24px;
    }
    
    .total-amount {
        font-size: 36px;
    }
    
    .formulas-grid {
        grid-template-columns: 1fr;
    }
    
    /* Мета-карточки на мобильном */
    .content-meta-bar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .meta-item {
        width: 100%;
        flex: 1 1 100%;
        padding: 14px 16px;
    }
    
    .meta-icon {
        width: 40px;
        height: 40px;
    }
    
    .meta-icon i {
        font-size: 20px;
    }
    
    /* Tube на мобильном - ИСПРАВЛЕНО */
    .tube-visualizer {
        padding: 20px;
    }
    
    .tube-body {
        width: 80px;
        height: 160px;
    }
    
    /* ИСПРАВЛЕНО: Крышка синхронизирована с тюбиком на мобильном */
    .tube-cap {
        width: 80px; /* Синхронно с tube-body */
        height: 24px;
    }
    
    .tube-icon {
        font-size: 24px;
    }
    
    .tube-percent {
        font-size: 16px;
    }
    
    .tube-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* ИСПРАВЛЕНО: Шкала дней на мобильном */
    .countdown-labels {
        font-size: 10px;
    }
    
    .countdown-labels span {
        font-size: 10px;
    }
    
    .icon-heading {
        font-size: 20px;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .header-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    
    .header-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .formula-card {
        padding: 20px;
        text-align: center;
        align-items: center;
    }
    
    .formula-header {
        align-items: center;
        width: 100%;
    }
    
    .math-expression {
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .info-wrapper {
        margin-top: 40px;
        padding-top: 40px;
    }
    
    /* Classic header на мобильном */
    .classic-header h1 {
        font-size: 24px;
    }
    
    .intro-lead {
        font-size: 16px;
    }
    
    /* Input grid на мобильном */
    .input-grid {
        gap: 16px;
    }
    
    .input-group label {
        font-size: 13px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .helper-text {
        font-size: 11px;
    }
    
    /* Product cards на мобильном */
    .card-content {
        padding: 16px 12px;
    }
    
    .card-content .icon {
        font-size: 20px;
    }
    
    .card-content .title {
        font-size: 12px;
    }
    
    /* FAQ на мобильном */
    .faq-section .faq-item {
        margin-bottom: 10px;
    }
    
    summary.faq-question {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .faq-answer {
        padding: 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .calculator-box {
        padding: 16px;
        margin-bottom: 40px;
    }
    
    .calc-result {
        padding: 16px;
    }
    
    .total-amount {
        font-size: 32px;
    }
    
    .result-header h3 {
        font-size: 16px;
    }
    
    .tube-body {
        width: 70px;
        height: 140px;
    }
    
    /* ИСПРАВЛЕНО: На ultra-mobile тоже синхронно */
    .tube-cap {
        width: 70px; /* Синхронно с tube-body */
        height: 20px;
    }
    
    .tube-icon {
        font-size: 20px;
    }
    
    .tube-percent {
        font-size: 14px;
    }
    
    .meta-item {
        padding: 12px 14px;
    }
    
    .meta-icon {
        width: 36px;
        height: 36px;
    }
    
    .meta-icon i {
        font-size: 18px;
    }
    
    .meta-item .label {
        font-size: 11px;
    }
    
    .meta-item .val {
        font-size: 15px;
    }
    
    .stat-row {
        font-size: 14px;
    }
    
    .savings-tip {
        font-size: 13px;
        padding: 12px;
        flex-direction: column;
        text-align: center;
    }
    
    .savings-tip i {
        font-size: 18px;
    }
    
    /* ИСПРАВЛЕНО: Шкала на очень маленьких экранах */
    .countdown-labels {
        font-size: 9px;
    }
    
    .countdown-labels span {
        font-size: 9px;
    }
}