/* ============================================================
   Luxee Commerce Suite — Elementor Widget
   ============================================================
   CSS Defaults use the Luxee brand palette as fallback.
   Every visual property here CAN be overridden by Elementor
   controls via {{WRAPPER}} selectors (higher specificity).
   No !important — Elementor wins automatically.
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Base Wrap ── */
.lxwdk-cs-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.lxwdk-cs-wrap *,
.lxwdk-cs-wrap *::before,
.lxwdk-cs-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Reset form — prevent WP nonce / form defaults from adding gap */
.lxwdk-cs-form {
    margin: 0;
    padding: 0;
}

.lxwdk-cs-form > input[type="hidden"],
.lxwdk-cs-form > div:empty {
    display: none;
    margin: 0;
    padding: 0;
    height: 0;
    line-height: 0;
    font-size: 0;
}

.lxwdk-cs-form > .lxwdk-cs-section:first-of-type {
    margin-top: 0;
}

.lxwdk-cs-wrap > .lxwdk-cs-form > *:first-child:not(.lxwdk-cs-section) + .lxwdk-cs-section {
    margin-top: 0;
}

/* ── Section ── */
.lxwdk-cs-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.lxwdk-cs-section__title {
    font-size: 15px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f1;
    font-family: inherit;
    line-height: 1.4;
}

/* ── Product Grid ── */
.lxwdk-cs-product-grid {
    display: grid;
    grid-template-columns: repeat(var(--lxwdk-cols, 2), 1fr);
    gap: 16px;
}

/* ── Product Card ── */
.lxwdk-cs-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    width: 100%;
    color: inherit;
}

.lxwdk-cs-card:hover {
    border-color: #B68D5D;
    box-shadow: 0 4px 12px rgba(182, 141, 93, 0.12);
}

.lxwdk-cs-card.lxwdk-active {
    border-color: #B68D5D;
    background: #fdf9f5;
    box-shadow: 0 0 0 1px #B68D5D;
}

.lxwdk-cs-card.lxwdk-active .lxwdk-cs-card__check {
    display: flex;
}

.lxwdk-cs-card.lxwdk-error {
    border-color: #ef4444;
    animation: lxwdkShake 0.4s ease;
}

@keyframes lxwdkShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ── Card Image ── */
.lxwdk-cs-card__img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
    display: block;
}

/* ── Card Body ── */
.lxwdk-cs-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.lxwdk-cs-card__name {
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 6px;
    line-height: 1.4;
    font-family: inherit;
}

.lxwdk-cs-card__badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #B68D5D;
    background: #fdf4eb;
    border: 1px solid #f0dfc0;
    border-radius: 4px;
    padding: 3px 7px;
    margin-bottom: 10px;
    align-self: flex-start;
    font-family: inherit;
}

.lxwdk-cs-card__price {
    font-size: 15px;
    font-weight: 600;
    color: #B68D5D;
    margin-bottom: 10px;
    font-family: inherit;
}

.lxwdk-cs-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.lxwdk-cs-card__features li {
    padding: 4px 0;
    font-weight: 400;
    font-family: inherit;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #6b7280;
}

.lxwdk-cs-card__features li::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    min-width: 5px;
    background: #B68D5D;
    border-radius: 50%;
    margin-top: 5px;
}

/* ── Check Badge ── */
.lxwdk-cs-card__check {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: #B68D5D;
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(182, 141, 93, 0.3);
}

/* ── Form Fields ── */
.lxwdk-cs-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.lxwdk-cs-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lxwdk-cs-field--full {
    grid-column: 1 / -1;
}

.lxwdk-cs-field label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    font-family: inherit;
    display: block;
    margin-bottom: 5px;
}

.lxwdk-cs-req {
    color: #ef4444;
    font-weight: 600;
}

.lxwdk-cs-field input,
.lxwdk-cs-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    font-size: 14px;
    color: #3c434a;
    background: #fff;
    font-family: inherit;
    font-weight: 400;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

.lxwdk-cs-field input:focus,
.lxwdk-cs-field textarea:focus {
    border-color: #B68D5D;
    box-shadow: 0 0 0 1px #B68D5D;
}

.lxwdk-cs-field input.lxwdk-error,
.lxwdk-cs-field textarea.lxwdk-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 1px #ef4444;
}

.lxwdk-cs-field input::placeholder,
.lxwdk-cs-field textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.lxwdk-cs-field textarea {
    resize: vertical;
    min-height: 90px;
}

/* ── Product Error Msg ── */
.lxwdk-cs-product-error {
    margin-top: 10px;
    font-size: 13px;
    color: #ef4444;
    min-height: 16px;
    font-weight: 500;
}

/* ── Coupon ── */
.lxwdk-cs-coupon-row {
    display: flex;
    gap: 10px;
}

