/* ---------- Account / Profile Pages ---------- */

.account-wrapper {
    margin-top: 0;
    margin-bottom: 100px;
    padding: 0;
}

@media (max-width: 1200px) {
    .account-wrapper {
        margin-bottom: 60px;
        padding: 0 15px;
    }
}

/* ---- Mobile sidebar toggle ---- */
.account-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    color: var(--color-text);
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: border-color 0.2s;
}

.account-sidebar-toggle:hover {
    border-color: var(--color-green-main);
    color: var(--color-green-main);
}

/* ---- Account Sidebar ---- */
.account-sidebar {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px 20px;
    position: sticky;
    top: 130px;
}

.account-sidebar_heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid #E5E7EB;
}

.account-sidebar_avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-green-main);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: 18px;
    flex-shrink: 0;
}

.account-sidebar_name {
    font-weight: var(--font-weight-semibold);
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.3;
}

/* Sidebar links */
.account-sidebar_link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    position: relative;
    margin-bottom: 6px;
}

.account-sidebar_link:hover {
    background: #44564330;
    color: var(--color-green-main);
}

.account-sidebar_link.active {
    background: #44564330;
    color: var(--color-green-main);
    font-weight: var(--font-weight-semibold);
}

.account-sidebar_ico {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.account-sidebar_ico img {
    width: 20px;
    height: 20px;
    opacity: 0.65;
}

.account-sidebar_link:hover .account-sidebar_ico img,
.account-sidebar_link.active .account-sidebar_ico img {
    opacity: 1;
}

.account-sidebar_counter {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--color-rose);
    color: #fff;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.account-sidebar_title {
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 12px 4px;
    margin: 0;
}

/* ---- Account Page Title ---- */
.account-page-title {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0;
}

/* ---- Account content area ---- */
.account-content {
    min-height: 400px;
}

/* ---- Orders History ---- */
.orders-history {
    margin: 0;
}

.orders-history_heading {
    border-bottom: 1px solid #E5E7EB;
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: #6B7280;
}

.orders-history_item {
    border-bottom: 1px solid #F0F2F3;
    cursor: pointer;
    transition: background 0.15s;
}

.orders-history_item:hover {
    background: #FAFBFC;
}

.orders-history_item .row {
    align-items: center;
    padding: 0 10px;
}

.orders-history_item-id {
    font-weight: var(--font-weight-semibold);
    font-size: 15px;
    color: var(--color-text);
}

.orders-history_item-date {
    font-size: 14px;
    color: #6B7280;
}

.orders-history_item-total {
    font-weight: var(--font-weight-semibold);
    font-size: 15px;
}

/* Status badges */
.orders-history_status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    padding: 4px 0;
}

.orders-history_status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.orders-history_status--new::before,
.orders-history_status--processing::before,
.orders-history_status--waiting::before {
    background: #3B82F6;
}
.orders-history_status--new,
.orders-history_status--processing,
.orders-history_status--waiting {
    color: #3B82F6;
}

.orders-history_status--delivered::before,
.orders-history_status--done::before {
    background: #10B981;
}
.orders-history_status--delivered,
.orders-history_status--done {
    color: #10B981;
}

.orders-history_status--canceled::before,
.orders-history_status--returned::before,
.orders-history_status--trash::before {
    background: #EF4444;
}
.orders-history_status--canceled,
.orders-history_status--returned,
.orders-history_status--trash {
    color: #EF4444;
}

/* Order row arrow */
.orders-history_arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: #9CA3AF;
    transition: transform 0.2s;
}

.orders-history_arrow svg {
    width: 16px;
    height: 16px;
}

/* Order expand details */
.orders-history_item-details {
    display: none;
    border-top: 1px solid #E5E7EB;
    margin-top: 12px;
    padding: 0 5px;
}

.orders-history_item-details.active {
    display: block;
}

/* ---- Status filter ---- */
.account-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.account-filter select,
.account-filter-select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 8px 40px 8px 14px;
    font-size: 14px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    cursor: pointer;
    min-width: 140px;
}

.account-filter select:focus,
.account-filter-select:focus {
    outline: none;
    border-color: var(--color-green-main);
}

/* ---- Pagination ---- */
.account-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 24px;
    justify-content: center;
}

.account-pagination a,
.account-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.15s;
}

.account-pagination a:hover {
    background: var(--color-green-light);
}

.account-pagination span.active {
    background: var(--color-green-main);
    color: #fff;
}

/* ---- Cart product in order details ---- */
.cart-product {
    border-radius: 8px;
    background: #FAFBFC;
}

.cart-product_img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.cart-product_img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-product_title {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-product_title:hover {
    color: var(--color-green-main);
}

.cart-product_price span {
    font-weight: var(--font-weight-semibold);
}

/* ---- Favorites Grid ---- */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.favorites-grid .product-item {
    position: relative;
}

.btn-fav-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6B7280;
    transition: color 0.2s, border-color 0.2s;
}

.btn-fav-remove:hover {
    color: #EF4444;
    border-color: #EF4444;
}

.btn-clear-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #EF4444;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    padding: 6px 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.btn-clear-all:hover {
    opacity: 0.75;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text);
    height: 100%;
    margin: 100px auto;
}

