/**
 * TitanCart — My Account Pages
 *
 * Scoped to #tc-account with !important to override theme constraints.
 * Uses full-bleed breakout (same pattern as checkout.css).
 */

/* ── Full-bleed breakout ─────────────────────────────────────────────── */
#tc-account {
    display: block !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    margin-left: -50vw !important;
    padding: 0 !important;
    max-width: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    color: #1a1a1a !important;
    line-height: 1.5 !important;
}

/* ── Banner / Breadcrumb ─────────────────────────────────────────────── */
#tc-account .tc-account__banner {
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    text-align: center;
    padding: 40px 24px;
}
#tc-account .tc-account__banner-inner {
    max-width: 1200px;
    margin: 0 auto;
}
#tc-account .tc-account__banner-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #111;
}
#tc-account .tc-account__breadcrumb {
    font-size: 13px;
    color: #666;
}
#tc-account .tc-account__breadcrumb a {
    color: #444;
    text-decoration: none;
}
#tc-account .tc-account__breadcrumb a:hover {
    text-decoration: underline;
}
#tc-account .tc-sep {
    margin: 0 6px;
    color: #bbb;
}

/* ══════════════════════════════════════════════════════════════════════
   AUTH (Login / Register) — Guest view
   ══════════════════════════════════════════════════════════════════ */

#tc-account .tc-account__auth-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}
#tc-account .tc-account__auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Auth card (login + register share same position, toggled via JS) */
#tc-account .tc-auth-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 40px;
}
#tc-account .tc-auth-card--hidden {
    display: none;
}
#tc-account .tc-auth-card__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
}
#tc-account .tc-auth-card__subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 28px;
}
#tc-account .tc-auth-card__subtitle a {
    color: #111;
    font-weight: 600;
    text-decoration: underline;
}

/* Auth form fields */
#tc-account .tc-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
#tc-account .tc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#tc-account .tc-field label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}
#tc-account .tc-field input,
#tc-account .tc-field select,
#tc-account .tc-field textarea {
    padding: 10px 14px;
    border: 1.5px solid #d4d4d4;
    border-radius: 8px;
    font-size: 14px;
    color: #111;
    background: #fff;
    transition: border-color 0.15s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
#tc-account .tc-field input:focus,
#tc-account .tc-field select:focus {
    outline: none;
    border-color: #111;
}
#tc-account .tc-field__pw-wrap {
    position: relative;
}
#tc-account .tc-field__pw-wrap input {
    padding-right: 42px;
}
#tc-account .tc-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 16px;
    padding: 4px;
}
#tc-account .tc-field--row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
#tc-account .tc-field--row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Checkbox */
#tc-account .tc-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #444;
}
#tc-account .tc-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: #111;
    flex-shrink: 0;
}

/* Auth link */
#tc-account .tc-auth-link {
    font-size: 13px;
    color: #111;
    text-decoration: underline;
    white-space: nowrap;
}

/* Divider */
#tc-account .tc-auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0 16px;
}
#tc-account .tc-auth-divider::before,
#tc-account .tc-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}
#tc-account .tc-auth-divider span {
    font-size: 11px;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.5px;
}

/* Social buttons */
#tc-account .tc-auth-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
#tc-account .tc-social-btn-wrap {
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    border-radius: 4px;
    display: flex;
    justify-content: center;
}
#tc-account .tc-social-btn {
    width: 100%;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid #d4d4d4;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: not-allowed;
    opacity: 0.6;
    font-family: inherit;
    text-decoration: none;
}
/* Active provider — clickable */
#tc-account a.tc-social-btn--active,
#tc-account button.tc-social-btn--active {
    cursor: pointer;
    opacity: 1;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
#tc-account a.tc-social-btn--active:hover,
#tc-account button.tc-social-btn--active:hover {
    border-color: #a3a3a3;
    background: #fafafa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
#tc-account a.tc-social-btn--active:active,
#tc-account button.tc-social-btn--active:active {
    background: #f0f0f0;
}

