/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background: #f4f8fb;
    color: #222;
}

/* HEADER & NAVIGATION */
.main-header {
    border-bottom: 2px solid #eee;
    background: #fff;
}

.header-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px 10px 24px;
    background: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.site-logo {
    height: 80px;
    width: auto;
    margin-right: 32px;
}

.header-search {
    flex: 1;
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 32px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.header-search input[type="text"] {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 8px 0 0 8px;
    font-size: 1.1rem;
    background: #f7f7f7;
    outline: none;

}

.header-search button {
    background: #22b573;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    height: 53px;
}

.header-search button:hover {
    background: #1a8c5a;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-icon {
    display: flex;
    align-items: center;
    color: #222;
    font-size: 1.08rem;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}

.header-icon:hover {
    color: #22b573;
}

.icon-user::before {
    content: '\1F464';
    /* Unicode user icon */
    font-size: 1.5rem;
    margin-right: 6px;
}

.icon-cart {
    position: relative;
    margin-right: 6px;
}

.icon-cart::before {
    content: '\1F6D2';
    /* Unicode cart icon */
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #22b573;
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
}

/* MENU NAVIGATION */
.main-nav-bar {
    background: #22b573;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    margin-bottom: 0;
}

.main-nav-bar ul {
    display: flex;
    align-items: center;
    /* gap: 18px; */
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 54px;
}

.main-nav-bar ul li {
    color: #fff;
    font-size: 1.13rem;
    font-weight: 500;
    /* padding: 0 18px; */
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;

}

.main-nav-bar ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.0rem;
    letter-spacing: 1px;
    transition: color 0.2s;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 18px;
}

.main-nav-bar ul li a:hover {
    color: #222;
    background-color: #bcfb9c;
}

.nav-category {
    background: #111;
    color: #fff;
    border-radius: 6px 6px 0 0;
    padding: 0 24px;
    /* margin-right: 18px; */
    display: flex;
    align-items: center;
    font-size: 1.13rem;
    font-weight: 500;
    height: 54px;
}

.icon-menu::before {
    content: '\2630';
    /* Unicode hamburger */
    font-size: 1.3rem;
    margin-right: 8px;
}

.icon-down::before {
    content: '\25BC';
    /* Unicode down arrow */
    font-size: 1rem;
    margin-left: 8px;
}

body {
    background: #f4f8fb;
    color: #222;
}

/* HERO SLIDER */
.hero-slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 32px auto;
    overflow: hidden;
    background: #fafbfc;
    border-bottom: 2px solid #eee;
    aspect-ratio: 16/9;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    background-color: #fafbfc;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    font-size: 2rem;
    padding: 8px 16px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}

.slider-btn:hover {
    background: rgba(34, 181, 115, 0.7);
}

.slider-btn.prev {
    left: 18px;
}

.slider-btn.next {
    right: 18px;
}

.slider-dots {
    text-align: center;
    margin-top: 12px;
}

.slider-dots .dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 6px;
    background: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.slider-dots .dot.active {
    background: #22b573;
}

@media (max-width: 700px) {

    .slider-wrapper,
    .slide {
        height: 180px;
        min-height: 120px;
    }
}

/* FEATURED CATEGORIES */
.featured-categories {
    padding: 40px 0 32px 0;
    text-align: center;
    border-bottom: 2px solid #eee;
}

.featured-categories h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 28px;
    letter-spacing: 1px;
}

.categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-card {
    width: 280px;
    height: 200px;
    background: #fff;
    border: none;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #222;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.category-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.category-card .category-name {
    padding: 16px;
    width: 100%;
    text-align: center;
    background: #fff;
    font-weight: 600;
    color: #333;
}

/* NEW ARRIVALS */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0 32px 0;
}

.new-arrivals-section h2 {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.new-arrivals-list {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.product-card {
    width: 220px;
    height: 180px;
    background: #fff;
    border: 2px solid #bbb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #222;
    margin-bottom: 12px;
}
/* FOOTER LINKS SECTION */
.footer-links-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 0 24px 0;
}

.footer-links-row {
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.footer-link-col {
    flex: 1 1 200px;
}

.footer-link-col h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 16px;
}

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

.footer-link-col ul li {
    margin-bottom: 12px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    color: #444;
}
.footer-main {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 0 24px 0;
    gap: 32px;
    background: #fff;
}

.footer-main-col.left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 320px;
    padding-left: 50px;
}

.footer-logo {
    max-width: 100px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: 100px;
}

.footer-main-col.left p {
    margin-top: 8px;
    color: #222;
    font-size: 1.1rem;
}

.footer-main-col.info {
    min-width: 320px;
}

.footer-main-col.info h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #222;
}

.footer-main-col.info p {
    color: #222;
    font-size: 1.1rem;
    margin-bottom: 8px;
    text-decoration: none;
    word-break: break-word;
}    

.footer-main-col.map {
    min-width: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 30px;
}

.footer-main-col.map iframe {
    width: 100%;
    min-width: 250px;
    height: 190px;
    border: 0;
    border-radius: 8px;
    margin-top: 8px;
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #444;
    font-size: 1.05rem;
    padding: 18px 0 10px 0;
    background: #fff;
    /* margin-top: 16px; */
}

