@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600&display=swap');

/* ==========================================
   1. TỐI ƯU RENDER CHỮ & BẢNG MÀU CHỦ ĐẠO
   ========================================== */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #ff5277;          /* Hồng san hô sắc nét, dịu êm */
    --primary-hover: #e03b60;    
    --primary-light: #fff0f3;    
    --text-color: #0c0a09;       /* Đen sâu sắc nét, không gắt */
    --text-heading: #0c0a09;     
    --sub-text: #334155;         /* Xám than đầm mắt, không mờ nhạt */
    --bg-page: #f8fafc;          /* Nền xám mát khử chói trắng */
    --card-bg: #ffffff;          
    --border-color: #cbd5e1;     
    --border-soft: #e2e8f0;      
}

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 500;            /* Nét chữ đầm tay, không dùng 700-900 */
    color: var(--text-color);
    background-color: var(--bg-page);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================
   2. KHUNG DÀN RỘNG TOÀN TRANG (FLUID CONTAINER)
   ========================================== */
.container-fluid-wide, 
.main-content-wide {
    width: 95%;
    max-width: 1680px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ==========================================
   3. HEADER & MENU ĐIỀU HƯỚNG CÂN ĐỐI
   ========================================== */
.site-header {
    background: var(--card-bg);
    border-bottom: 1.5px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    padding: 14px 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    max-height: 54px;
    width: auto;
    object-fit: contain;
}

.logo-fallback {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

/* Khung tìm kiếm phẳng mượt, cân đối (không lồi nút) */
.search-bar {
    flex: 1;
    max-width: 640px;
    display: flex;
    align-items: stretch;
    height: 46px;
    background: #ffffff;
    border: 1.5px solid #ff758c;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 82, 119, 0.15);
    border-color: var(--primary);
}

.search-bar input {
    flex: 1;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    padding: 0 20px;
    border: none;
    outline: none;
    color: var(--text-color);
    background: transparent;
}

.search-bar input::placeholder {
    color: #94a3b8;
}

.search-bar button {
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    padding: 0 28px;
    background: linear-gradient(135deg, #ff5277 0%, #ff758c 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.search-bar button:hover {
    opacity: 0.92;
}

/* Khu vực Hotline & Giỏ hàng */
.header-actions {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-shrink: 0;
}

.hotline-box {
    text-align: right;
}

.hotline-box .label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--sub-text);
}

.hotline-box .phone-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 9px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    border: 1.5px solid #fecdd3;
    transition: all 0.2s ease;
}

.cart-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.cart-badge {
    background: var(--primary);
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.cart-btn:hover .cart-badge {
    background: #ffffff;
    color: var(--primary);
}

/* Menu điều hướng chính */
.main-nav {
    background: #ffffff;
    border-top: 1px solid var(--border-soft);
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 13px 0;
    overflow-x: auto;
}

.nav-link {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    padding: 2px 0;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover, 
.nav-link.active {
    color: var(--primary);
}

.nav-link.highlight {
    color: #e11d48;
}

/* ==========================================
   4. BANNER TRANG CHỦ
   ========================================== */
.hero-banner {
    margin: 24px auto;
}

.hero-box {
    background: linear-gradient(135deg, #fcd34d 0%, #ff5277 100%);
    color: #ffffff;
    padding: 48px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(255, 82, 119, 0.15);
}

.hero-box h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.hero-box p {
    font-size: 16px;
    font-weight: 500;
    max-width: 800px;
}

/* ==========================================
   5. LƯỚI SẢN PHẨM TRANG CHỦ
   ========================================== */
.products-section {
    margin-bottom: 50px;
}

.section-title-wrap {
    margin-bottom: 24px;
}

.section-title-wrap h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-heading);
}

.section-title-wrap p {
    font-size: 15px;
    font-weight: 500;
    color: var(--sub-text);
    margin-top: 4px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: var(--border-color);
}

.card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 12px;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img img {
    transform: scale(1.03);
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
}

.price-box {
    margin-bottom: 14px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.current-price {
    font-size: 18px;
    font-weight: 600;
    color: #e11d48;
}

.old-price {
    font-size: 14px;
    font-weight: 500;
    text-decoration: line-through;
    color: var(--sub-text);
}

.btn-add-cart {
    width: 100%;
    padding: 11px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-add-cart:hover {
    background: var(--primary-hover);
}

/* ==========================================
   6. TRANG CHI TIẾT SẢN PHẨM
   ========================================== */
.product-detail-layout {
    margin-top: 24px;
    margin-bottom: 60px;
}

.breadcrumb {
    font-size: 15px;
    font-weight: 500;
    color: var(--sub-text);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--sub-text);
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text-heading);
    font-weight: 600;
}

.detail-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    background: var(--card-bg);
    padding: 36px;
    border-radius: 18px;
    border: 1px solid var(--border-soft);
}

.main-image-wrap {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--border-soft);
}

.detail-main-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.detail-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.4;
    margin-bottom: 18px;
}

.detail-price-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffe4e8;
    border: 1px solid #fecdd3;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.detail-current-price {
    font-size: 28px;
    font-weight: 600;
    color: #e11d48;
}

.detail-old-price {
    font-size: 16px;
    font-weight: 500;
    text-decoration: line-through;
    color: var(--sub-text);
}

.discount-tag {
    background: #ff4757;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.product-commitments {
    margin: 24px 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    padding: 16px 0;
}

.commit-item {
    font-size: 15px;
    font-weight: 500;
    color: #047857;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.commit-item:last-child {
    margin-bottom: 0;
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin-top: 28px;
}

.btn-buy-now {
    flex: 1.3;
    padding: 15px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-buy-now:hover {
    background: var(--primary-hover);
}

.btn-add-cart-outline {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: #ffffff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-cart-outline:hover {
    background: var(--primary);
    color: #ffffff;
}

.hotline-consult {
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
    margin-top: 18px;
}

.hotline-consult strong {
    font-weight: 600;
    color: #e11d48;
}

.product-description-wrap {
    background: var(--card-bg);
    margin-top: 30px;
    padding: 36px;
    border-radius: 18px;
    border: 1px solid var(--border-soft);
}

.product-description-wrap h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

.desc-content {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.8;
}

/* ==========================================
   7. FOOTER CHUNG TOÀN TRANG
   ========================================== */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-soft);
    padding-top: 48px;
    margin-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1.3fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 16px;
}

.footer-col p, 
.footer-col li {
    font-size: 15px;
    font-weight: 500;
    color: var(--sub-text);
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: var(--sub-text);
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-col .tagline {
    font-weight: 600;
    color: var(--primary);
    margin-top: 10px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #f1f5f9;
    font-size: 14px;
    font-weight: 500;
    color: var(--sub-text);
}

/* ==========================================
   8. TƯƠNG THÍCH MÀN HÌNH (RESPONSIVE)
   ========================================== */
@media (max-width: 1024px) {
    .detail-container {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .header-actions {
        justify-content: space-between;
    }
    .footer-inner {
        grid-template-columns: 1fr;
    }
    .action-buttons {
        flex-direction: column;
    }
}
