/* ==========================================================================
   ELECTRONICS STORE — Cart / Checkout / Orders / Account
   Light theme — matches site's es-* token system.
   ========================================================================== */

/* ---- Page wrapper ---- */
.ax-page {
    background: var(--es-surface, #f6f8fb);
    color: var(--es-ink, #0f172a);
    min-height: calc(100vh - 88px);
    padding: 40px 20px 80px;
}
.ax-wrap { max-width: 1200px; margin: 0 auto; }
.ax-wrap--narrow { max-width: 880px; }

/* ---- Page header ---- */
.ax-phead { margin-bottom: 28px; }
.ax-phead__crumbs { font-size: 12.5px; color: var(--es-muted, #94a3b8); margin-bottom: 10px; letter-spacing: 0.4px; }
.ax-phead__crumbs a { color: var(--es-ink-soft, #475569); }
.ax-phead__crumbs a:hover { color: var(--es-primary, #2454e8); }
.ax-phead__title {
    margin: 0;
    font-family: 'Oswald', 'Montserrat', sans-serif;
    font-size: 32px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--es-ink, #0f172a);
}
.ax-phead__sub { margin: 6px 0 0; color: var(--es-muted, #94a3b8); font-size: 14px; }

/* ---- Layout grids ---- */
.ax-grid-cart {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}
.ax-grid-account {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

/* ---- Cards ---- */
.ax-card {
    background: #ffffff;
    border: 1px solid var(--es-border, #e5e9f0);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--es-shadow-sm, 0 1px 3px rgba(15,23,42,0.07));
}
.ax-card + .ax-card { margin-top: 20px; }
.ax-card__title {
    margin: 0 0 18px;
    font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
    color: var(--es-ink-soft, #475569);
}

/* ---- Cart items ---- */
.ax-citem {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--es-border, #e5e9f0);
}
.ax-citem:first-child { padding-top: 0; }
.ax-citem:last-child { border-bottom: 0; padding-bottom: 0; }
.ax-citem__media {
    width: 92px; height: 110px;
    border-radius: 12px; overflow: hidden;
    background: var(--es-surface, #f6f8fb);
    border: 1px solid var(--es-border, #e5e9f0);
    display: flex; align-items: center; justify-content: center;
}
.ax-citem__media img { width: 100%; height: 100%; object-fit: cover; }
.ax-citem__name { font-size: 15px; font-weight: 600; margin: 0 0 5px; color: var(--es-ink, #0f172a); }
.ax-citem__name a { color: var(--es-ink, #0f172a); }
.ax-citem__name a:hover { color: var(--es-primary, #2454e8); }
.ax-citem__meta { color: var(--es-muted, #94a3b8); font-size: 12.5px; margin-bottom: 4px; }
.ax-tag {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 6px; padding: 3px 9px;
    background: rgba(36, 84, 232, 0.08);
    border: 1px solid rgba(36, 84, 232, 0.2);
    border-radius: 20px;
    color: var(--es-primary, #2454e8); font-size: 11px; font-weight: 600;
}
.ax-citem__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.ax-citem__price { font-size: 16px; font-weight: 700; color: var(--es-ink, #0f172a); }
.ax-citem__unit { color: var(--es-muted, #94a3b8); font-size: 12px; }
.ax-citem__remove {
    background: none; border: 0; color: var(--es-muted, #94a3b8); font-size: 12.5px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px; transition: color 0.15s;
}
.ax-citem__remove:hover { color: var(--es-danger, #e23744); }

/* ---- Quantity stepper ---- */
.ax-step {
    display: inline-flex; align-items: center;
    border: 1px solid var(--es-border, #e5e9f0); border-radius: 10px; overflow: hidden;
}
.ax-step__btn {
    width: 34px; height: 36px; background: var(--es-surface, #f6f8fb); border: 0;
    color: var(--es-ink, #0f172a);
    font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.ax-step__btn:hover { background: var(--es-border, #e5e9f0); }
.ax-step__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ax-step__val {
    width: 44px; height: 36px; text-align: center;
    background: #fff; color: var(--es-ink, #0f172a);
    border: 0;
    border-left: 1px solid var(--es-border, #e5e9f0);
    border-right: 1px solid var(--es-border, #e5e9f0);
    font-size: 14px; font-weight: 600; -moz-appearance: textfield;
}
.ax-step__val::-webkit-outer-spin-button,
.ax-step__val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Order summary box ---- */
.ax-summary2 { position: sticky; top: 20px; }
.ax-srow {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 0; font-size: 14px; color: var(--es-ink-soft, #475569);
}
.ax-srow b { color: var(--es-ink, #0f172a); font-weight: 600; }
.ax-srow--free b { color: var(--es-success, #0f9d58); }
.ax-srow--discount b { color: var(--es-success, #0f9d58); }
.ax-sdiv { height: 1px; background: var(--es-border, #e5e9f0); margin: 10px 0; }
.ax-stotal { display: flex; justify-content: space-between; align-items: baseline; padding-top: 6px; }
.ax-stotal span { font-size: 13px; color: var(--es-ink-soft, #475569); text-transform: uppercase; letter-spacing: 1px; }
.ax-stotal b { font-size: 26px; font-weight: 800; color: var(--es-ink, #0f172a); }

/* ---- Coupon ---- */
.ax-coupon { display: flex; gap: 10px; margin-top: 4px; }
.ax-coupon input {
    flex: 1; height: 46px; padding: 0 14px;
    background: var(--es-surface, #f6f8fb);
    border: 1px solid var(--es-border, #e5e9f0);
    border-radius: 10px;
    color: var(--es-ink, #0f172a); font-size: 13.5px; outline: none; text-transform: uppercase;
    transition: border-color 0.18s;
}
.ax-coupon input:focus { border-color: var(--es-primary, #2454e8); box-shadow: 0 0 0 3px rgba(36,84,232,0.1); }
.ax-coupon__applied {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 4px; padding: 12px 14px;
    background: rgba(15,157,88,0.07); border: 1px dashed rgba(15,157,88,0.4);
    border-radius: 10px; color: #0a7a3c; font-size: 13px;
}
.ax-coupon__applied button { background: none; border: 0; color: var(--es-danger, #e23744); cursor: pointer; font-size: 12.5px; }

/* ---- Available coupon list ---- */
.ax-coupon-list { margin-top: 14px; }
.ax-coupon-list__head {
    font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
    color: var(--es-muted, #94a3b8); margin-bottom: 8px;
}
.ax-coupon-chip {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; margin-bottom: 8px;
    background: rgba(36,84,232,0.04); border: 1px dashed rgba(36,84,232,0.25);
    border-radius: 10px; cursor: pointer; text-align: left; transition: background .15s ease;
}
.ax-coupon-chip:hover { background: rgba(36,84,232,0.09); }
.ax-coupon-chip__code {
    font-weight: 700; font-size: 13px; letter-spacing: .5px;
    color: var(--es-primary, #2454e8); text-transform: uppercase;
}
.ax-coupon-chip__label { flex: 1; font-size: 12px; color: var(--es-ink-soft, #475569); }
.ax-coupon-chip__apply { font-size: 12px; font-weight: 600; color: var(--es-primary, #2454e8); }

/* ---- Buttons ---- */
.ax-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    height: 50px; padding: 0 24px; border-radius: 12px;
    font-size: 14px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
    cursor: pointer; border: 1px solid transparent; transition: all 0.18s ease; width: 100%;
}
.ax-btn--gold {
    background: linear-gradient(180deg, var(--es-primary, #2454e8) 0%, #1739b0 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(36, 84, 232, 0.28);
}
.ax-btn--gold:hover { filter: brightness(1.06); transform: translateY(-1px); color: #fff; }
.ax-btn--ghost {
    background: transparent;
    border-color: var(--es-border, #e5e9f0);
    color: var(--es-ink-soft, #475569);
}
.ax-btn--ghost:hover { border-color: var(--es-primary, #2454e8); color: var(--es-primary, #2454e8); }
.ax-btn--sm { height: 42px; padding: 0 18px; font-size: 12.5px; width: auto; }
.ax-btn--danger { background: rgba(226,55,68,0.08); border-color: rgba(226,55,68,0.3); color: var(--es-danger,#e23744); }
.ax-btn--danger:hover { background: rgba(226,55,68,0.14); }
.ax-btn:disabled { opacity: 0.6; pointer-events: none; }

/* ---- Empty state ---- */
.ax-empty { text-align: center; padding: 70px 20px; }
.ax-empty__ic {
    width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%;
    background: var(--es-surface, #f6f8fb); border: 1px solid var(--es-border, #e5e9f0);
    display: flex; align-items: center; justify-content: center;
    color: var(--es-muted, #94a3b8);
}
.ax-empty h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: var(--es-ink, #0f172a); }
.ax-empty p { color: var(--es-ink-soft, #475569); font-size: 14px; margin: 0 0 24px; }

/* ---- Alerts (flash) ---- */
.ax-flash { margin-bottom: 22px; padding: 13px 16px; border-radius: 11px; font-size: 14px; }
.ax-flash--success { background: rgba(15,157,88,0.08); border: 1px solid rgba(15,157,88,0.3); color: #0a7a3c; }
.ax-flash--error { background: rgba(226,55,68,0.07); border: 1px solid rgba(226,55,68,0.25); color: var(--es-danger,#e23744); }

/* ---- Account sidebar ---- */
.ax-side {
    background: #ffffff; border: 1px solid var(--es-border, #e5e9f0);
    border-radius: 16px; padding: 12px; position: sticky; top: 20px;
    box-shadow: var(--es-shadow-sm);
}
.ax-side__user {
    display: flex; align-items: center; gap: 12px; padding: 14px 12px 18px;
    border-bottom: 1px solid var(--es-border, #e5e9f0); margin-bottom: 10px;
}
.ax-side__avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--es-primary,#2454e8), #3b68ef);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 17px; overflow: hidden; flex: none;
}
.ax-side__avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Profile photo uploader */
.ax-avatar-edit { display: flex; align-items: center; gap: 18px; }
.ax-avatar-edit__pic {
    width: 84px; height: 84px; border-radius: 50%; flex: none; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--es-primary,#2454e8), #3b68ef);
    color: #fff; font-weight: 800; font-size: 34px;
    border: 2px solid rgba(36,84,232,.3);
}
.ax-avatar-edit__pic img { width: 100%; height: 100%; object-fit: cover; }
.ax-avatar-edit__meta { display: flex; flex-direction: column; }
.ax-side__name { font-weight: 700; font-size: 14.5px; color: var(--es-ink, #0f172a); }
.ax-side__mob { color: var(--es-muted, #94a3b8); font-size: 12.5px; }
.ax-side__link {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
    color: var(--es-ink-soft, #475569); font-size: 14px; font-weight: 500;
    transition: all 0.15s ease;
}
.ax-side__link svg { color: var(--es-muted, #94a3b8); }
.ax-side__link:hover { background: var(--es-surface, #f6f8fb); color: var(--es-ink, #0f172a); }
.ax-side__link.is-active { background: rgba(36,84,232,0.08); color: var(--es-primary, #2454e8); }
.ax-side__link.is-active svg { color: var(--es-primary, #2454e8); }
.ax-side__link--danger { color: var(--es-danger, #e23744); }

/* ---- Forms ---- */
.ax-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ax-form-grid .ax-col-2 { grid-column: 1 / -1; }
.ax-f { margin-bottom: 2px; }
.ax-f__label {
    display: block; margin-bottom: 7px; font-size: 12.5px; font-weight: 600;
    color: var(--es-ink-soft, #475569);
}
.ax-f__input, .ax-f textarea, .ax-f select {
    width: 100%; min-height: 48px; padding: 12px 14px;
    background: var(--es-surface, #f6f8fb);
    border: 1px solid var(--es-border, #e5e9f0);
    border-radius: 10px;
    color: var(--es-ink, #0f172a);
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.ax-f__input:focus, .ax-f textarea:focus, .ax-f select:focus {
    border-color: var(--es-primary, #2454e8);
    box-shadow: 0 0 0 3px rgba(36,84,232,0.1);
    background: #fff;
}
.ax-f__input::placeholder, .ax-f textarea::placeholder { color: var(--es-muted, #94a3b8); }
.ax-f__err { display: block; margin-top: 6px; color: var(--es-danger, #e23744); font-size: 12px; }

/* ---- Address / radio cards ---- */
.ax-addr { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ax-addr__card { position: relative; cursor: pointer; }
.ax-addr__card input { position: absolute; opacity: 0; }
.ax-addr__body {
    height: 100%; padding: 16px; border-radius: 12px;
    background: var(--es-surface, #f6f8fb);
    border: 1px solid var(--es-border, #e5e9f0);
    transition: all 0.18s ease;
}
.ax-addr__card input:checked + .ax-addr__body {
    border-color: var(--es-primary, #2454e8);
    background: rgba(36,84,232,0.04);
}
.ax-addr__name {
    font-weight: 700; font-size: 14px; margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px;
    color: var(--es-ink, #0f172a);
}
.ax-addr__pill {
    font-size: 10px; padding: 2px 7px; border-radius: 10px;
    background: rgba(36,84,232,0.1); color: var(--es-primary, #2454e8); font-weight: 600;
}
.ax-addr__text { color: var(--es-ink-soft, #475569); font-size: 13px; line-height: 1.55; }
.ax-addr__edit {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    background: rgba(36,84,232,0.08); border: 1px solid rgba(36,84,232,0.25);
    color: var(--es-primary, #2454e8); font-size: 12px; font-weight: 600;
    padding: 4px 12px; border-radius: 8px; cursor: pointer; line-height: 1.4;
    transition: background 0.15s ease;
}
.ax-addr__edit:hover { background: rgba(36,84,232,0.15); }

/* ---- Payment options ---- */
.ax-pay { display: flex; flex-direction: column; gap: 12px; }
.ax-pay__opt { position: relative; cursor: pointer; }
.ax-pay__opt input { position: absolute; opacity: 0; }
.ax-pay__body {
    display: flex; align-items: center; gap: 14px; padding: 16px;
    border-radius: 12px;
    background: var(--es-surface, #f6f8fb);
    border: 1px solid var(--es-border, #e5e9f0);
    transition: all 0.18s ease;
}
.ax-pay__opt input:checked + .ax-pay__body {
    border-color: var(--es-primary, #2454e8);
    background: rgba(36,84,232,0.04);
}
.ax-pay__radio {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--es-border, #e5e9f0); flex: 0 0 auto;
}
.ax-pay__opt input:checked + .ax-pay__body .ax-pay__radio {
    border-color: var(--es-primary, #2454e8);
    box-shadow: inset 0 0 0 4px var(--es-primary, #2454e8);
}
.ax-pay__label { font-weight: 600; font-size: 14px; color: var(--es-ink, #0f172a); }
.ax-pay__desc { color: var(--es-muted, #94a3b8); font-size: 12.5px; }

/* ---- Status badge ---- */
.ax-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.ax-badge--placed   { background: rgba(100,116,139,0.12); color: #475569; }
.ax-badge--confirmed{ background: rgba(36,84,232,0.12); color: var(--es-primary,#2454e8); }
.ax-badge--shipped  { background: rgba(6,182,212,0.12); color: #0891b2; }
.ax-badge--delivered{ background: rgba(15,157,88,0.12); color: #0a7a3c; }
.ax-badge--cancelled{ background: rgba(226,55,68,0.1); color: var(--es-danger,#e23744); }
.ax-badge--pending  { background: rgba(245,158,11,0.12); color: #92400e; }
.ax-badge--paid     { background: rgba(15,157,88,0.12); color: #0a7a3c; }
.ax-badge--failed   { background: rgba(226,55,68,0.1); color: var(--es-danger,#e23744); }

/* ---- Orders list ---- */
.ax-order { display: block; margin-bottom: 16px; }
.ax-order__head {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    margin-bottom: 16px; padding-bottom: 16px;
    border-bottom: 1px solid var(--es-border, #e5e9f0);
}
.ax-order__no { font-weight: 700; font-size: 15px; color: var(--es-ink, #0f172a); }
.ax-order__date { color: var(--es-muted, #94a3b8); font-size: 12.5px; }
.ax-order__thumbs { display: flex; align-items: center; gap: 10px; }
.ax-order__thumb {
    width: 52px; height: 62px; border-radius: 9px; overflow: hidden;
    background: var(--es-surface, #f6f8fb);
    border: 1px solid var(--es-border, #e5e9f0);
}
.ax-order__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ax-order__more { color: var(--es-muted, #94a3b8); font-size: 13px; }
.ax-order__foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 16px; }

/* ---- Order timeline ---- */
.ax-steps { display: flex; align-items: flex-start; margin: 8px 0 6px; }
.ax-steps__item { flex: 1; text-align: center; position: relative; }
.ax-steps__dot {
    width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 10px;
    background: var(--es-surface, #f6f8fb);
    border: 2px solid var(--es-border, #e5e9f0);
    display: flex; align-items: center; justify-content: center;
    color: var(--es-muted, #94a3b8); position: relative; z-index: 1;
}
.ax-steps__item.is-done .ax-steps__dot {
    background: var(--es-primary, #2454e8);
    border-color: var(--es-primary, #2454e8);
    color: #fff;
}
.ax-steps__item::before {
    content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px;
    background: var(--es-border, #e5e9f0); z-index: 0;
}
.ax-steps__item:first-child::before { display: none; }
.ax-steps__item.is-done::before { background: var(--es-primary, #2454e8); }
.ax-steps__label { font-size: 12px; color: var(--es-muted, #94a3b8); }
.ax-steps__item.is-done .ax-steps__label { color: var(--es-ink, #0f172a); font-weight: 600; }

/* ---- Address type selector (Home / Office / Work) ---- */
.ax-addrtype { display: flex; gap: 10px; flex-wrap: wrap; }
.ax-addrtype__opt {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: 20px; cursor: pointer;
    background: var(--es-surface, #f6f8fb);
    border: 1px solid var(--es-border, #e5e9f0);
    color: var(--es-ink-soft, #475569);
    font-size: 13px; font-weight: 600;
    transition: all 0.18s ease; user-select: none;
}
.ax-addrtype__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.ax-addrtype__opt:hover { border-color: var(--es-primary, #2454e8); color: var(--es-primary, #2454e8); }
.ax-addrtype__opt.is-active {
    background: rgba(36,84,232,0.08);
    border-color: var(--es-primary, #2454e8);
    color: var(--es-primary, #2454e8);
}

/* ---- Smart combo dropdown (State / City / Pincode) ---- */
.ax-combo { position: relative; }
.ax-combo__menu {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 500;
    background: #fff;
    border: 1px solid var(--es-border, #e5e9f0);
    border-radius: 10px; overflow-y: auto; max-height: 220px;
    box-shadow: var(--es-shadow, 0 8px 24px rgba(15,23,42,0.1));
    scrollbar-width: thin;
}
.ax-combo__opt {
    padding: 10px 14px; font-size: 13.5px; color: var(--es-ink-soft, #475569); cursor: pointer;
    transition: background 0.12s ease;
}
.ax-combo__opt:hover, .ax-combo__opt.is-active {
    background: rgba(36,84,232,0.07); color: var(--es-primary, #2454e8);
}
.ax-combo__opt--hint { color: var(--es-muted, #94a3b8); cursor: default; font-style: italic; }
.ax-combo__opt--hint:hover { background: transparent; color: var(--es-muted, #94a3b8); }

/* ---- Misc ---- */
.ax-link-gold { color: var(--es-primary, #2454e8); font-weight: 600; font-size: 13.5px; }
.ax-link-gold:hover { text-decoration: underline; }
.ax-mt { margin-top: 18px; }
.ax-muted { color: var(--es-muted, #94a3b8); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .ax-grid-cart, .ax-grid-account { grid-template-columns: 1fr; }
    .ax-summary2 { position: static; }
    .ax-side { position: static; }
    .ax-addr { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .ax-form-grid { grid-template-columns: 1fr; }
    .ax-citem { grid-template-columns: 72px 1fr; }
    .ax-citem__media { width: 72px; height: 88px; }
    .ax-citem__right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .ax-phead__title { font-size: 26px; }
}
