/* === FERRASOL COTIZADOR — public/css/cotizador.css === */
:root {
    --frcot-primary:     #1a3a6b;
    --frcot-secondary:   #e8f0fc;
    --frcot-btn-text:    #ffffff;
    --frcot-font-size:   14px;
    --frcot-modal-width: 960px;
    --frcot-radius:      10px;
}

/* ---- Overlay / Modal ---- */
.frcot-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.frcot-overlay.frcot-open { display: flex; }

.frcot-modal {
    background: #fff;
    border-radius: var(--frcot-radius);
    width: 100%;
    max-width: var(--frcot-modal-width);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: var(--frcot-font-size);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

/* ---- Header ---- */
.frcot-modal__header {
    background: var(--frcot-primary);
    color: var(--frcot-btn-text);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}
.frcot-header-brand { display: flex; flex-direction: column; }
.frcot-header-nombre { font-size: 1.2em; font-weight: 700; letter-spacing: -.3px; }
.frcot-header-sub    { font-size: .75em; opacity: .75; text-transform: uppercase; letter-spacing: .8px; }
.frcot-header-center { flex: 1; text-align: center; font-size: .8em; opacity: .8; }
.frcot-close-btn {
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.frcot-close-btn:hover { background: rgba(255,255,255,.3); }

/* ---- Body ---- */
.frcot-modal__body {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.frcot-col { display: flex; flex-direction: column; overflow: hidden; }
.frcot-col--left  { flex: 1.2; border-right: 1px solid #e5e7eb; overflow-y: auto; }
.frcot-col--right { flex: 1; overflow-y: auto; }

.frcot-section {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.frcot-section--catalog { border-bottom: none; flex: 1; }
.frcot-section__title {
    font-weight: 600;
    font-size: .8em;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    margin-bottom: 10px;
}

/* ---- Form ---- */
.frcot-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.frcot-form-grid input {
    border: 1px solid #d1d5db;
    border-radius: calc(var(--frcot-radius) * .6);
    padding: 7px 10px;
    font-size: .9em;
    width: 100%;
    outline: none;
    transition: border-color .2s;
}
.frcot-form-grid input:focus { border-color: var(--frcot-primary); }

/* ---- Search ---- */
.frcot-search-wrap {
    position: relative;
    margin-bottom: 8px;
}
.frcot-search-wrap input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: calc(var(--frcot-radius) * .6);
    padding: 7px 10px 7px 30px;
    font-size: .9em;
    outline: none;
}
.frcot-search-wrap input:focus { border-color: var(--frcot-primary); }
.frcot-search-icon {
    position: absolute; left: 9px; top: 50%;
    transform: translateY(-50%);
    font-size: 13px; color: #9ca3af; pointer-events: none;
}

/* ---- Category tabs ---- */
.frcot-cat-tabs {
    display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px;
}
.frcot-cat-tab {
    font-size: .78em; padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    cursor: pointer;
    background: #fff; color: #6b7280;
    transition: all .15s;
}
.frcot-cat-tab.active, .frcot-cat-tab:hover {
    background: var(--frcot-primary);
    color: #fff; border-color: var(--frcot-primary);
}

/* ---- Product list ---- */
.frcot-prod-list {
    max-height: 280px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 3px;
}
.frcot-prod-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 8px;
    border-radius: calc(var(--frcot-radius) * .6);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background .15s;
}
.frcot-prod-item:hover { background: var(--frcot-secondary); border-color: #b5d4f4; }
.frcot-prod-thumb {
    width: 36px; height: 36px; border-radius: 4px;
    object-fit: cover; flex-shrink: 0;
    background: #f3f4f6;
}
.frcot-prod-thumb-placeholder {
    width: 36px; height: 36px; border-radius: 4px;
    background: #f3f4f6; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #9ca3af;
}
.frcot-prod-info { flex: 1; min-width: 0; }
.frcot-prod-nombre { font-size: .88em; font-weight: 500; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frcot-prod-meta   { font-size: .75em; color: #6b7280; }
.frcot-prod-precio { font-size: .88em; font-weight: 600; color: var(--frcot-primary); white-space: nowrap; }
.frcot-prod-add {
    background: var(--frcot-primary); color: #fff;
    border: none; border-radius: 6px;
    width: 24px; height: 24px;
    cursor: pointer; font-size: 16px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.frcot-prod-add:hover { opacity: .85; }

/* ---- Quote list ---- */
.frcot-cot-list { flex: 1; overflow-y: auto; padding: 0 16px; }
.frcot-empty {
    text-align: center; padding: 2.5rem 1rem;
    color: #9ca3af; font-size: .88em;
}
.frcot-cot-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0; border-bottom: 1px solid #f3f4f6;
}
.frcot-cot-item:last-child { border-bottom: none; }
.frcot-cot-info { flex: 1; min-width: 0; }
.frcot-cot-nombre { font-size: .88em; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frcot-cot-meta   { font-size: .75em; color: #6b7280; }
.frcot-qty-ctrl   { display: flex; align-items: center; gap: 3px; }
.frcot-qty-btn {
    width: 22px; height: 22px;
    border: 1px solid #d1d5db; border-radius: 4px;
    background: #f9fafb; cursor: pointer;
    font-size: 14px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.frcot-qty-btn:hover { background: var(--frcot-secondary); }
.frcot-qty-num { width: 26px; text-align: center; font-size: .88em; font-weight: 600; }
.frcot-cot-total { font-size: .88em; font-weight: 600; color: var(--frcot-primary); min-width: 60px; text-align: right; }
.frcot-cot-del { color: #d1d5db; cursor: pointer; font-size: 15px; }
.frcot-cot-del:hover { color: #ef4444; }
.frcot-count { font-size: .8em; font-weight: 400; color: #6b7280; }

/* ---- Totals ---- */
.frcot-totales {
    background: #f9fafb;
    border-radius: calc(var(--frcot-radius) * .6);
    padding: 10px 14px; margin: 8px 16px;
    border: 1px solid #e5e7eb;
}
.frcot-total-row {
    display: flex; justify-content: space-between;
    font-size: .88em; padding: 2px 0; color: #374151;
}
.frcot-total-row--grand {
    font-weight: 700; font-size: 1em;
    border-top: 1px solid #d1d5db;
    margin-top: 5px; padding-top: 5px;
    color: var(--frcot-primary);
}

/* ---- Observations ---- */
.frcot-obs-wrap { padding: 0 16px 8px; }
.frcot-obs-wrap textarea {
    width: 100%; font-size: .85em;
    padding: 8px 10px; min-height: 54px;
    border: 1px solid #d1d5db;
    border-radius: calc(var(--frcot-radius) * .6);
    resize: vertical; font-family: inherit;
    outline: none;
}
.frcot-obs-wrap textarea:focus { border-color: var(--frcot-primary); }

/* ---- Action buttons ---- */
.frcot-actions {
    padding: 0 16px 16px;
    display: flex; gap: 8px;
}
.frcot-btn-pdf, .frcot-btn-wa {
    flex: 1; border: none;
    border-radius: calc(var(--frcot-radius) * .6);
    padding: 10px 12px; font-size: .88em; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: opacity .2s;
}
.frcot-btn-pdf  { background: var(--frcot-primary); color: var(--frcot-btn-text); }
.frcot-btn-wa   { background: #25D366; color: #fff; }
.frcot-btn-pdf:hover, .frcot-btn-wa:hover { opacity: .88; }
.frcot-btn-clear { background: none; border: none; cursor: pointer; font-size: 16px; color: #9ca3af; padding: 0; }
.frcot-btn-clear:hover { color: #ef4444; }

/* ---- FAB Floating button ---- */
.frcot-fab {
    position: fixed; z-index: 99998;
    display: flex; align-items: center; gap: 8px;
    background: var(--frcot-primary); color: var(--frcot-btn-text);
    border-radius: 50px; padding: 12px 18px;
    cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.25);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: var(--frcot-font-size); font-weight: 600;
    transition: transform .2s, box-shadow .2s;
    user-select: none;
}
.frcot-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.frcot-fab--bottom-right { bottom: 24px; right: 24px; }
.frcot-fab--bottom-left  { bottom: 24px; left: 24px; }
.frcot-fab--top-right    { top: 100px; right: 24px; }
.frcot-fab--top-left     { top: 100px; left: 24px; }
.frcot-fab__icon { font-size: 1.1em; }

/* ---- Shortcode inline button ---- */
.frcot-shortcode-btn {
    background: var(--frcot-primary); color: var(--frcot-btn-text);
    border: none; border-radius: calc(var(--frcot-radius) * .6);
    padding: 12px 22px; font-size: var(--frcot-font-size); font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    transition: opacity .2s;
}
.frcot-shortcode-btn:hover { opacity: .88; }

/* ---- Responsive ---- */
@media (max-width: 680px) {
    .frcot-modal__body { flex-direction: column; }
    .frcot-col--left   { border-right: none; border-bottom: 1px solid #e5e7eb; max-height: 55vh; }
    .frcot-col--right  { max-height: 45vh; }
    .frcot-form-grid   { grid-template-columns: 1fr; }
}
