.object-controls-mobile {
    display: none;
}

/* Mobile Responsive Base */
@media (max-width: 767px) {

    html,
    body {
        width: 100% !important;
        height: 100vh !important;
        overflow-x: hidden !important;
        position: fixed !important;
        margin: 0 !important;
        padding: 0 !important;
        /* -webkit-overflow-scrolling: touch; */
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }

    #design-main {
        width: 100% !important;
        /* height: 100vh !important; */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        /* -webkit-overflow-scrolling: touch; */
        padding-bottom: 80px !important;
        /* Space for tab menu */
    }

    #design-main ul.list-items {
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .object-controls-mobile {
        width: 100%;
        left: 0;
        right: 0;
        margin: auto;
        max-width: 300px;
        background-color: #cccccc47;
        padding: 0px 10px;
        position: fixed;
        border-radius: 10px;
        bottom: 90px;
        display: block;
    }
}



/* Mobile Tab Menu Styles */
.mobile-tab-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1050;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-tab-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

.mobile-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    min-width: 60px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
}

.mobile-tab-item:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.mobile-tab-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.mobile-tab-item.active .tab-icon svg {
    color: #ffffff;
}

.mobile-tab-item.active .tab-text {
    color: #ffffff;
    font-weight: 600;
}

.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.tab-icon svg {
    width: 22px;
    height: 22px;
    color: #666666;
    transition: all 0.3s ease;
}

.mobile-tab-item:hover .tab-icon svg {
    color: #667eea;
    transform: scale(1.1);
}

.tab-text {
    font-size: 10px;
    font-weight: 500;
    color: #666666;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Active state animations */
/* .mobile-tab-item.active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 0 0 3px 3px;
    animation: tabActiveSlide 0.3s ease;
} */

@keyframes tabActiveSlide {
    0% {
        width: 0;
        opacity: 0;
    }

    100% {
        width: 20px;
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 320px) {
    .mobile-tab-item {
        min-width: 50px;
        padding: 6px 2px;
    }

    .tab-icon {
        width: 28px;
        height: 28px;
    }

    .tab-icon svg {
        width: 20px;
        height: 20px;
    }

    .tab-text {
        font-size: 9px;
        max-width: 45px;
    }
}

@media (min-width: 768px) {
    .mobile-tab-menu {
        display: none !important;
    }
}

/* Add bottom margin to main content to prevent overlap */
.container#design-main {
    margin-bottom: 80px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Additional mobile-specific styles */
@media (max-width: 767px) {
    body {
        padding-bottom: 70px;
    }

    #design-main {
        margin-top: 0;
    }

    #design-main .layout-option-button {
        top: 13px;
    }

    /* Canvas responsive adjustments */
    #canvas-container {
        width: 100% !important;
        max-width: calc(100vw - 20px) !important;
        /* height: auto !important; */
        aspect-ratio: 1 !important;
        margin: 10px auto !important;
        border: 1px solid #fff !important;
        background: #fff !important;
        overflow: visible !important;
        position: relative !important;
        padding-top: 40px;
    }

    /* Layout display adjustments for mobile */
    #design-main .layout-display {
        top: 250px
            /* position: relative !important;
        top: auto !important;
        left: auto !important; */
            /* margin-bottom: 15px !important; */
            /* margin-top: 10px !important; */
            /* z-index: 10; */
    }

    #design-main .layout-display ul {
        /* display: flex; */
        /* flex-wrap: wrap; */
        justify-content: center;
        gap: 10px;
        padding: 0;
        margin: 0;
    }

    #design-main .layout-display li {
        width: 50px !important;
        height: 55px !important;
        margin: 0 !important;
    }

    /* Row adjustments for mobile */
    .row {
        margin: 0 !important;
    }

    .col-md-6 {
        padding: 5px !important;
    }

    /* Prevent horizontal scrolling */
    * {
        box-sizing: border-box;
    }

    /* Smooth touch scrolling */
    .mobile-tab-content {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
        max-height: calc(100vh - 150px);
    }

    /* Fabric.js canvas adjustments */
    .canvas-container {
        width: 100% !important;
        max-width: 100% !important;
        touch-action: pan-x pan-y;
    }

    .upper-canvas {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        touch-action: manipulation;
    }

    /* Prevent zoom on double tap */
    * {
        touch-action: manipulation;
    }

    /* iOS Safari specific fixes */
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .mobile-tab-menu {
        animation: slideUpFromBottom 0.5s ease-out;
    }
}

