/* ============================================
   ARD BUTH E-COMMERCE - MODERN DESIGN SYSTEM
   ============================================ */

:root {
    --prim: #012758;
    --prim-2: #013a7a;
    --sec: #a51d31;
    --sec-2: #c12840;
    --acc: #e39c11;
    --acc-2: #f3a82a;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f6f8fb;
    --lighter: #fafbfd;
    --white: #ffffff;
    --text: #1f2937;
    --text-2: #4b5563;
    --text-3: #6b7280;
    --text-4: #9ca3af;
    --border: #e5e7eb;
    --border-2: #d1d5db;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 22px;
    --radius-pill: 999px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
    --shadow: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);
    --gradient-1: #012758;
    --gradient-2: #a51d31;
    --gradient-3: #012758;
    --gradient-4: #f6f8fb;
    --gradient-gold: #e39c11;
    --tr: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --tr-fast: all 0.2s ease;
}

/* Page banner override for ecommerce pages */
.page-name-area {
    background: var(--prim) !important;
    padding: 50px 0 !important;
    position: relative;
    overflow: hidden;
}
.page-name-area h2 {
    color: #fff !important;
    font-weight: 700;
    font-size: 32px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}
.page-name-area p, .page-name-area a {
    color: rgba(255,255,255,0.85) !important;
    position: relative;
    z-index: 1;
}
.page-name-area a:hover { color: var(--acc) !important; }

/* Generic wrapper */
.ecom-wrapper { padding: 50px 0 70px; background: var(--light); min-height: 60vh; }

/* Cards */
.ecom-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid rgba(229,231,235,0.6);
    transition: var(--tr);
}
.ecom-card:hover { box-shadow: var(--shadow-lg); }
.ecom-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--light);
}
.ecom-card-header i {
    width: 42px; height: 42px;
    background: var(--gradient-1);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.ecom-card-header h4 { margin: 0; color: var(--prim); font-weight: 700; font-size: 18px; }

/* Form controls */
.ecom-form-group { margin-bottom: 18px; }
.ecom-label {
    display: block;
    font-weight: 600;
    color: var(--prim);
    margin-bottom: 7px;
    font-size: 13px;
    letter-spacing: 0.2px;
}
.ecom-input,
.ecom-select,
.ecom-textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    transition: var(--tr-fast);
    font-family: inherit;
}
.ecom-input:focus,
.ecom-select:focus,
.ecom-textarea:focus {
    border-color: var(--prim);
    box-shadow: 0 0 0 3px rgba(1,39,88,0.1);
    outline: none;
}
.ecom-textarea { resize: vertical; min-height: 90px; }
.ecom-input::placeholder { color: var(--text-4); }

/* Password input wrapper */
.ecom-pw-wrap { position: relative; }
.ecom-pw-toggle {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-3);
    background: none; border: none; padding: 6px;
    transition: var(--tr-fast);
}
.ecom-pw-toggle:hover { color: var(--prim); }

