/**
 * Customization page styles - Modern Design
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;800&family=Montserrat+Alternates:wght@500&display=swap');

:root {
    --e-global-color-primary: #EB5757;
    --e-global-color-secondary: #151515;
    --e-global-color-text: #000000;
    --e-global-color-accent: #FFFFFF;
    --e-global-color-b103f2b: #F8F8F8;
    --e-global-color-9d3d785: #F2F2F2;
    --e-global-color-cf7726c: #E4E4E4;
    --e-global-color-a49eb05: #CACACA;
    --e-global-color-85cadf8: #535557;
    --e-global-color-a91f731: #252525;
    --e-global-color-2b7eb80: #151515;
    --e-global-color-4379ead: #CEA177;
    --e-global-color-d53b3e9: #FFFFFF;
    --e-global-color-19b1fd0: #000000;
    --e-global-typography-primary-font-family: "Montserrat";
    --e-global-typography-primary-font-weight: 600;
    --e-global-typography-secondary-font-family: "Montserrat";
    --e-global-typography-secondary-font-weight: 400;
    --e-global-typography-text-font-family: "Montserrat";
    --e-global-typography-text-font-weight: 400;
    --e-global-typography-accent-font-family: "Montserrat Alternates";
    --e-global-typography-accent-font-weight: 500;
    --e-global-typography-5e6a3b3-font-size: 14px;
    --body-color: var(--e-global-color-85cadf8);
}

/* Full page styles - no header/footer */
html.tshack-customization-page,
body.tshack-customization-page {
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
    font-family: var(--e-global-typography-primary-font-family), sans-serif;
}

body.tshack-customization-page * {
    box-sizing: border-box;
}

/* Hide any theme header/footer elements */
body.tshack-customization-page header,
body.tshack-customization-page footer,
body.tshack-customization-page .site-header,
body.tshack-customization-page .site-footer,
body.tshack-customization-page .main-navigation,
body.tshack-customization-page .widget-area {
    display: none !important;
}

.tshack-customization-container {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

/* Main Layout */
.tshack-main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 70px);
}

/* Left Sidebar */
.tshack-left-sidebar {
    width: 320px;
    background: var(--e-global-color-b103f2b);
    border-right: 1px solid var(--e-global-color-cf7726c);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Horizontal Navigation Tabs */
.tshack-nav-tabs {
    display: flex;
    flex-direction: row;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--e-global-color-cf7726c);
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.tshack-nav-tab {
    flex: 1;
    min-width: 0;
    height: 56px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    color: var(--e-global-color-85cadf8);
    font-size: 20px;
    position: relative;
}

.tshack-nav-tab:hover {
    background: var(--e-global-color-b103f2b);
    color: var(--e-global-color-a91f731);
}

.tshack-nav-tab.active {
    background: var(--e-global-color-b103f2b);
    border-bottom-color: var(--e-global-color-primary);
    color: var(--e-global-color-primary);
}

.tshack-nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #ffffff;
}

.tshack-nav-icon {
    font-size: 22px;
}

/* Tool Panel */
.tshack-tool-panel {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: var(--e-global-color-cf7726c) var(--e-global-color-b103f2b);
}

.tshack-tool-panel::-webkit-scrollbar {
    width: 6px;
}

.tshack-tool-panel::-webkit-scrollbar-track {
    background: var(--e-global-color-b103f2b);
    border-radius: 3px;
}

.tshack-tool-panel::-webkit-scrollbar-thumb {
    background: var(--e-global-color-cf7726c);
    border-radius: 3px;
}

.tshack-tool-panel::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.tshack-panel-header {
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--e-global-color-9d3d785);
    position: relative;
}

.tshack-panel-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--e-global-color-primary) 0%, var(--e-global-color-secondary) 100%);
    border-radius: 2px;
}

.tshack-panel-header h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--e-global-color-a91f731);
}

/* Text Input */
.tshack-text-input-wrapper {
    margin-bottom: 20px;
}