@keyframes slideUpFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Tab content panels (hidden by default, can be shown with JavaScript) */
.mobile-tab-content {
    display: none;
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    max-height: 50vh;
    overflow-y: auto;
    z-index: 1049;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
}

.mobile-tab-content.active {
    display: block;
    animation: slideUpContent 0.3s ease-out;
}

@keyframes slideUpContent {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-tab-content .content-header {
    padding: 0px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-tab-content .close-tab-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.mobile-tab-content .close-tab-btn:hover {
    background: #e0e0e0;
    color: #333;
    transform: rotate(90deg);
}

.mobile-tab-content .close-tab-btn:active {
    transform: scale(0.9) rotate(90deg);
    background: #d0d0d0;
}

.mobile-tab-content .content-body {
    padding: 5px 10px;
}

/* Haptic feedback simulation with scale animation */
.mobile-tab-item:active {
    transform: scale(0.95);
}

/* Badge/notification dot for tabs */
.mobile-tab-item .notification-badge {
    position: absolute;
    top: 5px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/* Scroll behavior for hiding/showing tab menu */
.mobile-tab-menu.hide-tab {
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-tab-menu:not(.hide-tab) {
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

/* Click feedback */
.mobile-tab-item.clicked {
    transform: scale(0.9) translateY(-2px);
    transition: transform 0.15s ease;
}

/* Enhanced gradient themes for different tabs */
.mobile-tab-item#tab-color.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.mobile-tab-item#tab-collar.active {
    background: linear-gradient(135deg, #4834d4 0%, #686de0 100%);
    box-shadow: 0 4px 15px rgba(72, 52, 212, 0.4);
}

.mobile-tab-item#tab-upload.active {
    background: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%);
    box-shadow: 0 4px 15px rgba(0, 210, 211, 0.4);
}

.mobile-tab-item#tab-text.active {
    background: linear-gradient(135deg, #5f27cd 0%, #a55eea 100%);
    box-shadow: 0 4px 15px rgba(95, 39, 205, 0.4);
}

.mobile-tab-item#tab-images.active {
    background: linear-gradient(135deg, #00d84a 0%, #05c46b 100%);
    box-shadow: 0 4px 15px rgba(0, 216, 74, 0.4);
}

/* Loading state for tabs */
.mobile-tab-item.loading {
    pointer-events: none;
    opacity: 0.6;
}

.mobile-tab-item.loading .tab-icon {
    animation: tabLoading 1s linear infinite;
}

@keyframes tabLoading {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Improved safe area handling for newer iPhones */
@supports (padding: max(0px)) {
    .mobile-tab-menu {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-tab-menu {
        background: #1a1a1a;
        border-top-color: #333333;
    }

    .mobile-tab-item:hover {
        background: #2a2a2a;
    }

    .tab-icon svg {
        color: #cccccc;
    }

    .tab-text {
        color: #cccccc;
    }

    .mobile-tab-content {
        background: #1a1a1a;
        border-top-color: #333333;
    }

    .mobile-tab-content .content-header {
        background: #2a2a2a;
        border-bottom-color: #333333;
        color: #ffffff;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-tab-menu {
        border-top-width: 2px;
    }

    .mobile-tab-item.active {
        border: 2px solid #000000;
    }
}

/* Mobile List Items Styles */
.mobile-tab-content .list-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-x: hidden;
    max-height: 350px;
    overflow-y: auto;
}

/* Mobile Color Items - Single Row Layout */
.mobile-color-items {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 15px;
    padding: 0 5px 10px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.mobile-tab-content .list-items li {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Mobile Color Items - Single Row */
.mobile-color-items li {
    min-width: 90px;
    flex-shrink: 0;
    padding: 10px;
    border-radius: 8px;
}

#design-main .mobile-tab-content ul.list-items .icon-checked {
    position: absolute;
    z-index: 99;
    right: 0;
    top: auto;
    border-radius: 100px;
    color: green;
    font-size: 31px;
    background: #FFF;
    width: 28px;
    height: 22px;
    padding: 0;
    margin: 0;
    line-height: 20px;
    display: none;
    bottom: auto;
    left: 0;
    margin: auto;
    top: 0;
    bottom: 0;
}

#design-main ul.list-items .icon-checked .mobile-tab-content .list-items li:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.mobile-tab-content .list-items li.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* .mobile-tab-content .list-items li.active .txt {
    color: #ffffff;
} */

.mobile-tab-content .list-items li img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    /* margin-bottom: 10px; */
}

.mobile-tab-content .list-items li .txt {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}

.mobile-tab-content .list-items li .icon-checked {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
    color: #ffffff;
    font-size: 18px;
}

.mobile-tab-content .list-items li.active .icon-checked {
    display: block;
}

.mobile-tab-content .list-items li .best-seller {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: url(/custom/i24Design/img/best-seller.png) no-repeat center center;
    background-size: contain;
    margin-right: 5px;
    position: absolute;
    z-index: 99;
    /* left: 0; */
    right: -13px;
    top: -8px;
}

/* Mobile Color Items Specific */
.mobile-color-items li img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

/* Hide scrollbar for mobile color items */
.mobile-color-items::-webkit-scrollbar {
    display: none;
}

.mobile-color-items {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ensure single row layout for color items */
.mobile-color-items {
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
}

/* Container for mobile color items */
#color-content .content-body {
    overflow: hidden;
    padding: 10px 0;
}

/* Mobile Collar Items Specific */
.mobile-collar-items li img {
    width: 60px;
    height: 40px;
    object-fit: contain;
}

/* Mobile Artwork Items Specific - Single Row Layout */
.mobile-artwork-items {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden !important;
    gap: 15px;
    padding: 0 5px 10px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    height: auto !important;
    max-height: none !important;
    flex-direction: row !important;
    align-items: center;
    grid-template-columns: none !important;
}

.mobile-artwork-items li {
    min-width: 95px;
    max-width: 95px;
    flex-shrink: 0;
    flex-grow: 0;
    padding: 10px 8px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mobile-artwork-items li img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin-bottom: 5px;
}

.mobile-artwork-items li .txt {
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Hide scrollbar for mobile artwork items */
.mobile-artwork-items::-webkit-scrollbar {
    display: none;
}

.mobile-artwork-items {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Container for mobile artwork items */
#images-content .content-body {
    overflow: hidden;
    padding: 10px 0;
}

/* Force single row for artwork items */
.mobile-artwork-items.list-items {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-y: hidden !important;
}

/* Prevent grid layout override */
.mobile-tab-content .mobile-artwork-items {
    grid-template-columns: none !important;
    display: flex !important;
}

/* Mobile Text Controls */
.mobile-tab-content .input-group {
    margin-bottom: 15px;
}

.mobile-tab-content .input-group input {
    border-radius: 8px 0 0 8px;
    border: 2px solid #e0e0e0;
    padding: 12px;
    font-size: 16px;
}

.mobile-tab-content .input-group .btn {
    border-radius: 0 8px 8px 0;
    /* padding: 12px 20px; */
    /* font-weight: 600; */
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    border: none;
}

.mobile-tab-content .form-control {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    /* padding: 12px; */
    font-size: 16px;
    transition: all 0.3s ease;
}

.mobile-tab-content .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.mobile-tab-content label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

/* Upload Area Styles */
.mobile-tab-content .upload-area {
    margin-bottom: 20px;
}

.mobile-tab-content .list-unstyled li {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Small screen adjustments */
@media (max-width: 480px) {
    .mobile-tab-content .list-items {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .mobile-tab-content .list-items li {
        padding: 12px;
    }

    .mobile-tab-content .list-items li img {
        width: 50px;
        height: 50px;
    }

    /* Mobile Artwork Items - Small Screen */
    .mobile-artwork-items li {
        min-width: 80px;
        max-width: 80px;
        padding: 8px 6px;
    }

    .mobile-artwork-items li img {
        width: 45px;
        height: 45px;
    }

    .mobile-artwork-items li .txt {
        font-size: 10px;
        margin-top: 3px;
        line-height: 1.1;
        text-align: center;
        word-wrap: break-word;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    /* Mobile Color Items - Small Screen */
    .mobile-color-items li {
        min-width: 80px;
        padding: 8px;
    }

    .mobile-color-items li img {
        width: 40px;
        height: 40px;
    }

    .mobile-color-items li .txt {
        font-size: 12px;
        margin-top: 5px;
    }
}

/* Mobile Order Button */
.mobile-order-button {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1049;
}

.mobile-order-button .order-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 120px;
    justify-content: center;
}

.mobile-order-button .order-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea080 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.5);
}

.mobile-order-button .order-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 15px rgba(40, 167, 69, 0.4);
}

.mobile-order-button .order-btn svg {
    width: 20px;
    height: 20px;
}

/* Pulse animation for order button */
.mobile-order-button .order-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 25px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    animation: pulse 2s infinite;
    z-index: -1;
    opacity: 0;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

/* Mobile Order Modal Styles */
.mobile-order-modal .modal-dialog {
    max-width: 90%;
    margin: 1rem auto;
}

.size-selection-section .section-title {
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.table-size {
    font-size: 14px;
}

.table-size th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.table-size .form-control-sm {
    font-size: 12px;
}

.order-summary {
    border: 1px solid #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.order-summary .badge {
    font-size: 14px;
}

/* Modal enhancements for mobile */
@media (max-width: 767px) {
    #footer {
        display: none;
    }

    .mobile-order-button {
        bottom: 180px;
        right: 15px;
    }

    .mobile-order-button .order-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 100px;
    }

    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .table-size {
        font-size: 12px;
    }

    .order-summary {
        font-size: 14px;
    }

    /* Size Modal Responsive */
    #modal-size-list .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    #modal-size-list .modal-content {
        border-radius: 8px;
        border: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    #modal-size-list .modal-header {
        padding: 12px 15px;
        border-bottom: 1px solid #dee2e6;
    }

    #modal-size-list .modal-title {
        font-size: 18px;
        font-weight: 600;
        color: #495057;
    }

    #modal-size-list .modal-body {
        padding: 10px;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #modal-size-list .size-section {
        margin-bottom: 20px;
    }

    #modal-size-list .size-section h6 {
        margin-bottom: 10px;
        color: #495057;
        font-size: 14px;
    }

    #modal-size-list .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        margin-bottom: 15px;
    }

    #modal-size-list .table {
        margin-bottom: 0;
        font-size: 11px;
        min-width: 100%;
    }

    #modal-size-list .table th,
    #modal-size-list .table td {
        padding: 6px 4px;
        vertical-align: middle;
        border-color: #dee2e6;
        white-space: nowrap;
    }

    #modal-size-list .table th {
        background-color: #f8f9fa;
        font-weight: 600;
        color: #495057;
        font-size: 10px;
    }

    #modal-size-list .table td:first-child,
    #modal-size-list .table th:first-child {
        position: sticky;
        left: 0;
        background-color: #f8f9fa;
        z-index: 2;
        font-weight: 600;
        min-width: 70px;
    }

    #modal-size-list .modal-footer {
        padding: 10px 15px;
        border-top: 1px solid #dee2e6;
    }
}

