/* --- 1. Thiết lập chung & Biến màu --- */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --transition: all 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: clip;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- 2. Header --- */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    gap: 24px;
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

/* --- 3. Nội dung chính & Thẻ sản phẩm chung --- */
.main-content {
    padding: 24px 0 32px;
    min-height: 70vh;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.product-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: #f9fafb;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.badge-sale {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--danger-color);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
}

.product-name a:hover {
    color: var(--primary-color);
}

.product-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    margin-top: auto;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--danger-color);
}

.old-price {
    font-size: 13px;
    color: var(--text-light);
    text-decoration: line-through;
}

.btn-add-cart {
    width: 100%;
    padding: 10px;
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- 4. Trang chủ (pages/home.php) --- */
.home-section {
    margin: 28px 0 36px;
    width: 100%;
}

.home-section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.home-section-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.home-section-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.home-empty-text {
    color: var(--text-light);
    font-size: 14px;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chip {
    display: inline-block;
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.category-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #eff6ff;
}

.home-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.home-category-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-prod-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-prod-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.home-prod-thumb-wrap {
    height: 170px;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

.home-prod-thumb-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-prod-thumb-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.home-prod-cat {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.home-prod-name {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.4;
}

.home-prod-name a {
    color: #111827;
    font-weight: 700;
}

.home-prod-name a:hover {
    color: var(--primary-color);
}

.home-prod-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.home-price-now {
    font-size: 16px;
    font-weight: 800;
    color: var(--danger-color);
}

.home-price-old {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
}

.home-prod-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.home-btn-detail {
    text-align: center;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.home-btn-cart {
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    background: var(--primary-color);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.home-btn-cart:hover {
    background: var(--primary-hover);
}

/* --- 5. Slider Sản Phẩm Mới (includes/new-products-slider.php) --- */
.new-hero-slider-section {
    margin: 12px 0 32px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.hero-slider-wrapper {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    width: 100%;
    min-width: 0;
}

.hero-slider-tabs {
    display: grid;
    grid-template-columns: repeat(var(--hero-tab-cols, 5), minmax(0, 1fr));
    border-bottom: 1px solid var(--border-color);
    background: #f9fafb;
    width: 100%;
}

.hero-tab-btn {
    border: none;
    background: transparent;
    padding: 12px 10px;
    cursor: pointer;
    text-align: center;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hero-tab-btn:hover {
    background: var(--bg-light);
}

.hero-tab-btn.active {
    background: var(--white);
    border-bottom-color: var(--danger-color);
}

.hero-tab-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-tab-sub {
    font-size: 12px;
    color: var(--danger-color);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-slider-viewport {
    position: relative;
    overflow: hidden;
    background: var(--white);
    width: 100%;
    min-width: 0;
}

.hero-slider-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    width: 100%;
}

.hero-slide-item {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 28px 56px;
    min-height: 320px;
}

.hero-slide-item > div {
    min-width: 0;
}

.hero-slide-media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 10px;
    padding: 18px;
    height: 265px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.hero-slide-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

.hero-slide-badge {
    display: inline-block;
    background: #fee2e2;
    color: var(--danger-color);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.hero-slide-title {
    font-size: 24px;
    line-height: 1.3;
    margin: 0 0 10px;
    color: #111827;
    word-break: break-word;
}

.hero-slide-desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.55;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.hero-slide-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
}

.hero-price-current {
    font-size: 22px;
    font-weight: 800;
    color: var(--danger-color);
}

.hero-price-old {
    font-size: 15px;
    color: #9ca3af;
    text-decoration: line-through;
}

.hero-slide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-btn-primary {
    background: var(--danger-color);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-btn-secondary {
    background: var(--bg-light);
    color: #111827;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #d1d5db;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 54px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.94);
    color: #111827;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hero-nav-prev {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.hero-nav-next {
    right: 0;
    border-radius: 8px 0 0 8px;
}

.hero-sub-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
    width: 100%;
}

.hero-sub-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    color: #111827;
    min-width: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-sub-card:hover {
    border-color: var(--danger-color);
    transform: translateY(-2px);
}

.hero-sub-card img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 8px;
    padding: 4px;
    flex-shrink: 0;
}

.hero-sub-card-meta {
    min-width: 0;
}

.hero-sub-card-title {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.hero-sub-card-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--danger-color);
}

/* --- 6. Trang Cửa Hàng (pages/shop.php) --- */
.sh-page {
    background: var(--bg-light);
    min-height: 75vh;
    padding: 28px 0 24px;
    color: #111827;
}

.sh-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.sh-header-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sh-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
}

.sh-ship-badge {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.sh-filter-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 18px;
}

.sh-empty-card {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.sh-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.sh-input {
    flex: 1 1 260px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
    color: #111827;
}

.sh-btn-search {
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.sh-btn-search:hover {
    background: var(--primary-hover);
}

.sh-btn-reset {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    font-size: 13.5px;
    font-weight: 600;
}

.sh-cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sh-cat-chip {
    display: inline-block;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #f9fafb;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.sh-cat-chip.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.sh-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.sh-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.sh-thumb-wrap {
    aspect-ratio: 4 / 3;
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.sh-thumb-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sh-thumb-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sh-cat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.sh-prod-name {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.sh-prod-name a {
    color: #111827;
}

.sh-prod-name a:hover {
    color: var(--primary-color);
}

.sh-price-now {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--danger-color);
}

.sh-price-old {
    font-size: 12.5px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 6px;
}

.sh-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.sh-btn-detail {
    text-align: center;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    font-size: 12.5px;
    font-weight: 600;
}

.sh-btn-cart {
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    background: var(--primary-color);
    color: var(--white);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.sh-btn-cart:hover {
    background: var(--primary-hover);
}

.sh-alert-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}

/* --- 7. Trang Chi Tiết Sản Phẩm (pages/product-detail.php) --- */
.pd-page {
    background: var(--bg-light);
    min-height: 75vh;
    padding: 28px 0 24px;
    color: #111827;
}

.pd-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.pd-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 20px;
}

.pd-main-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 24px;
    align-items: start;
}

.pd-media-box {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-media-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pd-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
}

.pd-price-now {
    font-size: 22px;
    font-weight: 800;
    color: var(--danger-color);
}

.pd-price-old {
    font-size: 15px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 8px;
}

.pd-ship-note {
    margin: 12px 0 18px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13.5px;
}

.pd-cart-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.pd-qty-input {
    width: 78px;
    height: 42px;
    padding: 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    background: var(--white);
    color: #111827;
}

.pd-btn-cart {
    height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: var(--danger-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.pd-btn-cart:hover {
    background: #b91c1c;
}

.pd-btn-go-cart {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 13.5px;
    font-weight: 700;
}

.pd-cart-feedback {
    margin-top: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #047857;
    min-height: 20px;
}

.pd-section-title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
}

.pd-desc-text {
    font-size: 14.5px;
    line-height: 1.7;
    color: #374151;
    margin: 0;
}

.pd-desc-empty {
    color: var(--text-light);
}

/* Bài viết mô tả chi tiết phía trên video giới thiệu */
.pd-article-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pd-article-block {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.pd-article-block:first-child {
    padding-top: 0;
    border-top: none;
}

.pd-article-heading {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}

.pd-article-copy {
    margin: 0 0 12px;
    font-size: 14.5px;
    line-height: 1.65;
    color: #374151;
}

.pd-article-figure {
    margin: 8px 0 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.pd-article-img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
}

.pd-video-wrap {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.pd-video-label {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
}

.qb-video-frame {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.qb-video-frame iframe,
.qb-video-frame video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.pd-review-form {
    margin-bottom: 22px;
}

.pd-group {
    margin-bottom: 14px;
}

.pd-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 600;
}

.pd-input,
.pd-select,
.pd-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: var(--white);
    color: #111827;
}

.pd-btn-submit {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.pd-btn-submit:hover {
    background: var(--primary-hover);
}

.pd-alert-ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
}

.pd-alert-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
}

.pd-alert-err--compact {
    margin-bottom: 12px;
}

.pd-review-empty {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

.pd-review-item {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.pd-review-item:last-child {
    border-bottom: none;
}

.pd-review-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.pd-review-stars {
    color: #f59e0b;
    font-weight: 700;
}

.pd-review-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.pd-review-date {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* --- 8. Trang Giỏ Hàng (pages/cart.php) --- */
.ct-page {
    background: var(--bg-light);
    min-height: 75vh;
    padding: 28px 0 24px;
    color: #111827;
}

.ct-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 16px;
}

.ct-title {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 800;
}

.ct-grid {
    display: grid;
    grid-template-columns: 1.75fr 1fr;
    gap: 20px;
    align-items: start;
}

.ct-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
}

.ct-item {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ct-item:first-child {
    padding-top: 0;
}

.ct-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ct-thumb {
    width: 76px;
    height: 76px;
    object-fit: contain;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px;
}

.ct-item-name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
}

.ct-item-name a {
    color: #111827;
}

.ct-item-name a:hover {
    color: var(--primary-color);
}

.ct-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--danger-color);
}

.ct-item-line {
    font-size: 12.5px;
    color: var(--text-light);
    margin-top: 4px;
}

.ct-qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
}

.ct-qty-btn {
    width: 32px;
    height: 34px;
    border: none;
    background: #f9fafb;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.ct-qty-btn:hover {
    background: var(--border-color);
}

.ct-qty-val {
    width: 44px;
    height: 34px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    background: var(--white);
}

.ct-btn-remove {
    margin-left: 8px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.ct-summary-title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 17px;
    font-weight: 700;
}

.ct-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #374151;
}

.ct-ship-hint {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    line-height: 1.5;
}

.ct-summary-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 800;
    color: #111827;
}

.ct-total-amount {
    color: var(--danger-color);
    font-size: 18px;
}

.ct-btn-checkout {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--success-color);
    color: var(--white);
    text-align: center;
    font-size: 15px;
    font-weight: 700;
}

.ct-btn-checkout:hover {
    background: #15803d;
}

.ct-empty {
    text-align: center;
    padding: 28px 12px;
}

.ct-empty-text {
    margin: 0;
    font-size: 15px;
    color: #4b5563;
}

.ct-empty-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

/* --- 9. Trang Thanh Toán (pages/checkout.php) --- */
.co-page {
    background: var(--bg-light);
    min-height: 75vh;
    padding: 28px 0 24px;
    color: #111827;
}

.co-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 16px;
}

.co-title {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 800;
}

.co-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 20px;
    align-items: start;
}

