/* Reset CSS & Variables */
:root {
    --primary-red: #B22222; /* Màu đỏ sậm chủ đạo */
    --text-dark: #333333;
    --text-gray: #777777;
    --bg-light: #ffffff;
    --bg-body: #fafafa;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Floating Social Sidebar */
.social-sidebar {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.social-sidebar .icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    transition: transform 0.3s;
}

.social-sidebar .icon:hover {
    transform: scale(1.1);
}

.tiktok { background-color: #000; }
.facebook { background-color: #3b5998; }
.messenger { background-color: #0078FF; }
.phone { background-color: #794336; }
.location { background-color: #794336; }

/* Header */
.main-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px; /* Thêm khoảng cách giữa Logo, Tìm kiếm và Giỏ hàng */
}

.logo img {
    height: 60px; /* Tùy chỉnh theo size logo thực tế */
    background-color: #f0ceb6; /* Giả lập nền logo như ảnh */
    padding: 5px;
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 700;
    color: var(--primary-red);
    font-size: 14px;
}

.main-nav i {
    font-size: 10px;
    margin-left: 3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Header User Action */
.header-user-action {
    position: relative;
    display: flex;
    align-items: center;
}
.login-btn {
    background-color: var(--primary-red);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    display: flex; align-items: center; gap: 5px;
    transition: background-color 0.3s;
}
.login-btn:hover {
    background-color: #8B0000;
}
.user-dropdown {
    position: relative; cursor: pointer;
}
.user-greeting {
    background-color: var(--primary-red);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    display: flex; align-items: center; gap: 5px;
}
.user-dropdown-menu {
    position: absolute; top: 100%; right: 0;
    background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 4px; padding: 10px 0; width: 120px;
    display: none; z-index: 1000; margin-top: 10px;
}

/* Cầu nối tàng hình giúp chuột không bị trượt mất khi rê xuống Menu User */
.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px; left: 0; right: 0; height: 15px;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}
.user-dropdown-menu a {
    display: block; padding: 8px 15px;
    color: var(--text-dark); font-size: 14px;
    text-decoration: none;
}
.user-dropdown-menu a:hover {
    background: #f1f5f9; color: var(--primary-red);
}

/* Header Search Bar */
.header-search-bar {
    flex: 1; /* Tự động kéo dãn để lấp đầy không gian */
    max-width: 600px; /* Tránh bị quá dài trên màn hình to */
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-bar input {
    width: 100%;
    padding: 12px 45px 12px 20px; /* Dành khoảng trống bên phải cho icon */
    border: 2px solid #eee;
    border-radius: 25px; /* Bo tròn góc hiện đại */
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.header-search-bar input:focus {
    border-color: var(--primary-red); /* Viền đỏ khi click vào */
}

.header-search-bar button {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--primary-red);
    font-size: 18px;
    cursor: pointer;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-top: 10px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: var(--text-dark);
    transition: background-color 0.2s;
    cursor: pointer;
}

.search-suggestion-item:last-child { border-bottom: none; }
.search-suggestion-item:hover { background-color: #f8fafc; }

.search-suggestion-item img {
    width: 40px; height: 40px;
    border-radius: 4px; object-fit: cover;
}

.search-suggestion-info { flex: 1; }
.search-suggestion-name { font-size: 13px; font-weight: bold; margin-bottom: 3px; }
.search-suggestion-price {
    font-size: 12px; color: var(--primary-red); font-weight: 500;
}

.search-no-results {
    padding: 15px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.cart-btn {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mini Cart Dropdown */
.header-cart-wrapper {
    position: relative;
}

.mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 15px; /* Khoảng cách với nút Cart */
}

/* Cầu nối tàng hình cho Menu Giỏ hàng (Mini Cart) */
.mini-cart-dropdown::before {
    content: '';
    position: absolute;
    top: -15px; left: 0; right: 0; height: 15px;
}

.header-cart-wrapper:hover .mini-cart-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.mini-cart-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.mini-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mini-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.mini-cart-item-info {
    flex: 1;
}

.mini-cart-item-name {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
    line-height: 1.4;
}

.mini-cart-item-price {
    font-size: 13px;
    color: var(--primary-red);
    font-weight: 500;
}

.mini-cart-remove {
    background: none; border: none;
    color: #cbd5e1; font-size: 16px;
    cursor: pointer; padding: 5px 10px;
    transition: color 0.3s; margin-left: 10px;
}
.mini-cart-remove:hover {
    color: var(--primary-red);
}

.mini-cart-total {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.mini-cart-actions {
    display: flex;
    gap: 10px;
}

.mini-cart-actions a {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.view-cart-btn {
    background: #f1f5f9;
    color: var(--text-dark);
}

.view-cart-btn:hover {
    background: #e2e8f0;
}

.checkout-btn {
    background: var(--primary-red);
    color: #fff;
}

.checkout-btn:hover {
    background: #8B0000;
}

/* Page Title */
.page-title {
    text-align: center;
    padding: 40px 0;
}

.page-title h1 {
    font-family: var(--font-heading);
    color: var(--primary-red);
    font-size: 36px;
    letter-spacing: 1px;
}

/* Product Grid */
.category-section, .product-list-section {
    margin-bottom: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    text-align: center;
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.img-placeholder {
    background-color: #ddd;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.quick-view-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.img-placeholder:hover .quick-view-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: #ffffff; color: var(--primary-red);
    padding: 10px 20px; border-radius: 20px;
    font-weight: bold; font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.product-card h3 {
    color: var(--primary-red);
    font-family: var(--font-heading);
    font-size: 14px;
    margin: 15px 10px 5px;
    text-transform: uppercase;
}

.product-card p {
    color: var(--text-gray);
    font-size: 12px;
    margin-bottom: 10px;
}

.product-card .product-price {
    color: var(--primary-red);
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
}

.product-card .select-options-btn {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    transition: opacity 0.3s ease;
    margin: auto 15px 15px 15px;
}

.product-card .select-options-btn:hover {
    opacity: 0.85;
}

/* Section Divider */
.section-divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.divider-title {
    display: inline-block;
    border: 1px solid #ddd;
    padding: 10px 30px;
    background: var(--bg-light);
    color: var(--primary-red);
    font-family: var(--font-heading);
    font-size: 18px;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
    z-index: -1;
}

/* Quick View Modal Styles */
.qv-modal {
    display: none;
    position: fixed;
    z-index: 1001; /* Đảm bảo nằm trên header */
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.qv-modal.active {
    display: flex;
}

.qv-modal-content {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    display: flex;
    gap: 30px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.qv-close {
    color: #aaa;
    position: absolute;
    top: 10px; right: 20px;
    font-size: 28px; font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.qv-close:hover {
    color: var(--primary-red);
}

.qv-left {
    flex: 1;
}

.qv-left img {
    width: 100%; height: auto; max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
}

.qv-right {
    flex: 1.2;
    display: flex; flex-direction: column;
}

.qv-right h2 {
    color: var(--text-dark);
    font-family: var(--font-heading);
    margin-bottom: 10px; font-size: 24px;
}

.qv-price {
    font-size: 22px; font-weight: bold;
    color: var(--primary-red); margin-bottom: 15px;
}

.qv-description {
    color: var(--text-gray); margin-bottom: 20px;
    line-height: 1.6; font-size: 14px;
}

.qv-options, .qv-quantity {
    margin-bottom: 20px;
}

.qv-options label, .qv-quantity label {
    display: block; margin-bottom: 5px;
    font-weight: bold; font-size: 14px;
}

.qv-options select, .qv-quantity input {
    padding: 10px; border: 1px solid #ddd;
    border-radius: 4px; width: 100%; max-width: 200px;
    outline: none;
}

.qv-options select:focus, .qv-quantity input:focus {
    border-color: var(--primary-red);
}

.qv-add-to-cart {
    background-color: var(--primary-red);
    color: white; border: none;
    padding: 15px; font-size: 16px;
    font-weight: bold; cursor: pointer;
    border-radius: 4px; transition: background-color 0.3s;
    margin-top: auto; text-transform: uppercase;
}

.qv-add-to-cart:hover {
    background-color: #8B0000;
}

/* Footer */
.main-footer {
    background-color: #8B0000; /* Màu đỏ sậm */
    color: #ffffff;
    padding: 50px 0;
    position: relative;
}

.footer-container {
    display: flex;
    justify-content: center;
    gap: 50px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Giữ an toàn lề cho giao diện nhỏ hơn */
}

.footer-col h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 20px;
}

.logo-col img {
    max-height: 250px;
    width: auto;
}

.contact-col ul {
    list-style-type: disc;
    padding-left: 20px; /* Thụt vào một chút để hiển thị dấu chấm tròn */
}

.contact-col li {
    line-height: 1.8;
    margin-bottom: 5px;
}

.map-col iframe {
    width: 350px;
    height: 200px;
    border: 0;
}

/* Floating Action Button (FAB) Menu */
.fab-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse; /* Xếp nút FAB ở dưới, menu chồi lên trên */
    align-items: center;
    gap: 15px;
}

.fab-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); /* Ẩn trượt xuống dưới một chút */
    transition: all 0.3s ease;
}

.fab-container:hover .fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Nổi lên khi hover */
}

.fab-container:hover .fab-btn {
    transform: rotate(45deg); /* Xoay dấu + thành x */
}

.fab-menu .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.fab-menu .icon:hover {
    transform: scale(1.1);
}

.tiktok { background-color: #000; }
.facebook { background-color: #3b5998; }
.messenger { background-color: #0078FF; }
.phone { background-color: #794336; }
.location { background-color: #794336; }

.fab-btn {
    width: 50px;
    height: 50px;
    background-color: #d32f2f; /* Màu đỏ tươi */
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background-color 0.3s ease; /* Thêm hiệu ứng xoay */
}

.fab-btn:hover {
    background-color: #b71c1c;
}

/* Toast Notification */
#toast-notification {
    visibility: hidden;
    min-width: 250px;
    background-color: #4CAF50; /* Màu xanh lá thành công */
    color: #fff;
    text-align: center;
    border-radius: 30px;
    padding: 12px 24px;
    position: fixed;
    z-index: 1002;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    bottom: 30px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

#toast-notification.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Cart Page Styles */
.cart-page { padding: 40px 15px; min-height: 50vh; }
.page-title-text { text-align: center; font-family: var(--font-heading); color: var(--primary-red); margin-bottom: 40px; font-size: 32px; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-radius: 8px; overflow: hidden; }
.cart-table th, .cart-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; vertical-align: middle; }
.cart-table th { background: #f8fafc; font-weight: bold; text-transform: uppercase; font-size: 13px; color: #64748b; }
.cart-table img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }
.cart-item-name { font-weight: bold; color: var(--text-dark); display: block; margin-bottom: 5px; font-size: 15px; }
.cart-item-size { font-size: 12px; color: #888; }

.qty-control { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 4px; width: fit-content; }
.qty-btn { background: #f1f5f9; border: none; padding: 8px 12px; cursor: pointer; transition: background 0.2s; font-weight: bold; }
.qty-btn:hover { background: #e2e8f0; }
.qty-input { width: 40px; text-align: center; border: none; border-left: 1px solid #ddd; border-right: 1px solid #ddd; padding: 8px 0; outline: none; font-weight: bold; }

.cart-item-remove { color: #ef4444; cursor: pointer; background: none; border: none; font-size: 18px; padding: 5px; transition: color 0.2s; }
.cart-item-remove:hover { color: #b91c1c; }

.cart-summary { background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); width: 100%; max-width: 450px; margin-left: auto; }
.cart-summary h3 { font-family: var(--font-heading); margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; font-size: 20px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 16px; color: #475569; }
.summary-total { font-size: 22px; font-weight: bold; color: var(--primary-red); border-top: 1px solid #eee; padding-top: 15px; margin-top: 15px; }

.checkout-btn-large { display: block; width: 100%; background: var(--primary-red); color: #fff; text-align: center; padding: 15px; border-radius: 4px; font-weight: bold; font-size: 16px; margin-top: 25px; transition: background 0.3s; text-transform: uppercase; letter-spacing: 1px; }
.checkout-btn-large:hover { background: #8B0000; }

.empty-cart-msg { text-align: center; padding: 60px 0; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.empty-cart-msg h2 { margin-bottom: 15px; color: var(--text-dark); }
.empty-cart-msg a { color: var(--primary-red); font-weight: bold; text-decoration: underline; }

/* Responsive nhỏ cho bảng Giỏ hàng */
@media (max-width: 768px) {
    .cart-table th { display: none; }
    .cart-table td { display: block; text-align: right; padding: 10px 15px; }
    .cart-table td::before { content: attr(data-label); float: left; font-weight: bold; text-transform: uppercase; font-size: 12px; color: #64748b; }
    .cart-table td:first-child { display: flex; justify-content: flex-end; align-items: center; gap: 15px; }
    .cart-table td:first-child::before { display: none; }
    .cart-table td:first-child img { width: 60px; height: 60px; }
    .cart-table td:first-child div { text-align: right; }
    .qty-control { display: inline-flex; }
    .cart-summary { margin: 0 auto; max-width: 100%; }
}

/* Product Detail Page Styles */
.product-detail-section { padding: 40px 15px; min-height: 60vh; }
.breadcrumb { margin-bottom: 30px; font-size: 14px; color: #64748b; }
.breadcrumb a { color: var(--primary-red); text-decoration: none; font-weight: bold; }
.product-detail-wrapper { display: flex; gap: 50px; background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 2px 15px rgba(0,0,0,0.05); }
.detail-image-wrapper { flex: 1; }
.detail-image-wrapper img { width: 100%; border-radius: 8px; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.detail-info-wrapper { flex: 1.2; display: flex; flex-direction: column; justify-content: center; }
.detail-info-wrapper h1 { font-family: var(--font-heading); color: var(--text-dark); margin-bottom: 15px; font-size: 32px; }
.detail-price { font-size: 28px; color: var(--primary-red); font-weight: bold; margin-bottom: 25px; }
.detail-desc { color: #475569; line-height: 1.8; margin-bottom: 30px; font-size: 15px; }
.detail-options { margin-bottom: 30px; }
.detail-options label { display: block; font-weight: bold; margin-bottom: 10px; color: var(--text-dark); }
.detail-options select { padding: 12px 15px; width: 100%; max-width: 300px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 15px; outline: none; }
.detail-options select:focus { border-color: var(--primary-red); }
.detail-actions { display: flex; gap: 20px; align-items: center; margin-top: auto; }
.detail-qty { display: flex; border: 1px solid #cbd5e1; border-radius: 6px; overflow: hidden; height: 50px; }
.detail-qty button { background: #f8fafc; border: none; width: 40px; font-size: 18px; cursor: pointer; transition: background 0.2s; font-weight: bold; color: var(--text-dark); }
.detail-qty button:hover { background: #e2e8f0; }
.detail-qty input { width: 50px; text-align: center; border: none; border-left: 1px solid #cbd5e1; border-right: 1px solid #cbd5e1; font-size: 16px; font-weight: bold; outline: none; color: var(--text-dark); }
.btn-add-to-cart { flex: 1; height: 50px; background: var(--primary-red); color: white; border: none; border-radius: 6px; font-weight: bold; font-size: 16px; cursor: pointer; transition: background 0.3s; text-transform: uppercase; letter-spacing: 1px; max-width: 300px; }
.btn-add-to-cart:hover { background: #8B0000; }

/* Product Description Section */
.product-description-section {
    margin-top: 50px;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}
.product-description-section h2 {
    font-family: var(--font-heading);
    color: var(--primary-red);
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.description-content { color: #475569; line-height: 1.8; }

/* Suggested Products Section */
.suggested-products-section { margin-top: 60px; }
.suggested-products-section h2 { font-family: var(--font-heading); color: var(--text-dark); text-align: center; margin-bottom: 30px; font-size: 28px; }

@media (max-width: 768px) {
    .product-detail-wrapper { flex-direction: column; padding: 20px; gap: 30px; }
    .detail-actions { flex-direction: column; align-items: stretch; }
    .btn-add-to-cart { max-width: 100%; }
}

/* Checkout Page Styles */
.checkout-page { padding: 40px 15px; min-height: 60vh; }
.checkout-container { display: flex; gap: 40px; }
.checkout-form-section { flex: 1.5; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.checkout-form-section h2 { font-family: var(--font-heading); color: var(--primary-red); margin-bottom: 20px; font-size: 24px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.checkout-form .form-group { margin-bottom: 20px; }
.checkout-form label { display: block; font-weight: bold; margin-bottom: 8px; color: var(--text-dark); }
.checkout-form input, .checkout-form textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 15px; outline: none; transition: border-color 0.3s; }
.checkout-form input:focus, .checkout-form textarea:focus { border-color: var(--primary-red); }
.checkout-form textarea { resize: vertical; min-height: 100px; }

.checkout-summary-section { flex: 1; background: #f8fafc; padding: 30px; border-radius: 8px; border: 1px solid #e2e8f0; height: fit-content; }
.checkout-summary-section h2 { font-family: var(--font-heading); color: var(--text-dark); margin-bottom: 20px; font-size: 24px; border-bottom: 1px solid #cbd5e1; padding-bottom: 10px; }
.checkout-item { display: flex; justify-content: space-between; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #cbd5e1; }
.checkout-item-info { display: flex; flex-direction: column; }
.checkout-item-name { font-weight: bold; color: var(--text-dark); font-size: 14px; }
.checkout-item-size { font-size: 12px; color: #64748b; }
.checkout-item-price { font-weight: bold; color: var(--primary-red); }
.checkout-totals { margin-top: 20px; }
.checkout-total-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 15px; color: #475569; }
.checkout-total-row.final { font-size: 20px; font-weight: bold; color: var(--primary-red); border-top: 2px solid #cbd5e1; padding-top: 15px; margin-top: 10px; }
.payment-methods { margin-top: 25px; border-top: 2px solid #cbd5e1; padding-top: 20px; margin-bottom: 20px;}
.payment-method-item { margin-bottom: 10px; }
.payment-method-item label { font-weight: bold; color: var(--text-dark); cursor: pointer; display: inline-block; margin-left: 8px; vertical-align: middle; }
.payment-description { display: none; background: #fff; padding: 15px; border-radius: 6px; font-size: 13px; color: #64748b; margin-top: 12px; border: 1px solid #cbd5e1; line-height: 1.6; position: relative; }
.payment-method-item input[type="radio"]:checked ~ .payment-description { display: block; }
.payment-description::before { content: ''; position: absolute; top: -6px; left: 20px; width: 10px; height: 10px; background: #fff; border-top: 1px solid #cbd5e1; border-left: 1px solid #cbd5e1; transform: rotate(45deg); }
.place-order-btn { display: block; width: 100%; background: var(--primary-red); color: #fff; text-align: center; padding: 15px; border-radius: 6px; font-weight: bold; font-size: 16px; margin-top: 25px; border: none; cursor: pointer; transition: background 0.3s; text-transform: uppercase; letter-spacing: 1px; }
.place-order-btn:hover { background: #8B0000; }
@media (max-width: 768px) { .checkout-container { flex-direction: column-reverse; } }

/* =========================================
   Responsive Mobile Layout (Giao diện Mobile)
   ========================================= */

/* Màn hình Tablet (iPad) */
@media (max-width: 992px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Màn hình Điện thoại ngang & Tablet nhỏ */
@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 15px; padding: 10px 0; }
    .header-search-bar { width: 100%; max-width: 100%; order: 3; }
    .header-actions { width: 100%; justify-content: space-between; order: 2; }
    .mini-cart-dropdown { position: fixed; top: 160px; right: 10px; left: 10px; width: auto; }
    
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .page-title h1 { font-size: 26px; }
    
    .qv-modal-content { flex-direction: column; padding: 20px; gap: 15px; max-height: 90vh; overflow-y: auto; }
    .qv-left img { max-height: 250px; }
    
    .footer-container { flex-direction: column; align-items: center; text-align: center; gap: 30px; }
    .contact-col ul { padding-left: 0; list-style: none; }
    .map-col iframe { width: 100%; max-width: 100%; }
}

/* Màn hình Điện thoại dọc (iPhone, Android) */
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .auth-container { padding: 25px 15px; margin: 30px 10px; }
    .social-sidebar { display: none; } /* Ẩn sidebar mạng xã hội trên màn hình quá nhỏ */
    .detail-price { font-size: 24px; }
    .detail-info-wrapper h1 { font-size: 24px; }
    .checkout-form-section { padding: 20px 15px; }
}