/**
 * 369 Custom Gear - Frontend Styles
 */

/* Hide Add to Cart when plugin is active (CSS backup) */
body.single-product .cg369-hide-cart form.cart {
    display: none !important;
}

/* Custom Design Button */
.cg369-custom-design-wrapper {
    margin: 20px 0;
    clear: both;
}

.cg369-custom-design-btn {
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);

    color: #fff !important;
    font-size: 18px;
    font-weight: 600;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.cg369-custom-design-btn:hover {
    background: #9d1717 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 167, 225, 0.3);
}

/* Popup Overlay */
.cg369-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    overflow: hidden;
}

/* Popup Container */
.cg369-popup-container {
    width: 100%;
    height: 100%;
    background: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Popup Header */
.cg369-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
}

.cg369-popup-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.cg369-logo-icon {
    font-size: 24px;
    color: #00a7e1;
    transform: rotate(90deg);
    display: inline-block;
}

.cg369-popup-help {
    text-align: right;
    font-size: 13px;
}

.cg369-popup-help a {
    color: #00a7e1;
    text-decoration: none;
    font-weight: 600;
}

.cg369-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #545454 !important; /*f5f5f5 Light grey background */
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #cecece !important; /*666 Darker close icon color */
    width: 40px;
    height: 40px;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cg369-popup-close:hover {
    background: #ff4444;
    color: #ffffff;
    transform: rotate(90deg);
}

/* Step Indicator */
.cg369-step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
    background: #f9f9f9;
    gap: 80px;
    position: relative;
}

.cg369-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    padding: 0;
    min-width: 80px;
}

.cg369-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 17px;
    width: 126px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
    transform: translateX(17px);
    transition: background 0.3s ease;
    pointer-events: none;
}

.cg369-step-completed:not(:last-child)::after {
    background: #00a7e1;
}

.cg369-step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.cg369-step-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    position: relative;
    z-index: 2;
    line-height: 1.3;
    margin-top: 2px;
}

.cg369-step-active .cg369-step-number,
.cg369-step-completed .cg369-step-number {
    background: #00a7e1;
    color: #ffffff;
}

.cg369-step-completed .cg369-step-number::after {
    content: '✓';
}

.cg369-step-active .cg369-step-label,
.cg369-step-completed .cg369-step-label {
    color: #00a7e1;
    font-weight: 600;
}

.cg369-step-completed {
    cursor: pointer;
    user-select: none;
}

.cg369-step-completed:hover .cg369-step-number {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 167, 225, 0.3);
}

.cg369-step-completed:hover .cg369-step-label {
    text-decoration: underline;
}

.cg369-step-completed:active .cg369-step-number {
    transform: scale(1.05);
}

/* Content Area */
.cg369-popup-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Left Sidebar - Category Filters */
.cg369-popup-filters {
    width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 20px 15px;
    flex-shrink: 0;
}

/* Hide filters on steps 2 and 3 */
.cg369-popup-filters.cg369-hidden {
    display: none;
}

/* Main Content */
.cg369-popup-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #ffffff;
    min-width: 0;
}

.cg369-step-content {
    display: none;
}

.cg369-step-content.cg369-active {
    display: block;
}

.cg369-step-content h2 {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #333;
}

.cg369-step-description {
    color: #666;
    margin-bottom: 30px;
}

/* Design Section Padding */
.cg369-step-2 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cg369-step-2 h2,
.cg369-step-2 .cg369-step-description {
    padding: 0 10px;
}

.cg369-step-2 .cg369-form-group {
    padding: 0 10px;
}

.cg369-step-2 h3 {
    padding: 0 10px;
    margin-top: 25px;
    margin-bottom: 15px;
}

/* Search Bar */
.cg369-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.cg369-search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.cg369-search-btn {
    padding: 12px 20px;
    background: #00a7e1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
}

/* Filters */
.cg369-filters-section {
    margin-bottom: 0;
}

.cg369-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00a7e1;
}

.cg369-filters-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.cg369-reset-filters {
    background: transparent;
    border: 1px solid #00a7e1;
    color: #00a7e1;
    cursor: pointer;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cg369-reset-filters:hover {
    background: #00a7e1;
    color: #ffffff;
}

.cg369-category-filter {
    /* No extra styling needed */
}

.cg369-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 8px;
}

.cg369-filter-list::-webkit-scrollbar {
    width: 6px;
}

.cg369-filter-list::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 3px;
}