.co-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 22px;
}

.co-empty-card {
    text-align: center;
}

.co-empty-text {
    margin: 0 0 12px;
    color: #4b5563;
}

.co-empty-link {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
}

.co-card-title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 17px;
    font-weight: 700;
}

.co-group {
    margin-bottom: 14px;
}

.co-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
}

.co-input,
.co-select,
.co-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
    color: #111827;
}

.co-btn-submit {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--success-color);
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
}

.co-btn-submit:hover:not(:disabled) {
    background: #15803d;
}

.co-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.co-item-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.co-item-row:last-child {
    border-bottom: none;
}

.co-item-meta {
    font-size: 12.5px;
    color: var(--text-light);
}

.co-ship-banner {
    margin: 12px 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    line-height: 1.5;
}

.co-sum-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
}

.co-sum-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 800;
}

.co-total-amount {
    color: var(--danger-color);
    font-size: 18px;
}

.co-alert-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
}

.co-alert-ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 18px;
    border-radius: 10px;
    font-size: 14.5px;
    line-height: 1.65;
}

.co-success-heading {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 6px;
}

.co-success-note {
    margin-top: 8px;
}

.co-success-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.co-success-btn-primary {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
}

.co-success-btn-secondary {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 8px;
    background: var(--white);
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-weight: 700;
}

