/* calc/assets/css/calculators/caviar.css */

/* --- Caviar Theme --- */
:root {
    --caviar-bg: #FFF7ED;
    --caviar-primary: #9A3412; /* Orange 800 - Темный для текста */
    --caviar-accent: #EA580C;  /* Orange 600 - Яркий для акцентов */
    --caviar-red: #DC2626;
    
    --butter-color: #FEF08A; 
    --bread-color: #F5F5F4;  
    --bread-crust: #D6D3D1;
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }

/* Grid Layout */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1fr 1fr; } }

/* Inputs */
.calc-inputs { padding: 24px; }

.input-section-title { 
    font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; 
    color: var(--text-secondary); 
    margin-bottom: 24px; font-weight: 800;
    border-bottom: 1px solid #F3F4F6; padding-bottom: 8px;
    margin-top: 12px;
}
.input-section-title.second-title { margin-top: 40px; }

.input-group { margin-bottom: 24px; }
.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

.input-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.input-wrapper { position: relative; display: flex; align-items: center; }

.input-wrapper input, .input-wrapper select {
    width: 100%; padding: 14px; padding-right: 40px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: border 0.2s, box-shadow 0.2s;
    font-family: var(--font-main); appearance: none; background: #fff;
}
.input-wrapper input:focus, .input-wrapper select:focus { 
    border-color: var(--caviar-accent); 
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1); 
}
.suffix { position: absolute; right: 16px; color: var(--text-secondary); pointer-events: none; font-size: 14px; }
.select-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-secondary); display: flex; }

/* Radio Cards (Багет/Батон) */
.radio-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.radio-card input { display: none; }
.rc-content {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    border: 2px solid #E5E7EB; border-radius: 12px; padding: 10px 4px;
    cursor: pointer; transition: all 0.2s; color: var(--text-secondary);
}
.rc-icon { font-size: 24px; line-height: 1; }
.rc-title { font-size: 11px; font-weight: 600; }

.radio-card input:checked + .rc-content {
    border-color: var(--caviar-accent); background: #FFF7ED; color: var(--caviar-primary);
}

/* Range Slider */
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%;
    background: var(--caviar-accent); cursor: pointer; margin-top: -8px;
    border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; cursor: pointer; background: #E5E7EB; border-radius: 2px;
}
.range-val-center { text-align: center; margin-top: 8px; font-weight: 700; color: var(--caviar-accent); }


/* --- VISUALIZER --- */
.sandwich-visualizer {
    background: #fff; border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px; padding: 24px; margin-bottom: 24px;
    overflow: hidden;
}

.visualizer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.badge-caviar { background: #FFEDD5; color: var(--caviar-accent); padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.cost-preview { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.sandwich-stage {
    height: 200px; background: #F9FAFB; border-radius: 16px;
    position: relative; display: flex; flex-direction: column; 
    align-items: center; justify-content: flex-end;
    padding-bottom: 40px; border-bottom: 4px solid #E5E7EB; /* Стол */
    overflow: hidden;
}

.sandwich-stack {
    width: 180px; 
    display: flex; 
    flex-direction: column; /* Икра -> Масло -> Хлеб */
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
}

