:root {
    --primary-color: #ff4400;
    /* Màu cam Taobao */
    --secondary-color: #ff9000;
}
/*
body {
    background-color: #f4f4f4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*/

/* Bottom Navbar Cố định chân trang */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.nav-action-icons {
    display: flex;
    flex-grow: 1;
    justify-content: space-around;
    max-width: 180px;
}

.nav-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    text-decoration: none;
    font-size: 0.7rem;
    cursor: pointer;
}

.nav-icon-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.nav-icon-item:hover {
    color: var(--primary-color);
}

.btn-buy-footer {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 30px;
    font-weight: bold;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-left: 10px;
    box-shadow: 0 3px 8px rgba(255, 68, 0, 0.2);
}

.modal.modal-bottom{
    z-index: 200000;
}

  .modal.modal-bottom .modal-dialog {
    bottom: 0;
    position: fixed;
    z-index: 12000;
    transform: translate(0, 100%);
    margin: 0;
    width: 100%;
    min-width: 100%;
  }

  .modal.modal-bottom .modal-dialog .modal-content {
    max-width: 500px;
    margin: 0 auto;
  }

 .modal.modal-bottom.show .modal-dialog {
     transform: translate(0, 0);
 }

/* Modal Styling phong cách Taobao */
.modal-product-header {
    display: flex;
}
.modal-product-thanhphan {
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.product-thumb-container {
    width: 100px;
    height: 100px;
    margin-top: -60px;
    /* Hiệu ứng ảnh trồi lên */
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.product-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-summary {
    padding-left: 15px;
    flex-grow: 1;
}

.price-range {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.selection-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.selection-label {
    font-weight: bold;
    font-size: 0.9rem;
}

.view-toggle-btn {
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    padding: 4px 10px;
    border-radius: 4px;
    background: #fff;
    transition: all 0.2s;
}

.view-toggle-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dạng 1: Grid Mode (Rút gọn) */
.variation-list.grid-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.variation-list.grid-mode .variation-item {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    background: #f8f8f8;
}

.variation-list.grid-mode .variation-item.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #fff1eb;
    position: relative;
}

.variation-list.grid-mode .variation-item.active::after {
    content: "✓";
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 10px;
    background: var(--primary-color);
    color: white;
    padding: 0 2px;
    border-top-left-radius: 4px;
}

/* Dạng 2: List Mode (Chi tiết hàng dọc) */
.variation-list.list-mode {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.variation-list.list-mode .variation-item {
    display: flex;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    background: #fff;
}

.variation-list.list-mode .variation-item.active {
    border-color: var(--primary-color);
    background-color: #fffaf8;
}

.variation-list.list-mode .item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

/* Dạng 3: Thumbnail Mode (Hình ảnh cuộn ngang) */
.variation-list.thumbnail-mode {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.variation-list.thumbnail-mode .variation-item {
    flex: 0 0 120px;
    cursor: pointer;
    text-align: center;
}

.variation-list.thumbnail-mode .item-img-large {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    margin-bottom: 5px;
}

.variation-list.thumbnail-mode .variation-item.active .item-img-large {
    border-color: var(--primary-color);
}

.variation-list.thumbnail-mode .item-name-small {
    font-size: 0.8rem;
    display: block;
    white-space: normal;
    line-height: 1.2;
    height: 2.4em;
    overflow: hidden;
}

.variation-list.thumbnail-mode .variation-item.active .item-name-small {
    color: var(--primary-color);
    font-weight: bold;
}

/* Hiển thị thành phần trong header */
#display-thanh-phan {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* Bộ chọn số lượng */
.quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.quantity-input {
    width: 50px;
    height: 35px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    outline: none;
}

.btn-confirm {
    background: linear-gradient(90deg,  #ff5000);
    color: #fefefe;
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 25px;
    font-weight: bold;
    margin-top: 20px;
}
.btn-confirm:hover {
     color: #fff;
    background: linear-gradient(90deg, #ff9000, #ff641c,);
}


#modal-loading {
    display: none;
    text-align: center;
    padding: 30px;
}

/* Scrollbar styling */
.variation-list::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.variation-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}


/* --- TÙY CHỈNH THANH CUỘN (SCROLLBAR) --- */
.variation-list::-webkit-scrollbar {
    height: 12px;
    /* Độ cao thanh cuộn ngang */
    width: 12px;
    /* Độ rộng thanh cuộn dọc */
}

.variation-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.variation-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
    border: 2px solid #f1f1f1;
    /* Tạo khoảng trống giữa thumb và track */
}

.variation-list::-webkit-scrollbar-thumb:hover {
    background: #999;
    /* Đậm hơn khi hover để dễ thấy */
}