.cg369-filter-list::-webkit-scrollbar-thumb {
    background: #00a7e1;
    border-radius: 3px;
}

.cg369-filter-list::-webkit-scrollbar-thumb:hover {
    background: #0090c5;
}

.cg369-filter-item {
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    font-size: 13px;
    position: relative;
}

.cg369-filter-item:hover {
    background: #e3f2fd;
    border-color: #00a7e1;
    transform: translateX(3px);
    box-shadow: 0 2px 4px rgba(0, 167, 225, 0.2);
}

.cg369-filter-item.active {
    background: linear-gradient(135deg, #00a7e1 0%, #0090c5 100%);
    color: #ffffff;
    border-color: #00a7e1;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 167, 225, 0.3);
}

.cg369-filter-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: #ffffff;
    border-radius: 0 2px 2px 0;
}

.cg369-filter-item-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.cg369-filter-item.active .cg369-filter-item-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Parent Category Styles */
.cg369-filter-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.cg369-category-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    color: #00a7e1;
    font-weight: bold;
}

.cg369-parent-category.expanded .cg369-category-arrow {
    transform: rotate(90deg);
}

.cg369-parent-category.active .cg369-category-arrow {
    color: #ffffff;
}

/* Subcategory List */
.cg369-subcategory-list {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cg369-subcategory-item {
    padding: 10px 12px;
    font-size: 12px;
    margin-left: 0;
}

.cg369-subcategory-item:hover {
    transform: translateX(5px);
}

.cg369-subcategory-item.active::before {
    height: 60%;
}

/* Products Grid */
.cg369-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cg369-product-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.cg369-product-card:hover {
    border-color: #00a7e1;
    box-shadow: 0 4px 12px rgba(0, 167, 225, 0.2);
}

.cg369-product-card.selected {
    border-color: #00a7e1;
    background: #e3f2fd;
}

.cg369-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff9800;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.cg369-product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.cg369-product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.cg369-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #00a7e1;
    margin-bottom: 5px;
}

.cg369-product-design-btn {
    width: 100%;
    padding: 12px 20px;
    margin: 10px 0;
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cg369-product-design-btn:hover {
    background: #9d1717 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 23, 23, 0.4);
}

.cg369-product-design-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(157, 23, 23, 0.3);
}

.cg369-product-delivery {
    font-size: 12px;
    color: #666;
}

/* Hide add to cart on archives when enabled - comprehensive selectors */
.cg369-hide-archive-cart .woocommerce ul.products li.product .button,
.cg369-hide-archive-cart .woocommerce-page ul.products li.product .button,
.cg369-hide-archive-cart .woocommerce ul.products li.product .add_to_cart_button,
.cg369-hide-archive-cart .woocommerce-page ul.products li.product .add_to_cart_button,
.cg369-hide-archive-cart .woocommerce ul.products li.product a.button,
.cg369-hide-archive-cart .woocommerce-page ul.products li.product a.button,
.cg369-hide-archive-cart .woocommerce ul.products li.product .product_type_simple,
.cg369-hide-archive-cart .woocommerce ul.products li.product .product_type_variable,
.cg369-hide-archive-cart .woocommerce ul.products li.product .product_type_grouped,
.cg369-hide-archive-cart .woocommerce ul.products li.product .product_type_external,
.cg369-hide-archive-cart .woocommerce .products .product .button,
.cg369-hide-archive-cart ul.products li.product .button,
.cg369-hide-archive-cart.woocommerce ul.products li.product .button,
.cg369-hide-archive-cart.woocommerce-page ul.products li.product .button,
.cg369-hide-archive-cart .woocommerce ul.products li.product .ajax_add_to_cart,
.cg369-hide-archive-cart .woocommerce-page ul.products li.product .ajax_add_to_cart,
body.cg369-hide-archive-cart .woocommerce ul.products li.product .button,
body.cg369-hide-archive-cart .woocommerce ul.products li.product a.add_to_cart_button,
body.cg369-hide-archive-cart .woocommerce ul.products li.product a.button.product_type_simple,
body.cg369-hide-archive-cart .woocommerce ul.products li.product a.button.product_type_variable,
body.cg369-hide-archive-cart .woocommerce ul.products li.product a.button.product_type_grouped,
body.cg369-hide-archive-cart .woocommerce ul.products li.product a.button.product_type_external,
body.cg369-hide-archive-cart ul.products li.product a.button,
body.cg369-hide-archive-cart.woocommerce ul.products li.product .button,
body.cg369-hide-archive-cart.post-type-archive-product .woocommerce ul.products li.product .button,
body.cg369-hide-archive-cart.post-type-archive-product ul.products li.product .button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Archive button styling - positioned under product image */
.cg369-archive-design-btn {
    display: block;
    width: 100%;
    padding: 15px 40px;
    margin: 15px 0;
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
    line-height: 1.4;
}

