/* GomSuViet_Project/styles.css */
:root {
    --primary-color: #8B4513; /* Nâu đất đậm (SaddleBrown) */
    --secondary-color: #D2B48C; /* Nâu be nhạt (Tan) */
    --accent-color: #A0522D; /* Nâu Sienna (màu nhấn) */
    --text-color: #333333;
    --light-text-color: #f8f8f8;
    --background-color: #FAF0E6; /* Linen - Nền kem nhẹ */
    --white-color: #FFFFFF;
    --border-color: #DCDCDC; /* Gainsboro - Xám nhạt cho border */
    --container-width: 85%; /* Hoặc 80%, 90% tùy bạn */
    --max-container-width: 1200px;
    --font-family-primary: 'Arial', Helvetica, sans-serif; /* Font có chân, cổ điển */
    --font-family-secondary: 'Arial', Helvetica, sans-serif; /* Font không chân, dễ đọc */font-family: 
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --box-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --box-shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Reset cơ bản và Box Sizing */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-secondary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Loại bỏ khoảng trắng thừa dưới ảnh */
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

ul {
    list-style: none;
}

.container {
    width: var(--container-width);
    max-width: var(--max-container-width);
    margin-left: auto;
    margin-right: auto;
}

.page-content {
    flex-grow: 1; /* Đảm bảo main content chiếm không gian còn lại */
    padding-top: 20px;
    padding-bottom: 40px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-primary);
    color: var(--primary-color);
    margin-bottom: 0.75em;
    line-height: 1.3;
}
h1 { font-size: 2.2em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.4em; }

/* --- Top Bar --- */
#top-bar {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 8px 0;
    font-size: 0.9em;
}

#top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left span {
    margin-right: 20px;
}

.top-bar-right a {
    color: var(--light-text-color);
    font-weight: bold;
    margin-left: 10px;
}
.top-bar-right a:hover {
    color: var(--secondary-color);
}

/* --- Header Main --- */
#header-main {
    background-color: var(--white-color);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--box-shadow-light);
}

#header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Cho phép wrap trên màn hình nhỏ */
}

.logo img {
    height: 60px; /* Điều chỉnh kích thước logo */
}

.header-features {
    display: flex;
    gap: 25px; /* Khoảng cách giữa các feature items */
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-item img {
    height: 28px; /* Kích thước icon policy, mail, clock */
    opacity: 0.8;
}

.feature-text strong {
    display: block;
    font-size: 0.95em;
    color: var(--primary-color);
}
.feature-text span {
    font-size: 0.85em;
    color: #555;
}

.header-cart {
    position: relative;
}
.header-cart a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius-sm);
    color: var(--accent-color);
    font-weight: bold;
}
.header-cart a:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    text-decoration: none;
}
.header-cart img {
    height: 20px;
}
#cart-item-count {
    background-color: var(--accent-color);
    color: var(--white-color);
    border-radius: 50%;
    padding: 0px 6px;
    font-size: 0.8em;
    min-width: 18px;
    text-align: center;
    line-height: 18px;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* --- Main Navigation --- */
#main-nav {
    background-color: var(--accent-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#main-nav ul {
    display: flex;
    justify-content: center; /* Hoặc flex-start tùy thiết kế */
}

#main-nav ul li a {
    display: block;
    padding: 14px 20px;
    color: var(--light-text-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.95em;
    transition: background-color 0.3s ease;
}

#main-nav ul li a:hover,
#main-nav ul li.active a {
    background-color: var(--primary-color);
    text-decoration: none;
}


/* --- Sidebar (Common styling) --- */
.sidebar {
    background-color: var(--white-color);
    padding: 15px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-light);
    margin-bottom: 20px; /* Khoảng cách nếu sidebar và content chồng nhau trên mobile */
}
.sidebar h2 {
    font-size: 1.3em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 15px;
}
.category-menu li a {
    display: block;
    padding: 8px 10px;
    color: var(--text-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.category-menu li a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
}

/* --- Slideshow Section --- */
.slideshow-section {
    display: flex; /* Sử dụng flexbox cho sidebar và slideshow */
    gap: 20px; /* Khoảng cách giữa sidebar và slideshow */
    margin-bottom: 30px;
}
.slideshow {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-medium);
    height: 400px; /* Điều chỉnh chiều cao theo ảnh */
}
.slideshow .slide {
    display: none;
    width: 100%;
    height: 100%;
}
.slideshow .slide.active {
    display: block;
}
.slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Đảm bảo ảnh che phủ toàn bộ, có thể cắt bớt */
}
/* Nút slideshow (tùy chọn) */
.slideshow .prev, .slideshow .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    background-color: rgba(0,0,0,0.4);
    border: none;
    border-radius: var(--border-radius-sm);
    transition: background-color 0.3s ease;
}
.slideshow .prev { left: 10px; }
.slideshow .next { right: 10px; }
.slideshow .prev:hover, .slideshow .next:hover {
    background-color: rgba(0,0,0,0.7);
}


/* --- Offer Banner --- */
.offer-banner {
    margin: 30px 0;
}
.offer-banner img {
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-medium);
}

/* --- Product Showcase / Grid --- */
.product-showcase h2 {
    font-family: Arial, Helvetica, sans-serif; /* THAY FONT Ở ĐÂY */
    /* Hoặc nếu bạn đã định nghĩa biến font cho tiêu đề:
       font-family: var(--font-family-headings);
       hoặc
       font-family: var(--font-family-primary);
    */
    text-align: center;
    margin-bottom: 25px;
    position: relative; /* For decorative lines or elements */
    /* font-weight: bold; /* Hoặc giữ nguyên font-weight mặc định của h2 */
    /* color: var(--primary-color); /* Giữ nguyên màu nếu đã đẹp */
    /* font-size: 1.8em; /* Giữ nguyên hoặc điều chỉnh kích thước */
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Khoảng cách giữa các sản phẩm */
    /* clear: both;  Không cần nếu cha không dùng float */
}

