/**
 * Heiro Tape Configurator - Modern Minimalist Theme (2026 UX/UI)
 *
 * Design: Modern, minimalist, immersive product configurator
 * Accent Color: #032250 (Deep Navy)
 *
 * @author MiniMax Agent
 * @version 5.0.2 - Removed header/footer styles, side-by-side layout
 */

/* ==========================================
   CSS VARIABLES (2026 Design System)
   ========================================== */

:root {
    /* Primary Colors */
    --hc-primary: #032250;
    --hc-primary-hover: #021a3d;
    --hc-primary-light: rgba(3, 34, 80, 0.1);
    
    /* Background Colors */
    --hc-bg-page: #fafafa;
    --hc-bg-surface: #ffffff;
    --hc-bg-preview: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    
    /* Text Colors */
    --hc-text-primary: #1a1a1a;
    --hc-text-secondary: #6c757d;
    --hc-text-muted: #adb5bd;
    --hc-text-inverse: #ffffff;
    
    /* Border & Dividers */
    --hc-border-light: #e9ecef;
    --hc-border-medium: #dee2e6;
    
    /* Shadows (Soft, diffused - 2026 trend) */
    --hc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --hc-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --hc-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --hc-shadow-float: 0 12px 40px rgba(0, 0, 0, 0.12);
    
    /* Spacing */
    --hc-space-xs: 4px;
    --hc-space-sm: 8px;
    --hc-space-md: 16px;
    --hc-space-lg: 24px;
    --hc-space-xl: 32px;
    --hc-space-2xl: 48px;
    
    /* Border Radius (2026 trend: 12px-16px) */
    --hc-radius-sm: 8px;
    --hc-radius-md: 12px;
    --hc-radius-lg: 16px;
    --hc-radius-xl: 24px;
    --hc-radius-full: 9999px;
    
    /* Typography */
    --hc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --hc-font-mono: 'SF Mono', 'Fira Code', monospace;
    
    /* Transitions */
    --hc-transition-fast: 0.15s ease;
    --hc-transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --hc-transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index layers */
    --hc-z-header: 100;
    --hc-z-controls: 50;
    --hc-z-loading: 200;
}

/* ==========================================
   BASE RESET & TYPOGRAPHY
   ========================================== */

.hc-page-wrapper *,
.hc-page-wrapper *::before,
.hc-page-wrapper *::after {
    box-sizing: border-box !important;
}

/* ==========================================
   THEME ISOLATION — prevent any WP theme
   from overriding plugin button/input styles
   ========================================== */

.hc-page-wrapper button,
.hc-page-wrapper input[type="button"],
.hc-page-wrapper input[type="submit"],
.hc-page-wrapper input[type="reset"],
.hc-page-wrapper .wp-element-button {
    font-family: var(--hc-font) !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.hc-page-wrapper input[type="text"],
.hc-page-wrapper input[type="number"],
.hc-page-wrapper input[type="email"],
.hc-page-wrapper input[type="tel"],
.hc-page-wrapper input[type="range"],
.hc-page-wrapper select,
.hc-page-wrapper textarea {
    font-family: var(--hc-font) !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.hc-page-wrapper a {
    text-decoration: none !important;
}

.hc-page-wrapper h1,
.hc-page-wrapper h2,
.hc-page-wrapper h3,
.hc-page-wrapper h4,
.hc-page-wrapper h5,
.hc-page-wrapper h6,
.hc-page-wrapper p,
.hc-page-wrapper span,
.hc-page-wrapper label {
    font-family: var(--hc-font) !important;
}

.hc-page-wrapper {
    font-family: var(--hc-font) !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: var(--hc-text-primary) !important;
    background-color: var(--hc-bg-page) !important;
    width: 100% !important;
    height: calc(100vh - 100px) !important;
    max-width: 100% !important;
    max-height: calc(100vh - 100px) !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

/* ==========================================
   PREVIEW SECTION (Left side - 3D Viewer)
   ========================================== */

.hc-preview-section {
    flex: 1 !important;
    position: relative !important;
    background: var(--hc-bg-preview) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    height: 100% !important;
    min-height: 0 !important;
}

/* ==========================================
   PERSONALIZATION BAR (Bottom Center - HORIZONTAL)
   ========================================== */

.hc-personalization-bar {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 0 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 95% !important;
    max-width: 1400px !important;
    min-height: 70px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.hc-personalization-bar .hc-personalization-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 15px 0px 0px 15px !important;
    white-space: nowrap !important;
    text-align: center !important;
    background: #032250 !important;
    flex: 0 0 20% !important;
    width: 20% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border: none !important;
}

/* Responsywność paska personalizacji */
@media (max-width: 1300px) {
    .hc-personalization-bar .hc-personalization-title {
        flex: 0 0 16%;
        width: 16%;
        font-size: 13px;
        padding: 10px 12px;
    }
}

.hc-personalization-bar .hc-personalization-groups {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 15px 25px;
    min-width: 0;
}

/* Grupa 1: Tekst + Logo */
.hc-personalization-bar .hc-group-1 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0;
    margin: 0;
}

/* Grupa 2: Odstęp + Czcionka */
.hc-personalization-bar .hc-group-2 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0;
    margin: 0;
}

/* Grupa 3: Kolor tekstu */
.hc-personalization-bar .hc-group-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0;
    margin: 0;
}

/* Ładny rozdzielacz pionowy */
.hc-personalization-bar .hc-divider {
    width: 1px;
    height: 45px;
    background: linear-gradient(180deg, transparent 10%, #e5e5e5 30%, #e5e5e5 70%, transparent 90%);
    margin: 0 6px;
    border-radius: 1px;
}

/* Center labels above fields */
.hc-personalization-bar .hc-form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0;
    min-width: auto;
}

.hc-personalization-bar .hc-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-align: center;
    margin: 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hc-personalization-bar .hc-input {
    font-size: 14px !important;
    padding: 10px 16px !important;
    min-width: 160px !important;
    width: 160px !important;
    height: 40px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    outline: none !important;
    transition: all 0.25s ease !important;
    background: #fafafa !important;
    text-align: center !important;
    color: #333 !important;
    font-weight: 500 !important;
    box-sizing: border-box !important;
    line-height: normal !important;
    font-family: var(--hc-font) !important;
    box-shadow: none !important;
}