/* Layers */
.layer-bread {
    height: 40px; width: 85%; /* Default baguette */
    background: var(--bread-color);
    border: 2px solid var(--bread-crust); 
    border-radius: 12px;
    box-shadow: 0 4px 0 var(--bread-crust);
    position: relative; z-index: 1;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.layer-bread.is-tartlet {
    border-color: #D4A373;
    background: repeating-linear-gradient(90deg, #FAE1DD, #FAE1DD 10px, #F0D0C9 10px, #F0D0C9 12px);
    box-shadow: 0 4px 0 #C58F60;
}

.layer-butter {
    height: 6px; width: 80%;
    background: var(--butter-color); 
    border-radius: 4px;
    border: 1px solid #FDE047;
    margin-bottom: -2px;
    position: relative; z-index: 2;
    transition: all 0.3s ease;
}

.layer-caviar {
    height: 15px; width: 75%;
    background: transparent;
    margin-bottom: -1px;
    position: relative; z-index: 3;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 4px;
}

/* Caviar Texture */
.caviar-texture {
    width: 100%; height: 100%;
    background-image: radial-gradient(circle, #DC2626 3px, transparent 4px);
    background-size: 8px 8px; 
    background-position: center bottom;
    transition: all 0.3s ease;
}

/* Result Card */
.result-card.card--orange {
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border: 1px solid rgba(234, 88, 12, 0.1); padding: 24px; border-radius: 20px;
}

.result-header-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.res-title { font-size: 14px; color: var(--caviar-primary); font-weight: 700; text-transform: uppercase; opacity: 0.8; }
.res-total { font-size: 32px; font-weight: 800; color: var(--caviar-accent); }

.res-divider-hor { height: 1px; background: rgba(234, 88, 12, 0.15); margin-bottom: 20px; }

.shopping-list { display: flex; flex-direction: column; gap: 16px; }
.shop-item { display: flex; align-items: center; gap: 16px; }
.shop-icon { 
    width: 48px; height: 48px; border-radius: 12px; background: #fff; 
    color: var(--caviar-red); display: flex; align-items: center; justify-content: center; font-size: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.icon-butter { color: #D97706; }

.shop-info { display: flex; flex-direction: column; }
.shop-label { font-size: 12px; color: var(--caviar-primary); font-weight: 700; text-transform: uppercase; opacity: 0.6; margin-bottom: 2px; }
.shop-val { font-size: 18px; color: var(--caviar-primary); font-weight: 800; line-height: 1.2; }

/* ИСПРАВЛЕНО: Убрал прозрачность, сделал цвет темным и добавил вес шрифта */
.shop-sub { 
    font-size: 13px; 
    color: var(--caviar-primary); /* Темно-оранжевый/Коричневый */
    font-weight: 600; 
    opacity: 1; /* Убрал прозрачность */
    margin-top: 2px;
}


/* --- INFO & FAQ --- */
.info-wrapper { padding: 60px 0 60px 0; margin-top: 60px; border-top: 1px solid rgba(0,0,0,0.06); width: 100%; }
.info-wrapper .container { max-width: 800px; margin: 0 auto; }

.icon-heading { 
    display: flex; align-items: flex-start; gap: 16px; 
    margin-bottom: 24px; font-size: 24px; font-weight: 800; 
    color: var(--text-primary); 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; }
.orange-icon svg { color: #EA580C; }
.red-icon svg { color: #DC2626; }
.yellow-icon svg { color: #CA8A04; }

.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: var(--shadow-soft); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; }
.formula-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.formula-header { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.badge-orange { background: #EA580C; color: #fff; padding: 4px 10px; border-radius: 99px; font-size: 10px; text-transform: uppercase; font-weight: 700; align-self: flex-start; }
.badge-yellow { background: #CA8A04; color: #fff; padding: 4px 10px; border-radius: 99px; font-size: 10px; text-transform: uppercase; font-weight: 700; align-self: flex-start; }
.mini-list { font-size: 14px; line-height: 1.6; color: var(--text-secondary); padding-left: 20px; margin: 0; }

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 48px 0; }

.calc-description p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }
.calc-description strong { color: var(--text-primary); }
.calc-description ul { padding-left: 20px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 24px; }
.calc-description li { margin-bottom: 8px; }

/* FAQ */
.faq-fuel-style .faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-fuel-style .faq-item[open] { border-color: var(--caviar-accent); box-shadow: 0 4px 20px rgba(234, 88, 12, 0.1); }
.faq-fuel-style summary.faq-question { padding: 16px 20px; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; position: relative; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.faq-fuel-style summary.faq-question:hover { background-color: #F9FAFB; }
.faq-fuel-style .faq-item[open] summary.faq-question { color: var(--caviar-accent); background: #FFF7ED; }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); font-weight: 400; line-height: 1; }
.faq-question .icon-plus { display: none; }
.faq-fuel-style .faq-item[open] summary.faq-question::after { content: '−'; color: var(--caviar-accent); }
.faq-answer { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; border-top: 1px solid #F3F4F6; }

@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .icon-heading { 
        display: flex !important; flex-direction: row !important; justify-content: center !important; 
        align-items: center !important; text-align: left; width: 100%; gap: 12px; 
    }
    .header-icon { margin: 0; }
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { align-items: center; width: 100%; }
    .badge-orange, .badge-yellow { align-self: center; }
    .info-wrapper { margin-top: 40px; padding-top: 40px; }
}