.myaccount-custom-wrapper {
  padding: 30px;
  background: #f9f9f9;
}

.account-top {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.account-top .left-info {
  text-align: center;
}

.left-info .avatar img {
  border-radius: 50%;
  width: 200px;
  object-fit: cover;
}

.account-top .right-info {
  width: 100%;
}

.right-info ul {
  list-style: none;
  padding: 0;
}

.account-actions {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tab-nav {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  border-bottom: 2px solid #eee;
}

.tab-nav li {
  padding: 10px 20px;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ddd;
  border-bottom: none;
}

.tab-nav li.active {
  background: #e6f0ff;
  font-weight: bold;
}

.tab-panel {
  display: none;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
}

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

.loading {
  padding: 20px;
  text-align: center;
  color: #888;
}

table.shop_table.shop_table_responsive.my_account_orders .item-center {
  text-align: center;
}

a.button.view-order-popup.btn-info {
  margin: 0;
}

.order-card-row-mobile {
  display: none;
}

.load-more-wrapper button#load-more-orders {
  width: 100%;
  color: var(--fs-title-color);
  border: 1px solid var(--fs-title-color);
  text-align: center;
}

.order-account-filter .order-search {
  display: flex;
  position: relative;
  margin-bottom: 15px;
}

.order-account-filter .order-search button {
  margin: 0 20px 0 0;
  background: none;
  color: #000;
  border: none;
  padding: 0;
  position: absolute;
  right: 0;
  height: 100%;
}

.order-account-filter .order-search input.input-search {
  margin: 0;
}

.order-account-filter .order-month-filter {
  margin-bottom: 15px;
}

@media screen and (max-width: 768px) {
  .myaccount-custom-wrapper {
    padding: 15px;
  }

  .account-top {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .account-top .right-info {
    width: 100%;
  }

  .left-info .avatar img {
    width: 120px;
  }

  .tab-nav {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }

  .tab-nav li {
    flex: 1 1 45%;
    text-align: center;
    font-size: 14px;
    padding: 8px 10px;
    margin-left: 0 !important;
    border: 1px solid #ddd;
  }

  .tab-panel {
    padding: 15px;
  }

  .account-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .account-actions .button {
    width: 100%;
    text-align: center;
  }

  .account-data li {
    font-size: 14px;
  }

  /* Ẩn bảng desktop */
  #my-orders-table-wrapper table {
    display: none;
  }

  .order-card-row-mobile {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  /* Header */
  .order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f2f2f2;
    background: #fafafa;
  }

  .order-card-header .header-right {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .order-card-header .order-number {
    font-weight: bold;
    font-size: 14px;
    color: #333;
  }

  .order-card-header .order-date {
    font-size: 12px;
    color: #777;
  }

  .order-card-header .header-left {
    text-align: right;
  }

  .order-card-header .order-status span {
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    color: #fff;
  }

  /* Status colors */
  .order-status .status-completed {
    background: #d4edda;
    color: #155724;
  }
  .order-status .status-pending {
    background: #fff3cd;
    color: #856404;
  }
  .order-status .status-cancelled {
    background: #f8d7da;
    color: #721c24;
  }

  /* Body */
  .order-card-body {
    padding: 10px 12px;
  }

  .order-card-body .col {
    padding: 5px 0;
  }

  .order-card-body label {
    font-weight: bold;
    font-size: 12px;
    color: #555;
    display: block;
    margin-bottom: 2px;
  }

  .order-card-body p {
    font-size: 14px;
    color: #333;
    margin: 0;
  }

  /* Footer */
  .order-card-footer {
    padding: 10px 12px;
    border-top: 1px solid #f2f2f2;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .order-card-footer .order-total {
    font-weight: bold;
    font-size: 14px;
    color: #0071a1;
  }

  .order-card-footer .order-actions .button {
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-block;
  }

  .order-card-footer .order-actions .button:hover {
    background: #005a80;
  }
}

/* Dashboard Overview Cards */
.dashboard-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

.overview-card {
  flex: 1 1 150px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.overview-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 5px;
}

.overview-card.tong_don {
  background: #f1f1f1;
}

.overview-card.hoan_tat {
  background: #d4edda;
  color: #155724;
}

.overview-card.chua_hoan_thanh {
  background: #fff3cd;
  color: #856404;
}

.overview-card.huy {
  background: #f8d7da;
  color: #721c24;
}

.overview-card.tong_chi_tieu {
  background: #cce5ff;
  color: #004085;
}

/* Responsive cards */
@media screen and (max-width: 768px) {
  .overview-card {
    flex: 1 1 45%;
    font-size: 12px;
  }
  .overview-card strong {
    font-size: 20px;
  }
}

@media screen and (max-width: 480px) {
  .overview-card {
    flex: 1 1 100%;
  }
}

/* Mobile view adjustments */
.mobile-view {
  display: none;
}

.ordered-table-detail thead.mobile-only {
  display: none;
}

.block-order-data-total .group-col-inner {
  margin-left: 10px;
}

@media screen and (max-width: 768px) {
  .ordered-table-detail thead.desktop-only {
    display: none;
  }

  .ordered-table-detail thead.mobile-only {
    display: table-header-group;
  }

  .ordered-table-detail td.desktop-only {
    display: none;
  }

  td.mobile-view {
    display: table-cell;
  }

  .mobile-price-info {
    display: flex;
    gap: 10px;
    text-align: left;
    line-height: 1.5;
  }

  .mobile-price-info div {
    margin-bottom: 4px;
  }

  .product-detail-data {
    flex-direction: column;
    gap: 6px;
  }

  .product-detail-data .product-image img {
    width: 80px;
    height: auto;
  }

  .product-detail-data .product-warehouse {
    display: none;
  }
}

/* Order Popup */
#orderAccountPopup {
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  display: none;
}

#orderAccountPopup.show {
  display: flex;
}

