/* ============================================================
   HavenDrapes — User Center Styles
   ============================================================ */

:root {
    --brand-dark: #3b2314;
    --brand-mid: #523A28;
    --brand-light: #c9a98a;
    --brand-bg: #faf6f2;
    --brand-border: #e8ddd4;
    --text-dark: #3b2314;
    --text-mid: #5a3d2b;
    --text-light: #7a5c45;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    background: #f5f0eb;
    color: var(--text-dark);
    min-height: 100vh;
}

/* ── Page Loading ──────────────────────────────────────────── */
#page-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--brand-mid);
}

/* ── Navigation bar area ───────────────────────────────────── */
#uc-header,
#uc-menu {
    width: 100%;
}

/* ── Main Layout ───────────────────────────────────────────── */
#uc-main {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px 60px;
}

/* ── Page Title ─────────────────────────────────────────────── */
.uc-page-title {
    font-size: 26px;
    font-weight: normal;
    letter-spacing: 2px;
    color: var(--brand-dark);
    text-transform: uppercase;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--brand-border);
}

/* ── Tabs ───────────────────────────────────────────────────── */
.uc-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--brand-border);
    margin-bottom: 32px;
}

.uc-tab {
    padding: 12px 28px;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: Arial, sans-serif;
    transition: color 0.2s;
}

.uc-tab:hover {
    color: var(--brand-mid);
}

.uc-tab.active {
    color: var(--brand-dark);
    border-bottom-color: var(--brand-mid);
    font-weight: bold;
}

/* ── Tab Panels ─────────────────────────────────────────────── */
.uc-panel {
    display: none;
}

.uc-panel.active {
    display: block;
}

/* ── Login Form (unauthenticated view) ─────────────────────── */
#uc-login-view {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    padding: 40px;
}

#uc-login-view h2 {
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    color: var(--brand-dark);
}

.uc-form-group {
    margin-bottom: 18px;
}

.uc-form-group label {
    display: block;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
    font-family: Arial, sans-serif;
    margin-bottom: 6px;
}

.uc-form-group input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--brand-border);
    padding: 0 12px;
    font-size: 14px;
    color: var(--text-dark);
    font-family: Georgia, serif;
    outline: none;
    transition: border-color 0.2s;
}

.uc-form-group input:focus {
    border-color: var(--brand-mid);
}

.uc-error-msg {
    color: #c0392b;
    font-size: 13px;
    font-family: Arial, sans-serif;
    margin-top: 4px;
    min-height: 18px;
}

.uc-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--brand-mid);
    color: #fff;
    border: none;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: background 0.2s;
    text-decoration: none;
}

.uc-btn:hover {
    background: var(--brand-dark);
    color: #fff;
}

.uc-btn-block {
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

.uc-btn-outline {
    background: transparent;
    border: 1px solid var(--brand-mid);
    color: var(--brand-mid);
}

.uc-btn-outline:hover {
    background: var(--brand-mid);
    color: #fff;
}

.uc-btn-danger {
    background: #c0392b;
}

.uc-btn-danger:hover {
    background: #922b21;
}

.uc-link {
    color: var(--brand-mid);
    font-size: 13px;
    font-family: Arial, sans-serif;
    text-decoration: none;
}

.uc-link:hover {
    text-decoration: underline;
}

/* ── Orders List ───────────────────────────────────────────── */
.uc-order-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    margin-bottom: 16px;
    overflow: hidden;
}

.uc-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    cursor: pointer;
    background: var(--brand-bg);
    border-bottom: 1px solid var(--brand-border);
    flex-wrap: wrap;
    gap: 10px;
}

.uc-order-header:hover {
    background: #f0e9e1;
}

.uc-order-num {
    font-size: 15px;
    font-weight: bold;
    color: var(--brand-dark);
    letter-spacing: 1px;
}

.uc-order-date {
    font-size: 13px;
    color: var(--text-light);
    font-family: Arial, sans-serif;
}

.uc-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: Arial, sans-serif;
}

.uc-status-pending {
    background: #fef9e7;
    color: #d4a017;
    border: 1px solid #f0d060;
}

.uc-status-processing {
    background: #eaf4fb;
    color: #2980b9;
    border: 1px solid #aed6f1;
}

.uc-status-shipped {
    background: #e8f8f5;
    color: #1a9974;
    border: 1px solid #82e0c5;
}

.uc-status-delivered {
    background: #eafaf1;
    color: #196f3d;
    border: 1px solid #82e0aa;
}

.uc-status-cancelled {
    background: #fdedec;
    color: #c0392b;
    border: 1px solid #f1948a;
}

.uc-order-total {
    font-size: 15px;
    color: var(--brand-dark);
    font-family: Arial, sans-serif;
}

.uc-order-toggle {
    font-size: 12px;
    color: var(--text-light);
    font-family: Arial, sans-serif;
}

.uc-order-body {
    padding: 20px 24px;
    display: none;
}

.uc-order-body.open {
    display: block;
}

.uc-item-row {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--brand-border);
}

.uc-item-row:last-child {
    border-bottom: none;
}

.uc-item-info {
    flex: 1;
}

.uc-item-name {
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--brand-dark);
}

.uc-item-spec {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    font-family: Arial, sans-serif;
}

