/* ============================================
   SHADOW STYLE SHOP — Custom T-Shirt Builder
   ============================================ */

.custom-builder {
    min-height: 100vh;
    padding-top: calc(var(--header-height) + var(--space-3xl));
    padding-bottom: var(--space-4xl);
}

.custom-builder__title {
    font-family: var(--font-heading);
    font-size: var(--fs-4xl);
    font-weight: var(--fw-black);
    text-align: center;
    margin-bottom: var(--space-sm);
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.custom-builder__subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-3xl);
}

.custom-builder__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

/* Preview Area */
.custom-preview {
    position: sticky;
    top: calc(var(--header-height) + var(--space-xl));
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
}

.custom-preview__label {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-widest);
    text-transform: uppercase;
    color: var(--red-primary);
    margin-bottom: var(--space-md);
}

.custom-preview__canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    aspect-ratio: 3/4;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-light);
}

.custom-preview__shirt {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-preview__shirt svg {
    width: 100%;
    height: 100%;
}

.custom-preview__design {
    position: absolute;
    cursor: move;
    border: 2px dashed transparent;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.custom-preview__design:hover,
.custom-preview__design.active {
    border-color: var(--red-primary);
}

.custom-preview__design img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.custom-preview__design-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    background: var(--red-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.custom-preview__design:hover .custom-preview__design-remove { opacity: 1; }

.custom-preview__placeholder {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-dim);
    pointer-events: none;
    z-index: 1;
}

.custom-preview__placeholder i {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    opacity: 0.25;
    display: block;
}

.custom-preview__placeholder span {
    font-size: var(--fs-sm);
    display: block;
}

.custom-preview__info {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.custom-preview__info-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.custom-preview__info-item i {
    color: var(--red-primary);
}

/* Controls Area */
.custom-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.custom-step {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: border-color var(--transition-base);
}

.custom-step:hover {
    border-color: rgba(194, 29, 39, 0.2);
}

.custom-step__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.custom-step__number {
    width: 36px;
    height: 36px;
    background: var(--gradient-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    color: #fff;
    flex-shrink: 0;
}

.custom-step__title {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
}

/* Shirt Color Picker */
.custom-colors {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.custom-color {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.custom-color:hover { transform: scale(1.1); }

.custom-color.active {
    border-color: var(--red-primary);
    box-shadow: var(--glow-pink);
}

.custom-color.active::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.custom-color--white { background: #ffffff; border-color: rgba(255,255,255,0.2); }
.custom-color--white.active { border-color: var(--red-primary); }
.custom-color--black { background: #1a1a1a; }
.custom-color--red { background: #c21d27; }
.custom-color--navy { background: #1a2744; }
.custom-color--gray { background: #6b6b6b; }
.custom-color--maroon { background: #581014; }

/* Image Upload */
.custom-upload {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.custom-upload__dropzone {
    position: relative;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: rgba(255,255,255,0.02);
}

.custom-upload__dropzone:hover,
.custom-upload__dropzone.dragover {
    border-color: var(--red-primary);
    background: rgba(194, 29, 39, 0.05);
}

.custom-upload__dropzone i {
    font-size: 2.5rem;
    color: var(--red-primary);
    margin-bottom: var(--space-sm);
    display: block;
    opacity: 0.6;
}

.custom-upload__dropzone-text {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.custom-upload__dropzone-text strong {
    color: var(--red-primary);
}

.custom-upload__dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.custom-upload__hint {
    font-size: var(--fs-xs);
    color: var(--text-dim);
    text-align: center;
}

.custom-upload__preview {
    display: none;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
}

.custom-upload__preview.active { display: flex; }

.custom-upload__preview img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-xs);
}

.custom-upload__preview-name {
    flex: 1;
    font-size: var(--fs-sm);
    color: var(--text-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-upload__preview-remove {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: var(--fs-lg);
    transition: color 0.2s;
    padding: var(--space-xs);
}

.custom-upload__preview-remove:hover {
    color: var(--red-primary);
}

/* Position & Size */
.custom-position {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.custom-position__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.custom-position__btn {
    padding: var(--space-sm) var(--space-xs);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.custom-position__btn:hover {
    border-color: var(--red-primary);
    color: var(--text-primary);
}

.custom-position__btn.active {
    background: rgba(194, 29, 39, 0.15);
    border-color: var(--red-primary);
    color: var(--red-primary);
    box-shadow: 0 0 10px rgba(194, 29, 39, 0.2);
}

.custom-size {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.custom-size__label {
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.custom-size__slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    outline: none;
}

.custom-size__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--red-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--glow-pink);
}

.custom-size__slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--red-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--glow-pink);
}

/* Contact / Quote Section */
.custom-quote {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.custom-quote__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.custom-quote__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.custom-quote__field.full-width {
    grid-column: 1 / -1;
}

.custom-quote__label {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
}

.custom-quote__input,
.custom-quote__textarea,
.custom-quote__select {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-size: var(--fs-sm);
    font-family: var(--font-body);
    transition: all var(--transition-base);
}

.custom-quote__input:focus,
.custom-quote__textarea:focus,
.custom-quote__select:focus {
    border-color: var(--red-primary);
    box-shadow: 0 0 15px rgba(194, 29, 39, 0.15);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

.custom-quote__input::placeholder,
.custom-quote__textarea::placeholder { color: var(--text-dim); }

.custom-quote__textarea {
    resize: vertical;
    min-height: 80px;
}

.custom-quote__select {
    cursor: pointer;
}
.custom-quote__select option {
    background: var(--bg-card);
    color: var(--text-body);
}

.custom-quote__submit {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-widest);
    text-transform: uppercase;
    color: #fff;
    background: var(--gradient-red);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(194, 29, 39, 0.4);
    position: relative;
    overflow: hidden;
}

.custom-quote__submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.custom-quote__submit:hover::before { left: 100%; }
.custom-quote__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(194, 29, 39, 0.5);
}

.custom-quote__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.custom-quote__submit i { margin-right: var(--space-xs); }

/* Success message */
.custom-success {
    display: none;
    text-align: center;
    padding: var(--space-3xl);
}

.custom-success.active { display: block; }

.custom-success i {
    font-size: 4rem;
    color: #22c55e;
    margin-bottom: var(--space-lg);
}

.custom-success__title {
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.custom-success__text {
    color: var(--text-muted);
    font-size: var(--fs-md);
}

/* Responsive */
@media (max-width: 992px) {
    .custom-builder__layout {
        grid-template-columns: 1fr;
    }
    .custom-preview {
        position: relative;
        top: 0;
    }
}

@media (max-width: 576px) {
    .custom-builder__title { font-size: var(--fs-3xl); }
    .custom-quote__row { grid-template-columns: 1fr; }
    .custom-position__grid { grid-template-columns: repeat(2, 1fr); }
    .custom-preview__canvas-wrap { aspect-ratio: 3/4; }
}