#orderAccountPopup .modal-dialog {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  width: 90%;
}

#orderAccountPopup .modal-title {
  font-size: 1.5rem;
  color: var(--fs-title-color);
  margin: 0;
  font-weight: bold;
}

#orderAccountPopup hr {
  margin: 7px 0;
}

#orderAccountPopup .modal-dialog h3 {
  font-size: 1.1rem !important;
}

#orderAccountPopup .modal-dialog .group-data,
#orderAccountPopup .modal-dialog .order-information {
  font-size: 0.9rem;
}

#orderAccountPopup .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #ccc;
}

div#orderHeaderModal {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

div#orderHeaderModal h2 {
  margin: 0;
  width: fit-content;
}

#orderAccountPopup .block-general-information .order-information {
  display: flex;
  gap: 10px;
}

#orderAccountPopup .block-table-ordered-data {
  height: 40vh;
  overflow: scroll;
  border: 1px solid var(--fs-color-secondary);
}

#orderAccountPopup .ordered-table-detail .product-detail-data {
  display: flex;
  gap: 20px;
  align-items: center;
}

#orderAccountPopup .ordered-table-detail .item-center {
  text-align: center;
}

#orderAccountPopup .ordered-table-detail .product-detail-data .product-image img {
  width: 70px;
  object-fit: contain;
}

#orderAccountPopup table.table-data.ordered-table-detail {
  margin: 0;
}

#orderAccountPopup .ordered-table-detail .product-detail-data .product-data {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#orderAccountPopup .ordered-table-detail .product-detail-data .product-data .product-title {
  font-weight: 500;
  text-transform: uppercase;
}

#orderAccountPopup .modal-footer {
  margin-top: 20px;
  text-align: right;
}

#orderAccountPopup .modal-body {
  display: flex;
  flex-direction: column-reverse;
}

.woocommerce-order-status {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  display: inline-block;
  color: white;
}

#orderAccountPopup button.close.close-popup-order {
  margin: 0;
  font-size: 20px;
  padding: 5px;
  line-height: normal;
  height: fit-content;
}

/* Product status colors */
.product-status-cho_xuat {
  color: #FFC107;
}

.product-status-dang_chuyen {
  color: #2196F3;
}

.product-status-da_giao {
  color: #4CAF50;
}

.product-status-het_hang {
  color: #F44336;
}

@media screen and (max-width: 768px) {
  #orderAccountPopup .ordered-table-detail .product-detail-data {
    flex-direction: column;
    gap: 5px;
  }

  div#orderHeaderModal {
    flex-direction: column;
    align-items: flex-start;
  }

  #orderAccountPopup .ordered-table-detail .product-detail-data .product-image img {
    width: 50px;
  }
}

