/* =========================================================
   UBHAYA - PROFILE PAGE
   Keep this file separate from site.css
   ========================================================= */

.profile-page {
    width: 100%;
    min-height: calc(100vh - 120px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 70px 20px 90px;
    background: linear-gradient(180deg, #faf8f6 0%, #f8efec 100%);
    box-sizing: border-box;
}

.profile-card {
    width: 100%;
    max-width: 620px;
    background: #fff;
    border: 1px solid rgba(87, 19, 38, 0.08);
    border-radius: 22px;
    padding: 42px 44px;
    box-sizing: border-box;
    box-shadow: 0 12px 40px rgba(36, 25, 29, 0.08);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 38px;
}

.profile-avatar {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #571326;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    font-weight: 500;
    text-transform: uppercase;
}

.profile-heading {
    flex: 1;
}

.profile-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #8c5265;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.profile-heading h1 {
    margin: 0;
    color: #24191d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.1;
}

.profile-heading p {
    margin: 8px 0 0;
    color: #74666a;
    font-size: 14px;
    line-height: 1.5;
}

.profile-success {
    margin-bottom: 24px;
    padding: 13px 16px;
    border: 1px solid #cce3d4;
    border-radius: 9px;
    background: #f1faf4;
    color: #28633c;
    font-size: 14px;
}

.profile-error {
    margin-bottom: 24px;
    padding: 13px 16px;
    border: 1px solid #e6c3ca;
    border-radius: 9px;
    background: #fff4f5;
    color: #8a2439;
    font-size: 14px;
}

.profile-form {
    width: 100%;
}

.profile-field {
    margin-bottom: 22px;
}

.profile-field label {
    display: block;
    margin-bottom: 8px;
    color: #24191d;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.profile-field input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    box-sizing: border-box;
    border: 1px solid #d9d1d3;
    border-radius: 9px;
    background: #fff;
    color: #24191d;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.profile-field input::placeholder {
    color: #a59b9e;
}

.profile-field input:focus {
    border-color: #571326;
    box-shadow: 0 0 0 3px rgba(87, 19, 38, 0.08);
}

.profile-field input.profile-readonly {
    background: #f5f3f2;
    color: #766b6e;
    cursor: not-allowed;
}

.profile-help {
    display: block;
    margin-top: 6px;
    color: #918589;
    font-size: 11px;
}

.profile-validation {
    display: block;
    margin-top: 5px;
    color: #a4263e;
    font-size: 12px;
}

.profile-save-button {
    width: 100%;
    height: 52px;
    margin-top: 8px;
    border: 0;
    border-radius: 9px;
    background: #571326;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.profile-save-button:hover {
    background: #42101e;
    box-shadow: 0 7px 18px rgba(87, 19, 38, 0.18);
    transform: translateY(-1px);
}

.profile-save-button:active {
    transform: translateY(0);
}

.profile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #eee8e6;
}

.profile-actions form {
    margin: 0;
}