/* Buttons */
.ecom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--tr);
    font-family: inherit;
    white-space: nowrap;
}
.ecom-btn-primary { background: var(--gradient-1); color: #fff; }
.ecom-btn-primary:hover { background: var(--gradient-2); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ecom-btn-secondary { background: var(--gradient-2); color: #fff; }
.ecom-btn-secondary:hover { background: var(--gradient-1); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ecom-btn-gold { background: var(--gradient-gold); color: #fff; }
.ecom-btn-gold:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ecom-btn-outline { background: transparent; color: var(--prim); border: 1.5px solid var(--prim); }
.ecom-btn-outline:hover { background: var(--prim); color: #fff; }
.ecom-btn-ghost { background: var(--light); color: var(--text-2); }
.ecom-btn-ghost:hover { background: var(--border); color: var(--text); }
.ecom-btn-danger { background: var(--danger); color: #fff; }
.ecom-btn-danger:hover { background: #dc2626; color: #fff; }
.ecom-btn-success { background: var(--success); color: #fff; }
.ecom-btn-success:hover { background: #059669; color: #fff; }
.ecom-btn-block { width: 100%; }
.ecom-btn-lg { padding: 16px 32px; font-size: 16px; }
.ecom-btn-sm { padding: 8px 16px; font-size: 12px; }

/* Alerts */
.ecom-alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-left: 4px solid;
}
.ecom-alert i { font-size: 16px; margin-top: 2px; }
.ecom-alert-success { background: #d1fae5; color: #065f46; border-color: var(--success); }
.ecom-alert-error { background: #fee2e2; color: #991b1b; border-color: var(--danger); }
.ecom-alert-info { background: #dbeafe; color: #1e40af; border-color: var(--info); }
.ecom-alert-warning { background: #fef3c7; color: #92400e; border-color: var(--warning); }

/* Product grid */
.ecom-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.ecom-product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--tr);
    border: 1px solid rgba(229,231,235,0.5);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.ecom-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(1,39,88,0.15);
}
.ecom-product-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--light);
}
.ecom-product-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.ecom-product-card:hover .ecom-product-img-wrap img { transform: scale(1.08); }
.ecom-product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(1,39,88,0.85);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: var(--tr);
}
.ecom-product-card:hover .ecom-product-overlay { opacity: 1; }
.ecom-product-overlay-btn {
    width: 44px; height: 44px;
    background: #fff;
    color: var(--prim);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: var(--tr-fast);
    transform: translateY(10px);
}
.ecom-product-card:hover .ecom-product-overlay-btn { transform: translateY(0); }
.ecom-product-overlay-btn:hover { background: var(--acc); color: #fff; }
.ecom-product-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--gradient-2);
    color: #fff;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}
.ecom-product-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.ecom-product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}
.ecom-product-title a { color: var(--text); text-decoration: none; transition: var(--tr-fast); }
.ecom-product-title a:hover { color: var(--prim); }
.ecom-product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    margin-top: auto;
}
.ecom-product-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--prim);
    letter-spacing: -0.3px;
}
.ecom-product-actions { display: flex; gap: 8px; }
.ecom-product-add {
    flex: 1;
    background: var(--gradient-2);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tr);
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ecom-product-add:hover { background: var(--gradient-1); }
.ecom-product-view {
    background: var(--light);
    color: var(--prim);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--tr);
    display: flex; align-items: center; justify-content: center;
}
.ecom-product-view:hover { background: var(--prim); color: #fff; border-color: var(--prim); }

/* Section title */
.ecom-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--prim);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
    display: inline-block;
}
.ecom-section-title::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 60px; height: 3px;
    background: var(--gradient-2);
    border-radius: 2px;
}

/* Cart */
.ecom-cart-item {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    margin-bottom: 14px;
    gap: 16px;
    transition: var(--tr);
    border: 1px solid rgba(229,231,235,0.5);
}
.ecom-cart-item:hover { box-shadow: var(--shadow); }
.ecom-cart-img {
    width: 90px; height: 90px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--light);
}
.ecom-cart-info { flex: 1; min-width: 0; }
.ecom-cart-name { margin: 0 0 4px; font-size: 15px; color: var(--prim); font-weight: 600; }
.ecom-cart-name a { color: var(--prim); text-decoration: none; }
.ecom-cart-name a:hover { color: var(--sec); }
.ecom-cart-seller { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.ecom-cart-seller i { color: var(--acc); }
.ecom-cart-price { font-size: 16px; font-weight: 700; color: var(--sec); }
.ecom-qty-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--light);
    border-radius: var(--radius-sm);
    padding: 3px;
}
.ecom-qty-btn {
    width: 32px; height: 32px;
    border: none;
    background: #fff;
    color: var(--prim);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--tr-fast);
}
.ecom-qty-btn:hover { background: var(--prim); color: #fff; }
.ecom-qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    padding: 4px;
}
.ecom-qty-input:focus { outline: none; }
.ecom-cart-subtotal {
    font-weight: 700;
    color: var(--prim);
    min-width: 100px;
    text-align: right;
    font-size: 15px;
}
.ecom-cart-remove {
    background: #fee2e2;
    color: var(--danger);
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--tr-fast);
}
.ecom-cart-remove:hover { background: var(--danger); color: #fff; }

.ecom-cart-summary {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    position: sticky;
    top: 100px;
    border: 1px solid rgba(229,231,235,0.5);
}
.ecom-cart-summary h4 {
    color: var(--prim);
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--light);
    font-weight: 700;
    font-size: 18px;
    display: flex; align-items: center; gap: 10px;
}
.ecom-cart-summary h4 i { color: var(--sec); }
.ecom-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: var(--text-2);
    font-size: 14px;
}
.ecom-summary-line + .ecom-summary-line { border-top: 1px dashed var(--border); }
.ecom-summary-total {
    font-size: 20px;
    font-weight: 800;
    color: var(--sec);
    padding: 18px 0 4px;
    border-top: 2px solid var(--light);
    margin-top: 10px;
}