/* --- 10. Trang Tra Cứu Đơn Hàng (pages/order.php) --- */
.ord-page {
    background: var(--bg-light);
    min-height: 75vh;
    padding: 28px 0 24px;
    color: #111827;
}

.ord-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

.ord-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 18px;
}

.ord-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
}

.ord-sub {
    margin: 0 0 16px;
    font-size: 13.5px;
    color: var(--text-light);
}

.ord-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ord-input {
    flex: 1 1 240px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: var(--white);
}

.ord-btn {
    height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ord-btn:hover {
    background: var(--primary-hover);
}

.ord-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.ord-empty-text {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

.ord-item-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.ord-date {
    font-size: 12.5px;
    color: var(--text-light);
    margin-left: 6px;
}

.ord-status {
    font-weight: 700;
    color: var(--primary-color);
}

.ord-item-body {
    font-size: 14px;
    line-height: 1.6;
}

.ord-total {
    color: var(--danger-color);
    font-weight: 800;
}

.ord-note-box {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 13.5px;
    color: #92400e;
}

/* --- 11. Footer Quốc Bảo Shop (includes/footer.php) --- */
.qb-site-footer {
    background: #111827;
    color: var(--border-color);
    padding: 36px 0 20px;
    margin-top: 32px;
    font-size: 14px;
    line-height: 1.65;
}

.qb-footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.qb-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 24px;
    align-items: start;
}

.qb-footer-brand {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
}

.qb-footer-desc {
    margin: 0 0 14px;
    color: #9ca3af;
    font-size: 13.5px;
}

.qb-footer-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.qb-footer-list li {
    margin-bottom: 8px;
    color: #f3f4f6;
}

.qb-footer-phone-link {
    color: #60a5fa;
    font-weight: 700;
}

.qb-footer-phone-link:hover {
    text-decoration: underline;
}

.qb-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.qb-footer-nav a {
    color: #d1d5db;
    font-size: 13.5px;
    font-weight: 600;
}

.qb-footer-nav a:hover {
    color: var(--white);
}

.qb-footer-map-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
}

