/* ── WC Engraving Configurator — Frontend Styles ──────────────────────────── */

.wce-configurator {
    margin: 28px 0;
    padding: 28px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #fafafa;
    font-family: inherit;
}

.wce-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wce-title-icon {
    color: #b5952a;
    font-size: 1rem;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.wce-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 768px) {
    .wce-grid { grid-template-columns: 1fr; }
}

/* ── Field groups ────────────────────────────────────────────────────────────── */
.wce-field-group {
    margin-bottom: 22px;
}

.wce-label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    margin-bottom: 10px;
}

/* ── Material options ─────────────────────────────────────────────────────────── */
.wce-material-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.wce-material-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fff;
}

.wce-material-option:hover {
    border-color: #b5952a;
    background: #fdf8ee;
}

.wce-material-option input[type="radio"] {
    display: none;
}

.wce-material-option:has(input:checked) {
    border-color: #b5952a;
    background: #fdf8ee;
    box-shadow: 0 0 0 2px rgba(181,149,42,0.18);
}

.wce-material-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.wce-material-name {
    font-size: 0.85rem;
    font-weight: 500;
    flex: 1;
    color: #2a2a2a;
}

.wce-material-price {
    font-size: 0.78rem;
    color: #888;
}

/* ── Select ────────────────────────────────────────────────────────────────── */
.wce-select {
    width: 100%;
    padding: 9px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
    color: #2a2a2a;
    transition: border-color 0.2s;
}
.wce-select:focus {
    outline: none;
    border-color: #b5952a;
}

/* ── Custom size ─────────────────────────────────────────────────────────────── */
.wce-custom-size {
    margin-top: 12px;
    padding: 14px;
    background: #f0f0f0;
    border-radius: 6px;
}

.wce-size-inputs {
    display: flex;
    gap: 16px;
}

.wce-size-inputs label {
    font-size: 0.82rem;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wce-input-sm {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 90px;
}

/* ── Font list ────────────────────────────────────────────────────────────── */
.wce-font-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wce-font-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s;
}

.wce-font-option:hover,
.wce-font-option:has(input:checked) {
    border-color: #b5952a;
    background: #fdf8ee;
}

.wce-font-option input { display: none; }

.wce-font-preview {
    font-size: 1.4rem;
    width: 36px;
    text-align: center;
    color: #333;
}

.wce-font-name {
    font-size: 0.85rem;
    color: #444;
}

/* ── Textarea ─────────────────────────────────────────────────────────────── */
.wce-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s;
    font-family: inherit;
}

.wce-textarea:focus {
    outline: none;
    border-color: #b5952a;
}

.wce-char-count {
    font-size: 0.78rem;
    color: #999;
    margin: 4px 0 0;
    text-align: right;
}

/* ── Fixing list ─────────────────────────────────────────────────────────── */
.wce-fixing-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wce-fixing-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s;
}

.wce-fixing-option:hover,
.wce-fixing-option:has(input:checked) {
    border-color: #b5952a;
    background: #fdf8ee;
}

.wce-fixing-option input { display: none; }

.wce-fixing-name {
    flex: 1;
    font-size: 0.88rem;
    color: #2a2a2a;
}

.wce-fixing-price {
    font-size: 0.8rem;
    color: #888;
}

/* ── Preview panel ───────────────────────────────────────────────────────── */
.wce-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
}

.wce-preview-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #888;
}

.wce-preview-stage {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#wce_canvas {
    width: 100%;
    max-width: 480px;
    height: auto;
    display: block;
    border-radius: 4px;
}

.wce-preview-hint {
    font-size: 0.72rem;
    color: #666;
    letter-spacing: 0.04em;
}

/* ── Price display ───────────────────────────────────────────────────────── */
.wce-price-display {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 14px 18px;
    background: #1a1a1a;
    border-radius: 8px;
    color: #fff;
}

.wce-price-label {
    font-size: 0.85rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wce-price-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #e8c84a;
    letter-spacing: -0.01em;
}

.wce-price-breakdown {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.7;
    padding: 0 2px;
}

.wce-quantity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.wce-quantity-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.wce-cart-form .single_add_to_cart_button {
    width: 100%;
}
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #856404;
}