@media (max-width: 1100px) {
    .footer-main {
        flex-direction: column;
        gap: 18px;
        align-items: stretch;
    }

    .footer-main-col.left,
    .footer-main-col.info,
    .footer-main-col.map {
        min-width: 0;
    }

    .footer-main-col.map iframe {
        min-width: 0;
    }
}

@media (max-width: 700px) {
    .header-top-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 6px 8px 6px;
    }

    .site-logo {
        margin: 0 auto 12px auto;
        height: 44px;
    }

    .header-search {
        margin: 0 0 12px 0;
        max-width: 100%;
    }

    .header-icons {
        gap: 18px;
        justify-content: flex-end;
    }

    .main-nav-bar {
        position: relative;
    }

    .main-nav-bar ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #22b573;
        padding: 0;
        margin: 0;
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .main-nav-bar ul.show {
        display: flex;
    }

    .main-nav-bar ul li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav-bar ul li a {
        padding: 15px 20px;
        width: 100%;
        text-align: left;
    }

    .nav-category {
        margin: 0;
        border-radius: 0;
        background: #111;
    }

    .category-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .menu-toggle {
        display: none;
    }

    @media (max-width: 700px) {
        .menu-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px 20px;
            background: #22b573;
            color: #fff;
            font-size: 1.1rem;
            cursor: pointer;
            user-select: none;
            border: none;
            width: 100%;
        }

        .menu-toggle span {
            font-weight: 600;
        }

        .menu-toggle .icon-menu {
            font-size: 1.5rem;
        }
    }
}

/* RESPONSIVE */
@media (max-width: 900px) {

    .main-content,
    .categories-list,
    .new-arrivals-list,
    .footer-links-row {
        flex-direction: column;
        gap: 18px;
    }

    .main-header,
    .header-container,
    .footer-links-section,
    .newsletter-section,
    .featured-categories,
    .hero-section {
        padding-left: 8px;
        padding-right: 8px;
    }

    .main-content {
        padding: 24px 0 16px 0;
    }
}

/* CATEGORY DROPDOWN */
.nav-category {
    position: relative;
    cursor: pointer;
}

.category-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: fadeInDown 0.3s ease;
}

.nav-category:hover .category-dropdown {
    display: block;
}

.category-dropdown ul {
    flex-direction: column;
    padding: 8px 0;
    gap: 0;
    height: auto;
    width: 100%;
    
}

.category-dropdown ul li {
    padding: 0;
    margin: 0;
    height: auto;
    width: 100%;
}

.category-dropdown ul li a {
    color: #333;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

.category-dropdown ul li a:hover {
    background-color: #f5f5f5;
    color: #22b573;
}

.category-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #eee;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-dropdown ul li a:hover .category-icon {
    transform: scale(1.1);
    border-color: #22b573;
}

.category-dropdown ul li a span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.featured-products {
    padding: 20px 10px;
    background-color: #fff;
}

.featured-products h2 {
    text-align: left;
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.products-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px;
    position: relative;
}

.products-list a{
    text-decoration: none;
    
}
.product-card {
    background: white;
    border-radius: 6px;
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid #eee;
    height: auto;
    min-width: 0;
    width: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-brand {
    text-transform: uppercase;
    color: #666;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #fff;
    margin-bottom: 10px;
}

.product-info {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.product-info-mg {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.product-card h3 {
    margin: 0;
    font-size: 1em;
    color: #333;
    font-weight: normal;
    line-height: 1.3;
}

.product-card h3:hover {
    color: #0066cc;
}

.price-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 3px;
    align-items: center;
}

.product-price {
    color: #ff3300;
    font-size: 1.1em;
    font-weight: bold;
}


.slider-controls {
    position: absolute;
    top: -40px;
    right: 15px;
    display: flex;
    gap: 5px;
}

.slider-btn {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9em;
}

.slider-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-list {
        max-width: 100%;
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .products-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .products-list {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .featured-products h2 {
        font-size: 1.5em;
    }
}

.add-to-cart {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 0;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
}

.add-to-cart:hover {
    background-color: #45a049;
}

/* LOGIN PAGE STYLES */
.login-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 24px;
    color: #333;
    font-size: 1.8em;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
    font-size: 1em;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.login-container button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #22b573;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.login-container button[type="submit"]:hover {
    background-color: #1a8c5a;
}

.remember-pass{
    padding-bottom: 10px;
}

.register{
    padding-top: 15px;
}

/* REGISTER PAGE STYLES */
.register-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.register-container h2 {
    margin-bottom: 24px;
    color: #333;
    font-size: 1.8em;
}

.register-container button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #22b573;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.register-container button[type="submit"]:hover {
    background-color: #1a8c5a;
}

/* 1. Định dạng khối bao quanh */
.user-dropdown-container {
    position: relative; /* Để menu con bám theo nó */
    display: inline-block;
    cursor: pointer;
    padding: 10px 0;
}

/* 2. Định dạng link tên người dùng */
.user-name-link {
    text-decoration: none;
    color: #333; /* Màu chữ đen */
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px; /* Khoảng cách giữa icon và tên */
}

.user-name-link:hover {
    color: #007bff; /* Đổi màu khi rê chuột */
}

.arrow-down {
    font-size: 10px;
    color: #888;
}

/* 3. ĐỊNH DẠNG MENU XỔ XUỐNG (QUAN TRỌNG) */
.custom-dropdown-menu {
    display: none; /* Mặc định ẩn đi */
    position: absolute;
    top: 100%; /* Hiện ngay bên dưới tên */
    right: 0; /* Canh lề phải */
    background-color: white;
    min-width: 200px; /* Chiều rộng tối thiểu */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); /* Đổ bóng cho đẹp */
    padding: 10px 0;
    list-style: none; /* Bỏ dấu chấm tròn đầu dòng */
    z-index: 999; /* Luôn nổi lên trên cùng */
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* 4. Hiệu ứng: RÊ CHUỘT VÀO LÀ HIỆN MENU */
.user-dropdown-container:hover .custom-dropdown-menu {
    display: block; /* Hiện menu lên */
}

/* 5. Định dạng từng mục trong menu */
.custom-dropdown-menu li a {
    color: black;
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    transition: 0.2s;
}

.custom-dropdown-menu li a:hover {
    background-color: #f1f1f1; /* Màu nền xám khi rê chuột vào mục */
    color: #007bff;
}

/* 6. Định dạng nút Đăng xuất */
.logout-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    color: #dc3545; /* Màu đỏ cho nút đăng xuất */
    font-weight: bold;
    font-size: 14px; /* Cỡ chữ bằng với thẻ a */
}