/* Error / success messages */
#tc-account .tc-auth-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}
#tc-account .tc-auth-msg--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
#tc-account .tc-msg--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
#tc-account .tc-msg--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Benefits panel (right side of auth) */
#tc-account .tc-auth-benefits {
    padding: 40px 0;
    display: flex;
    align-items: center;
}
#tc-account .tc-auth-benefits__inner {
    padding: 0 32px;
}
#tc-account .tc-auth-benefits__inner h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 28px;
}
#tc-account .tc-auth-benefits__inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
#tc-account .tc-auth-benefits__inner li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
#tc-account .tc-auth-benefits__inner li > i {
    font-size: 22px;
    color: #111;
    margin-top: 2px;
    flex-shrink: 0;
}
#tc-account .tc-auth-benefits__inner li strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}
#tc-account .tc-auth-benefits__inner li p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   LOGGED-IN LAYOUT — Sidebar + Content
   ══════════════════════════════════════════════════════════════════ */

#tc-account .tc-account__layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

/* Sidebar */
#tc-account .tc-account__sidebar-toggle {
    display: none; /* shown on mobile */
}
#tc-account .tc-account__nav {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
#tc-account .tc-account__nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}
#tc-account .tc-account__nav-item:hover {
    background: #f5f5f5;
    color: #111;
}
#tc-account .tc-account__nav-item.tc-active {
    background: #f0f0f0;
    color: #111;
    font-weight: 600;
}
#tc-account .tc-account__nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}
#tc-account .tc-account__nav-heading {
    padding: 12px 14px 4px;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #999;
    border-top: 1px solid #eee;
}
#tc-account .tc-account__nav-heading:first-child {
    margin-top: 0;
    border-top: none;
}
#tc-account .tc-account__nav-item--logout {
    margin-top: 8px;
    border-top: 1px solid #eee;
    padding-top: 12px;
    color: #888;
}
#tc-account .tc-account__nav-item--logout:hover {
    color: #c44;
}

/* Content */
#tc-account .tc-account__content {
    min-width: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   BUTTONS (shared)
   ══════════════════════════════════════════════════════════════════ */
#tc-account .tc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
}
#tc-account .tc-btn--primary {
    background: #111;
    color: #fff;
    border-color: #111;
}
#tc-account .tc-btn--primary:hover {
    background: #333;
}
#tc-account .tc-btn--outline {
    background: #fff;
    color: #333;
    border-color: #d4d4d4;
}
#tc-account .tc-btn--outline:hover {
    border-color: #999;
}
#tc-account .tc-btn--danger {
    color: #b91c1c;
    border-color: #fca5a5;
}
#tc-account .tc-btn--danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
}
#tc-account .tc-btn--sm {
    padding: 6px 14px;
    font-size: 12px;
}
#tc-account .tc-btn--full {
    width: 100%;
}
#tc-account .tc-btn--large {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
}
#tc-account .tc-btn--loading {
    pointer-events: none;
    opacity: 0.6;
}

#tc-account .tc-link {
    font-size: 13px;
    color: #111;
    text-decoration: none;
    font-weight: 500;
}
#tc-account .tc-link:hover {
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════════════════════════════════ */
#tc-account .tc-dash__welcome h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
}
#tc-account .tc-dash__welcome p {
    font-size: 14px;
    color: #666;
    margin: 0 0 28px;
}

/* Stats */
#tc-account .tc-dash__stats {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}
#tc-account .tc-dash__stat {
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
#tc-account .tc-dash__stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #111;
}
#tc-account .tc-dash__stat-label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick nav */
#tc-account .tc-dash__quicknav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}
#tc-account .tc-dash__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: border-color 0.15s, box-shadow 0.15s;
}
#tc-account .tc-dash__card:hover {
    border-color: #111;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
#tc-account .tc-dash__card i {
    font-size: 24px;
    color: #111;
}
#tc-account .tc-dash__card span {
    font-size: 13px;
    font-weight: 500;
}

/* Section head */
#tc-account .tc-dash__section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
#tc-account .tc-dash__section-head h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

