/* ================================
   1) CORE STYLE CỦA SAPO (GIỮ NGUYÊN)
   ================================ */

.sort-cate ul {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.section.wrap_background {
    margin-bottom: 5px;
}

@media (max-width: 1023px) {
    .sort-cate {
        --border-color: #eee;
        font-size: 12px;
    }
    .sort-cate li {
        margin: 0 auto;
        position: relative;
        width: 120px;
        padding: 0 10px;
        color: var(--text-color);
        cursor: pointer;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        font-size: 12px;
    }
    .sort-cate #sort-by > ul > li {
        line-height: 34px;
    }
    .sort-cate #sort-by li > ul {
        visibility: hidden;
        position: absolute;
        width: 120px;
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: 0 0 6px 6px;
        top: 34px;
        left: -1px;
        z-index: 9999;
    }
}

@media (min-width: 1024px) {
    #recent-view-coll {
        margin-bottom: 50px;
    }
    .sort-cate .content_ul li a {
        font-weight: 400;
        color: #898989;
        padding: 9px 10px 11px;
    }
}

.card {
    border: none;
    border-radius: 0;
}

.sidebar.openf {
    top: 0 !important;
    right: 0;
    height: 100%;
    overflow-y: auto;
    z-index: 9999;
    width: 300px;
    background: #fff;
    visibility: visible;
    opacity: 1;
}

.pagenav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.filter-item-toggle .fas {
    transition: all 0.3s ease-out;
}

.filter-item-toggle.show .fas {
    transform: rotate(180deg);
}


/* ============================================
   2) RESET LAYOUT – ĐỂ MÔ TẢ KHÔNG BỊ LỆCH
   ============================================ */
.section.wrap_background .container {
    display: block !important;
}


/* ============================================
   3) STYLE MÔ TẢ DANH MỤC – PHONG CÁCH NIKE
   ============================================ */

.collection-header-wrapper-nike {
    width: 100%;
    max-width: 780px;
    margin: 0 auto 30px auto;
    padding: 0 10px;
}

/* Tiêu đề */
.collection-title-nike {
    font-size: 30px;
    font-weight: 700;
    color: #111;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-align: left;
}

/* Khung mô tả dạng CARD */
.collection-description-wrapper-nike {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid #eee;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    margin-bottom: 26px;
    max-width: 720px;
    width: 100%;
    transition: all .25s ease;
}

/* Nội dung mô tả */
.collection-description-content-nike {
    font-size: 16px;
    line-height: 1.65;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all .25s ease;
}

/* Khi mở rộng */
.collection-description-wrapper-nike.expanded .collection-description-content-nike {
    -webkit-line-clamp: unset;
    max-height: none;
}

/* Nút xem thêm */
.collection-description-toggle-btn {
    background: none;
    border: none;
    color: #0066d6;
    font-size: 15px;
    font-weight: 500;
    padding: 6px 0 0;
    cursor: pointer;
    text-decoration: underline;
}

.collection-description-toggle-btn:hover {
    color: #003e96;
}


/* ============================================
   4) RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .collection-title-nike {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .collection-description-wrapper-nike {
        padding: 18px 20px;
        border-radius: 10px;
    }

    .collection-description-content-nike {
        font-size: 15px;
        -webkit-line-clamp: 5;
    }

    /* Nút mở filter mobile */
    #open-filters {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 100%;
        background: #111;
        color: #fff;
        padding: 10px 0;
        border-radius: 6px;
        font-weight: 600;
        margin-bottom: 18px;
        font-size: 14px;
    }
}


/* ============================================
   5) FLASH SALE (GIỮ NGUYÊN)
   ============================================ */

.flashsale {
    --background-color: #f4ebc1;
    --countdown-background: #d3232a;
    --countdown-color: #fff;
    background: var(--background-color, transparent);
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 10px;
}

.flashsale__countdown-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* MOBILE FILTER SIDEBAR */
@media (max-width: 767px) {
    .sidebar {
        position: fixed !important;
        top: 0;
        right: -100%;       /* Ẩn hoàn toàn */
        width: 80%;
        height: 100%;
        background: #fff;
        z-index: 9999;
        transition: all 0.3s ease;
        overflow-y: auto;
        box-shadow: -4px 0 12px rgba(0,0,0,0.2);
        padding: 20px 16px;
    }
    .sidebar.openf {
        right: 0 !important;
    }

    /* Background mờ */
    #filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 9998;
        display: none;
    }
    #filter-overlay.active {
        display: block;
    }

    /* Nút Lọc sản phẩm */
    .mobile-filter-btn {
        width: 100%;
        text-align: left;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 10px 14px;
        font-size: 16px;
    }
}
/* ===== Mobile filter row: cân đều 2 nút và kiểu đẹp ===== */
@media (max-width: 767px) {

  /* container row */
  .mobile-filter-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 16px 18px; /* căn trong 2 bên */
    align-items: center;
  }

  /* chung cho cả 2 nút */
  .mobile-filter-row .mobile-filter-btn,
  .mobile-filter-row .mobile-sort-btn {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    display: inline-flex;          /* để căn giữa icon/text */
    align-items: center;
    justify-content: center;
    width: calc(50% - 5px);        /* chia đều hai nút + gap */
    min-height: 44px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #0b2540;
    text-align: left;              /* text nằm trái nhưng toàn khung cân */
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  }

  /* text nằm trái, mũi tên phải */
  .mobile-filter-row .mobile-filter-btn .label,
  .mobile-filter-row .mobile-sort-btn .label {
    flex: 1 1 auto;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-filter-row .mobile-filter-btn .caret,
  .mobile-filter-row .mobile-sort-btn .caret {
    flex: 0 0 auto;
    opacity: 0.7;
    font-size: 14px;
    margin-left: 6px;
  }

  /* nếu là phiên bản có icon/pseudo - giữ tỉ lệ */
  .mobile-filter-row .mobile-filter-btn svg,
  .mobile-filter-row .mobile-sort-btn svg {
    width: 18px;
    height: 18px;
  }

  /* đảm bảo không bị ảnh hưởng bởi .d-lg-none or other utility */
  .mobile-filter-row.d-lg-none { display: flex !important; }

}