/* Control Panel */
#controls {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0,0,0,0.08);
    padding: 32px 24px 100px 24px;
    overflow-y: auto;
    z-index: 10;
}

/* Accordion */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-bottom: 2px solid #f0f0f0;
    color: #2c3e50;
    transition: color 0.2s;
}

.accordion-header:hover {
    color: #c21f26;
}

.accordion-header .icon {
    font-size: 14px;
    transition: transform 0.3s;
    color: #95a5a6;
}

.accordion-header.active {
    color: #c21f26;
}

.accordion-header.active .icon {
    transform: rotate(90deg);
    color: #c21f26;
}

.accordion-content {
    display: none;
    padding: 24px 0;
}

.accordion-content label {
    display: block;
    margin: 20px 0 10px;
    font-size: 13px;
    color: #5a6c7d;
    font-weight: 500;
}

.accordion-content select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e8ecef;
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
}

.accordion-content select:hover {
    border-color: #c21f26;
}

.accordion-content select:focus {
    outline: none;
    border-color: #c21f26;
    box-shadow: 0 0 0 3px rgba(194,31,38,0.1);
}

/* Section Descriptions */
.section-desc {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.6;
    margin: 12px 0 20px;
    padding: 0;
}

.color-note {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 8px;
    font-style: italic;
}

.help-note {
    font-size: 12px;
    color: #95a5a6;
    line-height: 1.5;
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.help-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 16px;
    background: #fff5f5;
    border-left: 3px solid #c21f26;
    border-radius: 0 10px 10px 0;
}

.help-card-icon {
    color: #c21f26;
    font-size: 18px;
    padding-top: 2px;
    flex-shrink: 0;
}

.help-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.help-card-body strong {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.help-card-body span {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
}

.help-card-body a {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #c21f26;
    text-decoration: none;
}

.help-card-body a:hover {
    text-decoration: underline;
}

/* Color Swatches */
.colors-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 12px;
    margin-top: 16px;
}

.color-swatch {
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.colors-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

/* Image-based swatches */
.color-swatch--img {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background: #f8f9fa;
    padding: 0;
}

.color-swatch--img img {
    width: 100%;
    height: 52px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
}

.swatch-label {
    font-size: 10px;
    font-weight: 500;
    color: #5a6c7d;
    padding: 4px 4px 5px;
    text-align: center;
    line-height: 1.2;
    width: 100%;
}

/* "W kolorze ramy" swatch — link badge */
.color-swatch--match-frame {
    position: relative;
}

.swatch-match-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #c21f26;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Carbon swatch — CSS fiber pattern */
.color-swatch--carbon {
    background: repeating-linear-gradient(
        45deg,
        #1a1a1a 0px, #1a1a1a 4px,
        #2a2a2a 4px, #2a2a2a 8px
    );
}

.color-swatch--carbon img {
    display: none;
}

.color-swatch--carbon .swatch-label {
    color: #ccc;
    background: rgba(0,0,0,0.5);
}

.color-swatch:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.color-swatch.active {
    border-color: #c21f26;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c21f26;
}

/* Option Cards */
.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.option-card {
    border: 2px solid #e8ecef;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.option-card:hover {
    border-color: #c21f26;
    background: #fff5f5;
}

.option-card.active {
    border-color: #c21f26;
    background: #fff5f5;
}

.option-card input[type="radio"] {
    display: none;
}

.option-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

/* Image-based option cards */
.option-card--img {
    padding: 0;
    overflow: hidden;
}

.option-img {
    width: 100%;
    height: 90px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.option-img img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    transition: transform 0.3s;
}

.option-card--img:hover .option-img img {
    transform: scale(1.05);
}

.option-card--img .option-title {
    margin: 10px 12px 4px;
}

.option-card--img .option-desc {
    margin: 0 12px 12px;
}

.option-title {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.option-desc {
    font-size: 11px;
    color: #7f8c8d;
    line-height: 1.4;
}