/* Hide order button when mobile tab content is active */
.mobile-tab-content.active~.mobile-order-button {
    opacity: 0;
    pointer-events: none;
}

/* Color Picker Circle Styles */
.color-picker-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 0;
    justify-content: flex-start;
    width: 100%;
    /* max-width: 360px; */
}

.color-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 2px;
    flex: 0 0 auto;
}

.color-circle:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.color-circle.active {
    border-color: #667eea;
    transform: scale(1.15);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

.color-circle.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 16px;
    height: 16px;
    background: #13d501;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.color-inner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.color-circle[data-color="#FFFFFF"] .color-inner {
    border: 2px solid rgba(0, 0, 0, 0.3);
}

/* Mobile color picker specific styles */
.mobile-color-picker {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden !important;
    max-width: none;
    width: 100%;
    gap: 8px;
    padding: 15px 5px 25px 5px;
    margin: 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.mobile-color-picker .color-circle {
    width: 40px;
    height: 40px;
    margin: 0 2px;
    flex-shrink: 0;
    flex-grow: 0;
    min-width: 40px;
}

/* Hide scrollbar for mobile color picker */
.mobile-color-picker::-webkit-scrollbar {
    display: none;
}

.mobile-color-picker {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Force single row layout for mobile color picker */
.mobile-color-picker.color-picker-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    align-items: center;
    overflow-y: hidden !important;
}

@media (max-width: 768px) {
    .color-picker-container {
        gap: 5px;
        padding: 15px 5px;
        max-width: 100%;
    }

    .mobile-color-picker .color-circle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        margin: 0 1px;
    }

    .color-circle {
        width: 32px;
        height: 32px;
    }

    .color-inner {
        width: 22px;
        height: 22px;
    }

    .mobile-color-picker .color-circle {
        width: 40px;
        height: 40px;
    }

    .mobile-color-picker .color-inner {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .color-picker-container {
        max-width: 100%;
        gap: 4px;
    }

    .mobile-color-picker {
        gap: 6px !important;
        padding: 10px 3px 10px 3px !important;
    }

    .mobile-color-picker .color-circle {
        width: 45px;
        height: 45px;
        min-width: 45px;
        margin: 0;
    }

    .color-circle {
        width: 28px;
        height: 28px;
    }

    .color-inner {
        width: 20px;
        height: 20px;
    }

    .mobile-color-picker .color-inner {
        width: 40px;
        height: 40px;
    }
}

/* Updated Upload Area Styles - Mobile Tab Style */
.upload-section {
    padding: 15px 0;
}

.upload-area {
    position: relative;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #667eea;
    background: linear-gradient(145deg, #f0f4ff 0%, #e0e7ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.12);
}

.upload-area.dragover {
    border-color: #667eea;
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    transform: scale(1.01);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.18);
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    color: #94a3b8;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
    color: #667eea;
    transform: translateY(-2px);
}

.upload-title {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.upload-subtitle {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 15px;
}

.upload-divider {
    position: relative;
    margin: 15px 0;
    text-align: center;
}

.upload-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.upload-divider span {
    background: white;
    padding: 0 12px;
    color: #94a3b8;
    font-size: 11px;
    position: relative;
    z-index: 2;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.25);
    color: white;
}

.upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.35);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: white;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 3;
    border-radius: 10px;
}

