/* WP ECommerce Pro – Public Styles */

/* ── Variables ──────────────────────────────────── */
:root {
    --wpec-primary:    #2563eb;
    --wpec-primary-h:  #1d4ed8;
    --wpec-danger:     #dc2626;
    --wpec-success:    #16a34a;
    --wpec-warning:    #d97706;
    --wpec-gray-100:   #f3f4f6;
    --wpec-gray-200:   #e5e7eb;
    --wpec-gray-600:   #4b5563;
    --wpec-gray-800:   #1f2937;
    --wpec-radius:     8px;
    --wpec-shadow:     0 2px 8px rgba(0,0,0,.08);
}

/* ── Buttons ────────────────────────────────────── */
.wpec-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--wpec-radius);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s, transform .1s;
    text-decoration: none;
    text-align: center;
}
.wpec-btn:active { transform: scale(.98); }
.wpec-btn-primary  { background: var(--wpec-primary); color: #fff; }
.wpec-btn-primary:hover { background: var(--wpec-primary-h); color: #fff; }
.wpec-btn-full     { width: 100%; display: block; }
.wpec-btn-disabled { background: var(--wpec-gray-200); color: var(--wpec-gray-600); cursor: not-allowed; }
.wpec-btn-sm       { padding: 5px 12px; font-size: 12px; }
.wpec-add-to-cart  { background: var(--wpec-primary); color: #fff; width: 100%; margin-top: 12px; }
.wpec-add-to-cart:hover { background: var(--wpec-primary-h); }

/* ── Product Grid ───────────────────────────────── */
.wpec-product-grid {
    display: grid;
    gap: 24px;
}
.wpec-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wpec-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wpec-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .wpec-cols-3, .wpec-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .wpec-cols-2, .wpec-cols-3, .wpec-cols-4 { grid-template-columns: 1fr; }
}

/* ── Product Card ───────────────────────────────── */
/* ── Product Card — compact clean design ─────────── */
.wpec-product-card {
    background: var(--wpec-card-bg, #ffffff);
    border: 1px solid var(--wpec-card-border, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
}
.wpec-product-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.09);
    border-color: #d1d5db;
}

/* Image */
.wpec-product-image {
    position: relative;
    width: 100%;
    height: 130px;
    background: #f9fafb;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.wpec-product-image > a {
    display: flex;
    width: 100%; height: 100%;
    align-items: center;
    justify-content: center;
}
.wpec-product-image img {
    max-width: 90%; max-height: 90%;
    width: auto; height: auto;
    object-fit: contain;
    transition: transform .3s;
    display: block;
}
.wpec-product-card:hover .wpec-product-image img { transform: scale(1.04); }
.wpec-no-image {
    color: #9ca3af; font-size: 12px;
}

/* Discount badge */
.wpec-badge-sale {
    position: absolute; top: 7px; left: 7px;
    background: var(--wpec-badge-bg, #ef4444);
    color: var(--wpec-badge-text, #fff);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    pointer-events: none;
    letter-spacing: .01em;
}

/* Out of stock badge */
.wpec-badge-oos {
    position: absolute; top: 7px; right: 7px;
    background: rgba(31,41,55,.85);
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    z-index: 2;
    pointer-events: none;
}

/* Hover action icons */
.wpec-card-actions {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    background: rgba(255,255,255,.9);
    opacity: 0;
    transform: translateY(3px);
    transition: opacity .2s, transform .2s;
    z-index: 2;
}
.wpec-product-card:hover .wpec-card-actions {
    opacity: 1; transform: translateY(0);
}
.wpec-card-action {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    display: flex; align-items: center; justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.wpec-card-action:hover {
    background: var(--wpec-primary, #2563eb);
    color: #fff;
    border-color: var(--wpec-primary, #2563eb);
}
.wpec-card-action svg { display: block; }

/* Info */
.wpec-product-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}
.wpec-product-title {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--wpec-card-title, #1f2937);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wpec-product-title a {
    text-decoration: none;
    color: inherit;
}
.wpec-product-title a:hover { color: var(--wpec-primary, #2563eb); }

/* Price */
.wpec-price {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.wpec-price ins {
    text-decoration: none;
    color: var(--wpec-price-sale, #ef4444);
    font-size: 15px;
    font-weight: 600;
}
.wpec-price del {
    color: #9ca3af;
    font-weight: 400;
    font-size: 12px;
    text-decoration: line-through;
}
.wpec-price-regular {
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
}

/* Add to cart */
.wpec-card-atc {
    width: 100%;
    padding: 7px;
    background: var(--wpec-atc-bg, #2563eb);
    color: var(--wpec-atc-text, #fff);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-top: auto;
    transition: background .15s;
    letter-spacing: .01em;
}
.wpec-card-atc:hover { background: var(--wpec-atc-hover, #1d4ed8); }
.wpec-card-atc-oos {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
}

/* Legacy */
.wpec-add-to-cart, .wpec-btn-disabled { margin-top: auto !important; }

/* ── Cart Page ──────────────────────────────────── */
.wpec-cart-table {
    width: 100%; border-collapse: collapse; margin-bottom: 30px;
}
.wpec-cart-table th, .wpec-cart-table td {
    padding: 12px 16px; border-bottom: 1px solid var(--wpec-gray-200); text-align: left;
}
.wpec-cart-table th { background: var(--wpec-gray-100); font-weight: 600; font-size: 13px; }
.wpec-cart-table img { border-radius: 4px; }

.wpec-qty-input {
    width: 60px; padding: 6px; border: 1px solid var(--wpec-gray-200); border-radius: 4px;
    text-align: center; margin-right: 6px;
}
.wpec-remove-item {
    background: none; border: none; color: var(--wpec-danger); cursor: pointer;
    font-size: 18px; padding: 0 6px; font-weight: 700; line-height: 1;
}

.wpec-cart-totals { max-width: 360px; margin-left: auto; }
.wpec-cart-totals table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.wpec-cart-totals th, .wpec-cart-totals td { padding: 10px 12px; border-bottom: 1px solid var(--wpec-gray-200); }
.wpec-total-row th, .wpec-total-row td { font-weight: 700; font-size: 18px; border-top: 2px solid var(--wpec-gray-800); }

/* ── Checkout ───────────────────────────────────── */
.wpec-checkout-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 40px;
}
@media (max-width: 768px) { .wpec-checkout-layout { grid-template-columns: 1fr; } }

.wpec-field { margin-bottom: 16px; }
.wpec-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.wpec-field input, .wpec-field select, .wpec-field textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--wpec-gray-200); border-radius: var(--wpec-radius);
    font-size: 14px; box-sizing: border-box; transition: border-color .2s;
}
.wpec-field input:focus, .wpec-field textarea:focus {
    outline: none; border-color: var(--wpec-primary);
}
.wpec-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .wpec-field-row { grid-template-columns: 1fr; } }

.wpec-order-summary {
    background: var(--wpec-summary-bg, var(--wpec-gray-100));
    color: var(--wpec-summary-text, var(--wpec-gray-800));
    border-radius: var(--wpec-radius);
    padding: 24px;
    position: sticky;
    top: 20px;
}
.wpec-order-summary h3,
.wpec-order-summary th,
.wpec-order-summary td {
    color: var(--wpec-summary-text, var(--wpec-gray-800));
}
.wpec-order-review { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.wpec-order-review tr { border-bottom: 1px solid var(--wpec-gray-200); }
.wpec-order-review td, .wpec-order-review th { padding: 10px 0; font-size: 14px; }
.wpec-order-review td:last-child, .wpec-order-review th:last-child { text-align: right; }

/* ── Order Confirmation ─────────────────────────── */
.wpec-confirmation-header { text-align: center; padding: 40px 20px; }
.wpec-check {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--wpec-success); color: #fff; font-size: 32px; margin-bottom: 16px;
}

/* ── Status Badges ──────────────────────────────── */
.wpec-status {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.wpec-status-pending    { background: #fef9c3; color: #854d0e; }
.wpec-status-processing { background: #dbeafe; color: #1e40af; }
.wpec-status-completed  { background: #dcfce7; color: #14532d; }
.wpec-status-cancelled  { background: #fee2e2; color: #7f1d1d; }
.wpec-status-failed     { background: #fce7f3; color: #831843; }
.wpec-status-refunded   { background: #f3f4f6; color: #374151; }

/* ── Notices ────────────────────────────────────── */
.wpec-notice         { padding: 12px 16px; border-radius: var(--wpec-radius); margin-bottom: 16px; }
.wpec-notice-success { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.wpec-notice-error   { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }

/* ── Account Page ───────────────────────────────── */
.wpec-orders-table { width: 100%; border-collapse: collapse; }
.wpec-orders-table th, .wpec-orders-table td {
    padding: 12px 16px; border-bottom: 1px solid var(--wpec-gray-200); text-align: left;
}
.wpec-orders-table th { background: var(--wpec-gray-100); font-weight: 600; font-size: 13px; }

/* ── Mini Cart (widget) ─────────────────────────── */
.wpec-mini-cart-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--wpec-gray-200);
}
.wpec-mini-cart-item img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; }
.wpec-item-name  { flex: 1; font-size: 13px; }
.wpec-item-price { font-weight: 600; font-size: 13px; }

/* ── Empty states ───────────────────────────────── */
.wpec-empty-cart, .wpec-no-products { text-align: center; padding: 40px; color: var(--wpec-gray-600); }

/* ── Loading spinner ────────────────────────────── */
.wpec-loading { opacity: .5; pointer-events: none; }

/* ── Single Product Page ─────────────────────────── */
.wpec-single-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.wpec-single-product {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 48px;
    align-items: start;
    margin-bottom: 48px;
}
@media (max-width: 860px) {
    .wpec-single-product { grid-template-columns: 1fr; gap: 28px; }
}

/* Gallery */
.wpec-gallery { display: flex; gap: 12px; }
.wpec-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 72px;
    flex-shrink: 0;
}
.wpec-thumb {
    width: 68px; height: 68px;
    border: 2px solid var(--wpec-gray-200);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s;
}
.wpec-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wpec-thumb-active, .wpec-thumb:hover { border-color: var(--wpec-primary); }

.wpec-gallery-main {
    flex: 1;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--wpec-gray-100);
    aspect-ratio: 1 / 1;
}
.wpec-gallery-slide {
    display: none;
    width: 100%; height: 100%;
}
.wpec-gallery-slide.wpec-slide-active { display: flex; align-items: center; justify-content: center; }
.wpec-gallery-slide img { width: 100%; height: 100%; object-fit: contain; }
.wpec-no-image-lg { color: var(--wpec-gray-600); font-size: 14px; }

.wpec-gallery-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.9); border: none; border-radius: 50%;
    width: 40px; height: 40px; font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: background .2s;
    color: var(--wpec-gray-800);
}
.wpec-gallery-arrow:hover { background: #fff; }
.wpec-arrow-prev { left: 10px; }
.wpec-arrow-next { right: 10px; }

.wpec-gallery-dots {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px;
}
.wpec-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(0,0,0,.25); cursor: pointer; transition: background .2s;
}
.wpec-dot-active { background: var(--wpec-primary); }

/* Info panel */
.wpec-single-info { padding: 8px 0; }

.wpec-single-cats { margin-bottom: 8px; }
.wpec-cat-link {
    display: inline-block; font-size: 12px; font-weight: 600;
    color: var(--wpec-primary); text-decoration: none; text-transform: uppercase;
    letter-spacing: .06em; margin-right: 8px;
}
.wpec-cat-link:hover { text-decoration: underline; }

.wpec-single-title {
    font-size: 26px; font-weight: 700; line-height: 1.3;
    color: var(--wpec-gray-800); margin: 0 0 6px;
}
.wpec-single-sku { font-size: 12px; color: var(--wpec-gray-600); margin: 0 0 16px; }

/* Price */
.wpec-single-price {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
}
.wpec-price-current { font-size: 28px; font-weight: 700; color: var(--wpec-gray-800); }
.wpec-price-old { font-size: 16px; color: var(--wpec-gray-600); text-decoration: line-through; }
.wpec-price-save {
    background: var(--wpec-danger); color: #fff;
    font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
}

/* Stock */
.wpec-single-stock { margin-bottom: 20px; font-size: 14px; font-weight: 600; }
.wpec-stock-in  { color: #16a34a; }
.wpec-stock-low { color: #d97706; }
.wpec-stock-out { color: var(--wpec-danger); }

/* Qty stepper */
.wpec-single-actions { display: flex; gap: 12px; margin-bottom: 12px; align-items: center; }
@media (max-width: 480px) { .wpec-single-actions { flex-direction: column; } }

.wpec-qty-stepper {
    display: flex; align-items: center;
    border: 2px solid var(--wpec-gray-200); border-radius: var(--wpec-radius);
    overflow: hidden; flex-shrink: 0;
}
.wpec-qty-minus, .wpec-qty-plus {
    background: var(--wpec-gray-100); border: none; cursor: pointer;
    width: 42px; height: 48px; font-size: 20px; font-weight: 300;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s; color: var(--wpec-gray-800);
}
.wpec-qty-minus:hover, .wpec-qty-plus:hover { background: var(--wpec-gray-200); }
.wpec-qty-single {
    width: 52px; height: 48px; border: none; text-align: center;
    font-size: 16px; font-weight: 600; color: var(--wpec-gray-800);
    background: #fff; -moz-appearance: textfield;
}
.wpec-qty-single::-webkit-outer-spin-button,
.wpec-qty-single::-webkit-inner-spin-button { -webkit-appearance: none; }

.wpec-btn-buy {
    flex: 1; padding: 14px 20px; font-size: 15px; font-weight: 700;
    background: var(--wpec-primary) !important;
    color: #fff !important;
    border-radius: var(--wpec-radius);
    border: none; cursor: pointer; text-align: center;
}
.wpec-btn-buy:hover { background: var(--wpec-primary-h) !important; }

.wpec-btn-cart-link {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px; margin-bottom: 24px;
    background: transparent; border: 2px solid var(--wpec-gray-200);
    color: var(--wpec-gray-800); border-radius: var(--wpec-radius);
    font-weight: 600; font-size: 14px; text-decoration: none;
    transition: border-color .2s, color .2s;
}
.wpec-btn-cart-link:hover { border-color: var(--wpec-primary); color: var(--wpec-primary); }

/* Meta */
.wpec-single-meta { border-top: 1px solid var(--wpec-gray-200); padding-top: 16px; }
.wpec-meta-row {
    display: flex; gap: 8px; font-size: 13px;
    padding: 6px 0; color: var(--wpec-gray-600);
    border-bottom: 1px solid var(--wpec-gray-200);
}
.wpec-meta-row:last-child { border-bottom: none; }
.wpec-meta-label { font-weight: 600; color: var(--wpec-gray-800); min-width: 80px; }
.wpec-meta-row a { color: var(--wpec-primary); text-decoration: none; }
.wpec-meta-row a:hover { text-decoration: underline; }

/* Description */
.wpec-single-description {
    border-top: 2px solid var(--wpec-gray-200);
    padding-top: 32px;
}
.wpec-single-description h2 {
    font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--wpec-gray-800);
}
.wpec-description-content { font-size: 15px; line-height: 1.7; color: var(--wpec-gray-600); }

/* ── Payment Methods (Checkout) ──────────────────── */
.wpec-payment-methods { margin-bottom: 20px; }
.wpec-payment-methods h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--wpec-gray-800); }

.wpec-payment-option {
    background: var(--wpec-pm-bg, #ffffff);
    border: 2px solid var(--wpec-pm-border, var(--wpec-gray-200));
    border-radius: var(--wpec-radius);
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color .2s;
}
.wpec-payment-option:has(input:checked) { border-color: var(--wpec-pm-active, var(--wpec-primary)); }

.wpec-payment-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--wpec-pm-label-text, var(--wpec-gray-800));
}
.wpec-payment-label input[type="radio"] { accent-color: var(--wpec-pm-active, var(--wpec-primary)); width: 16px; height: 16px; flex-shrink: 0; }
.wpec-payment-icon { font-size: 20px; line-height: 1; }
.wpec-payment-title { flex: 1; }

.wpec-payment-fields {
    padding: 12px 16px 16px;
    border-top: 2px solid var(--wpec-pm-fields-border, var(--wpec-gray-200));
    background: var(--wpec-pm-fields-bg, var(--wpec-gray-100));
    border-radius: 0 0 calc(var(--wpec-radius) - 2px) calc(var(--wpec-radius) - 2px);
}
.wpec-gateway-desc { font-size: 13px; color: var(--wpec-pm-fields-text, var(--wpec-gray-600)); margin: 10px 0 4px; }
.wpec-test-notice {
    background: #fef9c3; border: 1px solid #fde047;
    border-radius: 6px; padding: 8px 12px;
    font-size: 12px; color: #713f12; margin: 8px 0;
}
.wpec-bank-details p { font-size: 13px; color: var(--wpec-gray-800); margin: 6px 0; }

/* Stripe card element */
#wpec-stripe-card-element { margin-top: 10px; }
#wpec-stripe-errors { color: var(--wpec-danger); font-size: 13px; margin-top: 6px; min-height: 18px; }

/* ── Order Confirmation (enhanced) ───────────────── */
.wpec-confirmation-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-top: 24px;
}
@media (max-width: 768px) { .wpec-confirmation-grid { grid-template-columns: 1fr; } }

.wpec-confirm-box {
    background: var(--wpec-confirm-bg, #ffffff);
    border: 1px solid var(--wpec-confirm-brd, var(--wpec-gray-200));
    border-radius: var(--wpec-radius);
    padding: 20px 24px;
}
.wpec-confirm-box h3 {
    font-size: 15px; font-weight: 700;
    margin: 0 0 14px; padding-bottom: 10px;
    border-bottom: 1px solid var(--wpec-confirm-brd, var(--wpec-gray-200));
    color: var(--wpec-gray-800);
}
.wpec-confirm-box p { font-size: 14px; color: var(--wpec-gray-600); margin-bottom: 4px; line-height: 1.5; }

.wpec-payment-detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 0; border-bottom: 1px solid var(--wpec-gray-200);
    font-size: 14px;
}
.wpec-payment-detail-row:last-child { border-bottom: none; }
.wpec-payment-detail-row span:first-child { color: var(--wpec-gray-600); }

/* Invoice table */
.wpec-invoice-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wpec-invoice-table thead th {
    background: var(--wpec-gray-100); padding: 10px 12px;
    text-align: left; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; color: var(--wpec-gray-600);
    white-space: nowrap;
}
.wpec-invoice-table thead th:last-child { text-align: right; }
.wpec-invoice-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--wpec-gray-200); color: var(--wpec-gray-800); }
.wpec-invoice-table tbody td:last-child { text-align: right; }
.wpec-invoice-table tfoot td { padding: 8px 12px; font-size: 13px; color: var(--wpec-gray-600); }
.wpec-invoice-table tfoot td:last-child { text-align: right; }
.wpec-invoice-table tfoot .wpec-total-row td { font-size: 16px; font-weight: 700; color: var(--wpec-gray-800); border-top: 2px solid var(--wpec-gray-800); }

/* ── Responsive invoice table ────────────────────── */
@media (max-width: 600px) {
    /* Hide desktop thead, use data-label instead */
    .wpec-invoice-table thead { display: none; }

    .wpec-invoice-table,
    .wpec-invoice-table tbody,
    .wpec-invoice-table tr,
    .wpec-invoice-table td { display: block; width: 100%; }

    .wpec-invoice-table tbody tr {
        border: 1px solid var(--wpec-gray-200);
        border-radius: var(--wpec-radius);
        margin-bottom: 10px;
        padding: 4px 0;
    }
    .wpec-invoice-table tbody tr:last-child { margin-bottom: 0; }

    .wpec-invoice-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 9px 14px;
        border-bottom: 1px solid var(--wpec-gray-100);
    }
    .wpec-invoice-table tbody td:last-child {
        border-bottom: none;
        font-weight: 700;
        font-size: 15px;
    }
    .wpec-invoice-table tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--wpec-gray-600);
        text-align: left;
        flex-shrink: 0;
        margin-right: 12px;
    }

    .wpec-invoice-table tfoot { display: block; }
    .wpec-invoice-table tfoot tr { display: flex; justify-content: space-between; }
    .wpec-invoice-table tfoot td { display: block; width: auto; padding: 8px 2px; }
    .wpec-invoice-table tfoot td[colspan] { flex: 1; }
    .wpec-invoice-table tfoot .wpec-total-row { border-top: 2px solid var(--wpec-gray-800); margin-top: 4px; }
    .wpec-invoice-table tfoot .wpec-total-row td { border-top: none; }

    /* Confirm box full width on mobile */
    .wpec-confirm-box { padding: 16px; }
    .wpec-confirmation-grid { gap: 14px; }
}

/* ── Account Page (enhanced) ─────────────────────── */
.wpec-account-header {
    display: flex; align-items: center; gap: 16px;
    padding: 20px; background: #fff;
    border: 1px solid var(--wpec-gray-200); border-radius: var(--wpec-radius);
    margin-bottom: 24px;
}
.wpec-account-header h2 { margin: 0 0 4px; font-size: 18px; color: var(--wpec-gray-800); }
.wpec-account-header p  { margin: 0; font-size: 14px; color: var(--wpec-gray-600); }
.wpec-account-header .wpec-btn-outline { margin-left: auto; }

.wpec-orders-list { display: flex; flex-direction: column; gap: 12px; }

.wpec-order-card {
    background: #fff; border: 1px solid var(--wpec-gray-200);
    border-radius: var(--wpec-radius); padding: 16px 20px;
    transition: box-shadow .2s;
}
.wpec-order-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }

.wpec-order-card-top {
    display: flex; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap;
}
.wpec-order-card-meta { flex: 1; }
.wpec-order-num { display: block; font-size: 15px; font-weight: 700; color: var(--wpec-gray-800); }
.wpec-order-date { font-size: 13px; color: var(--wpec-gray-600); }
.wpec-order-card-mid { display: flex; align-items: center; gap: 10px; }
.wpec-order-gw { font-size: 12px; color: var(--wpec-gray-600); }
.wpec-order-card-total { font-size: 18px; font-weight: 700; color: var(--wpec-gray-800); }

.wpec-order-card-actions {
    display: flex; gap: 8px;
    padding-top: 12px; border-top: 1px solid var(--wpec-gray-200);
}

.wpec-btn-outline {
    display: inline-block; padding: 8px 16px;
    border: 2px solid var(--wpec-gray-200); border-radius: var(--wpec-radius);
    color: var(--wpec-gray-800); font-size: 13px; font-weight: 600;
    text-decoration: none; transition: border-color .2s, color .2s;
}
.wpec-btn-outline:hover { border-color: var(--wpec-primary); color: var(--wpec-primary); }

.wpec-btn-sm-outline {
    display: inline-block; padding: 6px 14px;
    border: 1px solid var(--wpec-gray-200); border-radius: 6px;
    color: var(--wpec-gray-700, #374151); font-size: 13px; font-weight: 600;
    text-decoration: none; transition: border-color .2s, color .2s; background: #fff;
}
.wpec-btn-sm-outline:hover { border-color: var(--wpec-primary); color: var(--wpec-primary); }

.wpec-order-detail-header {
    display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px;
    padding-bottom: 16px; border-bottom: 1px solid var(--wpec-gray-200);
}
.wpec-order-detail-header h2 { margin: 0 0 4px; font-size: 22px; color: var(--wpec-gray-800); }
.wpec-order-detail-header p  { margin: 0; font-size: 14px; color: var(--wpec-gray-600); }

.wpec-empty-orders { text-align: center; padding: 48px 20px; }
.wpec-empty-orders p { color: var(--wpec-gray-600); margin-bottom: 16px; font-size: 16px; }

/* ── Auth (Login / Register) ─────────────────────── */
.wpec-auth-wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 0 60px;
}

.wpec-auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--wpec-gray-200);
    margin-bottom: 24px;
}
.wpec-auth-tab {
    padding: 12px 28px;
    font-size: 15px; font-weight: 600;
    text-decoration: none;
    color: var(--wpec-gray-600);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}