.product-item {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    text-align: center;
    padding: 15px;
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-medium);
}

.product-item a { /* Link bọc ảnh và tên sản phẩm */
    text-decoration: none;
    color: inherit;
}

.product-item img {
    width: 100%;
    height: 200px; /* Chiều cao cố định cho ảnh sản phẩm */
    object-fit: contain; /* Hiển thị toàn bộ ảnh, có thể để trống nếu ảnh không vừa */
    margin-bottom: 15px;
    border-radius: var(--border-radius-sm);
}

.product-item h3 {
    font-family: Arial, Helvetica, sans-serif; /* THAY FONT Ở ĐÂY */
    /* Hoặc nếu bạn đã định nghĩa biến font cho body hoặc một font khác bạn muốn:
       font-family: var(--font-family-body);
       hoặc
       font-family: var(--font-family-secondary);
    */
    font-size: 1.1em;
    margin-bottom: 8px;
    color: var(--primary-color);
    min-height: 44px; /* Đảm bảo tên sản phẩm có 2 dòng chiều cao */
    overflow: hidden; /* Ẩn nếu tên quá dài */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Giới hạn 2 dòng */
    -webkit-box-orient: vertical;
    /* font-weight: normal; /* Hoặc bold, 600, tùy bạn muốn tên sản phẩm đậm hay không */
}

.product-item .price {
    font-size: 1.2em;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.btn-add-to-cart {
    background-color: var(--accent-color);
    color: var(--white-color);
    border: none;
    padding: 10px 15px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Đẩy nút xuống dưới cùng nếu card có chiều cao khác nhau */
}

.btn-add-to-cart:hover {
    background-color: var(--primary-color);
}

/* --- Footer --- */
#footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 40px 0 20px; /* Thêm padding bottom */
    margin-top: auto; /* Đảm bảo footer luôn ở cuối nếu nội dung trang ngắn */
    font-size: 0.9em;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* Khoảng cách giữa các cột footer */
    margin-bottom: 30px;
}

.footer-col {
    flex: 1; /* Cho phép các cột co giãn */
    min-width: 200px; /* Chiều rộng tối thiểu trước khi wrap */
}

.footer-col h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.15em;
    text-transform: uppercase;
}

.footer-col p,
.footer-col ul li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.footer-col ul li a {
    color: var(--light-text-color);
}
.footer-col ul li a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.social-icons a {
    display: inline-block; /* Để các icon nằm trên một hàng */
    margin-right: 10px;
}
.social-icons img {
    width: 28px;
    height: 28px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.social-icons img:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-bottom p {
    margin-bottom: 8px;
}
.footer-bottom a {
    color: var(--secondary-color);
    margin: 0 8px;
}
.footer-bottom a:hover {
    color: var(--white-color);
}

/* Breadcrumb */
.breadcrumb {
    padding: 10px 0;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #777;
    border-bottom: 1px dashed var(--border-color);
}
.breadcrumb a {
    color: var(--accent-color);
}
.breadcrumb span {
    color: var(--text-color);
}

/* General Form Styling (Can be overridden in specific CSS files) */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.95em;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1em;
    font-family: var(--font-family-secondary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.15rem rgba(139, 69, 19, 0.2); /* SaddleBrown with alpha */
    outline: none;
}
.form-group textarea {
    resize: vertical; /* Cho phép thay đổi chiều cao textarea */
    min-height: 80px;
}
.required {
    color: #e74c3c; /* Màu đỏ cho dấu sao bắt buộc */
    margin-left: 2px;
}
button[type="submit"], .button-primary {
    background-color: var(--accent-color);
    color: var(--white-color);
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
button[type="submit"]:hover, .button-primary:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}


/* Responsive Adjustments */
@media (max-width: 992px) {
    .container {
        width: 90%;
    }
    .header-features {
        display: none; /* Ẩn bớt features trên tablet để gọn */
    }
    .slideshow-section {
        flex-direction: column; /* Sidebar và slideshow xếp chồng */
    }
    .sidebar.col-3, .slideshow.col-9 { /* Reset width từ grid */
        width: 100% !important; /* Quan trọng để ghi đè grid */
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .product-item.col-3 { /* 3 sản phẩm 1 hàng trên tablet */
        width: calc(33.333% - (20px * 2 / 3)) !important;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }

    #top-bar .container {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    #top-bar-left, #top-bar-right { text-align: center; }

    #header-main .container {
        flex-direction: column;
        gap: 15px;
    }
    .logo { margin-bottom: 10px; }

    #main-nav ul {
        flex-wrap: wrap; /* Cho phép các mục menu xuống hàng */
        justify-content: center;
    }
    #main-nav ul li a {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .product-item.col-3, .product-item.col-m-6 { /* 2 sản phẩm 1 hàng trên mobile */
        width: calc(50% - (20px / 2)) !important;
    }
    .footer-columns {
        gap: 20px;
    }
    .footer-col {
        min-width: calc(50% - 10px); /* 2 cột footer trên mobile nhỏ */
        text-align: center;
    }
    .footer-col ul { text-align: left; display: inline-block; }
    .social-icons { text-align: center; }
}

@media (max-width: 576px) {
    .product-item.col-3, .product-item.col-m-6, .product-item.col-s-12 { /* 1 sản phẩm 1 hàng trên mobile rất nhỏ */
        width: 100% !important;
    }
    .footer-col {
        min-width: 100%; /* 1 cột footer trên mobile rất nhỏ */
    }
    .header-cart a { padding: 6px 10px; font-size: 0.9em; }
    .header-cart img { height: 18px; }
}