.hc-personalization-bar .hc-input:focus {
    border-color: #032250 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(3, 34, 80, 0.1) !important;
}

.hc-personalization-bar .hc-select {
    font-size: 13px !important;
    padding: 10px 32px 10px 14px !important;
    min-width: 110px !important;
    width: 110px !important;
    height: 40px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    outline: none !important;
    cursor: pointer !important;
    background: #fafafa !important;
    text-align: center !important;
    color: #333 !important;
    font-weight: 500 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    transition: all 0.25s ease !important;
    font-family: var(--hc-font) !important;
    box-shadow: none !important;
}

.hc-personalization-bar .hc-select:focus {
    border-color: #032250 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(3, 34, 80, 0.1) !important;
}

.hc-personalization-bar .hc-text-color-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px !important;
}

.hc-personalization-bar .hc-text-color-btn {
    width: 30px !important;
    height: 30px !important;
    border: none !important;
    padding: 0 !important;
}

.hc-personalization-bar .hc-text-color-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hc-personalization-bar .hc-option-row {
    display: flex;
    align-items: center;
    margin: 0;
    gap: 6px;
}

.hc-personalization-bar .hc-checkbox-label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #1a1a1a !important;
    font-weight: 500 !important;
    font-family: var(--hc-font) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.hc-personalization-bar .hc-checkbox-custom {
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #ccc !important;
    border-radius: 4px !important;
    margin-right: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    background: transparent !important;
    padding: 0 !important;
}

.hc-personalization-bar .hc-checkbox:checked + .hc-checkbox-custom {
    background: #032250 !important;
    border-color: #032250 !important;
}

/* Style dla checkboxa odwróconej kolejności kolorów */
.hc-reverse-color-checkbox .hc-checkbox-label {
    font-size: 12px !important;
    color: #555 !important;
}

.hc-reverse-color-checkbox .hc-checkbox-custom {
    width: 16px !important;
    height: 16px !important;
    border: 2px solid #aaa !important;
    border-radius: 3px !important;
    margin-right: 6px !important;
}

.hc-reverse-color-checkbox .hc-checkbox:checked + .hc-checkbox-custom {
    background: #032250 !important;
    border-color: #032250 !important;
}

.hc-personalization-bar .hc-option-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 0;
    margin: 0;
}

.hc-personalization-bar .hc-option-content.hc-text-content,
.hc-personalization-bar .hc-option-content.hc-logo-content {
    display: flex;
}

.hc-personalization-bar .hc-option-content.active {
    display: flex;
}

/* Usunięto konfliktującą regułę -HC-form-group jest teraz zdefiniowana wyżej */

/* Usunięto duplikat reguły hc-select */

.hc-personalization-bar .hc-char-counter {
    font-size: 11px;
    color: #999;
    text-align: center;
    width: 100%;
}

/* Spacing Slider Styles - nowoczesny styl */
.hc-personalization-bar .hc-spacing-slider-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 6px 12px !important;
    min-width: 90px !important;
    width: auto !important;
    height: 40px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    background: #fafafa !important;
    transition: all 0.25s ease !important;
}

.hc-personalization-bar .hc-spacing-slider-container:hover {
    border-color: #032250 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(3, 34, 80, 0.1) !important;
}

.hc-personalization-bar .hc-spacing-slider {
    width: 80px !important;
    height: 6px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background: #e0e0e0 !important;
    border-radius: 3px !important;
    outline: none !important;
    cursor: pointer !important;
    border: none !important;
}

.hc-personalization-bar .hc-spacing-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #032250;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hc-personalization-bar .hc-spacing-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #032250;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hc-personalization-bar .hc-spacing-price {
    font-size: 10px;
    font-weight: 600;
    color: #666;
}

.hc-personalization-bar .hc-spacing-price {
    font-size: 11px;
    font-weight: 600;
    color: var(--hc-text-secondary);
}

.hc-spacing-slider {
    width: 100% !important;
    height: 6px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background: #ddd !important;
    border-radius: 3px !important;
    outline: none !important;
    cursor: pointer !important;
    border: none !important;
}

.hc-spacing-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    background: #032250 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    border: none !important;
}

.hc-spacing-slider::-moz-range-thumb {
    width: 18px !important;
    height: 18px !important;
    background: #032250 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.hc-spacing-hint {
    font-size: 10px;
    color: #999;
    text-align: center;
}

.hc-personalization-bar .hc-text-color-options {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    width: auto !important;
    height: auto !important;
}

.hc-personalization-bar .hc-text-color-wrapper {
    cursor: pointer;
    margin: 0;
    padding: 3px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 50%;
}

.hc-personalization-bar .hc-text-color-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    display: block !important;
    border: none !important;
    transition: all 0.2s !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    padding: 0 !important;
}

.hc-personalization-bar .hc-text-color-wrapper input {
    display: none;
}

.hc-personalization-bar .hc-text-color-wrapper input:checked + .hc-text-color-btn {
    border-color: #032250;
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(3, 34, 80, 0.3);
}

.hc-personalization-bar .hc-logo-upload-area {
    padding: 8px 10px !important;
    min-height: 40px !important;
    height: 40px !important;
    width: 110px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    text-align: center !important;
    background: #fafafa !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    color: #666 !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
}

.hc-personalization-bar .hc-logo-upload-area:hover {
    border-color: #032250 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(3, 34, 80, 0.1) !important;
}

.hc-personalization-bar .hc-upload-icon {
    flex-shrink: 0;
}

.hc-personalization-bar .hc-upload-text {
    font-size: 12px;
    color: #666;
    margin: 0;
    white-space: nowrap;
}

.hc-personalization-bar .hc-logo-filename {
    font-size: 11px;
    color: #333;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hc-personalization-bar .hc-remove-logo-btn-small {
    padding: 2px 6px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    background: #032250 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    min-width: 18px !important;
    min-height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.hc-personalization-bar .hc-logo-preview {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    min-height: 40px !important;
    height: 40px !important;
    width: 110px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    background: #fafafa !important;
    box-sizing: border-box !important;
}

.hc-personalization-bar .hc-logo-preview img {
    max-width: 50px;
    max-height: 24px;
    width: auto;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
    object-position: center;
}

.hc-personalization-bar .hc-remove-logo-btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    background: #032250 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.hc-3d-viewer {
    width: 100%;
    height: 100%;
    position: relative;
}