.empty-state_icon {
    margin-bottom: 16px;
}

.empty-state_text {
    font-size: 16px;
    margin-bottom: 20px;
}

.empty-state_btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--color-green-main);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    transition: opacity 0.2s;
    max-width: 200px;
}

.empty-state_btn:hover {
    opacity: 0.9;
    color: #fff;
}

.empty-state .btn {
    margin-top: 16px;
}

/* ---- Terms & Conditions Page ---- */
.terms-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
}

.terms-content h2 {
    color: var(--color-text);
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    margin-top: 32px;
    margin-bottom: 12px;
}

.terms-content p {
    margin-bottom: 12px;
}

.terms-content a {
    color: var(--color-green-main);
    text-decoration: underline;
}

.terms-content a:hover {
    text-decoration: none;
}

/* ---- Reviews List ---- */
.review-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.review-link:hover {
    border-color: var(--color-green-main);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.review-link_prod-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-link_prod-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.review-link_prod-name {
    font-weight: var(--font-weight-semibold);
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
}

.review-link_text {
    font-size: 14px;
    color: #6B7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-link_ico {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---- Star Rating ---- */
.star-rating {
    display: inline-flex;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.star-rating_item {
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23D1D5DB'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 21 12 17.27 5.82 21 7 14.14l-5-4.87 6.91-1.01z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.star-rating_item.active {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F59E0B'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 21 12 17.27 5.82 21 7 14.14l-5-4.87 6.91-1.01z'/%3E%3C/svg%3E");
}

/* ---- FAQ Accordion ---- */
.accordion {
    list-style: none;
    padding: 0;
    margin: 0;
}

.accordion_item {
    border-bottom: 1px solid #E5E7EB;
}

.accordion_title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    cursor: pointer;
    border: none;
    background: none;
    text-align: left;
}

.accordion_title::after {
    content: "";
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
    transition: transform 0.2s;
}

.accordion_title.active::after {
    transform: rotate(180deg);
}

.accordion_content {
    display: none;
    padding: 0 0 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #6B7280;
}

.accordion_title.active + .accordion_content {
    display: block;
}

/* ============================
   RESPONSIVE - Tablet (<=991px)
   ============================ */
@media (max-width: 991px) {
    .account-sidebar {
        position: static;
        margin-bottom: 0;
    }

    /* Hide sidebar col on mobile by default */
    .account-sidebar-col {
        display: none;
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }

    .account-sidebar-col.is-open {
        display: block;
        margin-bottom: 20px;
    }

    .account-sidebar {
        border-radius: 8px;
    }

    .favorites-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* ============================
   RESPONSIVE - Mobile (<=767px)
   ============================ */
@media (max-width: 767px) {
    .account-page-title {
        font-size: 20px;
    }

    /* Orders: data-label for mobile cards */
    .orders-history_item [data-label]::before {
        content: attr(data-label) ": ";
        font-weight: var(--font-weight-semibold);
        color: #6B7280;
        font-size: 13px;
    }

    .orders-history_item-id {
        font-size: 14px;
    }

    .orders-history_item-total {
        font-size: 14px;
    }

    /* Account filter stacks vertically */
    .account-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .account-filter .account-page-title {
        font-size: 20px;
    }

    .account-filter select,
    .account-filter-select {
        width: 100%;
    }

    /* Cart product in order details */
    .cart-product_img {
        width: 60px;
        height: 60px;
    }

    .cart-product_title {
        font-size: 13px;
    }

    /* Reviews */
    .review-link {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
    }

    .review-link_prod-img {
        width: 48px;
        height: 48px;
    }

    .review-link_prod-name {
        font-size: 14px;
    }

    /* Terms */
    .terms-content {
        font-size: 14px;
    }

    .terms-content h2 {
        font-size: 16px;
        margin-top: 24px;
    }

    /* Personal data forms */
    #personal-data .form-group_input,
    #personal-data textarea,
    #password-change .form-group_input {
        font-size: 14px;
    }
}

/* ============================
   RESPONSIVE - Small phones (<=575px)
   ============================ */
@media (max-width: 575px) {
    .favorites-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }

    .favorites-grid .product-item_title {
        font-size: 13px;
    }

    .favorites-grid .product-item_price {
        font-size: 14px;
    }

    .favorites-grid .btn-cart {
        font-size: 13px;
        padding: 8px 10px;
    }

    .btn-fav-remove {
        width: 28px;
        height: 28px;
    }

    .btn-fav-remove svg {
        width: 14px;
        height: 14px;
    }

    .account-sidebar_avatar {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .account-sidebar_name {
        font-size: 14px;
    }

    .account-sidebar_link {
        font-size: 14px;
        padding: 8px 10px;
    }

    .star-rating_item {
        width: 16px;
        height: 16px;
    }

    /* Order details responsive */
    .orders-history_item-details .cart-product {
        padding: 8px;
    }
}

/* ---- Page text (delivery, etc.) ---- */
.page-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.page-text img {
    max-width: 100%;
    height: auto;
}

.page-text table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

@media (max-width: 767px) {
    .page-text {
        font-size: 14px;
    }
}