.qb-footer-map-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 240px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #374151;
    background: #1f2937;
}

.qb-footer-map-box iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.qb-footer-bottom {
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid #1f2937;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
}

/* --- 12. Popup Thông Báo Quốc Bảo Shop --- */
.qb-notice-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.qb-notice-backdrop.is-open {
    display: flex;
}

.qb-notice-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    animation: qbPopIn 0.22s ease-out;
    font-family: inherit;
}

@keyframes qbPopIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.qb-notice-header {
    background: linear-gradient(135deg, #0d6efd, #084298);
    color: #ffffff;
    padding: 18px 44px 16px 20px;
}

.qb-notice-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.qb-notice-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

.qb-notice-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.qb-notice-close:hover {
    background: rgba(255, 255, 255, 0.32);
}

.qb-notice-body {
    padding: 18px 20px 14px;
    color: #1f2937;
    font-size: 14.5px;
    line-height: 1.6;
}

.qb-notice-intro {
    margin-top: 0;
}

.qb-notice-body ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.qb-notice-body li {
    margin-bottom: 6px;
}

.qb-notice-image-wrap {
    margin: 0 0 12px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.qb-notice-image {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: cover;
}

.qb-notice-footer {
    padding: 12px 20px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid #f1f5f9;
}

.qb-notice-remember {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}

.qb-notice-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.qb-notice-btn-primary {
    background: #0d6efd;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.qb-notice-btn-primary:hover {
    background: #0b5ed7;
}

.qb-notice-btn-secondary {
    background: #e5e7eb;
    color: #1f2937;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

.qb-notice-btn-secondary:hover {
    background: #d1d5db;
}

/* Phân trang trang Danh Sách Sản Phẩm */
.sh-pagination {
    margin-top: 24px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sh-pagination-info {
    font-size: 13.5px;
    color: var(--text-light);
}

.sh-pagination-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.sh-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: var(--white);
    color: var(--text-color);
    font-size: 13.5px;
    font-weight: 600;
    transition: var(--transition);
}

.sh-page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.sh-page-btn.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}