.hc-3d-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

/* 3D Loading State */
.hc-3d-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--hc-bg-surface);
    gap: var(--hc-space-lg);
}

.hc-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--hc-border-light);
    border-top-color: var(--hc-primary);
    border-radius: 50%;
    animation: hc-spin 1s linear infinite;
}

@keyframes hc-spin {
    to { transform: rotate(360deg); }
}

.hc-3d-loading p {
    color: var(--hc-text-secondary);
    font-size: 14px;
}

/* 3D Error State */
.hc-3d-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--hc-bg-surface);
    gap: var(--hc-space-lg);
}

.hc-3d-error p {
    color: #dc3545;
    font-size: 14px;
}

.hc-3d-error button {
    padding: var(--hc-space-md) var(--hc-space-xl) !important;
    background: var(--hc-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--hc-radius-md) !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-family: var(--hc-font) !important;
}

.hc-3d-error button:hover {
    background: var(--hc-primary-hover) !important;
}

/* 3D Controls - Floating - TOP */
.hc-3d-controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--hc-space-sm);
    padding: var(--hc-space-sm);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--hc-radius-xl);
    box-shadow: var(--hc-shadow-float);
    z-index: 40;
}

.hc-3d-control-btn {
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: transparent !important;
    border-radius: var(--hc-radius-md) !important;
    cursor: pointer !important;
    color: var(--hc-text-secondary) !important;
    transition: all var(--hc-transition-fast) !important;
    padding: 0 !important;
}

.hc-3d-control-btn:hover {
    background: var(--hc-primary-light) !important;
    color: var(--hc-primary) !important;
}

.hc-3d-control-btn svg {
    width: 20px;
    height: 20px;
}

/* ==========================================
   CONFIG PANEL (Right side)
   ========================================== */

.hc-config-panel {
    width: 380px !important;
    min-width: 320px !important;
    max-width: 380px !important;
    background: var(--hc-bg-surface) !important;
    border-left: 1px solid var(--hc-border-light) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.hc-config-panel > .hc-config-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.hc-config-panel::-webkit-scrollbar {
    width: 6px;
}

.hc-config-panel::-webkit-scrollbar-track {
    background: transparent;
}

.hc-config-panel::-webkit-scrollbar-thumb {
    background: var(--hc-border-medium);
    border-radius: 3px;
}

/* Config Header */
.hc-config-header {
    padding: var(--hc-space-lg) var(--hc-space-xl) !important;
    border-bottom: 1px solid var(--hc-border-light) !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.hc-config-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--hc-text-primary) !important;
    letter-spacing: -0.5px !important;
    margin-bottom: var(--hc-space-xs) !important;
    font-family: var(--hc-font) !important;
    line-height: 1.3 !important;
}

.hc-price-display {
    text-align: left;
    line-height: 1.2;
}

.hc-price-gross {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: var(--hc-primary) !important;
    letter-spacing: -1px !important;
    font-family: var(--hc-font) !important;
}

.hc-price-net {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--hc-text-muted) !important;
    letter-spacing: 0 !important;
}

/* Config Content */
.hc-config-content {
    flex: 1;
    min-height: 0;
    padding: var(--hc-space-md) var(--hc-space-xl);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Module Styling */
.hc-module {
    margin-bottom: var(--hc-space-md) !important;
    border-radius: var(--hc-radius-md) !important;
    background: var(--hc-bg-page) !important;
    overflow: hidden !important;
}

/* Hide personalization module in right panel when bottom bar is visible (desktop only) */
.hc-page-wrapper-with-bottom-bar .hc-module[data-module="personalization"] {
    display: none;
}

@media (max-width: 1024px) {
    /* On tablet/mobile, always show personalization module since bottom bar is hidden */
    .hc-page-wrapper-with-bottom-bar .hc-module[data-module="personalization"] {
        display: block !important;
    }
}

.hc-module-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: var(--hc-space-md) var(--hc-space-lg) !important;
    cursor: pointer !important;
    transition: background var(--hc-transition-fast) !important;
    background: transparent !important;
    border: none !important;
}

.hc-module-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.hc-module-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--hc-text-primary) !important;
    font-family: var(--hc-font) !important;
}

.hc-module-toggle {
    font-size: 12px;
    color: var(--hc-text-muted);
    transition: transform var(--hc-transition-normal);
}

.hc-module-header.expanded .hc-module-toggle {
    transform: rotate(180deg);
}

.hc-module-content {
    padding: 0 var(--hc-space-lg) var(--hc-space-lg);
    border-top: 1px solid transparent;
    transition: all var(--hc-transition-normal);
}

.hc-module-header.expanded + .hc-module-content {
    padding-top: var(--hc-space-md);
    border-top-color: var(--hc-border-light);
}

/* Form Groups */
.hc-form-group {
    margin-bottom: var(--hc-space-lg);
}

.hc-form-group:last-child {
    margin-bottom: 0;
}

.hc-label {
    display: block;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--hc-text-secondary) !important;
    margin-bottom: var(--hc-space-sm);
    font-family: var(--hc-font) !important;
}

/* Select Styling */
.hc-select {
    width: 100%;
    padding: var(--hc-space-md) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: var(--hc-font) !important;
    color: var(--hc-text-primary) !important;
    background: var(--hc-bg-surface) !important;
    border: 1px solid var(--hc-border-medium) !important;
    border-radius: var(--hc-radius-md) !important;
    cursor: pointer;
    transition: all var(--hc-transition-fast);
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 40px !important;
    box-shadow: none !important;
    outline: none !important;
}

.hc-select:hover {
    border-color: var(--hc-primary) !important;
}

.hc-select:focus {
    outline: none !important;
    border-color: var(--hc-primary) !important;
    box-shadow: 0 0 0 3px var(--hc-primary-light) !important;
}

/* Color Swatches - Modern Round */
.hc-color-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hc-space-sm);
}

.hc-color-swatch-wrapper {
    position: relative;
    cursor: pointer;
}

