/* WooCommerce Etiquetas Personalizadas - Premium Aesthetics */

:root {
    --brand-primary: #8B5CF6;
    --brand-secondary: #D946EF;
    --brand-accent: #3B82F6;
    --bg-main: #FFFFFF;
    --bg-soft: #F8FAFC;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --grid-color: rgba(226, 232, 240, 0.4);
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&family=Outfit:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

.wc-ep-customizer {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-strong);
    font-family: 'Poppins', sans-serif;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.wc-ep-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Multi-Etiqueta Slot Selector */
.wc-ep-slot-selector-container {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.wc-ep-slot-selector-container p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.wc-ep-slot-grid {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.wc-ep-slot-item {
    flex: 1;
    max-width: 120px;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
    position: relative;
    box-shadow: none;
}

.wc-ep-slot-item:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: #f5f3ff;
}

.wc-ep-slot-item.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
    transform: none;
}

.wc-ep-slot-item::after {
    display: none;
}

/* Stepper Navigation */
.wc-ep-steps {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.wc-ep-steps .step {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.wc-ep-steps .step.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 8px 15px rgba(139, 92, 246, 0.3);
}

/* Canvas Preview Area */
.wc-ep-preview-area {
    background-color: #f8fafc;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 1.5rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    width: 100%;
}
 
/* Grid for 4 Etiquetas (v3.0.0) */
.wc-ep-grid-container {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 500px; /* Limit size as requested */
    margin: 0 auto;
}

.wc-ep-bg-cat-title {
    text-align: center;
    background: #fdf2f8;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #fbcfe8;
}
 
.wc-ep-canvas-slot {
    display: block;
    overflow: visible;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-soft);
    position: relative;
}
 
.wc-ep-canvas-slot .canvas-container {
    border-radius: 0.75rem;
    overflow: hidden;
}
 
.wc-ep-canvas-slot canvas {
    display: block;
    border-radius: 0.75rem;
}

.wc-ep-preview-area::after {
    content: 'PREVIEW AO VIVO';
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.wc-ep-preview-area canvas {
    image-rendering: auto;
}

#wc-ep-canvas {
    border-radius: 0.75rem;
    box-shadow: var(--shadow-strong);
    transition: transform 0.3s ease;
    max-width: 100%;
}

/* Shape Variations */
.is-round .canvas-container,
.is-round .canvas-container canvas {
    border-radius: 50% !important;
}

.is-round .wc-ep-preview-area,
.is-square .wc-ep-preview-area {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    min-height: auto;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.canvas-container {
    margin: 0 auto !important;
    max-width: none !important;
}

#wc-ep-canvas {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Control Grids */
.wc-ep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Background Set Items (v3.0.0) */
.wc-ep-bg-set-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 0.75rem 0.75rem 0 0;
}

.wc-ep-bg-set-item.active {
    border-color: var(--brand-primary);
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.wc-ep-bg-set-item.active img {
    border-bottom: 2px solid var(--brand-primary);
}

/* Background Theme Items with Legends (v3.9.8) */
.wc-ep-bg-cor-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.wc-ep-bg-cor-item:hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

.wc-ep-bg-cor-item.active {
    border-color: var(--brand-primary);
    background: #f5f3ff;
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.15);
}

.wc-ep-bg-cor-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.wc-ep-bg-item-legend {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.65rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    max-width: 80px;
}

.wc-ep-theme-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: #334155;
}

/* Square theme items for square products */
.is-square-grid .wc-ep-theme-item {
    aspect-ratio: 1/1;
}

.wc-ep-theme-item.active {
    border-color: var(--brand-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
}

.wc-ep-color-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

/* Explicit fallback border for white color so it's always clearly visible */
.wc-ep-color-item[data-color="#ffffff"], 
.wc-ep-color-item[data-color="#FFFFFF"],
.wc-ep-color-item[data-color="white"] {
    border-color: #cbd5e1 !important;
}

.wc-ep-color-item.active {
    transform: scale(1.2);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 2px var(--brand-primary);
}

/* Form Styles */
.wc-ep-text-field {
    width: 100%;
    padding: 1.1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    background: #fff;
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.wc-ep-text-field:focus {
    background: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    outline: none;
}

select.wc-ep-text-field {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    background-color: #fff !important;
    color: var(--text-main) !important;
    cursor: pointer;
    height: 56px;
}

/* Layout Selector */
.wc-ep-layout-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--bg-soft);
    padding: 6px;
    border-radius: 12px;
}

.layout-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.layout-btn.active {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Font Selector */
.fonts-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.font-option-btn {
    border: 2px solid var(--border-color);
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-align: center;
}

.font-option-btn.active {
    border-color: var(--brand-primary);
    background: #f5f3ff;
    color: var(--brand-primary);
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.2);
}

