/* Coffee Comodato — Frontend styles */
.cc-app {
    --cc-primary: #6f4e37;
    --cc-primary-dark: #4a3424;
    --cc-accent: #d2a679;
    --cc-bg: #fff;
    --cc-card-bg: #faf7f3;
    --cc-border: #e3dccf;
    --cc-text: #2b2118;
    --cc-muted: #7a6c5d;
    --cc-radius: 12px;
    --cc-shadow: 0 2px 8px rgba(50, 30, 10, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--cc-text);
    background: var(--cc-bg);
    max-width: 1100px;
    margin: 2em auto;
    padding: 1.5em;
    box-sizing: border-box;
}
.cc-app *, .cc-app *::before, .cc-app *::after { box-sizing: border-box; }

.cc-header { text-align: center; margin-bottom: 1.5em; }
.cc-title { font-size: 1.8em; margin: 0 0 0.3em; color: var(--cc-primary-dark); }
.cc-subtitle { color: var(--cc-muted); margin: 0 0 1em; }

.cc-steps { list-style: none; display: flex; gap: 1em; justify-content: center; padding: 0; margin: 0; }
.cc-step {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--cc-card-bg); color: var(--cc-muted);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; border: 1px solid var(--cc-border);
    transition: background .2s, color .2s, border-color .2s;
}
.cc-step.is-active { background: var(--cc-primary); color: #fff; border-color: var(--cc-primary); }
.cc-step.is-done   { background: var(--cc-accent); color: #fff; border-color: var(--cc-accent); }

.cc-stage { margin-top: 1.5em; }

.cc-question { text-align: center; }
.cc-question h3 { font-size: 1.4em; margin: 0 0 .6em; color: var(--cc-primary-dark); }
.cc-q-sub { color: var(--cc-muted); margin: 0 0 1.4em; }

.cc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1em; max-width: 720px; margin: 0 auto; }
.cc-card {
    background: var(--cc-card-bg);
    border: 2px solid var(--cc-border);
    border-radius: var(--cc-radius);
    padding: 1em;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: .6em;
    transition: transform .15s ease, border-color .15s, box-shadow .15s;
    font: inherit;
    color: inherit;
}
.cc-card:hover { transform: translateY(-2px); border-color: var(--cc-primary); box-shadow: var(--cc-shadow); }
.cc-card-img { display: block; width: 100%; aspect-ratio: 16/10; border-radius: 8px; background-size: cover; background-position: center; background-color: #efe7da; }
.cc-card-img--placeholder { background: linear-gradient(135deg, #efe7da, #d8c8ad); }
.cc-card-label { font-weight: 600; }

.cc-slider-wrap { display: flex; align-items: center; gap: 1em; justify-content: center; margin: 1.5em 0 .5em; }
.cc-slider-display { font-size: 2.4em; color: var(--cc-primary-dark); }
.cc-slider-display strong { font-weight: 700; }
.cc-perday-label { font-size: .55em; color: var(--cc-muted); margin-left: .35em; }
.cc-step-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--cc-primary); color: #fff;
    border: none; font-size: 1.4em; cursor: pointer;
}
.cc-step-btn:hover { background: var(--cc-primary-dark); }

.cc-range { width: 100%; max-width: 480px; margin: 0 auto; display: block; accent-color: var(--cc-primary); }
.cc-range-scale { display: flex; justify-content: space-between; max-width: 480px; margin: 0 auto; color: var(--cc-muted); font-size: .85em; }

.cc-actions { display: flex; gap: .8em; justify-content: center; margin-top: 1.8em; flex-wrap: wrap; }

.cc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .8em 1.6em; border-radius: var(--cc-radius);
    background: var(--cc-primary); color: #fff;
    border: 1px solid var(--cc-primary);
    font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: background .15s, border-color .15s, transform .1s;
}
.cc-btn:hover { background: var(--cc-primary-dark); border-color: var(--cc-primary-dark); color: #fff; }
.cc-btn--ghost { background: transparent; color: var(--cc-primary); }
.cc-btn--ghost:hover { background: var(--cc-card-bg); color: var(--cc-primary-dark); }

/* Results */
.cc-results { display: flex; flex-direction: column; gap: 2em; }
.cc-result-summary { text-align: center; }
.cc-result-summary h3 { color: var(--cc-primary-dark); margin: .2em 0; }
.cc-result-context { color: var(--cc-muted); margin: 0; }
.cc-result-range { color: var(--cc-primary); margin: 0 0 .4em; font-weight: 600; }

.cc-cat { border-top: 1px solid var(--cc-border); padding-top: 1.4em; }
.cc-cat-head { display: flex; align-items: center; gap: .6em; margin-bottom: 1em; }
.cc-cat-head h4 { margin: 0; color: var(--cc-primary-dark); font-size: 1.2em; }
.cc-cat-icon { width: 36px; height: 36px; border-radius: 8px; background-size: cover; background-position: center; background-color: var(--cc-card-bg); }

.cc-product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1em; }
.cc-product-card {
    background: var(--cc-card-bg);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .15s, box-shadow .15s;
}
.cc-product-card:hover { transform: translateY(-2px); box-shadow: var(--cc-shadow); }
.cc-product-img { aspect-ratio: 4/3; background: #efe7da; }
.cc-product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-product-img--placeholder { background: linear-gradient(135deg, #efe7da, #d8c8ad); }
.cc-product-body { padding: 1em; display: flex; flex-direction: column; gap: .4em; flex: 1; }
.cc-product-brand { margin: 0; color: var(--cc-muted); font-size: .85em; text-transform: uppercase; letter-spacing: .04em; }
.cc-product-machine { margin: 0; font-size: 1.15em; color: var(--cc-primary-dark); }
.cc-product-price { margin: .4em 0 0; font-size: 1.15em; color: var(--cc-primary-dark); }
.cc-product-price small { color: var(--cc-muted); font-weight: 400; margin-left: .3em; }
.cc-product-monthly { margin: .2em 0 .6em; display: flex; align-items: baseline; gap: .35em; flex-wrap: wrap; }
.cc-product-monthly small { color: var(--cc-muted); font-size: .8em; }
.cc-product-monthly strong { font-size: 1.25em; color: var(--cc-primary); }
.cc-product-cta { margin-top: auto; text-align: center; }

/* Results: 3 columns row (one carousel per category) */
.cc-cat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6em;
    align-items: start;
}
.cc-cat-col { min-width: 0; }
.cc-cat-count {
    margin-left: auto;
    font-size: .72em;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--cc-primary);
    padding: .25em .7em;
    border-radius: 999px;
}

/* Carousel */
.cc-carousel { position: relative; }
.cc-carousel-viewport { overflow: hidden; border-radius: var(--cc-radius); }
.cc-carousel-track { display: flex; transition: transform .35s ease; }
.cc-carousel-track > .cc-slide { flex: 0 0 100%; width: 100%; box-sizing: border-box; }
.cc-carousel .cc-product-card:hover { transform: none; box-shadow: none; }

.cc-car-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    color: var(--cc-primary-dark);
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex; align-items: center; justify-content: center;
}
.cc-car-arrow:hover { background: var(--cc-primary); color: #fff; }
.cc-car-prev { left: -10px; }
.cc-car-next { right: -10px; }
.cc-car-dots { display: flex; justify-content: center; gap: .4em; margin-top: .8em; }
.cc-car-dot {
    width: 7px; height: 7px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--cc-border);
    cursor: pointer;
    transition: width .25s, background .25s;
}
.cc-car-dot.is-active { width: 20px; background: var(--cc-primary); }

.cc-pdf-link { font-size: .72em; color: var(--cc-primary); white-space: nowrap; }
.cc-product-machine a { color: inherit; text-decoration: none; }
.cc-product-machine a:hover { text-decoration: underline; }
a.cc-product-img { display: block; }

@media (max-width: 760px) {
    .cc-cat-row { grid-template-columns: 1fr; gap: 2em; }
}

/* Form */
.cc-form-wrap { max-width: 560px; margin: 0 auto; }
.cc-form-wrap h3 { color: var(--cc-primary-dark); margin-top: 0; }
.cc-form-desc { color: var(--cc-muted); margin-bottom: 1em; }
.cc-form-row { margin-bottom: .9em; }
.cc-form-row label { display: block; font-weight: 600; color: var(--cc-text); }
.cc-form-row input, .cc-form-row textarea {
    display: block; width: 100%; margin-top: .25em;
    padding: .7em .85em; border: 1px solid var(--cc-border);
    border-radius: 8px; font: inherit; background: #fff; color: var(--cc-text);
}
.cc-form-row input:focus, .cc-form-row textarea:focus { outline: none; border-color: var(--cc-primary); box-shadow: 0 0 0 3px rgba(111,78,55,.15); }
.cc-form-consent { font-weight: 400; }
.cc-form-consent label { display: flex; gap: .6em; align-items: flex-start; font-weight: 400; }
.cc-form-consent input { width: auto; margin: .25em 0 0; }
.cc-form-feedback { margin-top: 1em; font-weight: 600; color: var(--cc-primary); text-align: center; }
.cc-form-feedback.is-error { color: #b3261e; }

.cc-success, .cc-empty {
    text-align: center; padding: 2em 1em;
    background: var(--cc-card-bg); border-radius: var(--cc-radius);
    border: 1px solid var(--cc-border); color: var(--cc-text);
}
.cc-success p, .cc-empty p { margin-top: 1.2em; }

@media (max-width: 600px) {
    .cc-app { padding: 1em; }
    .cc-title { font-size: 1.4em; }
    .cc-slider-display { font-size: 1.8em; }
}