.upload-area.dragover .upload-overlay {
    opacity: 1;
    visibility: visible;
}

.upload-overlay-content {
    color: white;
    text-align: center;
}

.upload-overlay-icon {
    margin-bottom: 8px;
}

.upload-overlay p {
    font-weight: 500;
    margin: 0;
    font-size: 14px;
}

/* Guidelines Section - Mobile Tab Style */
.upload-guidelines {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

.guidelines-header {
    margin-bottom: 15px;
}

.guidelines-header h5 {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.guidelines-header i {
    color: #667eea;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.guideline-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.guideline-item:hover {
    background: #f1f5f9;
    transform: translateX(2px);
}

.guideline-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.guideline-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.guideline-content strong {
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.guideline-content span {
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
}

/* Desktop Responsive - Tab Style */
@media (min-width: 768px) {
    .upload-area {
        padding: 40px 30px;
    }

    .upload-title {
        font-size: 18px;
    }

    .upload-subtitle {
        font-size: 14px;
    }

    .upload-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .upload-guidelines {
        padding: 20px;
    }

    .guidelines-grid {
        gap: 14px;
    }

    .guideline-item {
        padding: 12px;
    }

    .guideline-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .guideline-content strong {
        font-size: 13px;
    }

    .guideline-content span {
        font-size: 12px;
    }
}

/* Mobile Responsive - Match Tab Style */
@media (max-width: 767px) {
    .upload-area {
        padding: 25px 15px;
        margin-bottom: 15px;
    }

    .upload-title {
        font-size: 15px;
    }

    .upload-subtitle {
        font-size: 12px;
    }

    .upload-btn {
        padding: 9px 18px;
        font-size: 12px;
    }

    .upload-guidelines {
        padding: 12px;
    }

    .guidelines-grid {
        gap: 10px;
    }

    .guideline-item {
        padding: 8px;
    }

    .guideline-icon {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .guideline-content strong {
        font-size: 11px;
    }

    .guideline-content span {
        font-size: 10px;
    }
}

/* Mobile touch optimization */
@media (max-width: 768px) {

    /* Enhanced touch targets */
    .mobile-color-items>div,
    .mobile-artwork-items>div,
    .mobile-color-picker>div {
        min-height: 44px !important;
        min-width: 44px !important;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    /* Button touch improvements */
    .btn,
    button,
    [role="button"],
    a.btn {
        min-height: 44px !important;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    /* Interactive elements */
    .mobile-tab-menu a,
    .color-item,
    .artwork-item {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }

    .mobile-tab-menu a:active,
    .color-item:active,
    .artwork-item:active {
        transform: scale(0.98);
        opacity: 0.8;
    }

    /* Prevent double-tap zoom on buttons */
    .btn-start-design-popup,
    .btn-line-oa-popup {
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
}