.container-parent{
    position: relative;
    width: 100%;
    height: 100%;
}

.profile-pages-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.section-colored {
    background-color: var( --primary-color);
    width: 30%;
}

.profile-section {
    width: 30%;
}

.profile-title {
    font-size: 1.167rem;
}

.profile-section * {
    font-size: 1.2rem;
    color: var(--text-color-primary-bg);
}

.profile-item {
    padding: 10px 0px;
    padding-right: 20px;
}

.rtl .profile-item {
    padding: 10px 0px;
    padding-right: 0px;
    padding-left: 20px;
}

.profile-item-title {
    font-size: 1.2rem;
    margin: 0 10px;
}

.profile-item-description {
    margin: 0 44px;
}

.profile-item-description p{
    font-size: 1rem;
}

.profile-item-image {
    font-size: 35px;
    width: 44px;
}

.profile-row.active {
    margin-left: -15px;
    padding: 10px;
    background-color: rgba(255, 255, 255, .4);
}

.rtl .profile-row.active {
    margin-left: unset;
    margin-right: -15px;
}

.profile-row {
    border-radius: 10px;
}

.account-content {
    margin: 50px;
}

.profile-section-dropdown {
    margin: 0px -15px;
}

.profile-section-dropdown .dropdown {
    position:static !important;
}

.profile-section-dropdown .dropdown-menu {
    top: 54px !important;
    transform: none !important;
    margin: 0px;
    padding: 0px;
    margin-top: 0!important;
    width: 100%!important;
    border: 0;
}

.profile-section-dropdown .nav {
    padding: 0px;
    width: 100%;
}

.profile-section-dropdown .dropdown-toggle::after{
    display: none !important;
}


.profile-section-dropdown .icon-arrow_drop_down1 {
    margin-left: auto;
}

.rtl .profile-section-dropdown .icon-arrow_drop_down1 {
    margin-left: unset;
    margin-right: auto;
    font-size: 32px;
}

.profile-section-dropdown .dropdown {
    background:var( --primary-color);
    border:0;
    border-radius:0px;
    width: 100%;
    padding: 10px 15px;
}

.profile-section-dropdown .dropdown-menu>li>a {
    background-color: var( --primary-color);
    padding: 10px 15px;
    color: #ffffff;
    border-top: 1px solid #3d3d3d;
}

.profile-section-dropdown .dropdown ul.dropdown-menu {
    border-radius:0px;
    box-shadow:none;
    margin-top:20px;
    width:300px;
}

.account-content .btn-primary {
    min-width: 100px;
    float: right;
}

.rtl .account-content .btn-primary {
    float: left;
}

.delete-button {
    position: absolute;
    top: 10px;
    right: 10px;
    /* border: 1px solid #ccc; */
    padding: 5px;
    cursor: pointer;
    z-index: 2;
}

.rtl .delete-button {
    right: unset;
    left: 10px;
}

@media only screen and (max-width: 768px) {
    .account-content {
        margin: 15px;
    }
}


/* ===== Theme account pages (templates/account_orders.jinja, account_wishlist.jinja) =====
   Menu beside the content from 992px, a scrolling row of pills above it on smaller screens.
   Personal info is Zid's own page; the menu only links to it. */
.account-shell {
    --account-radius: 14px;
    --account-line: var(--theme-line);
    --account-surface: var(--theme-surface);
    display: grid;
    gap: 20px;
}

@media (min-width: 992px) {
    .account-shell {
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 32px;
        align-items: start;
    }
}

.account-main {
    min-width: 0;
}

/* Menu */
.account-nav-list {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.account-nav-list::-webkit-scrollbar {
    display: none;
}

.account-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--account-line);
    border-radius: 999px;
    color: var(--theme-ink);
    white-space: nowrap;
    transition: border-color .2s ease, background-color .2s ease;
}

.account-nav-link:hover,
.account-nav-link:focus {
    color: var(--theme-ink);
    text-decoration: none;
}

.account-nav-link.is-active {
    border-color: var(--theme-ink);
    background-color: var(--account-surface);
}

.account-nav-link:focus-visible {
    outline: 2px solid var(--theme-ink);
    outline-offset: 2px;
}

.account-nav-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--account-surface);
}

.account-nav-icon .theme-icon {
    width: 18px;
    height: 18px;
}

.account-nav-title {
    display: block;
    font-size: 1.167rem;
    font-weight: 600;
}

.account-nav-desc {
    display: none;
    color: var(--theme-muted);
    font-size: 1rem;
}

@media (hover: hover) {
    .account-nav-link:hover {
        border-color: var(--theme-ink);
    }
}

@media (min-width: 992px) {
    .account-nav {
        position: sticky;
        top: 20px;
    }

    .account-nav-list {
        flex-direction: column;
        overflow: visible;
    }

    .account-nav-link {
        gap: 14px;
        padding: 16px;
        border-radius: var(--account-radius);
        white-space: normal;
    }

    .account-nav-link.is-active .account-nav-icon {
        background-color: var(--theme-bg);
    }

    .account-nav-icon {
        width: 44px;
        height: 44px;
    }

    .account-nav-desc {
        display: block;
        margin-top: 2px;
    }
}

/* Empty state (orders, wishlist) */
.account-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 420px;
    margin: 24px auto 0;
    padding: 40px 16px;
    text-align: center;
}

.account-empty[hidden] {
    display: none;
}

.account-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    border-radius: 50%;
    background-color: var(--account-surface);
    color: var(--theme-ink);
}

.account-empty-icon .theme-icon {
    width: 30px;
    height: 30px;
}

.account-empty-title {
    margin-bottom: 8px;
    color: var(--theme-ink);
    font-size: 1.667rem;
}

.account-empty-text {
    margin-bottom: 24px;
    color: var(--theme-muted);
}