/* Empty state */
.ecom-empty {
    text-align: center;
    padding: 70px 30px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.ecom-empty-icon {
    width: 90px; height: 90px;
    background: var(--light);
    color: var(--text-4);
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
}
.ecom-empty h3 { color: var(--prim); margin: 0 0 8px; font-weight: 700; }
.ecom-empty p { color: var(--text-3); margin-bottom: 24px; }

/* Checkout */
.ecom-checkout-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: flex-start; }
.ecom-order-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--light); }
.ecom-order-line:last-of-type { border-bottom: none; }
.ecom-order-line img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--light); flex-shrink: 0; }
.ecom-order-line-info { flex: 1; min-width: 0; }
.ecom-order-line-info h6 { margin: 0 0 3px; font-size: 14px; color: var(--text); font-weight: 600; }
.ecom-order-line-info span { font-size: 12px; color: var(--text-3); }
.ecom-order-line-price { font-weight: 700; color: var(--prim); font-size: 14px; }
.ecom-order-total-row {
    text-align: right;
    padding-top: 18px;
    border-top: 2px solid var(--light);
    margin-top: 10px;
    font-size: 18px;
    font-weight: 800;
    color: var(--sec);
}

/* Product details */
.ecom-pd-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: flex-start; }
.ecom-pd-main-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--light);
    box-shadow: var(--shadow);
}
.ecom-pd-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.ecom-pd-thumb {
    width: 80px; height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--tr-fast);
    background: var(--light);
}
.ecom-pd-thumb:hover, .ecom-pd-thumb.active { border-color: var(--prim); transform: scale(1.05); }
.ecom-pd-title { font-size: 28px; color: var(--prim); margin: 0 0 12px; font-weight: 700; line-height: 1.3; }
.ecom-pd-price { font-size: 32px; font-weight: 800; color: var(--sec); margin: 16px 0; letter-spacing: -0.5px; }
.ecom-pd-desc { line-height: 1.7; color: var(--text-2); margin: 20px 0; padding: 20px; background: var(--light); border-radius: var(--radius); border-left: 4px solid var(--prim); }
.ecom-pd-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}
.ecom-pd-qty button {
    width: 44px; height: 44px;
    background: var(--light);
    border: none;
    color: var(--prim);
    font-size: 16px;
    cursor: pointer;
    transition: var(--tr-fast);
}
.ecom-pd-qty button:hover { background: var(--prim); color: #fff; }
.ecom-pd-qty input {
    width: 64px; height: 44px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    background: #fff;
}
.ecom-pd-qty input:focus { outline: none; }

.ecom-pd-actions { display: flex; gap: 12px; margin: 24px 0; flex-wrap: wrap; }
.ecom-pd-seller {
    background: var(--light);
    border-radius: var(--radius);
    padding: 22px;
    margin-top: 28px;
    display: flex; align-items: center; gap: 18px;
    flex-wrap: wrap;
}
.ecom-pd-seller img {
    width: 64px; height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--prim);
}
.ecom-pd-seller h5 { margin: 0 0 3px; color: var(--text); font-size: 15px; }
.ecom-pd-seller p { margin: 0; font-size: 13px; color: var(--text-3); }
.ecom-pd-seller-btns { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Orders list */
.ecom-order-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 18px;
    border: 1px solid rgba(229,231,235,0.5);
    transition: var(--tr);
}
.ecom-order-card:hover { box-shadow: var(--shadow); }
.ecom-order-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--light);
    margin-bottom: 16px;
}
.ecom-order-ref { font-weight: 700; color: var(--prim); font-size: 15px; }
.ecom-order-ref small { color: var(--text-3); font-weight: 400; margin-left: 10px; font-size: 13px; }
.ecom-status {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ecom-status-pending { background: #fef3c7; color: #92400e; }
.ecom-status-paid, .ecom-status-confirmed, .ecom-status-delivered { background: #d1fae5; color: #065f46; }
.ecom-status-shipped { background: #dbeafe; color: #1e40af; }
.ecom-status-cancelled { background: #fee2e2; color: #991b1b; }

.ecom-order-item-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--light);
}
.ecom-order-item-row:last-of-type { border-bottom: none; }
.ecom-order-item-row img { width: 50px; height: 50px; border-radius: var(--radius-sm); object-fit: cover; background: var(--light); flex-shrink: 0; }
.ecom-order-item-name { flex: 1; min-width: 0; color: var(--text); font-size: 14px; font-weight: 500; }
.ecom-order-item-qty { width: 50px; text-align: center; color: var(--text-3); font-size: 13px; }
.ecom-order-item-sub { width: 110px; text-align: right; font-weight: 700; color: var(--prim); font-size: 14px; }
.ecom-order-foot {
    text-align: right;
    padding-top: 14px;
    margin-top: 10px;
    border-top: 2px dashed var(--border);
    color: var(--sec);
    font-weight: 800;
    font-size: 17px;
}

/* Auth pages (login/register/reset) */
.ecom-auth-page {
    min-height: calc(100vh - 200px);
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}
.ecom-auth-page::before {
    content: "";
    position: absolute;
    width: 500px; height: 500px;
    background: rgba(1,39,88,0.04);
    border-radius: 50%;
    top: -200px; left: -200px;
}
.ecom-auth-page::after {
    content: "";
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(165,29,49,0.04);
    border-radius: 50%;
    bottom: -150px; right: -150px;
}
.ecom-auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 44px 40px;
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(229,231,235,0.5);
}
.ecom-auth-card-wide { max-width: 560px; }
.ecom-auth-icon {
    width: 70px; height: 70px;
    background: var(--gradient-1);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(1,39,88,0.25);
}
.ecom-auth-icon.gold { background: var(--gradient-gold); box-shadow: 0 8px 20px rgba(227,156,17,0.3); }
.ecom-auth-icon.red { background: var(--gradient-2); box-shadow: 0 8px 20px rgba(165,29,49,0.25); }
.ecom-auth-title { text-align: center; font-size: 26px; color: var(--prim); margin: 0 0 6px; font-weight: 700; }
.ecom-auth-subtitle { text-align: center; color: var(--text-3); margin: 0 0 30px; font-size: 14px; }
.ecom-auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 24px 0;
    color: var(--text-4);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ecom-auth-divider::before, .ecom-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.ecom-auth-footer { text-align: center; margin-top: 22px; color: var(--text-3); font-size: 14px; }
.ecom-auth-footer a { color: var(--prim); font-weight: 600; text-decoration: none; }
.ecom-auth-footer a:hover { color: var(--sec); text-decoration: underline; }
.ecom-form-row { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 18px; font-size: 13px; }
.ecom-form-row label { color: var(--text-2); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.ecom-form-row a { color: var(--prim); text-decoration: none; font-weight: 500; }
.ecom-form-row a:hover { color: var(--sec); }
.ecom-form-row input[type="checkbox"] { accent-color: var(--prim); width: 16px; height: 16px; cursor: pointer; }

/* Account type radio cards */
.ecom-account-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 22px;
}
.ecom-account-type {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--tr);
    background: #fff;
}
.ecom-account-type input { position: absolute; opacity: 0; pointer-events: none; }
.ecom-account-type i { font-size: 24px; color: var(--prim); margin-bottom: 6px; display: block; transition: var(--tr); }
.ecom-account-type strong { display: block; color: var(--prim); font-size: 14px; font-weight: 700; }
.ecom-account-type small { color: var(--text-3); font-size: 11px; }
.ecom-account-type:hover { border-color: var(--prim); transform: translateY(-2px); }
.ecom-account-type.active { border-color: var(--prim); background: rgba(1,39,88,0.04); box-shadow: var(--shadow-sm); }
.ecom-account-type.active::after {
    content: "✓";
    position: absolute;
    top: 8px; right: 10px;
    color: var(--prim);
    font-weight: 800;
    font-size: 16px;
}

/* Upload product */
.ecom-upload-area {
    border: 2px dashed var(--border-2);
    border-radius: var(--radius);
    padding: 28px 18px;
    text-align: center;
    background: var(--lighter);
    transition: var(--tr);
    cursor: pointer;
    position: relative;
}
.ecom-upload-area:hover { border-color: var(--prim); background: rgba(1,39,88,0.02); }
.ecom-upload-area i { font-size: 32px; color: var(--prim); margin-bottom: 10px; display: block; }
.ecom-upload-area h6 { margin: 0 0 4px; color: var(--text); font-size: 14px; font-weight: 600; }
.ecom-upload-area small { color: var(--text-3); font-size: 12px; }
.ecom-upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Dashboard */
.ecom-dash-layout { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: flex-start; }
.ecom-dash-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    border: 1px solid rgba(229,231,235,0.5);
    overflow: visible;
}
.ecom-dash-cover {
    height: 80px;
    background: var(--prim);
    border-radius: var(--radius) var(--radius) 0 0;
    position: relative;
}
.ecom-dash-avatar-wrap {
    text-align: center;
    padding: 0 20px 18px;
    margin-top: -55px;
    position: relative;
    z-index: 2;
}
.ecom-dash-avatar {
    width: 110px; height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--shadow);
    background: #fff;
    display: inline-block;
}
.ecom-dash-name { margin: 14px 0 2px; color: var(--text); font-size: 17px; font-weight: 700; }
.ecom-dash-uname { color: var(--text-3); font-size: 13px; margin: 0 0 12px; }
.ecom-dash-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 18px;
}
.ecom-dash-status.active { background: #d1fae5; color: #065f46; }
.ecom-dash-status.pending { background: #fef3c7; color: #92400e; }
.ecom-dash-menu { padding: 0 12px 18px; }
.ecom-dash-menu-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--tr-fast);
    margin-bottom: 3px;
}
.ecom-dash-menu-item i { width: 18px; text-align: center; font-size: 13px; }
.ecom-dash-menu-item:hover { background: var(--light); color: var(--prim); transform: translateX(3px); }
.ecom-dash-menu-item.logout { color: var(--danger); margin-top: 10px; }
.ecom-dash-menu-item.logout:hover { background: #fee2e2; }
.ecom-dash-content {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    border: 1px solid rgba(229,231,235,0.5);
}
.ecom-dash-hero {
    display: flex; align-items: center; gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.ecom-dash-hero-icon {
    width: 56px; height: 56px;
    background: var(--gradient-1);
    color: #fff;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.ecom-dash-hero h3 { margin: 0 0 4px; color: var(--prim); font-size: 20px; font-weight: 700; }
.ecom-dash-hero p { margin: 0; color: var(--text-3); font-size: 13px; }
.ecom-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}
.ecom-feature-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 22px 14px;
    background: var(--lighter);
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    text-align: center;
    text-decoration: none;
    color: var(--text-2);
    transition: var(--tr);
    min-height: 130px;
}
.ecom-feature-tile i { font-size: 28px; color: var(--prim); margin-bottom: 10px; transition: var(--tr); }
.ecom-feature-tile span { font-size: 13px; font-weight: 600; }
.ecom-feature-tile small { color: var(--text-3); font-size: 11px; margin-top: 2px; }
.ecom-feature-tile:hover { transform: translateY(-4px); border-color: var(--prim); box-shadow: var(--shadow-lg); }
.ecom-feature-tile:hover i { color: var(--sec); transform: scale(1.1); }

/* Success page */
.ecom-success-page { padding: 60px 0; background: var(--light); min-height: 60vh; }
.ecom-success-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 50px 40px;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}
.ecom-success-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: var(--gradient-1);
}
.ecom-success-icon {
    width: 100px; height: 100px;
    background: #d1fae5;
    color: var(--success);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 48px;
    margin-bottom: 24px;
    box-shadow: 0 8px 20px rgba(16,185,129,0.2);
    animation: successPop 0.6s ease;
}
@keyframes successPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.ecom-success-card h2 { color: var(--prim); margin: 0 0 8px; font-weight: 700; }
.ecom-success-card > p { color: var(--text-3); font-size: 15px; margin-bottom: 4px; }
.ecom-success-card .order-ref { color: var(--text); font-size: 14px; margin-bottom: 30px; }
.ecom-success-card .order-ref strong { color: var(--prim); }
.ecom-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.ecom-info-tile {
    background: var(--light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    text-align: left;
}
.ecom-info-tile label { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; font-weight: 600; }
.ecom-info-tile span { font-weight: 600; color: var(--text); font-size: 13px; }
.ecom-order-table { width: 100%; margin: 20px 0; border-collapse: collapse; }
.ecom-order-table th { text-align: left; padding: 10px 8px; font-size: 12px; color: var(--text-3); text-transform: uppercase; border-bottom: 2px solid var(--border); }
.ecom-order-table td { padding: 12px 8px; font-size: 14px; border-bottom: 1px solid var(--light); }
.ecom-order-table .text-right { text-align: right; }
.ecom-order-table tfoot td { font-weight: 800; color: var(--sec); font-size: 16px; border-top: 2px solid var(--border); }
.ecom-success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* Profile update */
.ecom-profile-header {
    display: flex; align-items: center; gap: 20px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.ecom-profile-pic { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--prim); box-shadow: var(--shadow-sm); }
.ecom-profile-header h4 { margin: 0 0 4px; color: var(--text); font-size: 18px; font-weight: 700; }
.ecom-profile-header p { margin: 0; color: var(--text-3); font-size: 13px; }

/* Edit product image slots */
.ecom-edit-img-slot {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    transition: var(--tr);
}
.ecom-edit-img-slot:hover { border-color: var(--prim); box-shadow: var(--shadow-sm); }
.ecom-edit-img-label {
    font-weight: 600;
    color: var(--prim);
    font-size: 13px;
    margin-bottom: 10px;
}
.ecom-edit-img-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ecom-edit-img-preview img { width: 100%; height: 100%; object-fit: cover; }
.ecom-edit-img-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-4);
    font-size: 12px;
    gap: 6px;
}
.ecom-edit-img-empty i { font-size: 28px; }
.ecom-edit-img-remove {
    position: absolute;
    top: 6px; right: 6px;
    width: 32px; height: 32px;
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--tr-fast);
    box-shadow: var(--shadow-sm);
}
.ecom-edit-img-remove:hover { background: var(--danger); transform: scale(1.1); }
.ecom-edit-img-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: var(--light);
    border: 1.5px dashed var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--prim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tr-fast);
    position: relative;
}
.ecom-edit-img-upload:hover { background: rgba(1,39,88,0.04); border-color: var(--prim); }
.ecom-edit-img-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Image modal */
.ecom-modal {
    display: none;
    position: fixed;
    z-index: 999999999;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}