.wpec-auth-tab:hover { color: var(--wpec-primary); }
.wpec-auth-tab-active {
    color: var(--wpec-primary);
    border-bottom-color: var(--wpec-primary);
}

.wpec-auth-box {
    background: var(--wpec-auth-box-bg, #ffffff);
    border: 1px solid var(--wpec-auth-box-border, var(--wpec-gray-200));
    border-radius: var(--wpec-radius);
    padding: 32px;
}
.wpec-auth-title {
    font-size: 22px; font-weight: 700;
    color: var(--wpec-auth-title, var(--wpec-gray-800));
    margin: 0 0 6px;
}
.wpec-auth-sub {
    font-size: 14px;
    color: var(--wpec-auth-sub, var(--wpec-gray-600));
    margin: 0 0 24px;
}
.wpec-auth-notice {
    padding: 12px 16px;
    border-radius: var(--wpec-radius);
    font-size: 14px;
    margin-bottom: 16px;
}
.wpec-auth-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #7f1d1d;
}
.wpec-auth-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #14532d;
}

.wpec-auth-field { margin-bottom: 18px; }
.wpec-auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) { .wpec-auth-field-row { grid-template-columns: 1fr; } }

.wpec-auth-field label {
    display: block;
    font-size: 13px; font-weight: 600;
    color: var(--wpec-auth-label, var(--wpec-gray-800));
    margin-bottom: 6px;
}
.wpec-auth-hint { font-size: 11px; font-weight: 400; color: var(--wpec-gray-600); }