.cg369-archive-design-btn:hover {
    background: #9d1717 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 23, 23, 0.4);
    color: #fff !important;
}

.cg369-archive-design-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(157, 23, 23, 0.3);
}

/* Responsive archive button styling */
@media (max-width: 768px) {
    .cg369-archive-design-btn {
        padding: 12px 30px;
        font-size: 15px;
        margin: 12px 0;
    }
}

@media (max-width: 480px) {
    .cg369-archive-design-btn {
        padding: 10px 20px;
        font-size: 13px;
        margin: 10px 0;
    }
}

.cg369-product-select-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #00a7e1;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cg369-product-card.selected .cg369-product-select-btn {
    background: #00a7e1;
    color: #fff;
}

.cg369-product-card.selected .cg369-product-select-btn::after {
    content: '✓';
    font-weight: bold;
}

/* Forms */
.cg369-login-banner {
    background: #1a4d7a;
    color: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cg369-login-btn {
    background: #fff;
    color: #000;
    border: 1px solid #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 600;
}

.cg369-login-btn:hover {
    background: #f0f0f0;
    color: #000;
    border-color: #e0e0e0;
}

.cg369-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.cg369-form-group {
    display: flex;
    flex-direction: column;
}

.cg369-form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.cg369-required {
    color: #ff0000;
}

.cg369-form-group input[type="text"],
.cg369-form-group input[type="email"],
.cg369-form-group input[type="tel"],
.cg369-form-group input[type="date"],
.cg369-form-group input[type="number"],
.cg369-form-group textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.cg369-form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.cg369-form-group input[type="number"]::-webkit-outer-spin-button,
.cg369-form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cg369-form-group input[type="number"] {
    -moz-appearance: textfield;
}

.cg369-form-group small {
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.cg369-phone-input {
    display: flex;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.cg369-country-select {
    padding: 12px 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    width: 210px !important;
    min-width: 210px;
    max-width: 210px;
    font-family: inherit;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cg369-country-select:hover {
    background: #ececec;
    border-color: #00a7e1;
}

.cg369-country-select:focus {
    outline: none;
    border-color: #00a7e1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 167, 225, 0.1);
}

.cg369-phone-input input[type="tel"] {
    flex: 1;
    min-width: 0;
}

.cg369-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.cg369-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.cg369-info-box {
    background: #f0f0f0;
    padding: 15px;
    border-left: 4px solid #00a7e1;
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.6;
}

.cg369-info-box p {
    margin: 0 0 10px 0;
}

.cg369-info-box p:last-child {
    margin-bottom: 0;
}

/* Design Specifications */
.cg369-design-spec-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 20px;
    background: #fff;
}

.cg369-spec-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #e0e0e0;
}

.cg369-spec-header.collapsed {
    border-bottom: none;
}

.cg369-spec-title {
    flex: 1;
}

.cg369-spec-title span {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.cg369-spec-content {
    padding: 20px;
    max-height: 2000px;
    overflow: visible;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 1;
}

.cg369-spec-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 20px;
    overflow: hidden;
}

.cg369-spec-header .cg369-collapse-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.cg369-spec-header.collapsed .cg369-collapse-icon {
    transform: rotate(180deg);
}

.cg369-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.cg369-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    font-weight: normal;
}

.cg369-checkbox-label input[type="checkbox"] {
    display: none;
}

.cg369-checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #00a7e1;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cg369-checkbox-label input[type="checkbox"]:checked + .cg369-checkbox-custom {
    background: #00a7e1;
}

.cg369-checkbox-label input[type="checkbox"]:checked + .cg369-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.cg369-font-style-section h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.cg369-font-style-desc {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: #666;
}

.cg369-font-carousel-wrapper {
    position: relative;
    padding: 0 45px;
}

.cg369-font-carousel-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #00a7e1 #f0f0f0;
    -webkit-overflow-scrolling: touch;
}

.cg369-font-carousel-container::-webkit-scrollbar {
    height: 8px;
}