.logout-btn:hover {
    background-color: #fff5f5;
}

/* Đường kẻ ngang phân cách */
.divider {
    height: 1px;
    background-color: #eee;
    margin: 5px 0;
}

/* ========================================
   All Products Page - Product Grid Layout
   ======================================== */

/* Container - Centered with max-width */
.container-centered {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Page Title */
.page-title {
    text-align: center;
    margin: 2rem 0;
    font-size: 2rem;
    color: #333;
    font-weight: bold;
}

/* Product Grid Wrapper - Force 4 Columns on Desktop */
.product-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Exactly 4 columns */
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
}

/* Product Card Links - Remove default link styling */
.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-card a img {
    display: block;
    transition: transform 0.3s ease;
}

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

/* Product Card - Ensure full width inside grid cell with perfect alignment */
.product-grid-wrapper .product-card {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid #eee;
    justify-content: space-between; /* Distribute space evenly */
}

/* Product Card Hover Effect */
.product-grid-wrapper .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Product Card Image - Fixed height container for consistent alignment */
.product-grid-wrapper .product-card img {
    width: 100%;
    height: 130px; /* Fixed height for uniform cards */
    object-fit: contain; /* Show full product without cropping */
    object-position: center;
    background-color: #fff;
    margin-bottom: 10px;
    border-radius: 4px;
}

/* Product Info Container - Flexbox to push button to bottom */
.product-grid-wrapper .product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Take up remaining space */
    width: 100%;
}

/* Product Name - Handle long titles gracefully */
.product-grid-wrapper .product-info h3 {
    margin: 0 0 8px 0;
    font-size: 1em;
    color: #333;
    font-weight: normal;
    line-height: 1.3;
    /* min-height: 2.6em; Reserve space for 2 lines to keep alignment */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    line-clamp: 2; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-grid-wrapper .product-info h3:hover {
    color: #0066cc;
}

/* Price Container */
.product-grid-wrapper .price-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 3px;
    margin-bottom: 10px;
    align-items: center;
}

/* Product Price */
.product-grid-wrapper .product-price {
    color: #ff3300;
    font-size: 1.1em;
    font-weight: bold;
}

/* Add to Cart Button - Reuse homepage green style + Push to bottom */
.product-card .add-to-cart,
.product-grid-wrapper .add-to-cart {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 0;
    background-color: #4CAF50;
    color: white !important;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    margin-top: auto; /* Magic CSS: Push button to bottom of card */
    text-decoration: none;
}

.product-card .add-to-cart:hover,
.product-grid-wrapper .add-to-cart:hover {
    background-color: #45a049;
    color: white !important;
}

/* No Products Message */
.no-products-message {
    text-align: center;
    width: 100%;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
    grid-column: 1 / -1; /* Span all columns */
}

/* Pagination Container - Centered */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

/* ========================================
   Responsive Media Queries
   ======================================== */

/* Tablet - 3 products per row */
@media (max-width: 992px) {
    .product-grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile - 2 products per row */
@media (max-width: 768px) {
    .container-centered {
        padding: 15px;
    }
    
    .page-title {
        font-size: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .product-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-grid-wrapper .product-card img {
        height: 150px;
    }
    
    .product-grid-wrapper .product-info h3 {
        font-size: 0.9rem;
    }
}

/* Small Mobile - 1 product per row (optional) */
@media (max-width: 480px) {
    .product-grid-wrapper {
        grid-template-columns: 1fr;
    }
    
    .product-grid-wrapper .product-card img {
        height: 200px;
    }
}