.tshack-text-input-field {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tshack-text-input-field::placeholder {
    color: #999;
    font-weight: 400;
}

.tshack-text-input-field:focus {
    outline: none;
    border-color: var(--e-global-color-primary);
    box-shadow: 0 0 0 4px rgba(235, 87, 87, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.tshack-text-input-field:hover:not(:focus) {
    border-color: #b0b0b0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Text Action Buttons */
.tshack-text-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--e-global-color-9d3d785);
}

    .tshack-action-btn {
        flex: 1;
        min-width: 44px;
        height: 44px;
        padding: 0;
        border: 2px solid var(--e-global-color-cf7726c);
        background: #ffffff;
        border-radius: 8px;
        cursor: pointer;
        font-size: 20px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

.tshack-action-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform 0.2s;
}

.tshack-action-btn:hover {
    background: linear-gradient(135deg, var(--e-global-color-b103f2b) 0%, #ffffff 100%);
    border-color: var(--e-global-color-primary);
    box-shadow: 0 4px 12px rgba(235, 87, 87, 0.15);
    transform: translateY(-2px);
}

.tshack-action-btn:hover span {
    transform: scale(1.1);
}

.tshack-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(235, 87, 87, 0.2);
}

.tshack-action-btn.active {
    background: linear-gradient(135deg, var(--e-global-color-primary) 0%, var(--e-global-color-secondary) 100%);
    border-color: var(--e-global-color-primary);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(235, 87, 87, 0.3);
}

.tshack-action-btn.active:hover {
    background: linear-gradient(135deg, var(--e-global-color-secondary) 0%, #004d6f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 87, 87, 0.35);
}

.tshack-delete-btn {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    border-color: #ff4444;
    color: #ffffff;
}

.tshack-delete-btn:hover {
    background: linear-gradient(135deg, #ff0000 0%, #990000 100%);
    border-color: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}

.tshack-delete-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.5);
}

/* Control Groups */
.tshack-control-group {
    margin-bottom: 24px;
}

.tshack-control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tshack-control-group label span {
    color: var(--e-global-color-primary);
    font-weight: 600;
    font-size: 13px;
    background: rgba(235, 87, 87, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 40px;
    text-align: center;
}

/* Select Wrapper */
.tshack-select-wrapper {
    position: relative;
}

.tshack-select-field {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.tshack-select-field:hover {
    border-color: #b0b0b0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tshack-select-field:focus {
    outline: none;
    border-color: var(--e-global-color-primary);
    box-shadow: 0 0 0 4px rgba(235, 87, 87, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tshack-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--e-global-color-85cadf8);
    font-size: 20px;
    font-weight: 300;
    transition: transform 0.2s, color 0.2s;
}

.tshack-select-wrapper:hover .tshack-select-arrow,
.tshack-select-field:focus+.tshack-select-arrow {
    color: var(--e-global-color-primary);
    transform: translateY(-50%) scale(1.2);
}

/* Color Picker */
.tshack-color-picker-wrapper {
    position: relative;
}

.tshack-color-picker-button {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.tshack-color-picker-button:hover {
    border-color: #b0b0b0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tshack-color-picker-button:focus {
    outline: none;
    border-color: var(--e-global-color-primary);
    box-shadow: 0 0 0 4px rgba(235, 87, 87, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tshack-color-picker-preview {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid var(--e-global-color-cf7726c);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tshack-color-picker-name {
    flex: 1;
    color: var(--e-global-color-a91f731);
    font-weight: 500;
}

.tshack-color-picker-button .tshack-select-arrow {
    position: static;
    transform: none;
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
}

.tshack-color-picker-button:hover .tshack-select-arrow,
.tshack-color-picker-button:focus .tshack-select-arrow {
    color: var(--e-global-color-primary);
    transform: scale(1.2);
}

.tshack-color-picker-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
    gap: 16px;
}

.tshack-color-picker-dropdown.active {
    display: flex;
}

.tshack-color-palette {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.tshack-color-swatch-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tshack-color-swatch-item:hover {
    transform: scale(1.1);
    border-color: var(--e-global-color-primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.tshack-color-swatch-item.selected {
    border-color: var(--e-global-color-primary);
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(235, 87, 87, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tshack-color-swatch-item.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tshack-color-custom-section {
    border-top: 1px solid var(--e-global-color-cf7726c);
    padding-top: 16px;
}

.tshack-custom-color-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--e-global-color-85cadf8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.tshack-custom-color-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tshack-custom-color-input {
    width: 60px;
    height: 48px;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.tshack-custom-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 4px;
}

.tshack-custom-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.tshack-custom-color-hex {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 6px;
    font-size: 14px;
    font-family: monospace;
    background: #ffffff;
    transition: all 0.2s;
}

.tshack-custom-color-hex:focus {
    outline: none;
    border-color: var(--e-global-color-primary);
    box-shadow: 0 0 0 3px rgba(235, 87, 87, 0.1);
}

/* Font Picker */
.tshack-font-picker-wrapper {
    position: relative;
}

.tshack-font-picker-button {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.tshack-font-picker-button:hover {
    border-color: #b0b0b0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tshack-font-picker-button:focus {
    outline: none;
    border-color: var(--e-global-color-primary);
    box-shadow: 0 0 0 4px rgba(235, 87, 87, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tshack-font-picker-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--e-global-color-b103f2b);
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--e-global-color-a91f731);
    flex-shrink: 0;
    font-family: Arial, sans-serif;
}

.tshack-font-picker-name {
    flex: 1;
    color: var(--e-global-color-a91f731);
    font-weight: 500;
}

.tshack-font-picker-button .tshack-select-arrow {
    position: static;
    transform: none;
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
}

.tshack-font-picker-button:hover .tshack-select-arrow,
.tshack-font-picker-button:focus .tshack-select-arrow {
    color: var(--e-global-color-primary);
    transform: scale(1.2);
}

.tshack-font-picker-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    max-height: 400px;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.tshack-font-picker-dropdown.active {
    display: flex;
}

.tshack-font-category-buttons {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--e-global-color-cf7726c);
    background: var(--e-global-color-b103f2b);
}

.tshack-font-category-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 6px;
    background: #ffffff;
    color: var(--e-global-color-85cadf8);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tshack-font-category-btn:hover {
    border-color: var(--e-global-color-primary);
    color: var(--e-global-color-primary);
    background: rgba(235, 87, 87, 0.05);
}

.tshack-font-category-btn.active {
    background: var(--e-global-color-primary);
    border-color: var(--e-global-color-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(235, 87, 87, 0.2);
}

.tshack-font-picker-search {
    padding: 12px;
    border-bottom: 1px solid var(--e-global-color-cf7726c);
    background: var(--e-global-color-b103f2b);
}

.tshack-font-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--e-global-color-cf7726c);
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.2s;
}

.tshack-font-search-input:focus {
    outline: none;
    border-color: var(--e-global-color-primary);
    box-shadow: 0 0 0 3px rgba(235, 87, 87, 0.1);
}

.tshack-font-picker-list {
    overflow-y: auto;
    max-height: 320px;
    padding: 8px;
}

.tshack-font-picker-list::-webkit-scrollbar {
    width: 6px;
}

.tshack-font-picker-list::-webkit-scrollbar-track {
    background: var(--e-global-color-b103f2b);
    border-radius: 3px;
}

.tshack-font-picker-list::-webkit-scrollbar-thumb {
    background: var(--e-global-color-cf7726c);
    border-radius: 3px;
}

.tshack-font-picker-list::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.tshack-font-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.tshack-font-option:hover {
    background: var(--e-global-color-b103f2b);
    transform: translateX(2px);
}

.tshack-font-option.selected {
    background: rgba(235, 87, 87, 0.1);
    border-left: 3px solid var(--e-global-color-primary);
}

.tshack-font-option-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1px solid var(--e-global-color-cf7726c);
    border-radius: 6px;
    font-size: 20px;
    font-weight: 600;
    color: var(--e-global-color-a91f731);
    flex-shrink: 0;
}

.tshack-font-option-name {
    flex: 1;
    color: var(--e-global-color-a91f731);
    font-weight: 500;
    font-size: 14px;
}

/* Range Slider */
.tshack-range-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--e-global-color-cf7726c) 0%, var(--e-global-color-cf7726c) 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.tshack-range-slider:hover {
    height: 10px;
}

.tshack-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--e-global-color-primary) 0%, var(--e-global-color-secondary) 100%);
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(235, 87, 87, 0.3), 0 0 0 2px rgba(235, 87, 87, 0.1);
    transition: all 0.2s;
    position: relative;
}

.tshack-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(235, 87, 87, 0.4), 0 0 0 4px rgba(235, 87, 87, 0.15);
}

.tshack-range-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(235, 87, 87, 0.5), 0 0 0 3px rgba(235, 87, 87, 0.2);
}

.tshack-range-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--e-global-color-primary) 0%, var(--e-global-color-secondary) 100%);
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(235, 87, 87, 0.3), 0 0 0 2px rgba(235, 87, 87, 0.1);
    transition: all 0.2s;
}

