/*
 * Bellpep Lifestyles - T-shirt Customizer Stylesheet
 * Responsive, premium, and interactive B2B design system.
 */

:root {
    --customizer-primary: #9dac82;
    --customizer-primary-hover: #8ba26a;
    --customizer-dark: #3a3a3a;
    --customizer-light-bg: #fcfbfa;
    --customizer-card-bg: #ffffff;
    --customizer-border: rgba(157, 172, 130, 0.25);
    --customizer-shadow: 0 12px 30px rgba(157, 172, 130, 0.12);
    --customizer-shadow-hover: 0 20px 40px rgba(157, 172, 130, 0.2);
}

.tshirt-customizer-section {
    padding: 80px 0;
    background-color: var(--customizer-light-bg);
    border-top: 1px solid rgba(157, 172, 130, 0.15);
    border-bottom: 1px solid rgba(157, 172, 130, 0.15);
    font-family: 'HK Grotesk', sans-serif;
}

.customizer-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
    margin-top: 40px;
}

@media (max-width: 991px) {
    .customizer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- Left Column: Studio Mockup Viewer --- */
.customizer-studio {
    background: radial-gradient(circle at center, #ffffff 0%, #f3f5f2 100%);
    border: 1px solid var(--customizer-border);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--customizer-shadow);
    min-height: 550px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.customizer-studio:hover {
    box-shadow: var(--customizer-shadow-hover);
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    background-color: transparent;
}

#tshirt-canvas,
#towel-canvas,
#bag-canvas {
    width: 100%;
    height: 100%;
    max-width: 450px;
    max-height: 450px;
    border-radius: 8px;
    display: block;
}

/* Printable Area Guide Overlay */
.printable-area-guide {
    position: absolute;
    top: 25%;
    left: 27%;
    width: 46%;
    height: 48%;
    border: 2px dashed rgba(157, 172, 130, 0.4);
    border-radius: 4px;
    pointer-events: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    z-index: 10;
}

.printable-area-guide.visible {
    opacity: 1;
}

.printable-area-guide.active {
    border-color: var(--customizer-primary);
    background-color: rgba(157, 172, 130, 0.03);
}

.printable-area-label {
    background-color: var(--customizer-primary);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 2px;
    transform: translateY(-50%);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}



.studio-tip {
    margin-top: 15px;
    font-size: 13px;
    color: #888888;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-tip svg {
    color: var(--customizer-primary);
}

/* --- Right Column: Dashboard Controls --- */
.customizer-dashboard {
    background-color: var(--customizer-card-bg);
    border: 1px solid var(--customizer-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--customizer-shadow);
}

.dashboard-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--customizer-dark);
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(157, 172, 130, 0.1);
    padding-bottom: 12px;
}

/* Section Steps */
.custom-step-card {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.custom-step-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.step-num {
    background-color: var(--customizer-primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--customizer-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Step 1: Style Selection */
.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.style-option {
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background-color: #faf9f8;
}

.style-option:hover {
    border-color: var(--customizer-primary);
    transform: translateY(-2px);
    background-color: #ffffff;
}

.style-option.selected {
    border-color: var(--customizer-primary);
    background-color: var(--customizer-primary);
    box-shadow: 0 4px 12px rgba(157, 172, 130, 0.25);
}

.style-option.selected h4 {
    color: #ffffff;
}

.style-option h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--customizer-dark);
}

.style-option p {
    font-size: 12.5px;
    color: #777777;
    margin: 0;
}

/* Step 2: Color Palette */
.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px var(--customizer-primary);
}

.color-swatch.selected {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--customizer-primary), 0 4px 10px rgba(0,0,0,0.15);
}

.color-swatch.selected::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

/* Light color swatch text adjustment */
.color-swatch[data-color="#ffffff"].selected::after,
.color-swatch[data-color="#d3d3d3"].selected::after {
    color: #333333;
}

/* Custom Color pill-shaped trigger button (perfectly inline inside color-palette) */
.color-swatch.btn-custom-color-trigger {
    width: auto !important;
    height: 32px !important;
    border-radius: 16px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ffffff !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--customizer-dark) !important;
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    margin: 0 !important; /* Reset layout margins */
}