.cg369-font-carousel-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.cg369-font-carousel-container::-webkit-scrollbar-thumb {
    background: #00a7e1;
    border-radius: 4px;
}

.cg369-font-carousel-container::-webkit-scrollbar-thumb:hover {
    background: #0090c5;
}

.cg369-font-carousel {
    display: flex;
    gap: 15px;
    padding-bottom: 10px;
}

.cg369-font-carousel .cg369-font-option {
    flex: 0 0 calc(25% - 12px);
    min-width: 200px;
}

.cg369-font-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.cg369-font-option:hover {
    border-color: #00a7e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 167, 225, 0.2);
}

.cg369-font-option.selected {
    border-color: #e53935;
    border-width: 3px;
    background: #fff5f5;
}

.cg369-font-checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.cg369-font-option.selected .cg369-font-checkmark {
    display: flex;
}

.cg369-font-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.cg369-font-preview {
    margin-top: 10px;
}

.cg369-font-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.cg369-no-fonts {
    color: #999;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

.cg369-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #e0e0e0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
}

.cg369-carousel-btn:hover:not(:disabled) {
    background: #00a7e1;
    border-color: #00a7e1;
    color: #fff;
}

.cg369-carousel-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.cg369-carousel-prev {
    left: 0;
}

.cg369-carousel-next {
    right: 0;
}

.cg369-white-label-desc {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.cg369-design-notes-info {
    margin-top: 12px;
    padding: 12px 15px;
    background: #f0f8ff;
    border-left: 3px solid #00a7e1;
    border-radius: 4px;
}

.cg369-design-notes-info p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.cg369-design-notes-info p:last-child {
    margin-bottom: 0;
}

/* Color Picker */
.cg369-colors-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    overflow: visible;
    padding: 5px 10px 10px 10px;
    max-width: 900px;
}

.cg369-color-section {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    background: #fafafa;
    overflow: visible;
    max-width: 450px;
}

.cg369-color-section-header {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 1;
}

.cg369-color-section-title {
    flex: 1;
}

.cg369-color-section-header label {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 2px;
    display: block;
    cursor: pointer;
}

.cg369-color-section-header small {
    color: #666;
    font-size: 10px;
    display: block;
}

.cg369-collapse-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
}

.cg369-collapse-btn:hover {
    color: #00a7e1;
}

.cg369-collapse-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.cg369-color-section-header.collapsed .cg369-collapse-icon {
    transform: rotate(180deg);
}

.cg369-color-content {
    max-height: 2000px;
    overflow: visible;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease, padding-top 0.3s ease;
    opacity: 1;
    margin-top: 0;
    padding-top: 3px;
}

.cg369-color-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: -8px;
    padding-top: 0;
}

.cg369-color-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    margin-top: 6px;
    position: relative;
}

.cg369-color-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 3px;
    cursor: pointer;
    border: 1.5px solid #e0e0e0;
    transition: all 0.2s ease;
    position: relative;
}

.cg369-color-option:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-color: #333;
    z-index: 100;
}

.cg369-color-option:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 101;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cg369-color-option:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 101;
    pointer-events: none;
}

.cg369-color-option.selected {
    border: 3px solid #00a7e1 !important;
    box-shadow: 0 0 0 4px rgba(0, 167, 225, 0.4), 0 2px 8px rgba(0, 167, 225, 0.5);
    transform: scale(1.05);
    position: relative;
}

.cg369-color-option.selected::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 3px rgba(0, 0, 0, 0.8) !important;
    z-index: 10 !important;
    pointer-events: none !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    white-space: normal !important;
    bottom: auto !important;
    margin: 0 !important;
}

.cg369-color-option.selected::before {
    display: none !important;
}

/* Uploads Section */
.cg369-upload-formats {
    color: #666;
    font-size: 14px;
    margin: -10px 0 20px 0;
    padding: 0 10px;
}

.cg369-uploads-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.cg369-upload-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.cg369-upload-section-header h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.cg369-upload-section-header .cg369-optional {
    font-weight: normal;
    color: #666;
}