.tshack-range-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(235, 87, 87, 0.4), 0 0 0 4px rgba(235, 87, 87, 0.15);
}

.tshack-range-slider::-moz-range-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(235, 87, 87, 0.5), 0 0 0 3px rgba(235, 87, 87, 0.2);
}

.tshack-range-slider::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: var(--e-global-color-cf7726c);
}

.tshack-range-slider:focus {
    outline: none;
}

.tshack-range-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 2px 8px rgba(235, 87, 87, 0.3), 0 0 0 4px rgba(235, 87, 87, 0.2);
}

.tshack-range-slider:focus::-moz-range-thumb {
    box-shadow: 0 2px 8px rgba(235, 87, 87, 0.3), 0 0 0 4px rgba(235, 87, 87, 0.2);
}

/* Upload Area */
.tshack-upload-area {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed #ddd;
    border-radius: 4px;
}

.tshack-upload-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--e-global-color-85cadf8);
}

/* Icons Section */
.tshack-icons-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tshack-icons-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--e-global-color-85cadf8);
    margin-bottom: 15px;
    text-align: center;
}

.tshack-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.tshack-icon-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    padding: 8px;
    box-sizing: border-box;
}

.tshack-icon-item:hover {
    border-color: #EB5757;
    background: #f9f9f9;
    transform: scale(1.05);
}