.hc-color-swatch-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hc-color-btn {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: 3px solid transparent !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1) !important;
    transition: all var(--hc-transition-fast) !important;
    padding: 0 !important;
    cursor: pointer !important;
}

.hc-color-swatch-wrapper input[type="radio"]:checked + .hc-color-btn {
    border-color: var(--hc-primary) !important;
    transform: scale(1.1) !important;
}

.hc-color-swatch-wrapper:hover .hc-color-btn {
    transform: scale(1.1);
}

.hc-color-label {
    display: none;
}

/* Option Rows (Checkboxes) */
.hc-option-row {
    margin-bottom: var(--hc-space-md);
    margin-top: var(--hc-space-md);
}

.hc-option-row:first-child {
    margin-top: 0;
}

.hc-checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: var(--hc-space-md) !important;
    cursor: pointer !important;
    padding: var(--hc-space-md) !important;
    background: var(--hc-bg-surface) !important;
    border: 1px solid var(--hc-border-medium) !important;
    border-radius: var(--hc-radius-md) !important;
    transition: all var(--hc-transition-fast) !important;
    font-family: var(--hc-font) !important;
    font-size: 15px !important;
    color: var(--hc-text-primary) !important;
}

.hc-checkbox-label:hover {
    border-color: var(--hc-primary) !important;
}

.hc-checkbox-label:has(input:checked) {
    border-color: var(--hc-primary) !important;
    background: var(--hc-primary-light) !important;
}

.hc-checkbox {
    display: none;
}

.hc-checkbox-custom {
    width: 22px !important;
    height: 22px !important;
    border: 2px solid var(--hc-border-medium) !important;
    border-radius: var(--hc-radius-sm) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all var(--hc-transition-fast) !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    padding: 0 !important;
}

.hc-checkbox-label:has(.hc-checkbox:checked) .hc-checkbox-custom {
    background: var(--hc-primary) !important;
    border-color: var(--hc-primary) !important;
}

.hc-checkbox-label:has(.hc-checkbox:checked) .hc-checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

/* Domyślnie ukryj opcje kolorów wydruku - JavaScript je pokaże */
/* Ukrywamy tylko kolory wydruku (hcTextColor), nie kolory grafiki (hcLogoColor) */
.hc-text-color-options:not(#hcLogoColorsBottom):not(#hcLogoColors) .hc-text-color-wrapper {
    display: none;
}

.hc-checkbox-text {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--hc-text-primary) !important;
    font-family: var(--hc-font) !important;
}

/* Style dla checkboxa odwróconej kolejności kolorów w głównym panelu */
.hc-config-panel .hc-reverse-color-checkbox .hc-checkbox-label {
    display: inline-flex !important;
    padding: 8px 12px !important;
    background: transparent !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    color: #555 !important;
}

.hc-config-panel .hc-reverse-color-checkbox .hc-checkbox-label:hover {
    border-color: #032250 !important;
}

.hc-config-panel .hc-reverse-color-checkbox .hc-checkbox-custom {
    width: 16px !important;
    height: 16px !important;
    border: 2px solid #aaa !important;
    border-radius: 3px !important;
    margin-right: 8px !important;
}

.hc-config-panel .hc-reverse-color-checkbox .hc-checkbox:checked + .hc-checkbox-custom {
    background: #032250 !important;
    border-color: #032250 !important;
}

/* Option Content */
.hc-option-content {
    margin-top: var(--hc-space-md);
    padding: var(--hc-space-lg);
    background: var(--hc-bg-surface);
    border: 1px solid var(--hc-border-light);
    border-radius: var(--hc-radius-md);
}

/* Extra margin for logo option row when text content is also visible */
.hc-option-row.text-content-visible {
    margin-top: 24px !important;
}

/* Target via adjacent sibling when text content is visible */
.hc-option-row:has(+ .hc-option-row .hc-option-content:not(.hc-hidden)) {
    margin-bottom: 24px;
}

/* Text Input */
.hc-input {
    width: 100% !important;
    padding: var(--hc-space-md) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--hc-text-primary) !important;
    background: var(--hc-bg-surface) !important;
    border: 1px solid var(--hc-border-medium) !important;
    border-radius: var(--hc-radius-md) !important;
    transition: all var(--hc-transition-fast) !important;
    font-family: var(--hc-font) !important;
    box-shadow: none !important;
    outline: none !important;
}

.hc-input:focus {
    outline: none !important;
    border-color: var(--hc-primary) !important;
    box-shadow: 0 0 0 3px var(--hc-primary-light) !important;
}

.hc-char-counter {
    font-size: 12px;
    color: var(--hc-text-muted);
    text-align: center;
    margin-top: var(--hc-space-xs);
}

/* Spacing Slider Styles - Sidebar Panel */
.hc-config-content .hc-spacing-slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: var(--hc-space-md);
}

.hc-config-content .hc-spacing-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hc-config-content .hc-spacing-label-row .hc-label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.hc-config-content .hc-spacing-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--hc-text-secondary);
    background: var(--hc-bg-surface);
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--hc-border-light);
}

.hc-config-content .hc-spacing-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.hc-config-content .hc-spacing-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--hc-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.hc-config-content .hc-spacing-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--hc-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.hc-config-content .hc-spacing-hint {
    font-size: 11px;
    color: #999;
    text-align: center;
}

/* Text Color Options - Modern Round */
.hc-text-color-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hc-space-sm);
}

/* Separator between single and two-color options */
.hc-two-color-options {
    margin-top: var(--hc-space-sm);
    padding-top: var(--hc-space-sm);
    border-top: 1px solid var(--hc-border-light);
}

.hc-text-color-btn {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    transition: all var(--hc-transition-fast) !important;
    border: none !important;
    padding: 0 !important;
}

.hc-text-color-wrapper {
    position: relative !important;
    cursor: pointer !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: 2px solid transparent !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    transition: all var(--hc-transition-fast) !important;
    background: none !important;
}

.hc-text-color-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hc-text-color-wrapper input[type="radio"]:checked + .hc-text-color-btn {
    border-color: var(--hc-primary);
}

.hc-text-color-wrapper:hover {
    transform: scale(1.1);
    border-color: var(--hc-primary);
}

.hc-text-color-wrapper:has(input:checked) {
    border-color: var(--hc-primary);
}