.uc-item-price {
    font-size: 14px;
    color: var(--brand-dark);
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

.uc-order-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--brand-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.uc-address {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.7;
    font-family: Arial, sans-serif;
}

.uc-address strong {
    color: var(--brand-dark);
}

.uc-order-total-section {
    text-align: right;
    font-family: Arial, sans-serif;
}

.uc-order-total-section .total-label {
    font-size: 13px;
    color: var(--text-light);
}

.uc-order-total-section .total-value {
    font-size: 18px;
    color: var(--brand-dark);
    font-weight: bold;
}

/* ── Account Settings ──────────────────────────────────────── */
.uc-settings-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    padding: 32px;
    max-width: 500px;
    margin-bottom: 24px;
}

.uc-settings-card h3 {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-dark);
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

.uc-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--brand-border);
    font-family: Arial, sans-serif;
}

.uc-info-row:last-child {
    border-bottom: none;
}

.uc-info-label {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
}

.uc-info-value {
    font-size: 14px;
    color: var(--text-dark);
}

/* ── Empty State ───────────────────────────────────────────── */
.uc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-family: Arial, sans-serif;
}

.uc-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--brand-light);
}

.uc-empty p {
    font-size: 15px;
    margin-bottom: 24px;
}

/* ── Success / Error alerts ────────────────────────────────── */
.uc-alert {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    margin-bottom: 16px;
}

.uc-alert-success {
    background: #eafaf1;
    border: 1px solid #82e0aa;
    color: #196f3d;
}

.uc-alert-error {
    background: #fdedec;
    border: 1px solid #f1948a;
    color: #c0392b;
}

/* ══════════════════════════════════════════════════════════════
   ADDRESS MANAGEMENT
   ══════════════════════════════════════════════════════════════ */

/* Panel header row (title + add button side by side) */
.addr-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.uc-panel-heading {
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-dark);
    font-family: Arial, sans-serif;
    font-weight: bold;
    margin: 0;
}

.addr-add-btn {
    padding: 9px 20px;
    font-size: 12px;
}

/* Address card grid */
.addr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Address card */
.addr-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.addr-card:hover {
    box-shadow: 0 4px 16px rgba(82, 58, 40, 0.10);
}

.addr-card--default {
    border-color: var(--brand-mid);
    box-shadow: 0 0 0 2px rgba(82, 58, 40, 0.15);
}

/* Card top bar */
.addr-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--brand-bg);
    border-bottom: 1px solid var(--brand-border);
    flex-wrap: wrap;
    gap: 6px;
}

.addr-label-badge {
    font-size: 12px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brand-mid);
}

.addr-default-badge {
    font-size: 11px;
    font-family: Arial, sans-serif;
    color: #196f3d;
    background: #eafaf1;
    border: 1px solid #82e0aa;
    border-radius: 10px;
    padding: 2px 8px;
    letter-spacing: 0.5px;
}

/* Card body */
.addr-card-body {
    padding: 16px;
    flex: 1;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-mid);
}

.addr-name {
    font-weight: bold;
    color: var(--brand-dark);
    margin-bottom: 4px;
    font-size: 15px;
}

.addr-phone {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.addr-line {
    margin: 0;
    font-size: 13px;
    color: var(--text-mid);
}

/* Card action buttons */
.addr-card-actions {
    padding: 12px 16px;
    border-top: 1px solid var(--brand-border);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.addr-action-btn {
    padding: 5px 12px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.addr-btn-edit {
    border-color: var(--brand-mid);
    color: var(--brand-mid);
    background: transparent;
}

.addr-btn-edit:hover {
    background: var(--brand-mid);
    color: #fff;
}

.addr-btn-delete {
    border-color: #c0392b;
    color: #c0392b;
    background: transparent;
}

.addr-btn-delete:hover {
    background: #c0392b;
    color: #fff;
}

.addr-btn-default {
    border-color: #d4a017;
    color: #d4a017;
    background: transparent;
}

.addr-btn-default:hover {
    background: #d4a017;
    color: #fff;
}

/* Required asterisk in modal */
.required {
    color: #c0392b;
}

/* Checkout saved address selector */
.checkout-saved-addresses {
    background: var(--brand-bg, #faf6f2);
    border: 1px solid #e8ddd4;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.checkout-saved-addresses h6 {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #523A28;
    margin-bottom: 12px;
}

.checkout-addr-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #e8ddd4;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fff;
}

.checkout-addr-option:hover,
.checkout-addr-option.selected {
    border-color: #523A28;
    background: #fdf5ee;
}

.checkout-addr-option input[type="radio"] {
    margin-top: 3px;
    accent-color: #523A28;
}

.checkout-addr-text {
    font-size: 13px;
    line-height: 1.6;
    color: #5a3d2b;
}

.checkout-addr-text strong {
    font-size: 14px;
    color: #3b2314;
}

.checkout-addr-new-toggle {
    font-size: 13px;
    color: #523A28;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 4px;
    display: inline-block;
    font-family: Arial, sans-serif;
}

/* ── Order Item Thumbnail (My Orders) ──────────────────────── */
.uc-item-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.uc-item-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--brand-border);
    flex-shrink: 0;
    margin-right: 14px;
}