.tshack-icon-item:active {
    transform: scale(0.95);
}

.tshack-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.tshack-icon-svg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tshack-icon-svg svg {
    width: 100%;
    height: 100%;
    max-width: 40px;
    max-height: 40px;
}

/* Canvas Area */
.tshack-canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--e-global-color-b103f2b);
    overflow: auto;
    padding: 40px;
    position: relative;
}

.tshack-canvas-header {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
    margin: 0;
}

.tshack-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #ffffff;
    color: var(--e-global-color-a91f731);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tshack-back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    color: var(--e-global-color-primary);
    text-decoration: none;
}

.tshack-canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 24px;
    padding: 60px;
    min-height: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
}

#tshack-design-canvas {
    background: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    cursor: crosshair;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Modern Selection Box Styling */
.canvas-container {
    position: relative;
}

.canvas-container .upper-canvas {
    border-radius: 8px;
}

/* Custom Fabric.js selection box styles */
.canvas-container .upper-canvas {
    cursor: default;
}

/* Override Fabric.js selection handles with modern design */
.canvas-container canvas {
    border-radius: 8px;
}

/* Improve touch behavior on mobile for Fabric.js */
.canvas-container,
.canvas-container .upper-canvas,
#tshack-design-canvas {
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

    /* Mobile-specific touch improvements */
    @media (max-width: 768px) {
        .canvas-container,
        .canvas-container .upper-canvas,
        .canvas-container .lower-canvas,
        #tshack-design-canvas {
            touch-action: none !important;
            -webkit-touch-callout: none !important;
            -webkit-user-select: none !important;
            user-select: none !important;
        }

        /* Ensure canvas is interactive and visible */
        .tshack-canvas-wrapper {
            min-height: 350px;
            max-height: none;
        }

        /* Make sure canvas takes priority in layout */
        .tshack-canvas-area {
            min-height: 400px;
            flex: 1 1 auto;
            overflow-y: auto;
            overflow-x: hidden;
        }

        /* Ensure canvas container is properly sized */
        .canvas-container {
            min-width: 280px;
            min-height: 280px;
        }

        /* Prevent other elements from interfering with canvas */
        .tshack-right-sidebar,
        .tshack-action-bar,
        .tshack-left-sidebar {
            flex-shrink: 0;
        }
    }

.tshack-product-info {
    position: absolute;
    bottom: 30px;
    left: 30px;
    margin: 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--e-global-color-a91f731);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Right Sidebar */