.cg369-upload-section-header p {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.cg369-upload-dropzone {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    background: #fafafa;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 200px;
}

.cg369-upload-dropzone:hover {
    border-color: #00a7e1;
    background: #f5f9fc;
}

.cg369-upload-dropzone.dragover {
    border-color: #00a7e1;
    background: #e3f2fd;
}

.cg369-dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.cg369-dropzone-label svg {
    color: #666;
    opacity: 0.6;
}

.cg369-dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cg369-dropzone-text strong {
    font-size: 15px;
    color: #333;
}

.cg369-dropzone-text span {
    font-size: 13px;
    color: #666;
}

.cg369-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.cg369-upload-dropzone:has(.cg369-upload-preview:not(:empty)) .cg369-dropzone-label {
    padding-bottom: 0;
}

.cg369-upload-dropzone .cg369-upload-preview:empty {
    display: none;
}

.cg369-upload-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.cg369-upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cg369-upload-preview-item .cg369-remove-upload {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 68, 68, 0.9);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cg369-upload-preview-item .cg369-remove-upload:hover {
    background: #ff0000;
}

/* File Upload (Legacy - if needed) */
.cg369-file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cg369-file-upload input[type="file"] {
    display: none;
}

.cg369-upload-label {
    padding: 10px 20px;
    background: #00a7e1;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.cg369-file-name {
    color: #666;
    font-size: 14px;
}

/* Sidebar */
.cg369-popup-sidebar {
    width: 380px;
    min-width: 380px;
    max-width: 380px;
    background: #ffffff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.cg369-sidebar-header {
    padding: 20px 20px 18px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cg369-sidebar-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}

.cg369-sidebar-toggle {
    background: #f5f5f5;
    border: none;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
}

.cg369-sidebar-toggle:hover {
    background: #e0e0e0;
    color: #333;
}

.cg369-popup-sidebar.cg369-sidebar-collapsed {
    width: 0;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    border-left: none;
    padding: 0;
}

.cg369-popup-sidebar.cg369-sidebar-collapsed .cg369-sidebar-header,
.cg369-popup-sidebar.cg369-sidebar-collapsed .cg369-selected-products,
.cg369-popup-sidebar.cg369-sidebar-collapsed .cg369-sidebar-footer {
    display: none;
}

.cg369-sidebar-toggle-show {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    color: white;
    border: none;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(229, 57, 53, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.cg369-sidebar-toggle-show:hover {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 24px rgba(229, 57, 53, 0.5);
}

.cg369-sidebar-toggle-show.cg369-visible {
    display: flex;
}

.cg369-sidebar-toggle-show::before {
    content: '🛒';
    position: absolute;
    font-size: 24px;
}

.cg369-sidebar-toggle-show span {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: #e53935;
    font-size: 12px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e53935;
}

.cg369-selected-products {
    flex: 1;
    padding: 20px 18px;
    overflow-y: auto;
    background: #fafafa;
    max-height: 500px;
}

.cg369-selected-products::-webkit-scrollbar {
    width: 6px;
}

.cg369-selected-products::-webkit-scrollbar-track {
    background: transparent;
}

.cg369-selected-products::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.cg369-selected-products::-webkit-scrollbar-thumb:hover {
    background: #00a7e1;
}

.cg369-empty-message {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 14px;
    background: #ffffff;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    margin: 0;
    font-weight: 500;
}

.cg369-selected-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.cg369-selected-item:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    border-color: #ccc;
}

.cg369-item-enter {
    animation: cg369-slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cg369-slideInRight {
    0% {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.cg369-item-removing {
    animation: cg369-slideOutRight 0.3s ease-out forwards;
}

@keyframes cg369-slideOutRight {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }
}

.cg369-selected-item-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cg369-selected-item-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #fafafa;
}

.cg369-selected-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.cg369-selected-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cg369-selected-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.cg369-selected-item-remove {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
    border-radius: 6px;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.cg369-selected-item-remove:hover {
    color: #ffffff;
    background: #ff4444;
    border-color: #ff4444;
    transform: scale(1.1);
}

.cg369-selected-item-remove:active {
    transform: scale(1.05);
}

.cg369-quantity-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.cg369-age-group-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cg369-age-group-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.cg369-age-group-options {
    display: inline-flex;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 2px;
    gap: 2px;
}

.cg369-age-group-option {
    position: relative;
    margin: 0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    border-radius: 3px;
    transition: background-color 0.15s ease, color 0.15s ease;
    user-select: none;
}

.cg369-age-group-option input.cg369-age-group-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.cg369-age-group-option:hover {
    color: #1a1a1a;
}

.cg369-age-group-option.active {
    background: #e63946;
    color: #fff;
}

.cg369-quantity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cg369-quantity-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    margin: 0;
}

.cg369-quantity-total {
    font-size: 12px;
    color: #333;
    font-weight: 600;
}

.cg369-total-qty {
    color: #e63946;
    font-weight: 700;
}

.cg369-size-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.cg369-size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.cg369-size-label {
    font-size: 10px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cg369-size-input {
    width: 100%;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #ffffff;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    outline: none;
    -moz-appearance: textfield;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.cg369-size-input::-webkit-outer-spin-button,
.cg369-size-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cg369-size-input:focus {
    border-color: #e63946;
    background: #fafafa;
}

.cg369-size-input.has-value {
    border-color: #e63946;
    background: #fff5f5;
}

.cg369-package-contents {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.cg369-package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cg369-edit-package {
    background: transparent;
    border: none;
    color: #00a7e1;
    cursor: pointer;
    font-size: 11px;
    text-decoration: none;
    font-weight: 600;
}

.cg369-edit-package:hover {
    text-decoration: underline;
}

/* Sidebar Footer */
.cg369-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

.cg369-quote-box {
    background: #ffffff;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cg369-quote-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.cg369-quote-box p {
    margin: 0 0 8px 0;
    line-height: 1.6;
    color: #666;
}

.cg369-quote-box p:last-child {
    margin-bottom: 0;
}

.cg369-quote-box a {
    color: #00a7e1;
    text-decoration: none;
    font-weight: 600;
}

.cg369-quote-box a:hover {
    text-decoration: underline;
}

.cg369-free-notice {
    font-weight: 600;
    color: #28a745;
    padding: 6px 10px;
    background: rgba(40, 167, 69, 0.08);
    border-radius: 6px;
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
}

.cg369-continue-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.cg369-continue-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    transition: left 0.3s ease;
    z-index: 0;
}

.cg369-continue-btn span {
    position: relative;
    z-index: 1;
}

.cg369-continue-btn:hover:not(:disabled)::before {
    left: 0;
}

.cg369-continue-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.45);
}

.cg369-continue-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(229, 57, 53, 0.3);
}

.cg369-continue-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}

.cg369-continue-btn:disabled::before {
    display: none;
}

/* Loading State */
.cg369-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    color: #666;
    gap: 15px;
    grid-column: 1 / -1;
    text-align: center;
    width: 100%;
}