/* Empty state */
#tc-account .tc-dash__empty {
    text-align: center;
    padding: 48px 24px;
    color: #888;
}
#tc-account .tc-dash__empty i {
    font-size: 48px;
    color: #ccc;
    display: block;
    margin-bottom: 12px;
}
#tc-account .tc-dash__empty p {
    margin: 0 0 16px;
    font-size: 14px;
}
#tc-account .tc-dash__empty--sm {
    padding: 32px 16px;
}

/* ══════════════════════════════════════════════════════════════════════
   ORDERS TABLE (shared between dashboard + orders section)
   ══════════════════════════════════════════════════════════════════ */
#tc-account .tc-orders-table-wrap {
    overflow-x: auto;
}
#tc-account .tc-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
#tc-account .tc-orders-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}
#tc-account .tc-orders-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}
#tc-account .tc-orders-table tbody tr:last-child td {
    border-bottom: none;
}
#tc-account .tc-orders-table tbody tr:hover {
    background: #fafafa;
}
#tc-account .tc-order-num {
    font-weight: 600;
    color: #111;
    text-decoration: none;
}
#tc-account .tc-order-num:hover {
    text-decoration: underline;
}

/* Status dot */
#tc-account .tc-status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}
#tc-account .tc-status-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot, #888);
    flex-shrink: 0;
}

/* Product in order row */
#tc-account .tc-order-product {
    display: flex;
    align-items: center;
    gap: 10px;
}
#tc-account .tc-order-product img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}
#tc-account .tc-order-product__name {
    font-size: 12px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#tc-account .tc-order-product__more {
    font-size: 11px;
    color: #888;
}

/* ══════════════════════════════════════════════════════════════════════
   ADDRESSES
   ══════════════════════════════════════════════════════════════════ */
#tc-account .tc-addresses__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
#tc-account .tc-addresses__head h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}
#tc-account .tc-addresses__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#tc-account .tc-address-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px 24px;
}
#tc-account .tc-address-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
#tc-account .tc-address-card__head h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}
#tc-account .tc-address-card__badge {
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#tc-account .tc-address-card__body {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    font-style: normal;
    margin-bottom: 14px;
}
#tc-account .tc-address-card__actions {
    display: flex;
    gap: 8px;
}

/* ══════════════════════════════════════════════════════════════════════
   MODAL (Address editor)
   ══════════════════════════════════════════════════════════════════ */
#tc-account .tc-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
#tc-account .tc-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
#tc-account .tc-modal__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}
#tc-account .tc-modal__head h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}
#tc-account .tc-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
#tc-account .tc-modal__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#tc-account .tc-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

/* ══════════════════════════════════════════════════════════════════════
   PROFILE
   ══════════════════════════════════════════════════════════════════ */
#tc-account .tc-profile__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px;
}
#tc-account .tc-profile__card {
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
}
#tc-account .tc-profile__card h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px;
}
#tc-account .tc-profile__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#tc-account .tc-myorders__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    #tc-account .tc-account__auth-grid {
        grid-template-columns: 1fr;
    }
    #tc-account .tc-auth-benefits {
        display: none;
    }
    #tc-account .tc-account__layout {
        grid-template-columns: 1fr;
    }
    #tc-account .tc-account__sidebar-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #111;
        color: #fff;
        border: none;
        border-radius: 8px;
        padding: 10px 18px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        margin-bottom: 16px;
        font-family: inherit;
    }
    #tc-account .tc-account__nav {
        display: none;
    }
    #tc-account .tc-account__nav.tc-open {
        display: flex;
    }
}

@media (max-width: 768px) {
    #tc-account .tc-dash__quicknav {
        grid-template-columns: repeat(2, 1fr);
    }
    #tc-account .tc-dash__stats {
        flex-direction: column;
    }
    #tc-account .tc-field--row-2col {
        grid-template-columns: 1fr;
    }
    #tc-account .tc-field--row {
        flex-direction: column;
        align-items: stretch;
    }
    #tc-account .tc-auth-social {
        flex-direction: column;
    }
    #tc-account .tc-addresses__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    #tc-account .tc-account__banner {
        padding: 28px 16px;
    }
    #tc-account .tc-account__banner-title {
        font-size: 22px;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   WISHLIST
   ══════════════════════════════════════════════════════════════════ */
