html, body {
  max-width: 100% !important; position: relative; font-family: 'Inter', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #ea580c;
    border-radius: 4px;
}
/* Đảm bảo hình ảnh và media không bao giờ vượt quá chiều rộng màn hình */
img, svg, video, iframe {max-width: 100%; height: auto}
.gradient-brand {
  background: linear-gradient(135deg, #C0392B 0%, #D35400 50%, #E67E22 100%);
}
.gradient-hover:hover {
  background: linear-gradient(135deg, #A93226 0%, #BA4A00 100%);
}
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
/* ========================================================
  THANH PROGRESS BAR ĐỎ - CAM TRÊN ĐỈNH ĐẦU TRANG
======================================================== */
#top-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  /* Dải màu chuyển tiếp Đỏ - Cam thương hiệu */
  background: linear-gradient(90deg, #DC2626 0%, #EA580C 50%, #F97316 100%);
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.7);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

#top-progress-bar.loading {
  opacity: 1;
  width: 5%;
  /* Hiệu ứng tia sáng chạy dọc thanh */
  animation: progressPulse 1.5s infinite linear;
}

#top-progress-bar.finished {
  width: 100% !important;
  opacity: 0;
  transition: width 0.15s ease, opacity 0.35s ease 0.15s;
}

@keyframes progressPulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.gradient-brand, .hover-gradient-brand:hover {
  background: linear-gradient(135deg, #DC2626 0%, #EA580C 50%, #F97316 100%);
}
.gradient-brand-dark {
  background: linear-gradient(135deg, #991B1B 0%, #C2410C 50%, #EA580C 100%);
}
.gradient-hover:hover {
  background: linear-gradient(135deg, #B71C1C 0%, #C2410C 100%);
}
.gradient-orange-white {
  background: linear-gradient(135deg, #f5a266 0%, #fadac4 50%, #fff 100%);
}

/* Chế độ xem dạng Danh sách (List View) */
#productContainer.is-list-view {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    #productContainer.is-list-view .product-card {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        gap: 1rem;
    }
    #productContainer.is-list-view .product-card-top {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        flex: 1;
    }
    #productContainer.is-list-view .product-img-wrap {
        width: 11rem; /* 176px */
        height: 9rem; /* 144px */
        border-radius: 0.75rem;
    }
    #productContainer.is-list-view .product-card-body {
        padding: 0;
        text-align: left;
    }
    #productContainer.is-list-view .product-title {
        font-size: 1rem;
        height: auto;
    }
    #productContainer.is-list-view .product-card-footer {
        width: 11rem;
        padding: 0 0 0 1rem;
        border-left: 1px solid #e5e7eb;
        flex-shrink: 0;
    }
    #productContainer.is-list-view .product-footer-inner {
        flex-direction: column;
        justify-content: center;
        border-top: none;
        padding-top: 0;
        gap: 0.5rem;
    }
}