.color-swatch.btn-custom-color-trigger:hover {
    border-color: var(--customizer-primary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(157, 172, 130, 0.15) !important;
}

.color-swatch.btn-custom-color-trigger.selected {
    border-color: var(--customizer-primary) !important;
    background-color: rgba(157, 172, 130, 0.08) !important;
    box-shadow: 0 0 0 1px var(--customizer-primary), 0 3px 8px rgba(157, 172, 130, 0.18) !important;
    transform: none !important; /* Prevent standard selected transform overrides */
}

/* Suppress default selected checkmark pseudo-element on the pill button */
.color-swatch.btn-custom-color-trigger::after {
    display: none !important;
}

.trigger-text {
    line-height: 1;
    letter-spacing: 0.2px;
}

/* Custom Figma-style Color Picker Studio Panel */
.custom-color-studio-panel {
    display: none; /* Controlled dynamically by JS */
    margin-top: 15px;
    padding: 18px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    animation: slideDownStudio 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

@keyframes slideDownStudio {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Remove native browser focus outlines and tap rings on click */
.custom-color-studio-panel button,
.custom-color-studio-panel button:focus,
.custom-color-studio-panel button:active,
#custom-studio-hex-input,
#custom-studio-hex-input:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.studio-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

.studio-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--customizer-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-close-studio {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #999999;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s ease;
}

.btn-close-studio:hover {
    color: #333333;
}

/* Hex input row styled exactly like Figma */
.studio-hex-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.hex-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #f7f6f5;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 0 12px;
    height: 40px;
    transition: all 0.2s ease;
}

.hex-input-wrapper:focus-within {
    border-color: var(--customizer-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(157, 172, 130, 0.15);
}

.hex-label {
    font-size: 11px;
    font-weight: 700;
    color: #999999;
    margin-right: 8px;
    text-transform: uppercase;
}

.hex-hash {
    font-size: 14px;
    font-weight: 600;
    color: #555555;
    margin-right: 2px;
}

#custom-studio-hex-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: #333333;
    font-family: inherit;
    text-transform: uppercase;
    padding: 0;
}

#custom-studio-hex-input:focus {
    outline: none;
}

.btn-apply-hex {
    background-color: var(--customizer-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-apply-hex:hover {
    background-color: var(--customizer-primary-hover);
}

/* Palette Swatches section */
.studio-palette-section {
    margin-bottom: 18px;
}

.studio-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.studio-palette-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.studio-palette-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
    flex-shrink: 0;
    position: relative;
}

.studio-palette-swatch:hover {
    transform: scale(1.18);
    box-shadow: 0 0 0 2px var(--customizer-primary), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.studio-palette-swatch.selected {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--customizer-primary), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.studio-palette-swatch.selected::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

/* Light designer swatches checkmark colors */
.studio-palette-swatch[data-color="#fdcb6e"].selected::after,
.studio-palette-swatch[data-color="#f9d423"].selected::after {
    color: #333333;
}

/* Visual Spectrum Section */
.studio-spectrum-section {
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
    padding-top: 15px;
    margin-top: 5px;
}

.spectrum-canvas-area {
    position: relative;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    cursor: crosshair;
    background-color: #ff0000;
    margin-bottom: 12px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.spectrum-white-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0));
}

.spectrum-black-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #000000, rgba(0, 0, 0, 0));
}

.spectrum-cursor {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transform: translate(-50%, -50%);
    left: 100%;
    top: 0%;
    transition: left 0.1s ease, top 0.1s ease;
}

/* Beautiful custom rainbow hue slider track */
.hue-slider-area {
    margin-bottom: 8px;
}

