/* ====== WRAPPER CHÍNH - GIỚI HẠN 1200PX ====== */
.category-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ====== MENU DANH MỤC 2 CẤP ====== */
.category-menu-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

.category-menu-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    display: inline-block;
    margin-right: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-menu-title i {
    color: #ed1b24;
    margin-right: 6px;
}

.category-menu-list {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3px 0;
}

.category-menu-item {
    position: relative;
    display: inline-block;
}

.category-menu-item > a {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: transparent;
    margin: 2px 2px;
}

.category-menu-item > a:hover {
    background: #ed1b24;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(237, 27, 36, 0.35);
}

.category-menu-item > a.active {
    background: #ed1b24;
    color: #fff;
}

/* ====== DROPDOWN NHÓM CON (CẤP 2) ====== */
.category-menu-item .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 8px 0;
    z-index: 999;
    border: 1px solid #f0f0f0;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.category-menu-item:hover .sub-menu {
    display: block;
}

.category-menu-item .sub-menu a {
    display: block;
    padding: 9px 22px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    text-align: left;
}

.category-menu-item .sub-menu a:hover {
    background: #f8f9fa;
    color: #ed1b24;
    border-left-color: #ed1b24;
}

.category-menu-item .sub-menu a i {
    margin-right: 10px;
    font-size: 12px;
    color: #ed1b24;
}

/* ====== HAS CHILDREN INDICATOR ====== */
.category-menu-item.has-children > a::after {
    content: " ▾";
    font-size: 10px;
    color: #999;
    transition: all 0.3s ease;
}

.category-menu-item.has-children:hover > a::after {
    color: #fff;
}

/* ====== RESPONSIVE MENU ====== */
@media (max-width: 992px) {
    .category-menu-wrapper {
        padding: 12px 15px;
    }
    .category-menu-title {
        display: block;
        margin-bottom: 8px;
        margin-right: 0;
    }
    .category-menu-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .category-menu-item > a {
        padding: 5px 12px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .category-menu-item > a {
        padding: 4px 10px;
        font-size: 11px;
    }
    .category-menu-item .sub-menu {
        position: fixed;
        top: auto;
        left: 10px;
        right: 10px;
        width: auto;
        min-width: unset;
        transform: translateX(0);
    }
    .category-menu-item:hover .sub-menu {
        transform: translateX(0);
    }
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* ====== SẢN PHẨM - GIAO DIỆN 5 CỘT ====== */
.section-products {
    padding: 10px 0 20px;
}

/* Product Grid - 5 cột */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.product-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid #f0f0f0;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
    transform: translateY(-6px);
    border-color: #ed1b24;
}

.product-card .product-image-wrap {
    padding: 12px;
    background: #fafafa;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.product-card .product-image-wrap img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.06);
}

/* Badges */
.product-card .badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: linear-gradient(135deg, #EE2B34, #c0392b);
    color: #fff;
    padding: 3px 12px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(238,43,52,0.4);
}

.product-card .badge-video {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 3px 10px;
    border-radius: 25px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.product-card .badge-video i {
    margin-right: 4px;
}

/* Product Info */
.product-card .product-info-wrap {
    padding: 10px 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .product-weight {
    font-size: 11px;
    color: #999;
    margin-bottom: 3px;
    font-weight: 500;
}

.product-card .product-name {
    min-height: 3.2em;
    max-height: 3.2em;
    overflow: hidden;
    margin-bottom: 6px;
}

.product-card .product-name a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    text-decoration: none;
    line-height: 1.3em;
    height: 2.6em;
}

.product-card .product-name a:hover {
    color: #ed1b24;
}

.product-card .product-price-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.product-card .product-price-new {
    font-size: 18px;
    font-weight: 700;
    color: #ce0707;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.product-card .product-price-new .currency {
    font-size: 12px;
    font-weight: 600;
}

.product-card .product-price-new .save {
    font-size: 10px;
    font-weight: 500;
    color: #28a745;
    background: #e8f5e9;
    padding: 1px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.product-card .product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
}

.product-card .product-status {
    font-size: 12px;
    color: #2cc067;
    font-weight: 500;
}

.product-card .product-status i {
    color: #2cc067;
    margin-right: 3px;
}

.product-card .product-status.order {
    color: #f48533;
}

.product-card .product-status.order i {
    color: #f48533;
}

.product-card .btn-buy {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, #ed1b24, #c0392b);
    color: #fff;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.product-card .btn-buy:hover {
    background: linear-gradient(135deg, #111e41, #1a2a5e);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(17,30,65,0.3);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
    .product-card .product-price-new {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-card .product-price-new {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .product-card .product-name a {
        font-size: 11px;
        height: 2.4em;
    }
    .product-card .product-name {
        min-height: 2.4em;
        max-height: 2.4em;
    }
    .product-card .product-price-new {
        font-size: 14px;
    }
    .product-card .badge-discount {
        font-size: 10px;
        padding: 2px 8px;
    }
    .category-wrapper {
        padding: 0 8px;
    }
}