/* Category Tabs (Icons & Backgrounds) */
.wc-ep-category-tabs {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.wc-ep-category-tabs::-webkit-scrollbar {
    height: 4px;
}

.category-tab, .bg-category-tab {
    white-space: nowrap;
    border: 1px solid var(--border-color);
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.category-tab.active, .bg-category-tab.active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

/* Navigation Buttons */
.wc-ep-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.wc-ep-navigation button {
    flex: 1;
    padding: 1rem;
    border-radius: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
}

#wc-ep-prev {
    background: var(--bg-soft);
    color: var(--text-main);
}

#wc-ep-prev:hover:not(:disabled) {
    background: var(--border-color);
}

#wc-ep-next {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.39);
}

#wc-ep-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

/* Variation Cards (Quantity Packs) */
.wc-ep-variations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

/* ===== Variation Cards — New Block Design ===== */
.wc-ep-variation-card {
    border-radius: 1.25rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
}

/* Qty block: Gradient or subtle solid background */
.wc-ep-variation-card .v-qty-block {
    background: #5d5fef;
    /* Purple base */
    color: #fff;
    padding: 1.2rem 1rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    font-family: 'Outfit', 'Inter', sans-serif;
    line-height: 1.2;
    word-break: break-word;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Price block: Contrasting but elegant orange */
.wc-ep-variation-card .v-price-block {
    background: #ff8c42;
    color: #ffffff !important;
    padding: 1rem 0.5rem;
    text-align: center;
    font-size: 1.85rem;
    /* Even bigger as requested */
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

/* Force white on ALL WooCommerce price children */
.wc-ep-variation-card .v-price-block *,
.wc-ep-variation-card .v-price-block .woocommerce-Price-amount,
.wc-ep-variation-card .v-price-block .woocommerce-Price-amount *,
.wc-ep-variation-card .v-price-block .woocommerce-Price-currencySymbol,
.wc-ep-variation-card .v-price-block ins,
.wc-ep-variation-card .v-price-block bdi {
    color: #ffffff !important;
    text-decoration: none !important;
}

.wc-ep-variation-card .v-price-block del,
.wc-ep-variation-card .v-price-block del * {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Specific card colors for variety */
.wc-ep-variation-card:nth-child(1) .v-qty-block {
    background: #5d5fef;
}

.wc-ep-variation-card:nth-child(2) .v-qty-block {
    background: #8b5cf6;
}

.wc-ep-variation-card:nth-child(3) .v-qty-block {
    background: #0ea5e9;
}

.wc-ep-variation-card:nth-child(4) .v-qty-block {
    background: #10b981;
}

/* Active/selected state with premium glow */
.wc-ep-variation-card.wc-ep-card-active {
    border-color: #ec4899;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.25);
}

/* Hover state */
.wc-ep-variation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* Confirmation Check */
.wc-ep-confirm-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ecfdf5;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

/* Modals */
.wc-ep-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.wc-ep-modal.active {
    display: flex;
}

.wc-ep-modal-content {
    background: #fff;
    border-radius: 2rem;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Loading Modal Specifics */
.loading-content h3 {
    font-family: 'Outfit', sans-serif;
    color: #10b981;
    margin-bottom: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.progress-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.3s;
}

/* Framing Modal Specifics */
.framing-content {
    background: #fff;
    color: var(--text-main);
    max-width: 600px;
    border: 1px solid var(--border-color);
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
    color: var(--text-main);
}

.framing-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.crop-container {
    position: relative;
    background: #fff;
    border-radius: 50%;
    overflow: hidden;
    width: 300px;
    height: 300px;
    border: 8px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.framing-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pan-grid {
    display: grid;
    grid-template-areas:
        ". up ."
        "left . right"
        ". down .";
    gap: 8px;
}

.zoom-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.frame-ctrl.up {
    grid-area: up;
}

.frame-ctrl.left {
    grid-area: left;
}

.frame-ctrl.right {
    grid-area: right;
}

.frame-ctrl.down {
    grid-area: down;
}

.frame-ctrl.zoom-in {
    grid-area: zoomIn;
}

.frame-ctrl.zoom-out {
    grid-area: zoomOut;
}

.frame-ctrl {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--brand-primary);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0px #6d28d9;
}

.frame-ctrl:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0px #6d28d9;
}

.frame-ctrl:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.framing-workspace {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

@media (max-width: 640px) {
    .framing-workspace {
        flex-direction: column;
        gap: 20px;
    }
}

.zoom-ctrls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Warning Box */
.low-quality-warning {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    background: rgba(250, 204, 21, 0.95);
    padding: 1.5rem;
    border-radius: 1rem;
    color: #854d0e;
    z-index: 10;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.warning-box strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 5px;
}

.warning-box p {
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

/* Text inputs polish */
.wc-ep-text-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.wc-ep-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.wc-ep-input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    margin-left: 2px;
}

.wc-ep-text-field {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 1.5rem;
    border: 2px solid #e5e7eb;
    background: #fff;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1f2937;
    outline: none;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.wc-ep-text-field:focus {
    border-color: #5d5fef;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(93, 95, 239, 0.1);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-footer button {
    flex: 1;
    padding: 1rem;
    border-radius: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.btn-secondary {
    background: #fff;
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary) !important;
    border-bottom: 4px solid var(--brand-primary) !important;
}

.btn-secondary:active {
    transform: translateY(2px);
    border-bottom-width: 2px !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: #fff;
    border-bottom: 4px solid #be185d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* ===== Premium Buy Button (inline, inside the plugin) ===== */
.wc-ep-buy-btn {
    display: none;
    /* Controlled by JS fadeIn/fadeOut */
    width: 100% !important;
    margin: 2rem auto !important;
    padding: 1.25rem !important;
    background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%) !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    border: none !important;
    border-radius: 1.25rem !important;
    cursor: pointer !important;
    justify-content: center !important;
    align-items: center !important;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.3) !important;
    transition: all 0.3s ease !important;
}

.wc-ep-buy-btn.wc-ep-visible {
    display: flex !important;
}

.wc-ep-buy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(217, 70, 239, 0.5);
}

.wc-ep-buy-btn .btn-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Photo Upload Styles */
.wc-ep-photo-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    border: 3px dashed var(--border-color);
    border-radius: 2rem;
    background: #fff;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.wc-ep-photo-upload-zone:hover {
    border-color: var(--brand-primary);
    background: #f5f3ff;
}

.wc-ep-upload-btn,
.wc-ep-upload-btn span,
.wc-ep-upload-btn i {
    color: #ffffff !important;
    text-decoration: none !important;
}

.wc-ep-upload-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    padding: 1.25rem 3rem;
    border-radius: 1.5rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.15rem;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wc-ep-upload-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
}

.upload-icon {
    font-size: 1.5rem;
}

/* Always hide the standard WooCommerce footer Add to Cart button */
.single-product .cart .button.alt,
.single-product .cart .single_add_to_cart_button {
    display: none !important;
}

/* Hide Quantity Selector */
.variations_form .quantity,
.variations_form .qty,
.single-product .quantity {
    display: none !important;
}

@media (max-width: 640px) {
    .wc-ep-customizer {
        padding: 1.5rem 1rem;
        border-radius: 1.5rem;
        width: 100%;
        max-width: 100vw;
    }

    .wc-ep-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        text-align: center;
        line-height: 1.2;
    }

    .wc-ep-steps {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .wc-ep-steps .step {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .wc-ep-preview-area {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1.5rem;
        border-radius: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Keep Fabric container scaled via transforms, not max-width */
    .wc-ep-canvas-slot {
        max-width: 100%;
    }

    .canvas-container {
        transform: scale(0.85);
        transform-origin: center center;
    }

    .is-round .canvas-container,
    .is-square .canvas-container {
        transform: scale(0.7);
    }

    .wc-ep-preview-area::after {
        font-size: 10px;
        top: 5px;
        right: 10px;
    }

    .wc-ep-navigation {
        margin-top: 1.5rem;
        flex-direction: column-reverse;
    }

    .wc-ep-navigation button {
        padding: 0.875rem;
    }

    .wc-ep-variation-card .v-qty-block {
        font-size: 1.1rem;
        padding: 0.875rem 0.5rem;
    }

    .wc-ep-variation-card .v-price-block {
        font-size: 1.5rem;
        padding: 0.75rem 0.5rem;
    }

    .wc-ep-buy-btn {
        margin: 1.5rem auto !important;
        font-size: 1rem !important;
    }

    .wc-ep-photo-upload-zone {
        padding: 1.5rem;
    }

    .wc-ep-upload-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
    }

    .wc-ep-variations-grid {
        grid-template-columns: 1fr;
        /* Full width cards on mobile */
    }

    .wc-ep-modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .crop-container {
        width: 220px;
        height: 220px;
    }
}

/* Step panels hidden — use high specificity + !important to beat theme overrides */
.wc-ep-customizer .wc-ep-step-content {
    display: none !important;
    animation: fadeIn 0.4s ease forwards;
}

/* Active step shown — JS also sets inline style as a second layer of guarantee */
.wc-ep-customizer .wc-ep-step-content.wc-ep-active {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake-animation {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }
}

.shake-animation {
    animation: shake-animation 0.4s ease-in-out !important;
    border: 2px solid #ef4444 !important;
    background-color: #fef2f2 !important;
}

/* Hide standard WooCommerce elements when customizer is active */
.wc-ep-customizer ~ p.price,
.wc-ep-customizer ~ .woocommerce-product-gallery,
.wc-ep-customizer ~ .variations_form,
.wc-ep-customizer ~ .single_variation_wrap {
    display: none !important;
}

/* Specific theme overrides if they don't use standard classes */
.single-product div.product form.variations_form,
.single-product div.product .woocommerce-product-gallery {
    display: none !important;
}