.hue-range-input {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

.hue-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(0,0,0,0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.hue-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.hue-range-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(0,0,0,0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.hue-range-input::-moz-range-thumb:hover {
    transform: scale(1.15);
}

/* Step 3: Logo Upload & Positioning */
.upload-container {
    border: 1.5px dashed rgba(157, 172, 130, 0.35);
    border-radius: 8px;
    padding: 10px 15px;
    background-color: #faf9f8;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    text-align: left;
    gap: 12px;
}

.upload-container:hover, .upload-container.dragover {
    border-color: var(--customizer-primary);
    background-color: rgba(157, 172, 130, 0.04);
}

.upload-icon {
    color: var(--customizer-primary);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-content-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upload-text {
    font-size: 12.5px; 
    font-weight: 600;
    color: var(--customizer-dark);
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.upload-sub {
    font-size: 10.5px;
    color: #888888;
    margin: 0;
    line-height: 1.2;
}

.btn-remove-logo-inline {
    background-color: #ff3b30;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: none; /* Hide by default and let JS toggle inline-flex */
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.25) !important;
    outline: none !important;
    font-family: inherit !important;
}

.btn-remove-logo-inline:hover {
    background-color: #e03126 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(255, 59, 48, 0.4) !important;
}

.logo-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f3f5f2;
    border: 1px solid var(--customizer-border);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 15px;
    font-size: 12px;
}

.logo-name {
    font-weight: 700;
    color: var(--customizer-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.btn-remove-logo {
    background: none;
    border: none;
    color: #e63946;
    font-weight: 700;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 6px;
    transition: opacity 0.2s;
}

.btn-remove-logo:hover {
    text-decoration: underline;
}

/* Snap Placements */
.placement-label {
    font-size: 12px;
    font-weight: 700;
    color: #666666;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.placement-row {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.btn-snap-placement {
    flex: 1;
    background-color: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-snap-placement:hover {
    border-color: var(--customizer-primary);
    background-color: rgba(157, 172, 130, 0.05);
}

.btn-snap-placement.active {
    border-color: var(--customizer-primary);
    background-color: var(--customizer-primary);
    color: #ffffff;
}

/* Slider Controls */
.slider-control-group {
    margin-bottom: 12px;
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #555555;
    margin-bottom: 4px;
}

.slider-val {
    font-weight: 700;
    color: var(--customizer-primary);
}

.slider-input {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    margin: 5px 0;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--customizer-primary);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.slider-input::-webkit-slider-thumb:hover {
    background: var(--customizer-primary-hover);
    transform: scale(1.15);
}

/* Step 4: Custom Text Options */
.text-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.text-input-field {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.25s;
    box-sizing: border-box;
}

.text-input-field:focus {
    border-color: var(--customizer-primary);
    box-shadow: 0 0 0 3px rgba(157, 172, 130, 0.12);
}

/* Textarea specific — multiline text input */
.text-textarea {
    resize: vertical;
    min-height: 56px;
    max-height: 120px;
    line-height: 1.5;
    overflow-y: auto;
}

.text-styling-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 12px;
    align-items: stretch;
}

.font-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-font-dropdown {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.custom-font-dropdown .dropdown-trigger {
    height: 42px;
    border: 1.5px solid rgba(0,0,0,0.10);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #3a3a3a;
    background-color: #faf9f8;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    user-select: none;
}

.custom-font-dropdown .dropdown-trigger:hover {
    border-color: var(--customizer-primary);
    background-color: #ffffff;
}

.custom-font-dropdown.open .dropdown-trigger {
    border-color: var(--customizer-primary);
    background-color: #ffffff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 0 3px rgba(157, 172, 130, 0.15);
}

.custom-font-dropdown .dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1.5px solid var(--customizer-primary);
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    max-height: 200px; /* Shows about 4-5 options before scrolling */
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.custom-font-dropdown.open .dropdown-options {
    display: block;
}

/* Custom Scrollbar */
.custom-font-dropdown .dropdown-options::-webkit-scrollbar {
    width: 8px;
}
.custom-font-dropdown .dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-bottom-right-radius: 10px;
}
.custom-font-dropdown .dropdown-options::-webkit-scrollbar-thumb {
    background: #9dac82;
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}
.custom-font-dropdown .dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #7a8b61;
}

.custom-font-dropdown .dropdown-optgroup {
    padding: 10px 12px 6px;
    font-size: 11px;
    font-weight: 800;
    color: #a0aab2;
    background-color: #fcfcfc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid #f0f0f0;
}

.custom-font-dropdown .dropdown-option {
    padding: 10px 16px;
    font-size: 16px;
    color: #3a3a3a;
    cursor: pointer;
    transition: background-color 0.2s, padding-left 0.2s;
    user-select: none;
    border-bottom: 1px solid #f9f9f9;
}

.custom-font-dropdown .dropdown-option:last-child {
    border-bottom: none;
}

.custom-font-dropdown .dropdown-option:hover {
    background-color: #f4f6f0;
    color: var(--customizer-primary);
    padding-left: 20px;
}

/* Fallback for browsers that don't support optgroup styling */

.form-input-control {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 0 15px;
    height: 48px;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input-control:focus {
    border-color: var(--customizer-primary);
}

.form-textarea-control {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    min-height: 100px;
    resize: vertical;
    transition: border-color 0.2s;
}

.dropdown-field {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    outline: none;
    background-color: #ffffff;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-field:focus {
    border-color: var(--customizer-primary);
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 8px;
    background-color: #ffffff;
}

.color-picker-input {
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.color-picker-label {
    font-size: 12px;
    font-weight: 700;
    color: #666666;
}

/* Text Color Trigger Button (matches fabric color pill style) */
.text-color-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 12px;
    border: 1.5px solid rgba(0,0,0,0.10);
    border-radius: 10px;
    background-color: #faf9f8;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #3a3a3a;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.text-color-trigger-btn:hover {
    border-color: var(--customizer-primary);
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(157, 172, 130, 0.15);
    transform: translateY(-1px);
}

.text-color-trigger-btn.active {
    border-color: var(--customizer-primary);
    background-color: rgba(157, 172, 130, 0.06);
    box-shadow: 0 0 0 3px rgba(157, 172, 130, 0.15);
}

.text-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.text-color-trigger-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

/* Text Color Studio Panel (same design as fabric color panel) */
.text-color-studio-panel {
    display: none;
    margin-bottom: 14px;
    padding: 18px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    animation: slideDownStudio 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

.text-color-studio-panel button,
.text-color-studio-panel button:focus,
.text-color-studio-panel button:active,
#text-studio-hex-input,
#text-studio-hex-input:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

#text-studio-hex-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: #333333;
    font-family: inherit;
    text-transform: uppercase;
    padding: 0;
}

/* Safety: hide any legacy native color picker inputs or old containers */
.color-picker-input,
.color-picker-container > svg,
input[type="color"].color-picker-input {
    display: none !important;
}

/* Step 5: B2B Cost Estimator Panel */
.estimator-card {
    background-color: #faf9f8;
    border: 1px solid var(--customizer-border);
    border-radius: 12px;
    padding: 18px;
    margin-top: 15px;
}

.estimator-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666666;
}

.estimator-row.highlight {
    font-weight: 800;
    color: var(--customizer-dark);
    font-size: 18px;
    border-top: 1.5px solid rgba(157, 172, 130, 0.2);
    padding-top: 12px;
    margin-top: 5px;
    margin-bottom: 0;
}

.estimator-row.highlight .estimator-val {
    color: var(--customizer-primary);
}

.lead-time-badge {
    background-color: rgba(157, 172, 130, 0.12);
    color: #718355;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Button & Action Row */
.action-btn-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

@media (max-width: 480px) {
    .action-btn-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.btn-customizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    outline: none;
    border: none;
}

.btn-customizer.primary {
    background-color: var(--customizer-primary);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(157, 172, 130, 0.3);
}

.btn-customizer.primary:hover {
    background-color: var(--customizer-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(157, 172, 130, 0.45);
}

.btn-customizer.secondary {
    background-color: #ffffff;
    color: var(--customizer-primary);
    border: 2px solid var(--customizer-primary);
}

.btn-customizer.secondary:hover {
    background-color: rgba(157, 172, 130, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(157, 172, 130, 0.15);
}

/* --- Slide Over / Modal Inquiry Form --- */
.customizer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 200000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 40px 20px;
    overflow-y: auto;
}

.customizer-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content-card {
    background-color: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    margin: auto;
    padding: 35px 40px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.customizer-modal.show .modal-content-card {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    color: #888888;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--customizer-dark);
}

.modal-header h3 {
    font-size: 28px;
    font-weight: 900;
    color: var(--customizer-primary);
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-header p {
    font-size: 14px;
    color: #666666;
    margin-bottom: 25px;
    text-align: center;
}

/* Custom Radio Group Styling */
.custom-radio-group {
    display: flex;
    gap: 8px;
    width: 100%;
}
.custom-radio-group input[type="radio"] {
    display: none;
}
.custom-radio-group label {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background-color: #fff;
    color: #666;
    transition: all 0.2s;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-radio-group input[type="radio"]:checked + label {
    background-color: var(--customizer-primary);
    color: #fff;
    border-color: var(--customizer-primary);
}

/* Modal Form Grid */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

@media (max-width: 575px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.form-group-field {
    margin-bottom: 15px;
}

.form-group-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #555555;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-input-control {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input-control:focus {
    border-color: var(--customizer-primary);
}

.form-textarea-control {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    min-height: 60px;
    resize: vertical;
    transition: border-color 0.2s;
}

.form-textarea-control:focus {
    border-color: var(--customizer-primary);
}

.summary-badge-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background-color: #fcfbfa;
    border: 1px solid var(--customizer-border);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-badge-item {
    background-color: #ffffff;
    border: 1px solid rgba(157, 172, 130, 0.25);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #666666;
}

.summary-badge-item strong {
    color: var(--customizer-primary);
}

.modal-submit-btn {
    width: 100%;
    background-color: var(--customizer-primary);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 18px rgba(157, 172, 130, 0.25);
}

.modal-submit-btn:hover {
    background-color: var(--customizer-primary-hover);
    box-shadow: 0 10px 24px rgba(157, 172, 130, 0.4);
    transform: translateY(-2px);
}

/* Success animation states */
.success-card {
    text-align: center;
    padding: 30px 10px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(157, 172, 130, 0.15);
    color: var(--customizer-primary);
    font-size: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp {
    0% { transform: scale(0.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--customizer-dark);
    margin-bottom: 10px;
}

.success-card p {
    font-size: 14px;
    color: #666666;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* --- Floating Action Button (FAB) --- */
.customizer-fab {
    position: fixed;
    left: 25px;
    bottom: 30px;
    width: max-content;
    max-width: 62px;
    height: 62px;
    border-radius: 31px;
    background-color: #daae75;
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
}

.customizer-fab svg {
    min-width: 22px;
}

.customizer-fab:hover {
    max-width: 400px;
    padding-right: 25px;
    background-color: #daae75;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
}

.customizer-fab:focus,
.customizer-fab:focus-visible,
.customizer-fab:active {
    outline: none !important;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
}

.customizer-fab::after {
    content: attr(title);
    position: static;
    margin-left: 15px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s 0.1s;
    font-family: 'HK Grotesk', sans-serif;
    border: none;
}

.customizer-fab:hover::after {
    opacity: 1;
}

.customizer-fab:hover .fab-pulse-ring {
    display: none;
}

.fab-pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #9dac82;
    animation: fab-pulse 2s infinite;
    pointer-events: none;
}

@keyframes fab-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* --- Slide-Over Drawer --- */
.customizer-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.customizer-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.customizer-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 1150px;
    max-width: 95vw;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -8px 0 35px rgba(0, 0, 0, 0.15);
    z-index: 100001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.customizer-drawer.open {
    transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(157, 172, 130, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
}

.drawer-title-block {
    display: flex;
    flex-direction: column;
}

.drawer-subtitle {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--customizer-primary);
    margin-bottom: 2px;
}

.drawer-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--customizer-dark);
    margin: 0;
    font-family: 'HK Grotesk', sans-serif;
}

.drawer-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 400;
    color: #888888;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s, transform 0.2s;
}

.drawer-close-btn:hover {
    color: var(--customizer-primary);
    transform: scale(1.1);
}

/* Drawer Body Split-Screen */
.drawer-body {
    flex: 1;
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 25px;
    padding: 25px;
    background-color: #fcfcfb;
    overflow: hidden;
}

/* Left Column: Canvas Studio sticky wrapper */
.customizer-drawer .customizer-studio {
    background: radial-gradient(circle at center, #ffffff 0%, #f6f7f5 100%);
    border: 1px solid rgba(157, 172, 130, 0.12);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-height: calc(100vh - 120px);
    overflow: visible;
}

.customizer-drawer .canvas-wrapper {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1;
    position: relative;
}

.customizer-drawer #tshirt-canvas,
.customizer-drawer #towel-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.customizer-drawer .studio-tip {
    font-size: 11px;
    margin-top: 15px;
    color: #666666;
}

/* Right Column: Scrollable Settings Dashboard */
.customizer-drawer .customizer-dashboard {
    height: 100%;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Custom Scrollbar for Dashboard Options */
.customizer-drawer .customizer-dashboard::-webkit-scrollbar {
    width: 6px;
}

.customizer-drawer .customizer-dashboard::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.customizer-drawer .customizer-dashboard::-webkit-scrollbar-thumb {
    background: #d4dbcd;
    border-radius: 3px;
}

.customizer-drawer .customizer-dashboard::-webkit-scrollbar-thumb:hover {
    background: var(--customizer-primary);
}

.customizer-drawer .dashboard-title {
    display: none;
}

/* Expand steps to fill background */
.customizer-drawer .custom-step-card {
    background: #ffffff;
    border: 1px solid rgba(157, 172, 130, 0.12);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.customizer-drawer .custom-step-card:last-child {
    margin-bottom: 0;
}

/* Responsive collapse on tablet/mobile */
@media screen and (max-width: 991px) {
    .customizer-drawer {
        width: 100%;
        max-width: 100vw;
    }
    
    .drawer-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
        gap: 20px;
        padding: 15px;
    }
    
    .customizer-drawer .customizer-studio {
        max-height: none;
        height: auto;
        padding: 15px;
    }
    
    .customizer-drawer .customizer-dashboard {
        max-height: none;
        height: auto;
        overflow-y: visible;
        padding-right: 0;
    }
}

/* Global Outline Reset: Remove harsh default black outlines on click/focus */
button,
input,
select,
textarea,
.color-swatch,
.studio-palette-swatch,
.btn-snap-placement,
.style-option,
.size-btn,
.qty-btn {
    outline: none !important;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
.color-swatch:focus,
.studio-palette-swatch:focus,
.btn-snap-placement:focus,
.style-option:focus,
.size-btn:focus,
.qty-btn:focus {
    outline: none !important;
    box-shadow: inherit; /* Maintain custom designed shadows */
}

/* Rich Text Editor specifics */
div#text-content[contenteditable="true"] {
    min-height: 60px;
    white-space: pre-wrap;
}
div#text-content[contenteditable="true"]:empty:before {
    content: attr(placeholder);
    color: #999;
    pointer-events: none;
    display: block; 
}
.rich-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    background: #faf9f8;
    color: #3a3a3a;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    outline: none;
}
.rich-btn:hover {
    border-color: var(--customizer-primary);
    background: #ffffff;
}

/* Sleeve Toggle Styles */
.sleeve-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f7f7f7;
    padding: 16px;
    border-radius: 12px;
    gap: 16px;
    border: 1px solid rgba(0,0,0,0.05);
}

.sleeve-label {
    font-size: 1rem;
    font-weight: 600;
    color: #a0a0a0;
    transition: all 0.3s ease;
    font-family: 'HK Grotesk', sans-serif;
}

.sleeve-label.active {
    color: #5a5a5a;
    font-weight: 800;
}

.sleeve-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.sleeve-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sleeve-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: .4s;
    border-radius: 34px;
}

.sleeve-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .sleeve-slider {
    background-color: #9dac82;
}

input:checked + .sleeve-slider:before {
    transform: translateX(28px);
}

.text-layer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.text-layer-item.active {
    border-color: #9dac82;
    background: rgba(157, 172, 130, 0.1);
}
.text-layer-item .text-preview {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}
.text-layer-item .btn-remove-layer {
    background: none;
    border: none;
    color: #ff4e50;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

/* Custom Select Dropdown Styling */
select.custom-select-dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' 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");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px !important;
    cursor: pointer;
    background-color: #fcfcfc !important;
}
select.custom-select-dropdown:hover {
    background-color: #ffffff !important;
    border-color: rgba(0,0,0,0.3) !important;
}
select.custom-select-dropdown:focus {
    border-color: var(--customizer-primary) !important;
    box-shadow: 0 0 0 3px rgba(157, 172, 130, 0.2);
}
select.custom-select-dropdown option {
    padding: 10px;
    font-weight: 500;
}

label.error {
    color: #dc3545 !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    display: block;
    font-weight: normal !important;
    text-transform: none !important;
}