/* Order status filter */
.order-status-filter {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.order-status-filter .filter-status {
  padding: 5px 12px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background: #f8f8f8;
  cursor: pointer;
  margin: 0;
  font-size: 0.9rem;
}

.order-status-filter .filter-status.active {
  background: #0071a1;
  color: #fff;
  border-color: #0071a1;
}
 .order-table-general {
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

.order-card-information {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.order-card-status {
    flex: 1;
    text-align: center;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border:1px solid #ddd;
}

.order-card-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    display: block;
}

.order-card-label {
    font-size: 14px;
    color: #777;
}

.table-product-status {
    margin-top: 30px;
}
.table-product-status >div{
    margin-bottom:20px
}
.group-block-title {
    background: #0073aa;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
}
.block-table-product-delivered .group-block-title{
  background: #155724;
}
.block-table-product-canceled .group-block-title{
  background: var(--fs-color-primary);
}
.group-block-title p{
    margin:0;
    font-size:1.1rem;
}
.group-block-content {
    border: 1px solid #ddd;
    border-top: none;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    background: #fff;
}
.group-block-content>div:not(:last-child) {
    border-bottom: 1px solid;
    margin-bottom:10px;
}
.row-data-item-detail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}
.row-data-item-detail>div {
    display: flex;
    align-items: center;
}
.row-data-item-detail:last-child {
    border-bottom: none;
}

.row-data-item-detail label {
    font-weight: bold;
    color: #444;
    margin-right: 5px;
    margin-bottom:0;
}
.block-content-title .content-title-left{
    display:flex;
    gap:10px;
    align-items:center;
}
.block-content-title .order-status span{
    padding:5px 10px;
    color:#fff;
    border-radius:50px;
}
.item-order_depends {
    font-weight: bold;
    font-size: 1.05rem;
    color:#000;
}
@media screen and (max-width:549px) {
    .row-data-item-detail{
        grid-template-columns: repeat(2, 1fr);
    }
    .order-card-information {
        grid-template-columns: repeat(2, 1fr);
    }
}
.list-option-filter {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    .list-option-filter .list-filter-right {
        display: flex;
        gap: 5px;
        width: 100%;
    }
    .list-option-filter .list-filter-right > *{
        width:100%;
        display:none;
    }
    .list-option-filter .list-filter-right .active{
        display: flex;
        align-items: center;
        gap: 5px;
    }
    .list-option-filter .list-filter-right select{
        margin:0;
    }
    .list-option-filter button{
        margin:0;
    }
    /* =========================
 * WRAPPER
 * ========================= */
.list-product-frequently-purchased {
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* =========================
 * SECTION TITLE
 * ========================= */
.list-product-frequently-purchased .section-title {
    font-size: var(--font-h3);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

/* =========================
 * TABLE BASE
 * ========================= */
.list-product-frequently-purchased .top-products-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* =========================
 * TABLE HEADER
 * ========================= */
.list-product-frequently-purchased .top-products-table thead {
    background: var(--bg-muted);
}

.list-product-frequently-purchased .top-products-table th {
    padding: 12px 14px;
    font-size: var(--font-small);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}
.list-product-frequently-purchased .top-products-table th.text-center{
  text-align: center;
}
/* =========================
 * TABLE BODY
 * ========================= */
.list-product-frequently-purchased .top-products-table td {
    padding: 14px;
    font-size: var(--font-body);
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

/* Hover row */
.list-product-frequently-purchased .top-products-table tbody tr:hover {
    background: var(--bg-accent);
}

/* =========================
 * IMAGE COLUMN
 * ========================= */
.list-product-frequently-purchased .top-products-table .col-image {
    width: 72px;
}

.list-product-frequently-purchased .top-products-table .col-image img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: #fff;
}

/* =========================
 * PRODUCT NAME
 * ========================= */
.list-product-frequently-purchased .top-products-table .col-name a {
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    transition: color .2s ease;
}

.list-product-frequently-purchased .top-products-table .col-name a:hover {
    color: var(--color-primary);
}

/* =========================
 * SKU
 * ========================= */
.list-product-frequently-purchased .top-products-table .col-sku {
    font-size: var(--font-small);
    color: var(--text-muted);
}

/* =========================
 * QUANTITY
 * ========================= */
.list-product-frequently-purchased .top-products-table .col-qty {
    font-weight: 600;
    color: var(--color-success);
    text-align: center;
}

/* =========================
 * PRICE
 * ========================= */
.list-product-frequently-purchased .top-products-table .col-price {
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

/* =========================
 * LAST ROW BORDER FIX
 * ========================= */
.list-product-frequently-purchased .top-products-table tbody tr:last-child td {
    border-bottom: none;
}

/* =========================
 * RESPONSIVE (TABLE → CARD)
 * ========================= */
@media (max-width: 768px) {

    .list-product-frequently-purchased {
        padding: 16px;
    }

    .list-product-frequently-purchased .top-products-table,
    .list-product-frequently-purchased .top-products-table thead,
    .list-product-frequently-purchased .top-products-table tbody,
    .list-product-frequently-purchased .top-products-table th,
    .list-product-frequently-purchased .top-products-table tr {
        display: block;
    }

    .list-product-frequently-purchased .top-products-table thead {
        display: none;
    }

    .list-product-frequently-purchased .top-products-table tr {
        margin-bottom: 16px;
        background: #fff;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        padding: 12px;
    }

    .list-product-frequently-purchased .top-products-table td {
        border: none;
        padding: 6px 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: baseline;
        font-size: var(--font-body);
    }
    .list-product-frequently-purchased .top-products-table .col-qty{
      display:inline;
    }
    .list-product-frequently-purchased .top-products-table td.col-qty::before {
        content: 'Số lượng: ';
        font-size: var(--font-small);
        color: var(--text-muted);
    }

    .list-product-frequently-purchased .top-products-table .col-image {
        justify-content: flex-start;
    }
}
/* =========================
   ITEM STATUS TABS
========================= */

.wrapper-item-with-status-tab {
  background: var(--bg-main, #fff);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

/* =========================
   TABS HEADER
========================= */

.wrapper-item-with-status-tab .item-status-tabs .tabs-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--border-color, #eee);
}

.wrapper-item-with-status-tab .item-status-tabs .tab-item {
  cursor: pointer;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted, #555);
  border-radius: 8px 8px 0 0;
  background: var(--bg-muted, #f7f7f7);
  transition: all 0.25s ease;
}

.wrapper-item-with-status-tab .item-status-tabs .tab-item .count {
  font-weight: 600;
  margin-left: 4px;
}

.wrapper-item-with-status-tab .item-status-tabs .tab-item:hover {
  background: var(--bg-hover, #eee);
}

.wrapper-item-with-status-tab .item-status-tabs .tab-item.active {
  background: var(--bg-main, #fff);
  color: var(--text-main, #111);
  border: 1px solid var(--border-color, #eee);
  border-bottom-color: var(--bg-main, #fff);
}

/* =========================
   TABS BODY
========================= */

.wrapper-item-with-status-tab .item-status-tabs .tabs-body {
  position: relative;
}

.wrapper-item-with-status-tab .item-status-tabs .tab-loading {
  text-align: center;
  padding: 30px;
  font-size: 14px;
  color: var(--text-muted, #777);
}

/* =========================
   TABLE
========================= */

.wrapper-item-with-status-tab .item-status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.wrapper-item-with-status-tab .item-status-table thead th {
  text-align: left;
  padding: 12px;
  background: var(--bg-muted, #f6f6f6);
  color: var(--text-muted, #555);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color, #eee);
}

.wrapper-item-with-status-tab .item-status-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color, #eee);
  vertical-align: middle;
}

/* =========================
   IMAGE COLUMN
========================= */

.wrapper-item-with-status-tab .item-status-table .col-image img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg-muted, #f7f7f7);
}

/* =========================
   PRODUCT INFO
========================= */

.wrapper-item-with-status-tab .item-status-table td strong {
  display: block;
  font-size: 14px;
  color: var(--text-main, #111);
  margin-bottom: 4px;
}

.wrapper-item-with-status-tab .product-sku {
  font-size: 12px;
  color: var(--text-muted, #777);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  .wrapper-item-with-status-tab .item-status-tabs .tabs-header {
    gap: 8px;
  }

  .wrapper-item-with-status-tab .item-status-tabs .tab-item {
    padding: 8px 12px;
    font-size: 13px;
  }

  .wrapper-item-with-status-tab .item-status-table thead {
    display: none;
  }

  .wrapper-item-with-status-tab .item-status-table tbody tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid var(--border-color, #eee);
    border-radius: 8px;
    padding: 12px;
  }

  .wrapper-item-with-status-tab .item-status-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border: none;
  }

  .wrapper-item-with-status-tab .item-status-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted, #555);
  }
}