#tc-account .tc-wishlist__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}
#tc-account .tc-wishlist__head h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}
#tc-account .tc-wishlist__count {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* Product grid — 3 columns matching ShopNest */
#tc-account .tc-wishlist__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Wishlist card — extends .product-card from titancart.css */
#tc-account .tc-wl-card {
    transition: box-shadow 0.15s, opacity 0.3s, transform 0.3s;
}
#tc-account .tc-wl-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}
/* Hide shop-specific elements not needed on wishlist cards */
#tc-account .tc-wl-card .product-hover-actions,
#tc-account .tc-wl-card .product-card__meta-row,
#tc-account .tc-wl-card .product-card__body-stock {
    display: none !important;
}

/* Remove button (trash) — positioned over image */
#tc-account .tc-wl-card__remove {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #d4d4d4;
    background: #fff;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: color 0.15s, border-color 0.15s, background 0.15s, opacity 0.15s;
    opacity: 0;
}
#tc-account .tc-wl-card:hover .tc-wl-card__remove {
    opacity: 1;
}
#tc-account .tc-wl-card__remove:hover {
    color: #b91c1c;
    border-color: #ef4444;
    background: #fef2f2;
}



/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE (updated to include wishlist)
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    #tc-account .tc-wishlist__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    #tc-account .tc-wl-card__remove {
        opacity: 1; /* always visible on touch devices */
    }
}

@media (max-width: 480px) {
    #tc-account .tc-auth-card {
        padding: 24px 20px;
    }
    #tc-account .tc-account__auth-wrap {
        padding: 24px 16px;
    }
    #tc-account .tc-account__layout {
        padding: 24px 16px;
    }
    #tc-account .tc-wishlist__grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   ORDER DETAIL VIEW (inline in My Orders section)
   ═══════════════════════════════════════════════════════════════════════ */

/* S282: drive colors from the titancart-theme design tokens (--tct-*) so the
   order-detail view follows light/dark mode; each falls back to the original
   light value when the tokens are absent (non-titancart themes). */
.tc-order-detail { max-width: 820px; }

.tc-od__back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--tct-brand, #1F6AE1); text-decoration: none; font-size: 13px; font-weight: 500;
    margin-bottom: 20px;
}
.tc-od__back:hover { text-decoration: underline; }

