:root {
    --pan-orange: #EA580C;
    --pan-bg: #FFF7ED;
    --pan-border: #FED7AA;
    --pan-text: #431407;
    --pan-gray: #6B7280;
}

.pancake-page { font-family: 'Inter', sans-serif; color: var(--pan-text); }

/* --- 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(--pan-orange); }

.classic-layout { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 992px) { .classic-layout { grid-template-columns: 2fr 1fr; } }

/* --- CALCULATOR UI --- */
.calculator-box {
    background: #fff; border: 1px solid #E5E7EB; border-radius: 16px;
    padding: 32px; margin-bottom: 56px; box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.calc-form { margin-bottom: 40px; display: flex; flex-direction: column; gap: 32px; }
.section-label { display: block; font-weight: 700; font-size: 16px; margin-bottom: 16px; color: #111827; }

/* Radio Cards */
.recipe-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.radio-card { cursor: pointer; position: relative; }
.radio-card input { display: none; }
.card-content {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16px 12px; border: 2px solid #E5E7EB; border-radius: 12px;
    background: #fff; transition: all 0.2s;
}
.card-content .icon { font-size: 26px; }
.card-content .title { font-weight: 600; font-size: 15px; }
.card-content .sub { font-size: 12px; color: #6B7280; }
.radio-card input:checked + .card-content {
    border-color: var(--pan-orange); background: var(--pan-bg);
    box-shadow: 0 4px 8px rgba(234, 88, 12, 0.1); transform: translateY(-2px);
}

/* --- SLIDER FIX (ROBUST CROSS-BROWSER) --- */
.range-wrapper { position: relative; padding: 0 5px; }
.label-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.range-val { font-size: 24px; font-weight: 800; color: var(--pan-orange); }

/* Сброс стилей input */
.slider {
    -webkit-appearance: none; /* Убираем дефолт Chrome/Safari */
    width: 100%;
    background: transparent; /* Важно: фон рисуем на треке, а не на инпуте */
    cursor: pointer;
    margin: 10px 0;
}
.slider:focus { outline: none; }

/* 1. СТИЛИ ДЛЯ WEBKIT (Chrome, Safari, Edge) */
/* Трек (Линия) */
.slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #FED7AA;
    border-radius: 4px;
    border: none;
}
/* Бегунок (Точка) */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--pan-orange);
    border: 4px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    /* Математика центрирования: (высота трека 6px - высота точки 24px) / 2 = -9px */
    margin-top: -9px; 
    transition: transform 0.1s;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.1); }

/* 2. СТИЛИ ДЛЯ MOZILLA (Firefox) */
/* Трек */
.slider::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #FED7AA;
    border-radius: 4px;
    border: none;
}
/* Бегунок */
.slider::-moz-range-thumb {
    height: 24px; /* В Firefox размер включает бордер, если box-sizing не content-box */
    width: 24px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--pan-orange);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-sizing: border-box; /* Важно для одинакового размера */
}

/* Подписи под слайдером */
.range-labels { display: flex; justify-content: space-between; color: #9CA3AF; font-size: 12px; margin-top: 8px; }

/* --- RESULT BOX --- */
.calc-result { background: var(--pan-bg); border: 1px solid var(--pan-border); border-radius: 12px; padding: 24px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.ing-col h3 { margin: 0 0 20px 0; font-size: 18px; color: #9A3412; }
.ing-list { list-style: none; padding: 0; margin: 0 0 24px 0; }
.ing-list li {
    display: flex; justify-content: space-between; padding: 10px 0;
    border-bottom: 1px dashed rgba(154, 52, 18, 0.2); font-size: 15px;
}
.ing-list li span:last-child { font-weight: 700; color: #C2410C; }
.meta-stats { background: rgba(255,255,255,0.7); padding: 16px; border-radius: 8px; }
.stat-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.stat-row strong { color: #EA580C; }

/* --- VISUAL STACK --- */
.visual-col {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    min-height: 280px; border-left: 1px solid rgba(154, 52, 18, 0.15); padding-left: 32px;
}
.plate-base { width: 180px; height: 10px; background: #E5E7EB; border-radius: 5px; margin-top: -3px; }
.stack-container { display: flex; flex-direction: column-reverse; align-items: center; width: 100%; }
.pancake {
    width: 150px; height: 12px; background: #FDBA74; border: 2px solid #EA580C;
    border-radius: 50%; margin-bottom: -9px; position: relative;
}
.pancake:nth-child(even) { background: #FED7AA; }
.butter-pat {
    width: 25px; height: 16px; background: #FDE047; border-radius: 3px;
    position: absolute; top: -12px; box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
.stack-caption { margin-top: 20px; font-weight: 600; color: #9A3412; font-size: 13px; }

/* --- CONTENT --- */
.content-article h2 { font-size: 26px; font-weight: 800; color: #111827; margin-bottom: 20px; }
.section-h3 { font-size: 22px; color: #111827; margin-bottom: 24px; font-weight: 700; }

.recipe-meta-bar {
    display: flex; gap: 24px; margin-bottom: 40px; padding: 16px 20px;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
}
.meta-item { display: flex; align-items: center; gap: 10px; }
.meta-item i { font-size: 24px; color: var(--pan-orange); }
.meta-item .label { font-size: 11px; text-transform: uppercase; color: #6B7280; font-weight: 600; }
.meta-item .val { font-size: 15px; font-weight: 700; color: #111827; }

.cooking-steps { position: relative; padding-left: 20px; margin-bottom: 48px; }
.cooking-steps::before {
    content: ''; position: absolute; left: 15px; top: 10px; bottom: 10px;
    width: 2px; background: #E5E7EB;
}
.step-item { position: relative; padding-left: 40px; margin-bottom: 32px; }
.step-item::after {
    content: ''; position: absolute; left: 5px; top: 0;
    width: 22px; height: 22px; background: #fff; border: 2px solid var(--pan-orange);
    border-radius: 50%;
}
.step-item h4 { margin: 0 0 8px 0; font-size: 18px; color: #111827; }
.step-item p { margin: 0; font-size: 16px; color: #4B5563; line-height: 1.6; }

/* Info Blocks */
.info-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
.info-card { background: #FAFAFA; padding: 24px; border-radius: 16px; border: 1px solid #F3F4F6; }
.info-card .card-icon { font-size: 32px; margin-bottom: 16px; }
.info-card h4 { margin: 0 0 10px 0; font-size: 18px; color: #111827; }
.info-card p { margin: 0; font-size: 15px; color: #6B7280; }

/* FAQ */
.simple-faq details { margin-bottom: 12px; background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; }
.simple-faq summary { padding: 18px 24px; font-weight: 600; cursor: pointer; color: #111827; list-style: none; position: relative; }
.simple-faq summary::after { content: '+'; position: absolute; right: 24px; color: #9CA3AF; font-size: 20px; }
.simple-faq details[open] summary { color: #9A3412; border-bottom: 1px solid rgba(254, 215, 170, 0.5); }
.simple-faq details[open] summary::after { content: '−'; color: var(--pan-orange); }
.simple-faq p { padding: 20px 24px; margin: 0; color: #4B5563; }

@media (max-width: 768px) {
    .recipe-selector { grid-template-columns: 1fr; }
    .result-grid { grid-template-columns: 1fr; }
    .visual-col { border-left: none; padding-left: 0; border-top: 1px solid #E5E7EB; padding-top: 32px; }
    .info-blocks { grid-template-columns: 1fr; }
    .recipe-meta-bar { flex-direction: column; gap: 16px; }
}