.shoe-customizer-wrapper2 {
    position: fixed;
    z-index: 999;
    background: #fff;
    left: 0;
    top: 110px;
    width: 100vw;
    height: 100vh;
    border: 1px solid #000;
}

.shoe-customizer-wrapper h4 {
    font-size: 15px;
    margin-bottom: 5px;
    font-weight: 400;
}

.shoe-customizer-wrapper .shoe-customizer {
    margin: 30px 0;
}

.shoe-customizer-wrapper.active .shoe-customizer {
    border: 1px solid #ddd;
}

.shoe-customizer-wrapper .customizer-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
    font-family: var(--ai-theme-font-2);
    font-weight: 700;
    font-size: 16px;
    font-style: italic;
    padding: 10px;
    background-color: #eaf9aa;
}

.shoe-customizer-wrapper .customizer-button.active {
    padding: 10px;
}

.shoe-customizer-wrapper .customizer-button:hover {
}

.shoe-customizer-wrapper .customizer-button .arrow-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.shoe-customizer-wrapper .customizer-button .arrow-icon.rotated {
    transform: rotate(90deg);
}

.shoe-customizer-wrapper .customizer-container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    will-change: transform, opacity;
    transform: translateZ(0);
    transform: scaleY(0);
    transform-origin: top;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    padding: 0 20px 20px 20px;
}

.shoe-customizer-wrapper .customizer-container.active {
    max-height: 1500px;
    transform: scaleY(1);
    opacity: 1;
    overflow: visible;
}

.shoe-customizer-wrapper .shoe-preview {
    flex: 1;
    min-width: 300px;
    text-align: center;
    position: relative;
}

.shoe-customizer-wrapper .shoe-preview .shoe-template {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.shoe-customizer-wrapper .controls {
    flex: 1;
    min-width: 300px;
}

.shoe-customizer-wrapper .parts,
.shoe-customizer-wrapper .bottom-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.shoe-customizer-wrapper .part-btn,
.shoe-customizer-wrapper .bottom-option {
    padding: 5px 10px;
    background: #fff;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.shoe-customizer-wrapper .part-btn.active,
.shoe-customizer-wrapper .bottom-option.active {
    background: #333;
    color: white;
    border-color: #333;
}

.shoe-customizer-wrapper .color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.shoe-customizer-wrapper .color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.shoe-customizer-wrapper .color-option:hover {
    transform: scale(1.2);
    border-color: #333;
}

.shoe-customizer-wrapper .color-option.selected {
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.3);
}

.shoe-customizer-wrapper .custom-color {
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shoe-customizer-wrapper .interaction-dot {
    position: absolute;
    z-index: 10;
    width: 14px;
    height: 14px;
    cursor: pointer;
    border-radius: 50%;
    background-color: #fff;
}

.shoe-customizer-wrapper .interaction-dot-hide {
    display: none;
}

.shoe-customizer-wrapper .interaction-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.5);
    background: #eaf9aa;
    animation: pulse 1.5s infinite;
    box-sizing: border-box;
}

.shoe-customizer-wrapper .interaction-dot::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 7px;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

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

.shoe-customizer-wrapper .dot-toe {
    top: 55%;
    left: 13%;
}

.shoe-customizer-wrapper .dot-laces {
    top: 40%;
    left: 40%;
}

.shoe-customizer-wrapper .dot-logo {
    top: 46%;
    left: 56%;
}

.shoe-customizer-wrapper .dot-upper {
    top: 50%;
    left: 45%;
}

.shoe-customizer-wrapper .dot-side-panel {
    top: 52%;
    right: 30%;
}

.shoe-customizer-wrapper .dot-tongue-pad-1 {
    top: 37%;
    left: 56%;
}

.shoe-customizer-wrapper .dot-lace-stay {
    top: 49%;
    left: 23%;
}

.shoe-customizer-wrapper .dot-heel-counter {
    top: 38%;
    right: 13%;
}

.shoe-customizer-wrapper .dot-heel-tpu {
    top: 53%;
    right: 10%;
}

.shoe-customizer-wrapper .shoe-preview-toggle {
    position: absolute;
    z-index: 15;
    right: 10px;
    bottom: 30px;
    width: 65px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shoe-customizer-wrapper .shoe-preview-toggle svg {
    fill: rgba(0, 0, 0, 0.5);
}

.shoe-customizer-wrapper .shoe-preview-toggle.active svg {
    fill: rgba(0, 0, 0, 1);
}
        
#custom-color-picker {
    width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

#apply-custom-color {
    padding: 5px 10px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px;
}

#design-summary {
    list-style: none;
    padding: 0;
}

#design-summary li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.cart-custom-color-block {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 1px solid #ddd;
    vertical-align: middle;
    margin-right: 5px;
}

.shoe-design-thumbnail {
    max-width: 150px;
    height: auto;
    vertical-align: middle;
    margin-right: 10px;
    border: 1px solid #ddd;
}

.shoe-design-badge {
    display: inline-block;
    background: #eaf9aa;
    color: #000;
    padding: 0 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
    margin-right: 8px;
    vertical-align: middle;
}

.xlwcty_wrap .xlwcty_order_details_2_col .xlwcty_pro_list .xlwcty_leftDiv .xlwcty_p_name .xlwcty_info:not(:empty) {
    margin-top: 20px;
    border: 1px solid #ddd;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.02);
}

.modal {
	display: none;
}

.modal.is-open {
	display: block;
}