.cg369-loading span {
    font-size: 15px;
    font-weight: 500;
}

.cg369-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00a7e1;
    border-radius: 50%;
    animation: cg369-spin 0.8s linear infinite;
}

@keyframes cg369-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1200px) {
    .cg369-popup-filters {
        width: 240px;
    }

    .cg369-popup-sidebar {
        width: 320px;
        min-width: 320px;
        max-width: 320px;
    }
}

@media (max-width: 992px) {
    .cg369-popup-content {
        flex-direction: column;
    }

    .cg369-popup-filters {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 15px;
        max-height: 200px;
    }

    .cg369-popup-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .cg369-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .cg369-form-row {
        grid-template-columns: 1fr;
    }

    .cg369-colors-container {
        grid-template-columns: 1fr;
    }

    .cg369-uploads-container {
        grid-template-columns: 1fr;
    }

    .cg369-font-carousel .cg369-font-option {
        flex: 0 0 calc(33.333% - 10px);
        min-width: 180px;
    }

    .cg369-font-carousel-wrapper {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .cg369-popup-overlay {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cg369-popup-container {
        width: 100%;
        min-height: 100vh;
        height: auto;
    }

    .cg369-popup-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 15px;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .cg369-popup-logo {
        font-size: 15px;
        order: 1;
        flex: 1;
    }

    .cg369-popup-close {
        order: 3;
        position: relative;
        top: auto;
        right: auto;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .cg369-popup-help {
        order: 2;
        font-size: 11px;
        width: 100%;
        text-align: left;
    }

    .cg369-popup-help span {
        display: block;
        margin-bottom: 3px;
    }

    .cg369-step-indicator {
        gap: 40px;
        padding: 12px 10px;
        position: sticky;
        top: 70px;
        z-index: 99;
        background: #f9f9f9;
    }

    .cg369-step {
        padding: 0;
        gap: 5px;
        min-width: 50px;
    }

    .cg369-step:not(:last-child)::after {
        width: 60px;
        left: 50%;
        top: 14px;
        transform: translateX(12px);
    }

    .cg369-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .cg369-step-label {
        font-size: 10px;
        line-height: 1.2;
        margin-top: 2px;
    }

    .cg369-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cg369-product-card {
        padding: 12px;
    }

    .cg369-product-image {
        height: 180px;
    }

    .cg369-popup-main {
        padding: 15px;
    }

    .cg369-step-content h2 {
        font-size: 22px;
    }

    .cg369-step-2 {
        padding: 0 5px;
    }

    .cg369-step-2 h2,
    .cg369-step-2 .cg369-step-description,
    .cg369-step-2 .cg369-form-group,
    .cg369-step-2 h3 {
        padding: 0 5px;
    }

    .cg369-popup-filters {
        max-height: none;
        padding: 12px;
        position: static;
    }

    .cg369-filter-list {
        max-height: none;
    }

    .cg369-filter-item {
        padding: 10px 12px;
        font-size: 14px;
    }

    .cg369-selected-products {
        max-height: none;
        padding: 15px;
    }

    .cg369-popup-sidebar {
        position: relative;
        right: auto;
        top: auto;
        height: auto;
        z-index: 1;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        transition: none;
        border-top: 2px solid #e0e0e0;
    }

    .cg369-popup-sidebar.cg369-sidebar-collapsed {
        display: none;
    }

    .cg369-sidebar-toggle-show {
        bottom: 80px;
        right: 16px;
        top: auto;
        transform: none;
        width: 60px;
        height: 60px;
        font-size: 18px;
    }

    .cg369-sidebar-toggle-show:hover {
        transform: scale(1.05);
    }

    .cg369-color-picker {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
    }

    .cg369-color-option {
        aspect-ratio: 1;
        min-height: 40px;
    }

    /* Larger tap targets for mobile */
    .cg369-form-group input,
    .cg369-form-group textarea,
    .cg369-form-group select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 44px;
        padding: 12px;
    }

    .cg369-country-select {
        font-size: 14px !important;
        width: 180px !important;
        min-width: 180px;
        max-width: 180px;
    }

    .cg369-upload-dropzone {
        padding: 25px 15px;
        min-height: 160px;
    }

    .cg369-upload-section {
        padding: 15px;
    }

    .cg369-continue-btn {
        padding: 16px;
        font-size: 15px;
        min-height: 50px;
    }

    .cg369-login-banner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 15px;
    }

    .cg369-login-btn {
        width: 100%;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .cg369-popup-container {
        width: 100%;
        min-height: 100vh;
        height: auto;
    }

    .cg369-popup-header {
        padding: 10px 12px;
    }

    .cg369-popup-logo {
        font-size: 14px;
    }

    .cg369-popup-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .cg369-popup-help {
        font-size: 10px;
    }

    .cg369-step-indicator {
        gap: 25px;
        padding: 10px 5px;
    }

    .cg369-step {
        min-width: 40px;
    }

    .cg369-step:not(:last-child)::after {
        width: 45px;
        transform: translateX(10px);
    }

    .cg369-step-number {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .cg369-step-label {
        font-size: 9px;
    }

    .cg369-popup-main {
        padding: 12px;
    }

    .cg369-step-content h2 {
        font-size: 20px;
    }

    .cg369-step-description {
        font-size: 13px;
    }

    .cg369-step-2 {
        padding: 0;
    }

    .cg369-step-2 h2,
    .cg369-step-2 .cg369-step-description,
    .cg369-step-2 .cg369-form-group,
    .cg369-step-2 h3 {
        padding: 0;
    }

    .cg369-popup-filters {
        padding: 10px;
    }

    .cg369-filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cg369-filter-item {
        padding: 12px;
        font-size: 15px;
    }

    .cg369-popup-sidebar {
        padding: 12px;
    }

    .cg369-sidebar-header {
        padding: 15px 12px;
    }

    .cg369-sidebar-header h3 {
        font-size: 16px;
    }

    .cg369-selected-products {
        padding: 12px;
    }

    .cg369-sidebar-footer {
        padding: 15px 12px;
    }

    .cg369-color-picker {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .cg369-color-option {
        min-height: 35px;
    }

    .cg369-color-section {
        padding: 10px;
    }

    .cg369-phone-input {
        flex-direction: column;
        gap: 10px;
    }

    .cg369-country-select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100%;
    }

    .cg369-phone-input input[type="tel"] {
        width: 100%;
    }

    .cg369-form-group input,
    .cg369-form-group textarea,
    .cg369-form-group select {
        font-size: 16px !important;
        padding: 14px 12px;
    }

    .cg369-upload-dropzone {
        padding: 20px 10px;
        min-height: 140px;
    }

    .cg369-dropzone-label svg {
        width: 32px;
        height: 32px;
    }

    .cg369-dropzone-text strong {
        font-size: 14px;
    }

    .cg369-dropzone-text span {
        font-size: 12px;
    }

    .cg369-upload-section {
        padding: 12px;
    }

    .cg369-upload-section-header h4 {
        font-size: 15px;
    }

    .cg369-upload-section-header p {
        font-size: 12px;
    }

    .cg369-font-carousel {
        gap: 8px;
    }

    .cg369-font-carousel .cg369-font-option {
        flex: 0 0 calc(100%);
        min-width: 140px;
    }

    .cg369-font-carousel-wrapper {
        padding: 0 32px;
    }

    .cg369-font-option {
        padding: 12px 8px;
    }

    .cg369-font-name {
        font-size: 12px;
    }

    .cg369-carousel-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .cg369-design-spec-section {
        margin-bottom: 15px;
    }

    .cg369-spec-header {
        padding: 12px 12px;
    }

    .cg369-spec-title span {
        font-size: 14px;
    }

    .cg369-spec-content {
        padding: 12px;
    }

    .cg369-checkbox-label {
        font-size: 14px;
    }

    .cg369-product-card {
        padding: 10px;
    }

    .cg369-product-image {
        height: 160px;
    }

    .cg369-product-title {
        font-size: 13px;
    }

    .cg369-product-price {
        font-size: 15px;
    }

    .cg369-product-design-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .cg369-search-bar input {
        font-size: 16px !important;
    }

    .cg369-continue-btn {
        font-size: 14px;
        padding: 15px;
    }

    .cg369-quote-box {
        padding: 12px;
        font-size: 12px;
    }

    .cg369-quote-box h4 {
        font-size: 13px;
    }

    .cg369-selected-item-title {
        font-size: 13px;
    }

    .cg369-sidebar-toggle-show {
        width: 56px;
        height: 56px;
        bottom: 75px;
        right: 15px;
    }
}

/* Mobile Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Better touch targets for mobile devices */
    .cg369-filter-item,
    .cg369-product-card,
    .cg369-color-option,
    .cg369-font-option,
    button,
    .cg369-step {
        -webkit-tap-highlight-color: rgba(0, 167, 225, 0.2);
    }

    /* Disable hover effects on touch devices */
    .cg369-filter-item:hover,
    .cg369-product-card:hover,
    .cg369-color-option:hover {
        transform: none;
    }

    /* Larger tap target for checkboxes */
    .cg369-checkbox-custom {
        width: 28px;
        height: 28px;
    }

    /* Easier to tap size inputs on touch */
    .cg369-size-input {
        height: 34px;
        font-size: 14px;
    }

    .cg369-size-label {
        font-size: 11px;
    }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .cg369-popup-header {
        padding: 8px 12px;
    }

    .cg369-step-indicator {
        padding: 8px 10px;
    }

    .cg369-step-number {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .cg369-step-label {
        font-size: 9px;
    }

    .cg369-popup-main {
        padding: 10px;
    }

    .cg369-step-content h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .cg369-step-description {
        font-size: 12px;
        margin-bottom: 15px;
    }
}

/* Success Modal */
.cg369-success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cg369-fadeIn 0.3s ease;
}

@keyframes cg369-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cg369-success-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 35px 40px 30px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: cg369-slideUp 0.4s ease;
    position: relative;
}

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

.cg369-success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
}

.cg369-success-icon svg {
    width: 100%;
    height: 100%;
}

.cg369-success-circle {
    stroke: #4caf50;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: cg369-checkCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes cg369-checkCircle {
    to {
        stroke-dashoffset: 0;
    }
}

.cg369-success-check {
    stroke: #4caf50;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: cg369-checkMark 0.3s 0.4s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes cg369-checkMark {
    to {
        stroke-dashoffset: 0;
    }
}

.cg369-success-title {
    font-size: 28px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 12px;
    line-height: 1.2;
}

.cg369-success-message {
    font-size: 15px;
    color: #666666;
    margin: 0 0 6px;
    line-height: 1.4;
}

.cg369-success-submessage {
    font-size: 14px;
    color: #999999;
    margin: 0 0 25px;
    line-height: 1.4;
}

.cg369-success-close-btn {
    background: #4caf50;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 50px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cg369-success-close-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.cg369-success-close-btn:active {
    transform: translateY(0);
}
