/* ===== E-commerce Page ===== */
.page-ecommerce { animation: fadeIn 0.4s ease; }

.tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    min-height: 40px;
    cursor: text;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 14px;
    background: rgba(233,30,99,0.12);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
}

.tag-remove {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
}
.tag-remove:hover { opacity: 1; }

.tags-input input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    min-width: 80px;
    font-size: 13px;
    color: var(--text-primary);
}

/* Product detail preview */
.ecommerce-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 750px;
}

.ecom-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    cursor: pointer;
}

.ecom-card:hover {
    box-shadow: var(--shadow);
}

.ecom-image {
    height: 300px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.ecom-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-input);
    cursor: zoom-in;
    display: block;
}

.ecom-label {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ecom-label span:first-child { font-weight: 550; }

.ecom-actions {
    display: flex;
    gap: 6px;
}

.ecom-card.pending {
    border-style: dashed;
}

.ecom-card.pending .ecom-image {
    background: linear-gradient(110deg, var(--bg-input) 20%, rgba(255,255,255,0.05) 40%, var(--bg-input) 60%);
    background-size: 200% 100%;
    animation: ecomShimmer 1.2s linear infinite;
}

.ecom-generating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ecom-gen-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ecomSpin 0.8s linear infinite;
}

.ecom-gen-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.ecom-failed {
    font-size: 12px;
    color: var(--text-muted);
}

@keyframes ecomSpin {
    to { transform: rotate(360deg); }
}

@keyframes ecomShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Regenerate confirmation overlay */
.ecom-regen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ecom-regen-overlay.active {
    opacity: 1;
}

.ecom-regen-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px 28px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ecom-regen-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.ecom-regen-msg {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.ecom-regen-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