.ecom-modal.active { display: flex; }
.ecom-modal-content { position: relative; max-width: 90%; max-height: 90vh; }
.ecom-modal-content img { max-width: 100%; max-height: 90vh; border-radius: var(--radius); box-shadow: var(--shadow-xl); }
.ecom-modal-close {
    position: absolute;
    top: -45px; right: 0;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--tr-fast);
}
.ecom-modal-close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }
.ecom-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    width: 50px; height: 50px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: var(--tr-fast);
}
.ecom-modal-nav:hover { background: var(--prim); }
.ecom-modal-prev { left: 20px; }
.ecom-modal-next { right: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Toast notification */
.ecom-toast {
    position: fixed;
    top: 20px; right: 20px;
    background: var(--text);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    z-index: 999999999;
    font-size: 14px;
    font-weight: 500;
    display: flex; align-items: center; gap: 10px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 340px;
}
.ecom-toast.show { transform: translateX(0); }
.ecom-toast.success { background: var(--success); }
.ecom-toast.error { background: var(--danger); }
.ecom-toast i { font-size: 18px; }

/* Cart add popup */
.ecom-cart-popup {
    display: none;
    position: fixed;
    z-index: 999999999;
    inset: 0;
    background: rgba(1,39,88,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.ecom-cart-popup.active { display: flex; }
.ecom-cart-popup-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px 24px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: popIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.ecom-cart-popup-icon {
    width: 64px; height: 64px;
    background: #d4edda;
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.ecom-cart-popup-icon i {
    font-size: 28px;
    color: var(--success);
}
.ecom-cart-popup-box h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--prim);
}
.ecom-cart-popup-box .popup-product-name {
    color: var(--text-2);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}
.ecom-cart-popup-box .popup-product-price {
    color: var(--sec);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}
.ecom-cart-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.ecom-cart-popup-actions .ecom-btn {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
}
.popup-cart-continue {
    background: #f1f5f9;
    color: var(--text);
    border: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 991px) {
    .ecom-product-grid { grid-template-columns: repeat(3, 1fr); }
    .ecom-checkout-grid { grid-template-columns: 1fr; }
    .ecom-pd-grid { grid-template-columns: 1fr; gap: 28px; }
    .ecom-dash-layout { grid-template-columns: 1fr; }
    .ecom-dash-sidebar { position: static; }
    .ecom-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .ecom-product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .ecom-product-img-wrap { height: 180px; }
    .ecom-cart-item { flex-wrap: wrap; }
    .ecom-cart-img { width: 70px; height: 70px; }
    .ecom-cart-subtotal { width: 100%; text-align: left; }
    .ecom-auth-card { padding: 32px 24px; }
    .ecom-dash-content { padding: 22px 18px; }
    .ecom-feature-grid { grid-template-columns: repeat(2, 1fr); }
    .ecom-success-card { padding: 36px 24px; }
    .ecom-pd-title { font-size: 24px; }
    .ecom-pd-price { font-size: 26px; }
    .page-name-area h2 { font-size: 26px; }
}
@media (max-width: 480px) {
    .ecom-product-grid { grid-template-columns: 1fr; }
    .ecom-account-types { grid-template-columns: 1fr; }
    .ecom-form-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .ecom-pd-actions .ecom-btn { width: 100%; }
    .ecom-success-actions .ecom-btn { width: 100%; }
}