.hc-split-color {
    border-radius: 50%;
}

/* Logo Upload */
.hc-logo-upload-area {
    border: 2px dashed var(--hc-border-medium) !important;
    border-radius: var(--hc-radius-md) !important;
    padding: var(--hc-space-xl) !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all var(--hc-transition-fast) !important;
    background: transparent !important;
}

.hc-logo-upload-area:hover {
    border-color: var(--hc-primary) !important;
    background: var(--hc-primary-light) !important;
}

.hc-logo-upload-area.dragover {
    border-color: var(--hc-primary) !important;
    background: var(--hc-primary-light) !important;
}

.hc-upload-text {
    font-size: 14px;
    color: var(--hc-text-secondary);
    margin-bottom: var(--hc-space-xs);
}

.hc-upload-hint {
    font-size: 12px;
    color: var(--hc-text-muted);
}

.hc-file-input {
    display: none;
}

.hc-logo-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hc-space-md);
    padding: 8px 12px;
    background: var(--hc-bg-surface);
    border: 1px solid var(--hc-border-light);
    border-radius: var(--hc-radius-md);
    min-height: 40px;
    box-sizing: border-box;
}

.hc-logo-preview-content {
    display: flex;
    align-items: center;
    gap: var(--hc-space-md);
    flex: 1;
    min-width: 0;
}

.hc-logo-preview img {
    max-width: 60px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: var(--hc-radius-sm);
    /* Default: black logo */
    filter: brightness(0);
}

.hc-logo-preview img.hc-logo-white {
    filter: brightness(0) invert(1);
}

.hc-logo-preview img.hc-logo-on-dark {
    filter: brightness(0) invert(1);
}

.hc-remove-logo-btn {
    padding: var(--hc-space-sm) var(--hc-space-md) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #032250 !important;
    background: transparent !important;
    border: 1px solid #032250 !important;
    border-radius: var(--hc-radius-sm) !important;
    cursor: pointer;
    transition: all var(--hc-transition-fast);
    flex-shrink: 0;
}

.hc-remove-logo-btn:hover {
    background: #032250 !important;
    color: white !important;
}

/* Summary */
.hc-summary {
    display: none;
}

.hc-summary-details {
    margin-bottom: var(--hc-space-md);
}

.hc-summary-row {
    font-size: 13px;
    color: var(--hc-text-secondary);
    margin-bottom: var(--hc-space-xs);
}

.hc-summary-label {
    font-weight: 500;
}

/* Tape Parameters - Clean Text Display */
.hc-tape-params {
    padding: var(--hc-space-md) var(--hc-space-lg);
    background: var(--hc-bg-surface);
    border-top: 1px solid var(--hc-border-light);
}

.hc-param-row {
    display: flex;
    align-items: flex-start;
    gap: var(--hc-space-sm);
    padding: var(--hc-space-xs) 0;
    font-size: 13px;
    line-height: 1.5;
}

.hc-param-row:first-child {
    margin-bottom: var(--hc-space-xs);
}

.hc-param-label {
    font-weight: 600;
    color: var(--hc-text-primary);
    flex-shrink: 0;
    min-width: 60px;
}

.hc-param-value {
    color: var(--hc-text-secondary);
    word-break: break-word;
}

.hc-param-text {
    color: var(--hc-text-muted);
    font-style: italic;
}

/* Tape Dimensions - Clean display under summary */
.hc-tape-dimensions {
    display: none;
}

.hc-dim-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--hc-space-xs) 0;
    font-size: 13px;
}

.hc-dim-row:not(:last-child) {
    border-bottom: 1px dashed var(--hc-border-light);
}

.hc-dim-label {
    font-weight: 600;
    color: var(--hc-text-primary);
}

.hc-dim-value {
    color: var(--hc-text-secondary);
    font-weight: 500;
}

/* Action Buttons — !important to override any theme button styles */
.hc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hc-space-sm);
    padding: var(--hc-space-md);
    background: var(--hc-bg-surface);
    border-top: 1px solid var(--hc-border-light);
    flex-shrink: 0;
    width: 100%;
}

.hc-btn {
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: var(--hc-font) !important;
    border-radius: var(--hc-radius-md) !important;
    cursor: pointer !important;
    transition: all var(--hc-transition-fast) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--hc-space-sm) !important;
    border: none !important;
    white-space: nowrap;
    flex: 1;
    min-width: 120px;
    text-decoration: none !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    box-shadow: none !important;
}

.hc-btn-reset {
    background: transparent !important;
    color: var(--hc-text-secondary) !important;
    border: 1px solid var(--hc-border-medium) !important;
    order: 1;
}

.hc-btn-reset:hover {
    border-color: var(--hc-text-secondary) !important;
    color: var(--hc-text-primary) !important;
    background: transparent !important;
}

.hc-add-to-cart-btn {
    background: var(--hc-primary) !important;
    color: var(--hc-text-inverse) !important;
    border: none !important;
    order: 3;
}

.hc-add-to-cart-btn:hover {
    background: var(--hc-primary-hover) !important;
    color: var(--hc-text-inverse) !important;
    transform: translateY(-1px);
    box-shadow: var(--hc-shadow-md) !important;
}

.hc-add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    background: var(--hc-primary) !important;
    color: var(--hc-text-inverse) !important;
}

.hc-btn-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hc-spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes hc-spin {
    to { transform: rotate(360deg); }
}

.hc-btn-arrow {
    width: 18px;
    height: 18px;
}

/* Quantity and Order wrapper */
.hc-quantity-order {
    display: flex;
    align-items: center;
    gap: var(--hc-space-xs);
    flex: 1;
    min-width: 100%;
    order: 2;
    margin-bottom: var(--hc-space-sm);
    justify-content: center;
}

.hc-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: var(--hc-space-sm);
    flex-shrink: 0;
    margin-right: var(--hc-space-md);
}

.hc-quantity-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--hc-text-secondary);
    white-space: nowrap;
}

.hc-quantity-input {
    width: 60px;
    padding: 8px 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    border: 1px solid var(--hc-border-medium) !important;
    border-radius: var(--hc-radius-sm) !important;
    background: var(--hc-bg-surface) !important;
    color: var(--hc-text-primary) !important;
    font-family: var(--hc-font) !important;
    box-shadow: none !important;
    outline: none !important;
    -moz-appearance: textfield;
}