.tshack-right-sidebar {
    width: 200px;
    background: var(--e-global-color-b103f2b);
    border-left: 1px solid var(--e-global-color-cf7726c);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.tshack-views-header h4 {
    margin: 0 0 15px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--e-global-color-a91f731);
}

.tshack-product-views {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.tshack-view-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--e-global-color-cf7726c);
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.tshack-view-btn.active {
    border-color: var(--e-global-color-primary);
    background: #f0f7ff;
}

.tshack-view-preview {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border: 1px solid var(--e-global-color-cf7726c);
    border-radius: 4px;
    margin-bottom: 8px;
}

.tshack-view-btn span {
    font-size: 12px;
    font-weight: 600;
    color: var(--e-global-color-a91f731);
    text-transform: uppercase;
}

.tshack-view-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.tshack-view-action-btn {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    color: var(--e-global-color-a91f731);
}

.tshack-view-action-btn:hover {
    background: var(--e-global-color-9d3d785);
    border-color: var(--e-global-color-primary);
    color: var(--e-global-color-primary);
}

.tshack-view-action-btn svg {
    fill: currentColor;
}

/* Action Bar */
.tshack-action-bar {
    height: 90px;
    background: #ffffff;
    border-top: 1px solid var(--e-global-color-cf7726c);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 100;
    gap: 30px;
}

.tshack-action-bar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tshack-action-bar-label h4 {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--e-global-color-85cadf8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Color Variations in Action Bar */
.tshack-color-variations-list {
    display: flex;
    gap: 10px;
}

.tshack-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--e-global-color-cf7726c);
    transition: all 0.2s ease;
}

.tshack-color-swatch:hover {
    transform: scale(1.1);
}

.tshack-color-swatch.active {
    box-shadow: 0 0 0 2px var(--e-global-color-primary);
    transform: scale(1.1);
}

/* Printing Method in Action Bar */
.tshack-printing-method-list {
    display: flex;
    gap: 10px;
    background: var(--e-global-color-b103f2b);
    padding: 4px;
    border-radius: 100px;
}

.tshack-printing-method-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--e-global-color-85cadf8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tshack-printing-method-btn:hover {
    color: var(--e-global-color-secondary);
}

.tshack-printing-method-btn.active {
    background: #ffffff;
    color: var(--e-global-color-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tshack-price-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    margin-right: 20px;
}

.tshack-price-label {
    color: var(--e-global-color-85cadf8);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.tshack-price-value {
    color: var(--e-global-color-primary);
    font-size: 24px;
    font-weight: 700;
}

.tshack-action-bar-btn {
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 150px;
}

.tshack-btn-outline {
    background: transparent;
    border: 2px solid var(--e-global-color-primary);
    color: var(--e-global-color-primary);
}

.tshack-btn-outline:hover {
    background: var(--e-global-color-primary);
    color: #ffffff;
}

.tshack-btn-primary {
    background: var(--e-global-color-primary);
    border: 2px solid var(--e-global-color-primary);
    color: #ffffff;
}

.tshack-btn-primary:hover {
    background: var(--e-global-color-secondary);
    border-color: var(--e-global-color-secondary);
}

/* Bulk Order Step */
#tshack-bulk-order-step {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 10000;
    overflow-y: auto;
}

.tshack-bulk-order-container {
    display: flex;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    gap: 40px;
}

.tshack-bulk-order-preview {
    flex: 1;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.tshack-bulk-order-preview h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--e-global-color-a91f731);
}

.tshack-design-preview-canvas {
    background: #ffffff;
    border: 1px solid var(--e-global-color-cf7726c);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#tshack-preview-canvas {
    max-width: 100%;
    height: auto;
}

.tshack-bulk-order-form {
    flex: 1;
    background: #ffffff;
    padding: 30px;
    border: 1px solid var(--e-global-color-cf7726c);
    border-radius: 8px;
}

.tshack-bulk-order-form h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    color: var(--e-global-color-a91f731);
}

.tshack-bulk-printing-method {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--e-global-color-cf7726c);
}

.tshack-bulk-printing-method label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--e-global-color-85cadf8);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tshack-bulk-printing-options {
    display: flex;
    gap: 10px;
}

.tshack-bulk-printing-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s;
    text-align: center;
}

.tshack-bulk-printing-btn:hover {
    border-color: var(--e-global-color-primary);
    background: #f0f7ff;
}