.profile-shopping-link {
    color: #571326;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}

.profile-shopping-link:hover {
    color: #24191d;
    text-decoration: underline;
}

.profile-logout-button {
    min-width: 100px;
    height: 42px;
    padding: 0 20px;
    border: 1px solid #571326;
    border-radius: 8px;
    background: #fff;
    color: #571326;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.profile-logout-button:hover {
    background: #571326;
    color: #fff;
}

@media (max-width: 700px) {
    .profile-page {
        min-height: calc(100vh - 90px);
        padding: 35px 15px 60px;
    }

    .profile-card {
        max-width: 100%;
        padding: 30px 22px;
        border-radius: 18px;
    }

    .profile-header {
        gap: 15px;
        margin-bottom: 30px;
    }

    .profile-avatar {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
        font-size: 23px;
    }

    .profile-heading h1 {
        font-size: 30px;
    }

    .profile-heading p {
        font-size: 13px;
    }

    .profile-field {
        margin-bottom: 19px;
    }

    .profile-field input {
        height: 48px;
    }

    .profile-actions {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 15px;
    }

    .profile-shopping-link {
        order: 1;
    }

    .profile-actions form {
        order: 2;
    }

    .profile-logout-button {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .profile-page {
        padding: 25px 12px 50px;
    }

    .profile-card {
        padding: 25px 18px;
    }

    .profile-heading h1 {
        font-size: 27px;
    }

    .profile-avatar {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        font-size: 20px;
    }
}

.profile-account-card { max-width: 1220px; }
.profile-tabs { display:flex; gap:8px; overflow-x:auto; margin:0 0 28px; padding:0 0 10px; border-bottom:1px solid #eee8e6; }
.profile-tabs a { flex:0 0 auto; padding:11px 15px; border-radius:9px; color:#74666a; font-size:13px; font-weight:650; text-decoration:none; }
.profile-tabs a:hover { background:#faf6f7; color:#571326; }
.profile-tabs a.is-active { background:#571326; color:#fff; }
.profile-tab-panel { min-height:260px; }
.profile-panel-heading { margin-bottom:22px; }
.profile-panel-heading h2 { margin:0; color:#24191d; font-family:Georgia,"Times New Roman",serif; font-size:25px; font-weight:400; }
.profile-panel-heading p,.profile-empty-state { margin:7px 0 0; color:#74666a; font-size:13px; line-height:1.5; }
.profile-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; }
.profile-form-grid .profile-field { min-width:0; }
.profile-field select { width:100%; height:50px; padding:0 13px; border:1px solid #d9d1d3; border-radius:9px; background:#fff; color:#24191d; font:inherit; }
.profile-address-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:12px; margin:20px 0; }
.profile-address-card { position:relative; display:flex; flex-direction:column; min-width:0; min-height:266px; padding:22px 20px 16px; border:1px solid #cfcfcf; border-radius:9px; background:#fff; box-shadow:0 2px 1px rgba(0,0,0,.12); box-sizing:border-box; }
.profile-address-summary { display:flex; flex-direction:column; align-items:flex-start; color:#111; font-size:14px; line-height:1.48; overflow-wrap:anywhere; }
.profile-address-summary strong { margin-bottom:1px; font-weight:700; }
.profile-delivery-note { color:#15549a; }
.profile-address-card > .profile-default-badge { position:absolute; top:0; left:0; padding:10px 18px; border-radius:8px 0 8px 0; background:#fff; color:#3f5870; font-size:12px; font-weight:400; }
.profile-address-card:has(> .profile-default-badge) .profile-address-summary { padding-top:27px; }
.profile-address-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:auto; padding-top:18px; color:#164f8a; font-size:14px; }
.profile-address-actions summary,.profile-address-actions button { padding:0; border:0; background:transparent; color:#164f8a; font:inherit; cursor:pointer; }
.profile-address-actions summary { list-style:none; }
.profile-address-actions summary::-webkit-details-marker { display:none; }
.profile-address-actions form { margin:0; }
.profile-address-actions .profile-address-delete { margin:0; }
.profile-address-delete button { padding:0; color:#164f8a; font:inherit; }
.profile-address-actions .profile-address-editor { position:absolute; z-index:2; top:12px; left:12px; right:12px; padding:18px; border:1px solid #ddd; border-radius:8px; background:#fff; box-shadow:0 8px 28px #0002; }
.profile-address-editor h3 { margin:0 0 14px; }
.profile-address-editor .profile-address-form label { margin-bottom:10px; }
.profile-address-editor .profile-save-button { width:auto; min-width:150px; padding:0 16px; }
.profile-address-editor .profile-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.profile-add-address { align-items:center; justify-content:center; padding:0; border:2px dashed #c8c8c8; box-shadow:none; }
.profile-add-address > summary { display:flex; width:100%; height:100%; min-height:262px; flex-direction:column; align-items:center; justify-content:center; gap:8px; color:#525252; list-style:none; cursor:pointer; }
.profile-add-address > summary::-webkit-details-marker { display:none; }
.profile-add-address > summary span { color:#c9c9c9; font-size:64px; font-weight:200; line-height:1; }
.profile-add-address > summary strong { font-size:23px; }
.profile-add-address[open] { grid-column:span 2; align-items:stretch; justify-content:flex-start; padding:20px; }
.profile-add-address[open] > summary { width:auto; height:auto; min-height:0; flex-direction:row; justify-content:flex-start; gap:10px; }
.profile-add-address[open] > summary span { font-size:28px; }
.profile-add-address[open] .profile-address-editor { margin-top:18px; width:100%; box-sizing:border-box; }
.profile-address-card-heading { display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.profile-address-card-heading strong { color:#321e25; }
.profile-default-badge { padding:4px 8px; border-radius:99px; background:#f8edf1; color:#68142e; font-size:11px; font-weight:700; }
.profile-address-form label { display:grid; gap:7px; color:#51474a; font-size:12px; font-weight:650; }
.profile-address-form input:not([type=checkbox]) { width:100%; min-width:0; height:43px; padding:0 11px; border:1px solid #ddd3d7; border-radius:7px; color:#2d2427; font:inherit; font-size:13px; box-sizing:border-box; }
.profile-field-wide { grid-column:1/-1; }
.profile-default-option { display:flex!important; align-items:center; gap:9px!important; margin:14px 0; cursor:pointer; }
.profile-default-option input { width:17px; height:17px; accent-color:#68142e; }
.profile-address-card .profile-save-button { max-width:240px; height:46px; margin-top:0; }
.profile-address-delete { margin-top:8px; }
.profile-address-delete button { padding:8px 0; border:0; background:transparent; color:#a4263e; font:inherit; font-size:13px; cursor:pointer; }
.profile-new-address { margin-top:24px; background:#fcfafb; }
.profile-new-address h3 { margin:0 0 17px; color:#321e25; font-size:16px; }
.profile-reset-note { margin-top:20px; color:#74666a; font-size:13px; }
.profile-reset-note a,.auth-forgot-link a { color:#68142e; font-weight:650; }
.auth-forgot-link { margin:-8px 0 18px; text-align:right; font-size:13px; }

.profile-orders-panel { min-height:0; }
.profile-orders-list { display:grid; gap:14px; }
.profile-order-card { overflow:hidden; border:1px solid #e7dfe1; border-radius:12px; background:#fff; }
.profile-order-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; }
.profile-order-header > div { display:grid; gap:5px; }
.profile-order-header > div span { color:#68142e; font-size:11px; font-weight:750; letter-spacing:.08em; }
.profile-order-header time { color:#74666a; font-size:13px; }
.profile-order-header > strong { color:#321e25; font-size:18px; white-space:nowrap; }
.profile-order-badges { display:flex; flex-wrap:wrap; gap:8px; padding:12px 20px; background:#fcfaf8; }
.profile-order-badges .order-status-pill,.profile-order-badges .order-payment-pill { min-height:28px; border-radius:99px; font-size:10px; letter-spacing:.03em; }
.profile-order-details { border-top:1px solid #eee8e6; }
.profile-order-details[hidden] { display:none; }
.profile-order-items { padding:4px 20px; }
.profile-order-items > div { display:grid; grid-template-columns:56px minmax(0,1fr) auto; align-items:center; gap:14px; padding:13px 0; border-bottom:1px solid #f0ebec; }
.profile-order-items > div:last-child { border-bottom:0; }
.profile-order-item > img,.profile-order-image-placeholder { display:block; width:56px; height:68px; border-radius:5px; background:#f7f1f3; object-fit:cover; }
.profile-order-image-placeholder { display:grid; place-items:center; color:#8e6572; font-family:Georgia,"Times New Roman",serif; font-size:22px; }
.profile-order-item-info { display:grid; gap:5px; min-width:0; }
.profile-order-items > div > span strong { color:#302529; font-size:13px; }
.profile-order-items small { color:#74666a; font-size:12px; }
.profile-order-item-price { color:#302529; font-size:13px; white-space:nowrap; }
.profile-order-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px 20px; padding:14px 20px; border-top:1px solid #eee8e6; color:#51474a; font-size:12px; line-height:1.5; }
.profile-order-footer > span { display:grid; gap:3px; }
.profile-order-footer small { color:#74666a; font-size:11px; }
.profile-orders-empty { display:grid; justify-items:center; padding:50px 20px; border:1px dashed #dfd5d8; border-radius:12px; background:#fcfafb; text-align:center; }
.profile-orders-empty > span { color:#b48b98; font-size:36px; }
.profile-orders-empty h3 { margin:10px 0 0; color:#321e25; font-family:Georgia,"Times New Roman",serif; font-size:22px; font-weight:400; }
.profile-orders-empty p { margin:8px 0 18px; color:#74666a; font-size:13px; }
.profile-orders-shop { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 17px; border-radius:6px; background:#68142e; color:#fff; font-size:12px; font-weight:700; text-decoration:none; }
.profile-orders-shop:hover { background:#4f0d23; }

@media (max-width:600px) {
    .profile-tabs { gap:3px; }
    .profile-tabs a { padding:10px 11px; font-size:12px; }
    .profile-form-grid { grid-template-columns:1fr; }
    .profile-field-wide { grid-column:auto; }
    .profile-address-list { grid-template-columns:1fr; }
    .profile-address-card { padding:17px 15px; }
    .profile-address-card .profile-save-button { max-width:none; }
    .profile-add-address[open] { grid-column:auto; }
    .profile-address-editor .profile-form-grid { grid-template-columns:1fr; }
    .profile-order-header,.profile-order-badges,.profile-order-items { padding-left:14px; padding-right:14px; }
    .profile-order-footer { padding-left:14px; padding-right:14px; }
}
@media (min-width:601px) and (max-width:900px) { .profile-address-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.profile-email-verification {
    margin: 22px 0;
    padding: 18px;
    border: 1px solid #eadfd2;
    border-radius: 10px;
    background: #fbf8f5;
}

.profile-email-verification p { margin: 0 0 12px; }
.profile-email-verification strong { color: #2e7049; }
.profile-email-verification .profile-field { margin: 14px 0; }


/* Clear, button-like order actions so tracking is visibly clickable. */
.profile-order-footer .profile-order-tracking,
.profile-order-footer .profile-order-detail-action { align-content:start; }
.profile-order-footer .profile-track-order-link,
.profile-order-footer .profile-order-detail-link {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    width:max-content;
    max-width:100%;
    min-height:38px;
    padding:0 13px;
    border:1px solid #68142e;
    border-radius:7px;
    background:#fff;
    color:#68142e !important;
    font-size:12px;
    font-weight:750;
    line-height:1.3;
    text-decoration:none;
    transition:background .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.profile-order-footer .profile-track-order-link { background:#68142e; color:#fff !important; box-shadow:0 4px 10px rgba(104,20,46,.12); }
.profile-order-footer .profile-track-order-link span,
.profile-order-footer .profile-order-detail-link span { font-size:17px; line-height:1; }
.profile-order-footer .profile-track-order-link:hover,
.profile-order-footer .profile-order-detail-link:hover { background:#92274e; border-color:#92274e; color:#fff !important; transform:translateY(-1px); box-shadow:0 6px 14px rgba(104,20,46,.16); }
@media(max-width:600px) {
    .profile-order-footer .profile-order-tracking,
    .profile-order-footer .profile-order-detail-action { width:100%; }
    .profile-order-footer .profile-track-order-link,
    .profile-order-footer .profile-order-detail-link { width:100%; }
}

.order-card-heading-right { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px 12px; }
.order-card-heading-right .order-card-total { flex:0 0 100%; text-align:right; }
.order-open-details-link { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:34px; padding:0 11px; border:1px solid #68142e; border-radius:7px; background:#68142e; color:#fff !important; font-size:11px; font-weight:800; text-decoration:none; white-space:nowrap; }
.order-open-details-link span { font-size:15px; }
.order-open-details-link:hover { background:#92274e; border-color:#92274e; color:#fff !important; }
@media(max-width:600px) {
    .profile-order-header { align-items:flex-start; }
    .order-card-heading-right { align-items:flex-end; }
    .order-card-heading-right .order-card-total { font-size:17px; }
    .order-open-details-link { min-height:32px; padding:0 9px; font-size:10px; }
}


/* Account deletion — explicit danger zone with deliberate confirmation. */
.profile-delete-account {
    margin-top: 34px;
    padding: 24px;
    border: 1px solid #e8cbd2;
    border-radius: 12px;
    background: #fffafa;
}
.profile-delete-account-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}
.profile-delete-account-heading > span {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 50%;
    background: #f8e8eb;
    color: #a4263e;
    font-size: 22px;
    font-weight: 800;
}
.profile-delete-account-heading h3 {
    margin: 0;
    color: #8f2039;
    font: 400 23px Georgia, "Times New Roman", serif;
}
.profile-delete-account-heading p {
    margin: 5px 0 0;
    color: #74666a;
    font-size: 13px;
    line-height: 1.5;
}
.profile-delete-account > ul {
    margin: 18px 0;
    padding-left: 20px;
    color: #66575b;
    font-size: 13px;
    line-height: 1.7;
}
.profile-delete-account-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}
.profile-delete-account-form .profile-field { min-width: 0; margin-bottom: 12px; }
.profile-delete-account-button {
    grid-column: 1 / -1;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid #a4263e;
    border-radius: 8px;
    background: #a4263e;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}
.profile-delete-account-button:hover { background: #811b30; border-color: #811b30; }
.profile-delete-account-note {
    margin: 12px 0 0;
    color: #88777b;
    font-size: 11px;
    line-height: 1.5;
}
@media (max-width: 600px) {
    .profile-delete-account { padding: 18px 15px; }
    .profile-delete-account-form { grid-template-columns: 1fr; }
    .profile-delete-account-button { grid-column: auto; width: 100%; }
}


/* Keep the Delete Account destination visible in the profile navigation on phones. */
.profile-tabs { flex-wrap: wrap; overflow-x: visible; }
.profile-tabs a[href*="tab=delete"] {
    border: 1px solid #e6c3ca;
    background: #fff8f9;
    color: #9b263e;
}
.profile-tabs a[href*="tab=delete"]:hover,
.profile-tabs a[href*="tab=delete"].is-active {
    border-color: #a4263e;
    background: #a4263e;
    color: #fff;
}
@media (max-width: 600px) {
    .profile-tabs { flex-wrap: wrap; overflow: visible; }
    .profile-tabs a { flex: 0 0 auto; }
}

.profile-delete-account-shortcut {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 26px;
    padding: 15px 17px;
    border: 1px solid #ead6da;
    border-radius: 9px;
    background: #fffafb;
    color: #74666a;
    font-size: 13px;
}
.profile-delete-account-shortcut a {
    color: #9b263e;
    font-weight: 750;
    text-decoration: none;
}
.profile-delete-account-shortcut a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .profile-delete-account-shortcut { align-items: flex-start; flex-direction: column; }
}


/* Keep Delete account tab visually consistent with the other profile tabs. */
.profile-tabs a[href*="tab=delete"] {
    border: 1px solid transparent !important;
    background: transparent !important;
    color: #74666a !important;
    padding: 11px 15px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    box-shadow: none !important;
}
.profile-tabs a[href*="tab=delete"]:hover {
    border-color: transparent !important;
    background: #faf6f7 !important;
    color: #571326 !important;
}
.profile-tabs a[href*="tab=delete"].is-active {
    border-color: transparent !important;
    background: #571326 !important;
    color: #fff !important;
}
@media (max-width: 600px) {
    .profile-tabs a[href*="tab=delete"] {
        padding: 10px 11px !important;
        font-size: 12px !important;
    }
}