/* Orders */
.account-orders-count,
.wishlist-page-count {
    margin: 0 0 16px;
    color: var(--theme-muted);
    font-size: 1.167rem;
}

.account-orders-list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-order {
    padding: 18px;
    border: 1px solid var(--account-line);
    border-radius: var(--account-radius);
    background-color: var(--theme-bg);
}

.account-order-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--account-line);
}

.account-order-number {
    display: block;
    color: var(--theme-ink);
    font-size: 1.333rem;
    font-weight: 600;
}

.account-order-date {
    display: block;
    margin-top: 2px;
    color: var(--theme-muted);
    font-size: 1rem;
}

/* Zid sends each status with its own colour (--order-status on the pill). */
.account-order-status {
    --order-status: var(--theme-ink);
    padding: 4px 12px;
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--order-status) 12%, transparent);
    color: var(--order-status);
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.account-order-meta {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.account-order-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.account-order-meta dt {
    flex: 0 0 auto;
    color: var(--theme-muted);
    font-weight: 400;
}

.account-order-meta dd {
    margin: 0;
    color: var(--theme-ink);
    text-align: end;
}

.account-order-total {
    font-weight: 600;
}

.account-order-address {
    display: block;
    color: var(--theme-muted);
    font-size: 1rem;
}

.account-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-order-btn {
    flex: 1 1 auto;
}

@media (min-width: 576px) {
    .account-order {
        padding: 22px 24px;
    }

    .account-order-btn {
        flex: 0 0 auto;
        min-width: 150px;
    }
}

/* Wishlist: listing grid and cards, one column fewer beside the menu. */
@media (min-width: 992px) {
    .account-main .products-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.wishlist-page-item {
    transition: opacity .3s ease, transform .3s ease;
}

.wishlist-page-item.is-removing {
    opacity: 0;
    transform: scale(.96);
}

@media (prefers-reduced-motion: reduce) {
    .wishlist-page-item,
    .account-nav-link {
        transition: none;
    }
}

/* Profile (templates/account_profile.jinja): one card per section, view <-> form toggled by JS. */
.account-profile {
    display: grid;
    gap: 16px;
}

.account-card {
    padding: 18px;
    border: 1px solid var(--account-line);
    border-radius: var(--account-radius);
    background-color: var(--theme-bg);
}

.account-card[hidden] {
    display: none;
}

.account-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.account-card-title {
    margin: 0;
    color: var(--theme-ink);
    font-size: 1.5rem;
}

.account-card-edit {
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--theme-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.account-card-edit[hidden] {
    display: none;
}

.account-card-edit:focus-visible {
    outline: 2px solid var(--theme-ink);
    outline-offset: 2px;
}

.account-fields {
    display: grid;
    gap: 12px;
    margin: 0;
}

.account-fields[hidden] {
    display: none;
}

.account-field {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.account-field dt {
    flex: 0 0 auto;
    color: var(--theme-muted);
    font-weight: 400;
}

.account-field dd {
    margin: 0;
    color: var(--theme-ink);
    text-align: end;
    overflow-wrap: anywhere;
}

.account-form[hidden] {
    display: none;
}

.account-form-grid {
    display: grid;
    gap: 14px;
}

.account-form-field {
    display: grid;
    gap: 6px;
    margin: 0;
}

.account-form-field > span {
    color: var(--theme-muted);
}

.account-form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    cursor: pointer;
}

.account-form-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--theme-ink);
}

.account-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.account-muted {
    margin: 0;
    color: var(--theme-muted);
}

.account-muted[hidden] {
    display: none;
}

.account-addresses {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-address {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--account-line);
    border-radius: calc(var(--account-radius) - 4px);
}

.account-address-title {
    display: block;
    margin-bottom: 4px;
    color: var(--theme-ink);
}

.account-address-line {
    display: block;
    color: var(--theme-muted);
}

.account-address-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 14px;
}

.account-address-action {
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--theme-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.account-address-action:disabled {
    opacity: .5;
    cursor: default;
}

@media (hover: hover) {
    .account-address-action:hover {
        color: var(--theme-ink);
    }
}

.account-address-action:focus-visible {
    outline: 2px solid var(--theme-ink);
    outline-offset: 2px;
}

.account-address-form {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--account-line);
}

.account-address-form-title {
    margin: 0 0 14px;
    color: var(--theme-ink);
    font-size: 1.25rem;
}

@media (min-width: 576px) {
    .account-card {
        padding: 22px 24px;
    }

    .account-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Log out + delete account (last card on the profile page). Delete is a <details> confirm step;
   its red comes from --account-danger so it can be retuned in one line. */
.account-session {
    --account-danger: #c0392b;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.account-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-ink);
    font-weight: 600;
}

.account-logout:hover,
.account-logout:focus {
    color: var(--theme-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.account-logout:focus-visible {
    outline: 2px solid var(--theme-ink);
    outline-offset: 2px;
}

.account-logout-icon {
    width: 18px;
    height: 18px;
}

.account-danger {
    text-align: end;
}

.account-danger[open] {
    flex-basis: 100%;
    text-align: start;
}

.account-danger-summary {
    display: inline-block;
    color: var(--account-danger);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.account-danger-summary::-webkit-details-marker {
    display: none;
}

.account-danger-summary:focus-visible {
    outline: 2px solid var(--account-danger);
    outline-offset: 2px;
}

.account-danger-text {
    margin: 12px 0 0;
    color: var(--theme-muted);
}

.account-danger-btn {
    border-color: var(--account-danger);
    background-color: var(--account-danger);
    color: #fff;
}

.account-danger-btn:hover,
.account-danger-btn:focus {
    border-color: var(--account-danger);
    background-color: var(--account-danger);
    color: #fff;
    filter: brightness(.92);
}