.tshack-bulk-printing-btn.active {
    background: var(--e-global-color-primary);
    border-color: var(--e-global-color-primary);
    color: #ffffff;
}

.tshack-bulk-sizes-section {
    margin-bottom: 30px;
}

.tshack-bulk-sizes-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--e-global-color-85cadf8);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tshack-bulk-sizes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tshack-bulk-size-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--e-global-color-cf7726c);
    border-radius: 4px;
    background: #f9f9f9;
}

.tshack-bulk-size-label {
    flex: 0 0 80px;
    font-weight: 600;
    color: var(--e-global-color-a91f731);
}

.tshack-bulk-size-quantity {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tshack-bulk-size-quantity input {
    width: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
}

.tshack-bulk-size-limit {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.tshack-bulk-order-summary {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--e-global-color-cf7726c);
}

.tshack-bulk-total-items,
.tshack-bulk-total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.tshack-bulk-total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--e-global-color-primary);
    padding-top: 10px;
    border-top: 1px solid var(--e-global-color-cf7726c);
}

.tshack-bulk-order-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.tshack-bulk-order-actions button {
    flex: 1;
    padding: 15px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

/* Button Styles */
.tshack-button-primary {
    width: 100%;
    padding: 12px;
    background: var(--e-global-color-primary);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.tshack-button-primary:hover {
    background: var(--e-global-color-secondary);
}

/* Responsive */
@media (max-width: 1400px) {
    .tshack-right-sidebar {
        width: 180px;
    }
}

@media (max-width: 1200px) {
    .tshack-left-sidebar {
        width: 280px;
    }
    
    .tshack-right-sidebar {
        width: 160px;
    }
}

@media (max-width: 1024px) {
    .tshack-main-layout {
        flex-direction: column;
    }
    
    .tshack-left-sidebar {
        width: 100%;
        height: auto;
        max-height: 400px;
    }
    
    .tshack-nav-tabs {
        flex-direction: row;
        width: 100%;
        height: 60px;
    }
    
    .tshack-right-sidebar {
        width: 100%;
        height: auto;
    }
    
    .tshack-product-views {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .tshack-view-actions {
        flex-direction: row;
    }
}

/* Mobile Layout - Reorganized Structure */
@media (max-width: 768px) {
    .tshack-customization-container {
        height: 100vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .tshack-main-layout {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        height: auto;
        min-height: 0;
    }

    /* Canvas Area - Top Priority - Maximum Visibility */
    .tshack-canvas-area {
        order: 1;
        flex: 1;
        min-height: 0;
        padding: 8px;
        overflow: auto;
        display: flex;
        flex-direction: column;
        -webkit-overflow-scrolling: touch;
        position: relative;
        background: var(--e-global-color-b103f2b);
    }

    .tshack-canvas-header {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 8px;
        z-index: 10;
        flex-shrink: 0;
    }

    .tshack-back-link {
        padding: 8px 16px;
        font-size: 12px;
    }

    .tshack-canvas-wrapper {
        flex: 1;
        min-height: 300px;
        padding: 8px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        position: relative;
        overflow: visible;
    }

    /* Ensure canvas container is properly sized and touchable */
    .canvas-container {
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
        max-height: 100%;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: grab;
    }

    .canvas-container:active {
        cursor: grabbing;
    }

    /* Improve visibility of selected objects on mobile */
    @media (max-width: 768px) {
        .canvas-container .upper-canvas {
            cursor: grab !important;
        }

        .canvas-container .upper-canvas:active {
            cursor: grabbing !important;
        }

        /* Make selection handles more visible on mobile */
        .canvas-container .upper-canvas {
            touch-action: none;
        }
    }

    #tshack-design-canvas {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        touch-action: none;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    /* Ensure canvas upper layer is touchable */
    .canvas-container .upper-canvas,
    .canvas-container .lower-canvas {
        touch-action: none !important;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .tshack-product-info {
        display: none;
    }

    /* View Bubbles - Below Canvas */
    .tshack-right-sidebar {
        order: 2;
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--e-global-color-cf7726c);
        padding: 15px;
        background: #ffffff;
    }

    .tshack-views-header {
        display: none;
    }

    .tshack-product-views {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        margin-bottom: 0;
        flex-wrap: wrap;
    }

    .tshack-view-btn {
        width: 60px;
        height: 60px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--e-global-color-cf7726c);
        background: #ffffff;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .tshack-view-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .tshack-view-btn.active {
        border-color: var(--e-global-color-primary);
        border-width: 3px;
        box-shadow: 0 0 0 3px rgba(235, 87, 87, 0.2), 0 4px 12px rgba(235, 87, 87, 0.3);
        transform: scale(1.1);
    }

    .tshack-view-preview {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        margin: 0;
        border: none;
    }

    .tshack-view-btn span {
        display: none;
    }

    .tshack-view-actions {
        display: none;
    }

    /* Footer Action Bar - Three Rows Layout using CSS Grid */
    .tshack-action-bar {
        order: 3;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 12px;
        padding: 12px 15px;
        border-top: 1px solid var(--e-global-color-cf7726c);
    }

    /* Row 1: Action Buttons - Side by Side (span full width) */
    #tshack-save-design {
        grid-row: 1;
        grid-column: 1;
        padding: 12px 15px;
        font-size: 12px;
    }

    #tshack-done-design {
        grid-row: 1;
        grid-column: 2;
        padding: 12px 15px;
        font-size: 12px;
    }

    .tshack-action-bar-btn {
        padding: 12px 15px;
        font-size: 12px;
    }

    /* Row 2: Colors (left) and Printing Method (right) */
    .tshack-color-variations-section {
        grid-row: 2;
        grid-column: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .tshack-action-bar-label {
        display: none;
    }

    .tshack-color-variations-list {
        gap: 8px;
        flex-wrap: wrap;
        display: flex;
    }

    .tshack-color-swatch {
        width: 28px;
        height: 28px;
    }

    /* Show printing method section on mobile */
    .tshack-printing-method-section {
        grid-row: 2;
        grid-column: 2;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }

    .tshack-printing-method-list {
        display: flex;
        gap: 8px;
        background: var(--e-global-color-b103f2b);
        padding: 4px;
        border-radius: 100px;
    }

    .tshack-printing-method-btn {
        background: transparent;
        border: none;
        padding: 8px 14px;
        border-radius: 100px;
        font-size: 12px;
        font-weight: 500;
        color: var(--e-global-color-85cadf8);
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
    }

    .tshack-printing-method-btn:hover {
        color: var(--e-global-color-secondary);
    }

    .tshack-printing-method-btn.active {
        background: #ffffff;
        color: var(--e-global-color-primary);
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    /* Row 3: Price - Centered (spans both columns) */
    .tshack-price-display {
        grid-row: 3;
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
        display: flex;
        margin: 0;
    }

    .tshack-price-label {
        font-size: 11px;
    }

    .tshack-price-value {
        font-size: 18px;
    }

    /* Controls at Bottom - Text, Upload Art, Upload Image */
    .tshack-left-sidebar {
        order: 4;
        width: 100%;
        height: auto;
        max-height: none;
        border-right: none;
        border-top: 1px solid var(--e-global-color-cf7726c);
        background: #ffffff;
        transition: max-height 0.3s ease;
        overflow: visible;
        display: flex;
        flex-direction: column;
    }

    /* Ensure nav tabs and toggle button don't shrink */
    .tshack-left-sidebar .tshack-nav-tabs {
        flex-shrink: 0;
    }

    .tshack-tools-toggle {
        flex-shrink: 0;
    }

    /* Mobile Toggle Button */
    .tshack-tools-toggle {
        display: none; /* Hidden on desktop */
    }

    .tshack-nav-tabs {
        display: flex;
        flex-direction: row;
        width: 100%;
        height: 40px;
        border-bottom: none;
        background: #ffffff;
        padding: 0;
    }

    .tshack-nav-tab {
        flex: 1;
        height: 40px;
        font-size: 12px;
        border-bottom: none;
        border-right: 1px solid var(--e-global-color-cf7726c);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .tshack-nav-tab:last-child {
        border-right: none;
    }

    .tshack-nav-tab.active {
        border-bottom: none;
        border-top: 3px solid var(--e-global-color-primary);
    }

    .tshack-nav-tab.active::after {
        display: none;
    }

    .tshack-nav-icon {
        font-size: 16px;
    }

    /* Mobile Toggle Button - Show on mobile */
    .tshack-tools-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 12px 15px;
        background: var(--e-global-color-primary);
        color: #ffffff;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .tshack-tools-toggle:hover {
        background: var(--e-global-color-secondary);
    }

    .tshack-tools-toggle-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }

    .tshack-tools-toggle-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Expanded state - rotate icon */
    .tshack-left-sidebar.expanded .tshack-tools-toggle-icon {
        transform: rotate(180deg);
    }

    /* Default state - collapsed on mobile */
    .tshack-left-sidebar .tshack-tool-panel {
        max-height: 30vh; /* 50% of expanded size (expanded is 60vh) */
        overflow-y: auto;
        padding: 15px;
        -webkit-overflow-scrolling: touch;
        transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
        opacity: 1;
        display: block !important; /* Override JavaScript hide/show */
    }

    /* Collapsed state - show 50% of size */
    .tshack-left-sidebar.collapsed .tshack-tool-panel {
        max-height: 30vh; /* 50% of expanded size */
        padding: 15px;
        overflow-y: auto;
        opacity: 1;
    }

    /* Expanded state - take more than half screen height */
    .tshack-left-sidebar.expanded .tshack-tool-panel {
        max-height: 60vh; /* More than half screen height */
        padding: 15px;
        opacity: 1;
    }

    /* Show active panel when expanded */
    .tshack-left-sidebar.expanded .tshack-tool-panel:not([style*="display: none"]) {
        display: block !important;
    }

    /* Tool panels are controlled by JavaScript via data-tool attribute */
    /* JavaScript will handle showing/hiding based on active tab */

    /* Improve scrollbar appearance on mobile */
    .tshack-tool-panel::-webkit-scrollbar {
        width: 4px;
    }

    .tshack-tool-panel::-webkit-scrollbar-thumb {
        background: var(--e-global-color-cf7726c);
        border-radius: 2px;
    }
    .tshack-text-input-field { padding: 10px 12px; font-size: 12px; }
    .tshack-action-btn { height: 32px; min-width: 32px; }
    .tshack-action-btn svg { width: 16px; height: 16px; }
    .tshack-color-picker-button { padding: 10px 14px; font-size: 12px; }
    .tshack-color-picker-preview { width: 24px; height: 24px; }
    .tshack-font-picker-button { padding: 10px 14px; font-size: 12px; }
    .tshack-font-picker-preview { width: 24px; height: 24px; font-size: 14px; }
    .tshack-font-option-preview { width: 28px; height: 28px; font-size: 16px; }
    .tshack-font-option-name { font-size: 12px; }
    .tshack-range-slider { height: 6px; }
    .tshack-range-slider::-webkit-slider-thumb { width: 18px; height: 18px; }
}

@media (max-width: 480px) {
    .tshack-canvas-wrapper {
        padding: 8px;
        min-height: 320px;
    }

    .tshack-canvas-area {
        min-height: 350px;
    }

    .tshack-back-link {
        padding: 6px 12px;
        font-size: 11px;
    }

    .tshack-product-views {
        gap: 8px;
        padding: 10px 0;
    }

    .tshack-view-btn {
        width: 50px;
        height: 50px;
    }

    .tshack-action-bar {
        padding: 10px 12px;
        gap: 10px;
        grid-template-columns: 1fr 1fr;
    }

    .tshack-action-bar-btn {
        padding: 10px 12px;
        font-size: 11px;
    }

    .tshack-color-swatch {
        width: 24px;
        height: 24px;
    }

    .tshack-price-value {
        font-size: 16px;
    }

    .tshack-price-label {
        font-size: 10px;
    }

    .tshack-nav-tab {
        height: 30px;
        font-size: 11px;
    }

    .tshack-nav-icon {
        font-size: 14px;
    }

    .tshack-tool-panel {
        padding: 12px;
    }

    .tshack-left-sidebar.expanded .tshack-tool-panel {
        max-height: 60vh; /* More than half screen height on smaller screens */
    }

    .tshack-left-sidebar.collapsed .tshack-tool-panel {
        max-height: 30vh; /* 50% of expanded size on smaller screens */
    }

    .tshack-right-sidebar {
        padding: 12px;
    }

    .tshack-action-bar-btn {
        padding: 10px 12px;
        font-size: 11px;
    }
}
