/* Ventanas PVC + Aluminio Configurador SVG - v1.0 */

/* === LAYOUT === */
.wcf-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* === PREVIEW SVG === */
.wcf-preview-container {
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    overflow: hidden;
    transition: border-color 0.3s;
    width: 100%;
}
.wcf-preview-container.active { border-color: #2AB9AD; }

.wcf-preview-label {
    font-size: 0.8em; color: #888; text-align: center;
    padding: 8px 15px; background: #f8f9fa; font-weight: 500;
    border-bottom: 1px solid #e8e8e8;
    letter-spacing: 0.3px; text-transform: uppercase;
}

.wcf-preview {
    background: #fff; padding: 15px;
    min-height: 200px; display: flex;
    align-items: center; justify-content: center;
}
.wcf-preview svg { width: 100%; max-height: 340px; }

/* === MEDIDAS ROW === */
.wcf-measures-row {
    display: flex; gap: 15px; align-items: stretch;
}
.wcf-measure-field { flex: 1; min-width: 0; }
.wcf-measure-field label {
    display: block; font-size: 0.85em; font-weight: 600;
    color: #333; margin-bottom: 6px;
}
.wcf-measure-field label .required { color: #e53935; }

.wcf-input-wrap {
    display: flex; align-items: center;
    border: 2px solid #e0e0e0; border-radius: 8px;
    overflow: hidden; transition: border-color 0.2s;
}
.wcf-input-wrap:focus-within {
    border-color: #2AB9AD;
    box-shadow: 0 0 0 3px rgba(42,185,173,0.1);
}
.wcf-input-wrap input {
    flex: 1; border: none; padding: 10px 12px;
    font-size: 1em; outline: none; background: transparent;
    min-width: 0; -moz-appearance: textfield;
}
.wcf-input-wrap input::-webkit-outer-spin-button,
.wcf-input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
.wcf-input-unit {
    padding: 10px 12px; background: #f5f5f5; color: #666;
    font-size: 0.85em; font-weight: 600;
    border-left: 1px solid #e0e0e0; white-space: nowrap;
}

/* === HOJAS INFO BADGE === */
.wcf-hojas-info {
    flex: 0 0 100px;
    background: linear-gradient(135deg, #e8faf9, #d4f5f3);
    border: 2px solid #2AB9AD; border-radius: 12px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 10px; text-align: center;
}
.wcf-hojas-num {
    font-size: 1.8em; font-weight: 800; color: #000065; line-height: 1;
}
.wcf-hojas-label {
    font-size: 0.78em; font-weight: 600; color: #2AB9AD;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* === SECTIONS (COLLAPSIBLE) === */
.wcf-section {
    border: 2px solid #e0e0e0; border-radius: 12px;
    overflow: hidden; transition: border-color 0.3s, box-shadow 0.3s;
}
.wcf-section.active {
    border-color: #2AB9AD;
    box-shadow: 0 2px 12px rgba(42,185,173,0.12);
}
.wcf-section.completed { border-color: #4caf50; }

.wcf-section-header {
    display: flex; align-items: center;
    padding: 14px 16px; background: #f8f9fa;
    cursor: pointer; user-select: none; transition: background 0.2s;
}
.wcf-section-header:hover { background: #f0f2f5; }
.wcf-section.active .wcf-section-header {
    background: linear-gradient(135deg, #e8faf9, #d4f5f3);
}
.wcf-section.completed .wcf-section-header { background: #f1f8e9; }

.wcf-section-number {
    width: 26px; height: 26px; background: #2AB9AD; color: #fff;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 0.82em;
    margin-right: 12px; flex-shrink: 0;
}
.wcf-section.completed .wcf-section-number { background: #4caf50; }

.wcf-section-title {
    flex: 1; font-weight: 600; color: #333; font-size: 0.92em;
}
.wcf-section-summary {
    font-size: 0.82em; color: #2AB9AD; margin-right: 10px; font-weight: 500;
}
.wcf-section-toggle {
    color: #999; font-size: 0.7em; transition: transform 0.3s;
}
.wcf-section.collapsed .wcf-section-toggle { transform: rotate(-90deg); }

.wcf-section-content {
    padding: 16px; max-height: 800px; overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}
.wcf-section.collapsed .wcf-section-content {
    max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0;
}

/* === TYPE GRID (SVG CARDS - inside section) === */
.wcf-type-options {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}

.wcf-type-card {
    background: #fff; border: 2px solid #e0e0e0; border-radius: 12px;
    padding: 12px 8px 8px; text-align: center; cursor: pointer;
    transition: all 0.25s ease; display: flex; flex-direction: column;
    align-items: center; gap: 4px; position: relative;
}
.wcf-type-card:hover {
    border-color: #2AB9AD;
    box-shadow: 0 4px 12px rgba(42,185,173,0.15);
    transform: translateY(-2px);
}
.wcf-type-card.selected {
    border-color: #2AB9AD;
    background: linear-gradient(135deg, rgba(42,185,173,0.06), rgba(42,185,173,0.02));
    box-shadow: 0 2px 10px rgba(42,185,173,0.2);
}
.wcf-type-card.selected::after {
    content: '\2713'; position: absolute; top: 6px; right: 8px;
    background: #2AB9AD; color: #fff; width: 20px; height: 20px;
    border-radius: 50%; font-size: 11px; line-height: 20px;
    text-align: center; font-weight: 700;
}
.wcf-type-card svg { max-width: 100%; height: auto; }
.wcf-type-card span {
    font-size: 0.78em; font-weight: 600; color: #333; line-height: 1.2;
}
.wcf-type-card.selected span { color: #2AB9AD; }

/* === COLOR SWATCH OPTIONS === */
.wcf-color-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.wcf-color-option { cursor: pointer; }
.wcf-color-option input { display: none; }

.wcf-color-btn {
    display: flex; align-items: center; gap: 8px;
    border: 2px solid #e0e0e0; border-radius: 10px;
    padding: 10px 12px; transition: border-color 0.2s, background 0.2s;
}
.wcf-color-option:hover .wcf-color-btn {
    border-color: #b2dfdb; background: #fafffe;
}
.wcf-color-option.selected .wcf-color-btn {
    border-color: #2AB9AD;
    background: linear-gradient(135deg, #e8faf9, #d4f5f3);
}
.wcf-color-swatch {
    width: 28px; height: 28px; border-radius: 50%;
    flex-shrink: 0; border: 1px solid rgba(0,0,0,0.1);
}
.wcf-color-name {
    font-weight: 600; font-size: 0.82em; color: #333;
}

/* === GLASS OPTIONS === */
.wcf-glass-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.wcf-glass-option { cursor: pointer; }
.wcf-glass-option input { display: none; }

.wcf-glass-btn {
    display: flex; align-items: center; gap: 8px;
    border: 2px solid #e0e0e0; border-radius: 10px;
    padding: 10px 12px; transition: border-color 0.2s, background 0.2s;
    text-align: left;
}
.wcf-glass-option:hover .wcf-glass-btn {
    border-color: #b2dfdb; background: #fafffe;
}
.wcf-glass-option.selected .wcf-glass-btn {
    border-color: #2AB9AD;
    background: linear-gradient(135deg, #e8faf9, #d4f5f3);
}
.wcf-glass-swatch {
    width: 22px; height: 22px; border-radius: 6px;
    flex-shrink: 0; border: 1px solid rgba(0,0,0,0.08);
}
.wcf-glass-name {
    font-weight: 600; font-size: 0.82em; color: #333; line-height: 1.2;
}

/* === PERSIANA SECTION (PVC) === */
.wcf-persiana-section {
    background: #f8f9fa; border-radius: 10px;
    border: 1px dashed #ddd; padding: 15px;
}
.wcf-persiana-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.wcf-persiana-row label {
    display: block; font-size: 0.85em; font-weight: 600;
    color: #333; margin-bottom: 6px;
}
.wcf-persiana-row select {
    width: 100%; padding: 10px 14px; border: 1.5px solid #ddd;
    border-radius: 10px; font-size: 0.95em; color: #333;
    background: #fff; min-height: 44px;
}

/* === EXTRA FIELDS ROW === */
.wcf-extras-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.wcf-extras-row label {
    display: block; font-size: 0.85em; font-weight: 600;
    color: #333; margin-bottom: 6px;
}
.wcf-extras-row select,
.wcf-extras-row input {
    width: 100%; padding: 10px 14px; border: 1.5px solid #ddd;
    border-radius: 10px; font-size: 0.95em; color: #333;
    background: #fff; min-height: 44px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .wcf-type-options { grid-template-columns: repeat(2, 1fr); }
    .wcf-color-grid { grid-template-columns: repeat(3, 1fr); }
    .wcf-glass-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .wcf-measures-row { flex-direction: column; }
    .wcf-hojas-info {
        flex: none; flex-direction: row; gap: 10px; padding: 10px 16px;
    }
    .wcf-hojas-num { font-size: 1.4em; }
    .wcf-type-options { grid-template-columns: repeat(2, 1fr); }
    .wcf-color-grid { grid-template-columns: repeat(2, 1fr); }
    .wcf-glass-grid { grid-template-columns: 1fr; }
    .wcf-persiana-row { grid-template-columns: 1fr; }
    .wcf-extras-row { grid-template-columns: 1fr; }
    .wcf-section-content { padding: 12px; }
}

@media (max-width: 400px) {
    .wcf-preview { padding: 10px; }
    .wcf-type-options { grid-template-columns: 1fr 1fr; gap: 6px; }
}