.lxwdk-cs-coupon-row input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #3c434a;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.lxwdk-cs-coupon-row input:focus {
    border-color: #B68D5D;
    box-shadow: 0 0 0 1px #B68D5D;
}

.lxwdk-cs-coupon-btn {
    padding: 11px 18px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #3c434a;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.lxwdk-cs-coupon-btn:hover {
    background: #f6f7f7;
    border-color: #B68D5D;
    color: #B68D5D;
}

.lxwdk-cs-coupon-msg {
    margin-top: 8px;
    font-size: 13px;
    min-height: 16px;
    font-weight: 500;
}

.lxwdk-cs-coupon-msg.lxwdk-success {
    color: #22c55e;
}

.lxwdk-cs-coupon-msg.lxwdk-error {
    color: #ef4444;
}

.lxwdk-cs-coupon-msg.lxwdk-info {
    color: #6b7280;
}

/* ── Order Summary ── */
.lxwdk-cs-summary {
    background: #fdfcfb;
    border-color: #f0dfc0;
}

.lxwdk-cs-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f1;
}

.lxwdk-cs-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #3c434a;
    font-weight: 400;
}

.lxwdk-cs-summary-row--discount span:last-child {
    color: #22c55e;
    font-weight: 600;
}

.lxwdk-cs-summary-row--total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #1e1e1e;
    padding-top: 4px;
}

.lxwdk-cs-summary-row--total span:last-child {
    color: #B68D5D;
    font-size: 17px;
}

/* ── Submit ── */
.lxwdk-cs-submit-section {
    border: none;
    background: transparent;
    padding: 0;
}

.lxwdk-cs-submit-area {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.lxwdk-cs-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #B68D5D;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    line-height: 1;
}

.lxwdk-cs-submit-btn:hover:not(:disabled) {
    background: #a07a4b;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(182, 141, 93, 0.3);
}

.lxwdk-cs-submit-btn:disabled {
    background: #e4d8cb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.lxwdk-cs-terms {
    margin-top: 10px;
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
    font-weight: 400;
    font-family: inherit;
}

/* ── Spinner ── */
.lxwdk-cs-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lxwdkSpin .7s linear infinite;
    vertical-align: middle;
}

@keyframes lxwdkSpin {
    to { transform: rotate(360deg); }
}

/* ── Result Message ── */
.lxwdk-cs-result {
    display: none;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.lxwdk-cs-result.lxwdk-success {
    display: block;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.lxwdk-cs-result.lxwdk-error {
    display: block;
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ── Empty / Placeholder ── */
.lxwdk-cs-empty {
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
    padding: 24px;
    font-weight: 400;
}

.lxwdk-cs-preview-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px;
    color: #9ca3af;
    font-size: 13px;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    text-align: center;
}

.lxwdk-cs-preview-placeholder .eicon-products {
    font-size: 36px;
    color: #dcdcde;
}

/* ── Success Screen ── */
.lxwdk-success-screen {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    text-align: center;
}

.lxwdk-success-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lxwdk-success-icon {
    color: #10b981;
}

.lxwdk-success-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    font-family: inherit;
}

.lxwdk-order-summary-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lxwdk-order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #4b5563;
}

.lxwdk-order-summary-row strong {
    color: #111827;
    font-weight: 600;
}

.lxwdk-total-highlight {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed #d1d5db;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.lxwdk-total-highlight strong {
    font-size: 20px;
    color: #B68D5D;
}

.lxwdk-payment-instructions {
    text-align: left;
}

.lxwdk-payment-instructions p {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 16px;
}

.lxwdk-bank-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lxwdk-bank-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s;
}

.lxwdk-bank-card:hover {
    border-color: #B68D5D;
}

.lxwdk-bank-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lxwdk-bank-info strong {
    font-size: 14px;
    color: #111827;
}

.lxwdk-bank-info p {
    font-size: 18px;
    font-family: monospace;
    font-weight: 600;
    color: #B68D5D;
    margin: 0;
    letter-spacing: 1px;
}

.lxwdk-bank-info small {
    font-size: 12px;
    color: #6b7280;
}

.lxwdk-bank-copy-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #4b5563;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.lxwdk-bank-copy-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.lxwdk-success-cta {
    margin-top: 10px;
}

/* ── Responsive ── */
@media (max-width: 680px) {
    .lxwdk-cs-product-grid {
        grid-template-columns: 1fr !important;
    }

    .lxwdk-cs-fields {
        grid-template-columns: 1fr;
    }

    .lxwdk-cs-field--full {
        grid-column: 1;
    }

    .lxwdk-cs-coupon-row {
        flex-direction: column;
    }

    .lxwdk-cs-coupon-btn {
        width: 100%;
    }
}