.wpec-auth-field input {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid var(--wpec-auth-input-border, var(--wpec-gray-200));
    border-radius: var(--wpec-radius);
    font-size: 14px;
    background: var(--wpec-auth-input-bg, #ffffff);
    color: var(--wpec-auth-input-text, var(--wpec-gray-800));
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
.wpec-auth-field input:focus {
    outline: none;
    border-color: var(--wpec-auth-input-focus, var(--wpec-primary));
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.wpec-auth-pw-wrap { position: relative; }
.wpec-auth-pw-wrap input { padding-right: 44px; }
.wpec-pw-toggle {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    font-size: 16px; line-height: 1; padding: 4px;
    color: var(--wpec-gray-600);
}

.wpec-pw-strength {
    font-size: 12px; font-weight: 600;
    margin-top: 5px; min-height: 16px;
    transition: color .2s;
}

.wpec-auth-row {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 20px;
}
.wpec-auth-check {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; color: var(--wpec-gray-600); cursor: pointer;
}
.wpec-auth-check input { width: 15px; height: 15px; accent-color: var(--wpec-primary); }
.wpec-auth-link {
    font-size: 13px; font-weight: 600;
    color: var(--wpec-primary); text-decoration: none;
}
.wpec-auth-link:hover { text-decoration: underline; }

.wpec-auth-submit {
    padding: 13px; font-size: 15px;
    margin-bottom: 16px;
}
.wpec-auth-switch {
    text-align: center; font-size: 13px;
    color: var(--wpec-gray-600); margin: 0;
}

/* ── Responsive cart table ───────────────────────── */
@media (max-width: 600px) {
    .wpec-cart-table thead { display: none; }
    .wpec-cart-table,
    .wpec-cart-table tbody,
    .wpec-cart-table tr,
    .wpec-cart-table td { display: block; width: 100%; box-sizing: border-box; }

    .wpec-cart-table tr {
        border: 1px solid var(--wpec-gray-200);
        border-radius: var(--wpec-radius);
        margin-bottom: 12px;
        padding: 8px 0;
    }
    .wpec-cart-table td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 8px 14px; border-bottom: 1px solid var(--wpec-gray-100);
        text-align: right;
    }
    .wpec-cart-table td:first-child { justify-content: center; border-bottom: 1px solid var(--wpec-gray-200); }
    .wpec-cart-table td:first-child img { width: 80px; height: 80px; }
    .wpec-cart-table td:last-child { border-bottom: none; }
    .wpec-cart-table td::before {
        content: attr(data-label);
        font-size: 11px; font-weight: 700;
        text-transform: uppercase; letter-spacing: .06em;
        color: var(--wpec-gray-600); text-align: left; flex-shrink: 0; margin-right: 12px;
    }
    .wpec-cart-table td:first-child::before { content: none; }

    .wpec-cart-totals { max-width: 100%; }

    /* My Account orders table */
    .wpec-orders-table thead { display: none; }
    .wpec-orders-table,
    .wpec-orders-table tbody,
    .wpec-orders-table tr,
    .wpec-orders-table td { display: block; width: 100%; }
    .wpec-orders-table tr {
        border: 1px solid var(--wpec-gray-200);
        border-radius: var(--wpec-radius);
        margin-bottom: 10px; padding: 4px 0;
    }
    .wpec-orders-table td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 8px 14px; border-bottom: 1px solid var(--wpec-gray-100);
    }
    .wpec-orders-table td:last-child { border-bottom: none; }
    .wpec-orders-table td::before {
        content: attr(data-label);
        font-size: 11px; font-weight: 700;
        text-transform: uppercase; color: var(--wpec-gray-600); margin-right: 12px; flex-shrink: 0;
    }
}

/* ── [wpec_cart_icon] shortcode ─────────────────── */
.wpec-cart-icon-sc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    vertical-align: middle;
    line-height: 1;
}
.wpec-cart-icon-sc:hover { opacity: .8; text-decoration: none; }

.wpec-cart-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.wpec-cart-icon-wrap svg { display: block; }

/* Count badge */
.wpec-cart-icon-badge {
    position: absolute;
    top: -6px; right: -8px;
    min-width: 17px; height: 17px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    pointer-events: none;
}

/* Pill style */
.wpec-cart-icon-pill {
    background: rgba(255,255,255,.12);
    padding: 6px 12px;
    border-radius: 20px;
}
.wpec-cart-icon-pill:hover { background: rgba(255,255,255,.2); }
.wpec-cart-icon-label {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