.tc-od__header {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.tc-od__title {
    font-size: 22px; font-weight: 700; margin: 0 0 4px; color: var(--tct-text, #0E2B53);
}
.tc-od__meta {
    font-size: 13px; color: var(--tct-text-secondary, #5A6270); margin: 0;
}

.tc-od__divider {
    border: none; border-top: 1px solid var(--tct-border, #E1E5EA); margin: 24px 0;
}

.tc-od__section-title {
    font-size: 15px; font-weight: 700; color: var(--tct-text, #0E2B53); margin: 0 0 12px;
}

/* Items table */
.tc-od__items {
    width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 4px;
}
.tc-od__items th {
    background: var(--tct-bg-tertiary, #F6F8FB); padding: 9px 12px; text-align: left;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--tct-text-secondary, #5A6270); border-bottom: 2px solid var(--tct-border, #E1E5EA);
}
.tc-od__items td {
    padding: 12px; border-bottom: 1px solid var(--tct-border-subtle, #F0F2F5); vertical-align: top;
    color: var(--tct-text, inherit);
}
.tc-od__items tr:last-child td { border-bottom: none; }

.tc-od__product-cell {
    display: flex; gap: 12px; align-items: flex-start;
}
.tc-od__thumb {
    width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
    border: 1px solid var(--tct-border, #E1E5EA); flex-shrink: 0;
}
.tc-od__thumb-placeholder {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 8px; background: var(--tct-bg-tertiary, #F6F8FB);
    color: var(--tct-text-tertiary, #ccc); font-size: 18px; flex-shrink: 0;
}

/* Totals block */
.tc-od__totals {
    max-width: 280px; margin-left: auto; margin-top: 8px;
}
.tc-od__total-row {
    display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px;
    color: var(--tct-text, inherit);
}
.tc-od__total-row--grand {
    border-top: 1px solid var(--tct-border, #E1E5EA); padding-top: 10px; margin-top: 4px;
    font-size: 15px; font-weight: 700; color: var(--tct-text, #0E2B53);
}

/* Addresses */
.tc-od__addresses {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.tc-od__address-card {
    background: var(--tct-bg-secondary, #F6F8FB); border: 1px solid var(--tct-border-subtle, transparent); border-radius: 10px; padding: 16px;
    font-size: 13px; line-height: 1.75; color: var(--tct-text, inherit);
}
.tc-od__address-card address { font-style: normal; color: var(--tct-text, #1C2430); }
.tc-od__address-card .tc-od__section-title { margin-bottom: 8px; }

/* Shipments / tracking */
.tc-od__shipments { display: flex; flex-direction: column; gap: 12px; }
.tc-od__shipment {
    background: var(--tct-bg-secondary, #F6F8FB); border: 1px solid var(--tct-border-subtle, #E1E5EA);
    border-radius: 10px; padding: 14px 16px; color: var(--tct-text, inherit);
}
.tc-od__shipment-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.tc-od__shipment-date { font-size: 12px; color: var(--tct-text-secondary, #5A6270); }
.tc-od__shipment-meta { font-size: 13px; line-height: 1.7; }
.tc-od__shipment-meta > div { margin-bottom: 2px; }
.tc-od__track-link { color: var(--tct-brand, #1F6AE1); text-decoration: none; font-weight: 600; }
.tc-od__track-link:hover { text-decoration: underline; }
.tc-od__track-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tc-od__shipment-items { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.tc-od__shipment-items li { padding: 2px 0; }

/* Notes */
.tc-od__notes {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.tc-od__note {
    background: var(--tct-bg-secondary, #F6F8FB); border-left: 3px solid var(--tct-brand, #1F6AE1);
    padding: 12px 14px; border-radius: 0 8px 8px 0; color: var(--tct-text, inherit);
}
.tc-od__note p { margin: 0 0 4px; font-size: 13px; }

@media (max-width: 560px) {
    .tc-od__addresses { grid-template-columns: 1fr; }
    .tc-od__product-cell { flex-direction: column; gap: 6px; }
}

/* ══════════════════════════════════════════════════════════════════════
   REWARD POINTS
   ══════════════════════════════════════════════════════════════════ */

/* Header */
#tc-account .tc-rewards__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}
#tc-account .tc-rewards__head h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

/* Balance cards row */
#tc-account .tc-rewards__balance-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
#tc-account .tc-rewards__balance-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 12px;
}
#tc-account .tc-rewards__balance-card--primary {
    background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
    border-color: #FDE68A;
}
#tc-account .tc-rewards__balance-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
#tc-account .tc-rewards__balance-card--primary .tc-rewards__balance-icon {
    color: #D97706;
    background: #FFF;
}
#tc-account .tc-rewards__balance-card:not(.tc-rewards__balance-card--primary) .tc-rewards__balance-icon {
    color: #059669;
}
#tc-account .tc-rewards__balance-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
#tc-account .tc-rewards__balance-value {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}
#tc-account .tc-rewards__balance-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Info card — how it works */
#tc-account .tc-rewards__info-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}
#tc-account .tc-rewards__info-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 14px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}
#tc-account .tc-rewards__info-card h4 i {
    color: #6B7280;
}
#tc-account .tc-rewards__info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
}
#tc-account .tc-rewards__info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4B5563;
}
#tc-account .tc-rewards__info-item i {
    font-size: 16px;
    color: #9CA3AF;
}
#tc-account .tc-rewards__info-item strong {
    color: #111;
}

/* History */
#tc-account .tc-rewards__history h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
}
#tc-account .tc-rewards__table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
#tc-account .tc-rewards__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
#tc-account .tc-rewards__table th {
    background: #f9fafb;
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
    border-bottom: 2px solid #e5e7eb;
}
#tc-account .tc-rewards__table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}
#tc-account .tc-rewards__table tr:last-child td {
    border-bottom: none;
}
#tc-account .tc-rewards__col-pts {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}
#tc-account .tc-rewards__pts--positive {
    color: #059669;
}
#tc-account .tc-rewards__pts--negative {
    color: #DC2626;
}
#tc-account .tc-rewards__reason {
    color: #6B7280;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Action badges */
#tc-account .tc-rewards__action {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
#tc-account .tc-rewards__action--earned {
    background: #ECFDF5;
    color: #059669;
}
#tc-account .tc-rewards__action--redeemed {
    background: #EFF6FF;
    color: #2563EB;
}
#tc-account .tc-rewards__action--adjusted {
    background: #F3F4F6;
    color: #4B5563;
}
#tc-account .tc-rewards__action--expired {
    background: #FEF3C7;
    color: #92400E;
}
#tc-account .tc-rewards__action--refunded {
    background: #FEF2F2;
    color: #DC2626;
}

/* Responsive */
@media (max-width: 768px) {
    #tc-account .tc-rewards__balance-row {
        grid-template-columns: 1fr;
    }
    #tc-account .tc-rewards__info-grid {
        flex-direction: column;
        gap: 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PAYMENT INSTRUCTIONS CARD (S210)
   Default styling for the offline-gateway re-display card on the
   account order-detail page (/my-account/orders/?view=N).
   Mirror of the same rules in checkout.css so the card is consistent
   across both pages in core deployments. Theme/extension overrides
   apply via the `titancart_payment_instructions_wrapper_class` and
   `..._heading_class` filters in PaymentsModule.
   ═══════════════════════════════════════════════════════════════════ */
.tc-payment-instructions-card {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.tc-payment-instructions-card__title {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #0a0a0a;
}

.tc-payment-instructions__dl {
    display: grid;
    grid-template-columns: minmax(140px, max-content) 1fr;
    column-gap: 1.25rem;
    row-gap: 0.5rem;
    margin: 0 0 1rem;
}

.tc-payment-instructions__label {
    margin: 0;
    font-weight: 600;
    color: #525252;
}

.tc-payment-instructions__value {
    margin: 0;
    color: #0a0a0a;
    word-break: break-word;
}

.tc-payment-instructions__notes {
    margin: 0.75rem 0 0;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    border-radius: 4px;
    color: #1f2937;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.tc-payment-instructions__note {
    margin: 1rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
    font-style: italic;
}

@media (max-width: 480px) {
    .tc-payment-instructions__dl {
        grid-template-columns: 1fr;
        row-gap: 0.25rem;
    }
    .tc-payment-instructions__label {
        margin-top: 0.5rem;
    }
    .tc-payment-instructions__label:first-child {
        margin-top: 0;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   S31 — Prism per-preset DISPLAY FONT on account-page headings.
   Same mechanism as the inner-page block in titancart.css: `--tct-font-display`
   exists on :root ONLY when a Prism preset is active, so the `inherit` fallback
   leaves the base theme + market.titancart.io unchanged (these headings already
   inherit #tc-account's Inter). Scoped under #tc-account (1,1,0) to win over the
   earlier #tc-account rules by source order and the bare order-detail rules by
   specificity; ancestor `!important` on #tc-account does not transfer to a
   heading's own declaration, so no !important is needed here. Headings only —
   subtitles + order-product item names stay on the body font.
   ───────────────────────────────────────────────────────────────────────── */
#tc-account .tc-account__banner-title,
#tc-account .tc-auth-card__title,
#tc-account .tc-account__nav-heading,
#tc-account .tc-profile__title,
#tc-account .tc-myorders__title,
#tc-account .tc-od__title,
#tc-account .tc-od__section-title,
#tc-account .tc-payment-instructions-card__title {
    font-family: var(--tct-font-display, inherit);
}