.modal__overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 9999;
}

.modal__container {
	background-color: #fff;
	padding: 30px;
	max-width: 90vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	overflow: hidden;
	box-sizing: border-box;
	border-radius: 8px;
	position: relative;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	display: inline-flex;
	flex-direction: column;
}

.modal__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.modal__title {
	margin: 0;
	font-size: 1rem;
	color: #000;
}

.modal__close {
	background: transparent;
	border: none;
	width: 32px;
	height: 32px;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.2s;
}

.modal__close:hover {
	background: #f5f5f5;
}

.modal__close svg {
	width: 20px;
	height: 20px;
	stroke: #666;
}

.modal__close:hover svg {
	stroke: #333;
}

.modal__content {
	text-align: center;
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 10px 0;
}

.modal-color-custom-order-checker .modal__container {
    width: 90%;
}

.modal-color-custom-order-checker .modal__content {
    align-items: flex-start;
}

.modal-color-custom-order-checker .modal-image {
    max-height: 90vh;
    border: none;
}

.modal-color-custom-order-checker .design-preview-info .design-info {
    
}

.modal-color-custom-order-checker .design-element {
    display: flex;
    gap: 15px;
    align-items: center;
}

.modal-color-custom-order-checker .design-element > div {
    width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-color-custom-order-checker .color-swatch {
    width: 20px!important;
    height: 20px;
    border: 1px solid #ddd;
}

#modal-design-image {
	max-width: 100%;
	max-height: 80vh;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.customization-agreement {
    margin-top: 15px;
}

#show-customization-details {
    text-decoration: underline;
    color: #000;
}

#modal-customization-details .modal__container {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
    
#modal-customization-details .modal__content {
    display: block;
    text-align: left;
    line-height: 1.6;
    padding: 20px;
    font-size: 15px;
}
    
#modal-customization-details .modal__content p {
    margin-bottom: 15px;
}
    
#modal-customization-details .modal__content strong {
    color: #e53935;
}

.customization-surcharge {
    margin-left: 5px;
}

.customization-surcharge, .customization-surcharge .woocommerce-Price-amount, .customization-surcharge .woocommerce-Price-currencySymbol {
    color: #e74c3c;
}

/* 加载状态样式 */
.ai-custom-designs-loading {
    padding: 50px;
    text-align: center;
    color: #888;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* 简单的转圈动画 */
.ai-custom-designs-loading::before {
    content: "";
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--ai-theme-color, #333); /* 优先使用主题色 */
    border-radius: 50%;
    animation: ai-spin 1s linear infinite;
}
/* 容器与网格 */
.ai-custom-designs-container { margin: 40px 0; min-height: 200px; }
.ai-custom-designs-container h2 { 
    position: relative;
    display: inline-block;
    font-size: 1.5rem;
    font-family: var(--ai-theme-font-2);
    margin-bottom: 46px;
}
.ai-custom-designs-container h2:before {
    position: absolute;
    top: 50%;
    left: 100%;
    margin-left: 20px;
    display: block;
    content: " ";
    width: 37px;
    height: 1px;
    background: currentColor;
    background: rgb(0 0 0 / .2);
}
.ai-custom-designs-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill,minmax(350px,1fr)); 
    gap: 20px; 
}

/* 卡片样式 */
.ai-custom-designs-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.ai-custom-designs-card:hover { transform: translateY(-5px); }

.ai-custom-designs-img-wrapper { height: 250px; cursor: zoom-in; overflow: hidden; padding: 20px; }
.ai-custom-designs-img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.5s; }

.ai-custom-designs-body { padding: 15px; font-size: 13px; }
.ai-custom-designs-tag { color: #2ecc71; font-size: 10px; font-weight: bold; text-transform: uppercase; display: block; margin-bottom: 8px; }
.ai-custom-designs-info { display: flex; justify-content: space-between; margin-bottom: 5px; color: #666; }
.ai-custom-designs-info b { color: #111; }

/* 灯箱弹窗样式 */
.ai-custom-designs-modal {
    display: none; position: fixed; z-index: 9999; padding-top: 50px;
    left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9);
}
.ai-custom-designs-modal-content {
    margin: auto; display: block; width: 80%; max-width: 800px;
    animation: ai-zoom 0.3s;border-radius: 15px;
}
@keyframes ai-zoom { from {transform:scale(0)} to {transform:scale(1)} }
.ai-custom-designs-close {
    position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer;
}

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


@media (max-width: 768px) {
    .ai-custom-designs-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .ai-custom-designs-modal-content { width: 95%; }
    .ai-custom-designs-img-wrapper { height: 180px; }
    .ai-custom-designs-modal { padding-top: 100px; }
}

@media (min-width: 769px) {
	.modal-color-custom-order-checker .design-preview-container {
        width: 100%;
        display: grid;
        grid-template-columns: 70% 1fr;
        gap: 25px;
        text-align: left;
    }
}

@media (max-width: 768px) {
	.modal__container {
		max-width: 95vw;
		max-height: 95vh;
		padding: 15px;
	}

	.modal__header {
		margin-bottom: 10px;
		padding-bottom: 10px;
	}

	.modal__title {
		font-size: 1.2rem;
	}
	
	.modal__content {
	    overflow-x: auto;
	    overflow-y: auto;
	}

	#modal-design-image {
		max-height: 85vh;
	}
	
    #modal-customization-details .modal__container {
        width: 95%;
        max-height: 90vh;
    }
    
}