.hc-quantity-input::-webkit-inner-spin-button,
.hc-quantity-input::-webkit-outer-spin-button {
    opacity: 1;
    height: 24px;
    margin: 0;
}

/* Hidden utility */
.hc-hidden {
    display: none !important;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet landscape - stack vertically */
@media (max-width: 1024px) {
    .hc-page-wrapper {
        flex-direction: column !important;
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
        overflow: visible !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    /* Force scrollability on any parent containers */
    body:has(.hc-page-wrapper),
    html:has(.hc-page-wrapper) {
        overflow-y: auto !important;
        height: auto !important;
    }
    
    .hc-preview-section {
        flex: none !important;
        height: 50vh !important;
        min-height: 300px !important;
        max-height: 50vh !important;
        position: relative;
        touch-action: pan-y;
        width: 100% !important;
    }
    
    /* Allow vertical scroll to pass through 3D canvas */
    .hc-3d-viewer,
    .hc-3d-viewer canvas {
        touch-action: pan-y;
    }
    
    /* Hide bottom personalization bar on tablet/mobile - 
       config panel has all the same options */
    .hc-personalization-bar {
        display: none !important;
    }
    
    /* Show personalization module in config panel when bar is hidden */
    .hc-module[data-module="personalization"] {
        display: block !important;
    }
    
    .hc-config-panel {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        border-left: none !important;
        border-top: 1px solid var(--hc-border-light) !important;
        overflow: visible !important;
    }
    
    .hc-config-panel > .hc-config-content {
        overflow: visible !important;
        max-height: none !important;
        min-height: 0;
        flex: none;
    }
    
    .hc-config-content {
        overflow: visible !important;
        flex: none;
    }
    
    .hc-3d-controls {
        top: 12px;
    }
    
    .hc-3d-control-btn {
        width: 40px;
        height: 40px;
    }
    
    /* Step indicators for mobile flow */
    .hc-module-header .hc-module-step {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: var(--hc-primary);
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        margin-right: 10px;
        flex-shrink: 0;
    }
    
    /* Actions bar - sticky at bottom on mobile */
    .hc-actions {
        position: sticky;
        bottom: 0;
        z-index: 90;
        background: var(--hc-bg-surface);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
        border-top: 1px solid var(--hc-border-light);
    }
    
    /* Config header - centered on tablet */
    .hc-config-header {
        text-align: center;
    }
    
    .hc-price-display {
        text-align: center;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .hc-preview-section {
        height: 40vh !important;
        min-height: 250px !important;
        max-height: 40vh !important;
    }
    
    .hc-config-header {
        padding: var(--hc-space-md) !important;
    }
    
    .hc-config-title {
        font-size: 20px !important;
    }
    
    .hc-price-gross {
        font-size: 26px !important;
    }
    
    .hc-config-content {
        padding: var(--hc-space-sm) var(--hc-space-md) !important;
    }
    
    .hc-module-content {
        padding: 0 var(--hc-space-md) var(--hc-space-md) !important;
    }
    
    .hc-module-header.expanded + .hc-module-content {
        padding-top: var(--hc-space-md) !important;
    }
    
    .hc-module-header {
        padding: var(--hc-space-md) !important;
        min-height: 48px;
    }
    
    /* Touch-friendly color swatches */
    .hc-color-btn {
        width: 36px !important;
        height: 36px !important;
    }
    
    .hc-text-color-wrapper {
        width: 36px !important;
        height: 36px !important;
    }
    
    .hc-text-color-btn {
        width: 100% !important;
        height: 100% !important;
    }
    
    .hc-color-options {
        gap: 10px !important;
    }
    
    .hc-text-color-options {
        gap: 10px !important;
    }
    
    /* Touch-friendly form elements */
    .hc-select {
        min-height: 44px !important;
        font-size: 16px !important; /* prevents iOS zoom */
    }
    
    .hc-input {
        min-height: 44px !important;
        font-size: 16px !important; /* prevents iOS zoom */
    }
    
    /* Actions */
    .hc-actions {
        flex-direction: column !important;
        padding: var(--hc-space-md) !important;
        gap: var(--hc-space-sm) !important;
    }
    
    .hc-btn {
        width: 100% !important;
        min-height: 48px !important;
        font-size: 15px !important;
    }
    
    .hc-quantity-order {
        width: 100% !important;
        flex-direction: row !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    .hc-quantity-wrapper {
        justify-content: center !important;
    }
    
    .hc-quantity-input {
        width: 70px !important;
        min-height: 44px !important;
        font-size: 16px !important;
    }
    
    .hc-add-to-cart-btn {
        width: 100% !important;
    }
    
    /* Checkbox labels - bigger touch targets */
    .hc-checkbox-label {
        min-height: 48px !important;
        padding: var(--hc-space-md) !important;
    }
    
    .hc-3d-controls {
        top: 10px;
        gap: 4px;
        padding: 4px;
    }
    
    .hc-3d-control-btn {
        width: 38px !important;
        height: 38px !important;
    }
    
    /* Option content - better spacing */
    .hc-option-content {
        padding: var(--hc-space-md) !important;
    }
    
    /* Form group in option content - fix height */
    .hc-option-content .hc-form-group {
        height: auto !important;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .hc-preview-section {
        height: 35vh !important;
        min-height: 200px !important;
        max-height: 35vh !important;
    }
    
    .hc-config-header {
        padding: var(--hc-space-sm) var(--hc-space-md) !important;
    }
    
    .hc-config-title {
        font-size: 18px !important;
    }
    
    .hc-price-gross {
        font-size: 22px !important;
    }
    
    .hc-price-net {
        font-size: 12px !important;
    }
    
    .hc-config-content {
        padding: var(--hc-space-sm) var(--hc-space-md) !important;
    }
    
    .hc-module {
        margin-bottom: var(--hc-space-sm) !important;
    }
    
    .hc-module-content {
        padding: 0 var(--hc-space-sm) var(--hc-space-sm) !important;
    }
    
    .hc-module-header {
        padding: var(--hc-space-sm) var(--hc-space-md) !important;
    }
    
    .hc-form-group {
        margin-bottom: var(--hc-space-md) !important;
    }
    
    .hc-option-content {
        padding: var(--hc-space-sm) !important;
    }
    
    /* Color swatches - ensure touch-friendly */
    .hc-color-btn {
        width: 34px !important;
        height: 34px !important;
    }
    
    .hc-color-options {
        gap: 8px !important;
    }
    
    .hc-text-color-options {
        gap: 8px !important;
    }
    
    .hc-text-color-wrapper {
        width: 34px !important;
        height: 34px !important;
    }
    
    .hc-3d-controls {
        top: 8px;
        gap: 2px;
        padding: 3px;
        border-radius: var(--hc-radius-lg);
    }
    
    .hc-3d-control-btn {
        width: 34px !important;
        height: 34px !important;
    }
    
    .hc-3d-control-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .hc-actions {
        padding: var(--hc-space-sm) var(--hc-space-md) !important;
    }
    
    /* Select and input full width on mobile */
    .hc-select {
        width: 100% !important;
    }
    
    .hc-input {
        width: 100% !important;
    }
    
    /* Module title smaller */
    .hc-module-title {
        font-size: 14px !important;
    }
    
    /* Label smaller */
    .hc-label {
        font-size: 12px !important;
    }
}

/* ==========================================
   RWD - Personalization Bar (Desktop only)
   ========================================== */

/* Large desktop scaling */
@media (max-width: 1800px) {
    .hc-personalization-bar {
        width: 94%;
        max-width: 1200px;
    }
    .hc-personalization-bar .hc-personalization-groups { gap: 10px; padding: 12px 15px; }
    .hc-personalization-bar .hc-group-1,
    .hc-personalization-bar .hc-group-2,
    .hc-personalization-bar .hc-group-3 { gap: 8px; }
    .hc-personalization-bar .hc-input { min-width: 180px !important; width: 180px !important; }
    .hc-personalization-bar .hc-input,
    .hc-personalization-bar .hc-select { padding: 7px 12px; font-size: 12px; }
    .hc-personalization-bar .hc-label { font-size: 10px; }
    .hc-personalization-bar .hc-text-color-btn { width: 24px; height: 24px; }
}

@media (max-width: 1600px) {
    .hc-personalization-bar { width: 95%; max-width: 1000px; }
    .hc-personalization-bar .hc-personalization-title { flex: 0 0 14%; width: 14%; }
    .hc-personalization-bar .hc-personalization-groups { gap: 6px; padding: 8px 10px; }
    .hc-personalization-bar .hc-group-1,
    .hc-personalization-bar .hc-group-2,
    .hc-personalization-bar .hc-group-3 { gap: 5px; }
    .hc-personalization-bar .hc-input { min-width: 140px !important; width: 140px !important; }
    .hc-personalization-bar .hc-input,
    .hc-personalization-bar .hc-select { padding: 5px 8px; font-size: 11px; min-width: 70px; }
    .hc-personalization-bar .hc-label { font-size: 8px; }
    .hc-personalization-bar .hc-divider { height: 30px; margin: 0 3px; }
    .hc-personalization-bar .hc-text-color-btn { width: 20px; height: 20px; }
    .hc-personalization-bar .hc-logo-upload-area { padding: 5px 8px; min-height: 30px; height: 30px; width: 80px; font-size: 10px; }
    .hc-personalization-bar .hc-spacing-slider-container { min-width: 70px; }
    .hc-personalization-bar .hc-spacing-slider { width: 50px; }
}

@media (max-width: 1400px) {
    .hc-personalization-bar { width: 95%; max-width: 900px; }
    .hc-personalization-bar .hc-personalization-title { flex: 0 0 13%; width: 13%; font-size: 14px; }
    .hc-personalization-bar .hc-personalization-groups { gap: 5px; padding: 6px 8px; }
    .hc-personalization-bar .hc-group-1,
    .hc-personalization-bar .hc-group-2,
    .hc-personalization-bar .hc-group-3 { gap: 4px; }
    .hc-personalization-bar .hc-input { min-width: 110px !important; width: 110px !important; }
    .hc-personalization-bar .hc-input,
    .hc-personalization-bar .hc-select { padding: 4px 6px; font-size: 10px; min-width: 60px; }
    .hc-personalization-bar .hc-label { font-size: 8px; }
    .hc-personalization-bar .hc-divider { height: 28px; margin: 0 2px; }
    .hc-personalization-bar .hc-text-color-btn { width: 18px; height: 18px; }
    .hc-personalization-bar .hc-logo-upload-area { padding: 4px 6px; min-height: 28px; height: 28px; width: 70px; font-size: 9px; }
    .hc-personalization-bar .hc-spacing-slider-container { min-width: 60px; }
    .hc-personalization-bar .hc-spacing-slider { width: 40px; }
}

/* Medium desktop - config panel narrower */
@media (max-width: 1280px) {
    .hc-config-panel {
        width: 340px !important;
        min-width: 300px !important;
        max-width: 340px !important;
    }
    
    .hc-config-title {
        font-size: 20px !important;
    }
    
    .hc-price-gross {
        font-size: 28px !important;
    }
    
    .hc-config-header {
        padding: var(--hc-space-md) var(--hc-space-lg) !important;
    }
    
    .hc-config-content {
        padding: var(--hc-space-sm) var(--hc-space-lg);
    }
    
    .hc-personalization-bar .hc-input { min-width: 100px !important; width: 100px !important; font-size: 10px !important; }
    .hc-personalization-bar .hc-select { min-width: 70px !important; width: 70px !important; font-size: 10px !important; }
    .hc-personalization-bar .hc-personalization-title { flex: 0 0 12%; width: 12%; font-size: 12px; }
    .hc-personalization-bar .hc-text-color-btn { width: 16px !important; height: 16px !important; }
    .hc-personalization-bar .hc-text-color-options { gap: 4px !important; }
    .hc-personalization-bar .hc-logo-upload-area { width: 60px !important; font-size: 8px !important; }
    .hc-personalization-bar .hc-spacing-slider-container { min-width: 55px !important; padding: 4px 6px !important; }
    .hc-personalization-bar .hc-spacing-slider { width: 35px !important; }
    .hc-personalization-bar .hc-divider { height: 24px; margin: 0 1px; }
    .hc-personalization-bar .hc-personalization-groups { gap: 3px; padding: 5px 6px; }
    .hc-personalization-bar .hc-group-1,
    .hc-personalization-bar .hc-group-2,
    .hc-personalization-bar .hc-group-3 { gap: 3px; }
}

/* Small desktop - hide bottom bar, show panel module */
@media (max-width: 1100px) {
    .hc-personalization-bar {
        display: none !important;
    }
    
    .hc-config-panel {
        width: 340px !important;
        min-width: 280px !important;
        max-width: 340px !important;
    }
    
    /* Show personalization module in config panel */
    .hc-page-wrapper-with-bottom-bar .hc-module[data-module="personalization"] {
        display: block !important;
    }
}

/* Step indicators - hidden on desktop, shown on mobile */
.hc-module-header .hc-module-step {
    display: none;
}

/* Animations */
@keyframes hc-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hc-slideUp {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.hc-config-panel {
    animation: hc-slideUp 0.4s ease-out;
}

@media (max-width: 1024px) {
    .hc-config-panel {
        animation: none;
    }
}

/* ==========================================
   RWD FIXES - Config panel form elements on mobile
   ========================================== */

/* Fix absolute positioned elements inside config panel on mobile */
@media (max-width: 1024px) {
    /* Char counter - make it flow normally */
    .hc-config-panel .hc-option-content .hc-form-group {
        height: auto !important;
        position: relative;
    }
    
    .hc-config-panel .hc-char-counter {
        position: relative !important;
        top: auto !important;
        margin-top: 4px;
    }
    
    /* Reverse color checkbox - make it flow normally */
    .hc-config-panel .hc-reverse-color-checkbox {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        margin-top: 8px;
        white-space: normal !important;
    }
    
    /* Logo position group - make it flow normally */
    .hc-config-panel .hc-logo-position-group {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        margin-top: 12px;
        justify-content: center;
    }
    
    /* Logo upload area - full width on mobile */
    .hc-config-panel .hc-logo-upload-area {
        width: 100% !important;
    }
    
    /* Logo preview - full width */
    .hc-config-panel .hc-logo-preview {
        width: 100% !important;
    }
    
    /* Spacing slider - full width */
    .hc-config-panel .hc-spacing-slider-container {
        width: 100% !important;
    }
    
    .hc-config-panel .hc-spacing-slider {
        width: 100% !important;
    }
    
    /* Option content - better padding on mobile */
    .hc-config-panel .hc-option-content {
        padding: var(--hc-space-md) !important;
    }
    
    /* Form group fix - ensure proper stacking */
    .hc-config-panel .hc-form-group {
        width: 100% !important;
        min-width: 0 !important;
    }
    
    /* Select full width */
    .hc-config-panel .hc-select {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Input full width */
    .hc-config-panel .hc-input {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Color options - wrap nicely */
    .hc-config-panel .hc-color-options,
    .hc-config-panel .hc-text-color-options {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    /* Two-column layout for config on wider tablets */
    .hc-config-panel .hc-module-content {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}


/* ==========================================
   POZYCJA LOGA - PRZYCISKI IKONOWE
   ========================================== */

.hc-position-toggle {
    display: flex;
    gap: 5px;
}

.hc-position-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 28px !important;
    padding: 4px 6px !important;
    background: #f5f5f5 !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    color: #666 !important;
}

.hc-position-btn:hover {
    background: #eee !important;
    border-color: #bbb !important;
}

.hc-position-btn.active {
    background: var(--hc-primary) !important;
    border-color: var(--hc-primary) !important;
    color: white !important;
}

.hc-position-btn svg {
    width: 100%;
    height: 100%;
}

/* ==========================================
   ODWÓRCONE KOLORY DWUKOLOROWE - IKONY
   ========================================== */

.hc-two-color-reversed-options {
    display: none;
    margin-top: 8px;
    padding: 8px;
    background: #f8f8f8;
    border-radius: 6px;
}

.hc-two-color-reversed-options.visible {
    display: block;
}

.hc-two-color-reversed-label {
    font-size: 10px;
    color: #888;
    margin-bottom: 6px;
    display: block;
}

.hc-two-color-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hc-two-color-icon {
    width: 28px !important;
    height: 20px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    border: 2px solid #ddd !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
}

.hc-two-color-icon:hover {
    border-color: #999 !important;
}

.hc-two-color-icon.selected {
    border-color: var(--hc-primary) !important;
    box-shadow: 0 0 0 2px rgba(3, 34, 80, 0.2) !important;
}

/* ==========================================
   EXTRA RWD FIXES
   ========================================== */

/* Prevent horizontal overflow on all screen sizes */
.hc-page-wrapper,
.hc-config-panel,
.hc-preview-section,
.hc-config-content,
.hc-module-content {
    max-width: 100%;
}

/* Preview section should take remaining space properly */
.hc-preview-section {
    min-width: 0 !important;
}

/* Very small mobile (< 360px) */
@media (max-width: 360px) {
    .hc-preview-section {
        height: 30vh !important;
        min-height: 180px !important;
        max-height: 30vh !important;
    }
    
    .hc-config-title {
        font-size: 16px !important;
    }
    
    .hc-price-gross {
        font-size: 20px !important;
    }
    
    .hc-color-btn {
        width: 30px !important;
        height: 30px !important;
    }
    
    .hc-text-color-wrapper {
        width: 30px !important;
        height: 30px !important;
    }
    
    .hc-module-title {
        font-size: 13px !important;
    }
    
    .hc-3d-controls {
        top: 6px;
    }
    
    .hc-3d-control-btn {
        width: 30px !important;
        height: 30px !important;
    }
    
    .hc-3d-control-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Landscape mobile orientation */
@media (max-width: 900px) and (orientation: landscape) {
    .hc-page-wrapper {
        flex-direction: column !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        overflow-x: hidden !important;
    }
    
    .hc-preview-section {
        height: 60vh !important;
        min-height: 250px !important;
        max-height: 60vh !important;
    }
    
    .hc-personalization-bar {
        display: none !important;
    }
    
    .hc-config-panel {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        border-left: none !important;
        overflow: visible !important;
    }
    
    .hc-module[data-module="personalization"] {
        display: block !important;
    }
}
