/* ==========================================================================
   1. BỌC HEADER OVERLAY (TOP BAR + HEADER)
   ========================================================================== */
.milano-header-absolute-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    /* Đảm bảo luôn đè lên ảnh Slider */
}

/* TOP BAR */
.announcement-bar {
    background-color: #111111;
    padding: 8px 0;
}

.announcement-bar__text {
    margin: 0;
    color: #ffffff;
    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* MAIN HEADER */
.milano-main-header {
    background-color: rgba(255, 255, 255, 0.85);
    /* Nền trắng hơi trong suốt giống hình */
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Viền mỏng phân cách */
}

.milano-header-inner {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    /* Chia 3 cột: Trái - Giữa - Phải */
    align-items: center;
    width: 100%;
}

/* LOGO */
.milano-header-left {
    display: flex;
    align-items: center;
}

.site-logo img {
    max-height: 40px;
    width: auto;
}

/* MENU GIỮA */
.milano-header-center {
    display: flex;
    justify-content: center;
}

.milano-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
    /* Khoảng cách giữa các menu */
}

.milano-menu-list>li>a {
    color: #111111 !important;
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.milano-menu-list>li>a::after {
    display: none !important;
    /* Xóa gạch chân cũ */
}

/* Thêm mũi tên thả xuống cho menu có menu con (giống hình ảnh) */
.milano-menu-list>li.menu-item-has-children>a::after {
    content: "expand_more";
    font-family: 'Material Icons';
    font-size: 16px;
    margin-left: 2px;
    display: inline-block !important;
    color: #555;
}

/* ICONS PHẢI */
.milano-header-right {
    display: flex;
    justify-content: flex-end;
}

.milano-icon-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
    align-items: center;
}

.milano-icon-list li a {
    color: #111111 !important;
    display: flex;
    align-items: center;
    position: relative;
    text-decoration: none;
}

.milano-icon-list .material-icons {
    font-size: 24px;
    font-weight: 300;
}

/* Chấm đỏ thông báo Giỏ hàng / Wishlist */
.icon-with-badge a {
    position: relative;
}

.milano-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: #e53935;
    /* Đỏ thuần giống hình */
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

/* ==========================================================================
   2. HERO SLIDER (FULL SCREEN)
   ========================================================================== */
.milano-hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Cao bằng 1 màn hình */
    min-height: 600px;
    padding: 0;
    margin: 0;
}

.h-100 {
    height: 100%;
}

.milano-slide-item {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Ảnh nền */
.milano-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Bóng đen nhạt dưới chân để dễ đọc chữ */
.milano-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
    z-index: 2;
}

/* Khung bọc Text */
.milano-slide-content-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Ép nội dung xuống đáy */
    padding-bottom: 80px;
    /* Cách đáy lên 80px */
}

/* Căn lề Text */
.milano-slide-content-box {
    max-width: 600px;
    padding-left: 15px;
    /* Khớp với lề của container */
}

.milano-slide-subtitle {
    display: block;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.milano-slide-title {
    color: #ffffff;
    font-size: clamp(35px, 4vw, 55px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    margin: 0 0 35px 0;
    font-family: var(--font-family-title, sans-serif);
    /* Dùng font chuẩn của bạn */
}

/* Nút hình con nhộng */
.milano-btn-white-pill {
    display: inline-block;
    background-color: #ffffff;
    color: #111111 !important;
    font-weight: 600;
    font-size: 15px;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.milano-btn-white-pill:hover {
    background-color: #111111;
    color: #ffffff !important;
}

/* Phân trang (Dots) */
.milano-slider-pagination {
    bottom: 30px !important;
    z-index: 10;
}

.milano-slider-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.4);
    width: 6px;
    height: 6px;
    margin: 0 8px !important;
    opacity: 1;
}

.milano-slider-pagination .swiper-pagination-bullet-active {
    background: #ffffff;
    position: relative;
}

.milano-slider-pagination .swiper-pagination-bullet-active::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 1px solid #ffffff;
    border-radius: 50%;
}

/* ==========================================================================
   3. RESPONSIVE MOBILE
   ========================================================================== */
@media (max-width: 992px) {
    .milano-header-inner {
        grid-template-columns: auto 1fr;
    }

    .desktop-only {
        display: none !important;
    }

    .milano-slide-title {
        font-size: 32px;
        margin-bottom: 25px;
    }

    .milano-slide-content-wrap {
        padding-bottom: 60px;
    }

    .milano-btn-white-pill {
        padding: 12px 28px;
        font-size: 14px;
    }
}

/* --- CATEGORY GRID (4 COLUMNS) --- */
.milano-cat-grid-4 {
    display: grid;
    /* Chia chính xác làm 4 cột bằng nhau, lấp đầy 100% chiều rộng */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    /* Khoảng cách giữa các ảnh */
}

/* --- Các thuộc tính Card giữ nguyên --- */
.milano-cat-card {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.milano-cat-img-wrapper {
    position: relative;
    /* Aspect ratio tuỳ chỉnh cho giống ảnh (hình hộp gần vuông) */
    aspect-ratio: 4 / 5;
    background-color: #f5f5f5;
    overflow: hidden;
}

.milano-cat-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.milano-cat-card:hover .milano-cat-img-wrapper img {
    transform: scale(1.05);
}

.milano-cat-info-box {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background-color: rgba(245, 245, 245, 0.95);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.milano-cat-name {
    font-size: 16px;
    font-weight: 600;
    color: #111111;
    margin: 0;
    /* Áp dụng font chữ bo tròn nếu bạn muốn giống hình 100% */
    font-family: var(--font-family-title-small, var(--font-family-title, sans-serif));
}

.milano-cat-info-box .arrow-icon {
    font-size: 18px;
    color: #111111;
    transition: transform 0.3s ease;
}

.milano-cat-card:hover .arrow-icon {
    transform: translateX(4px);
}

.milano-section-header-flex {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    justify-content: space-between;
}

/* --- RESPONSIVE CHO 4 CỘT --- */
@media (max-width: 992px) {
    .milano-cat-grid-4 {
        /* Về 2 cột trên màn hình Tablet */
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .milano-section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 25px;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .milano-heading {
        font-size: 28px !important;
    }

    .milano-cat-info-box {
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 10px 12px;
    }

    .milano-cat-name {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .milano-cat-grid-4 {
        /* Giữ 2 cột trên điện thoại cho đẹp, khoảng cách nhỏ lại */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ==========================================================================
   BEST SELLING SECTION (PRODUCT SLIDER)
   ========================================================================== */
.milano-best-selling-section {
    padding-top: var(--spacing-xxl);
    padding-bottom: var(--spacing-xxl);
}

/* --- PRODUCT CARD BASE --- */
.milano-product-card {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* --- IMAGE WRAPPER --- */
.milano-product-card .milano-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Hoặc 4/5 tuỳ kích thước ảnh của bạn */
    background-color: #f2f2f2;
    /* Nền xám nhạt như hình mẫu */
    overflow: hidden;
    margin-bottom: 15px;
}

.milano-product-card .product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    /* Giúp lọc nền trắng của ảnh sản phẩm (nếu có) tiệp vào nền xám */
    transition: transform 0.5s ease;
}

.milano-product-card:hover .product-img {
    transform: scale(1.05);
    /* Zoom nhẹ khi hover */
}

/* --- SALE BADGE --- */
.milano-badge-sale {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #d9534f;
    /* Màu đỏ mờ nhẹ giống hình */
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 5;
    letter-spacing: 0.5px;
}

/* --- HOVER ACTIONS (Quick View, Add to Cart) --- */
.milano-hover-actions {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10;
}

.milano-product-card:hover .milano-hover-actions {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.milano-icon-btn,
.milano-atc-btn {
    background-color: #ffffff;
    color: #111111;
    border: none;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.milano-icon-btn {
    width: 40px;
}

.milano-atc-btn {
    padding: 0 20px;
    text-transform: uppercase;
}

.milano-icon-btn:hover,
.milano-atc-btn:hover {
    background-color: #111111;
    color: #ffffff;
}

/* --- PRODUCT INFO (CĂN TRÁI) --- */
.milano-info {
    text-align: left;
    /* Đảm bảo căn trái y như hình */
    padding-top: 5px;
}

.milano-name {
    margin: 0 0 8px 0;
}

.milano-name a {
    font-size: 15px;
    font-weight: 600;
    color: #111111;
    text-decoration: none;
    font-family: var(--font-family-primary, sans-serif);
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.milano-name a:hover {
    color: var(--color-accent-hover, #ff5500);
}

/* --- ĐÁNH GIÁ (RATING STARS) --- */
.milano-rating {
    margin-bottom: 6px;
    min-height: 16px;
    /* Giữ layout không bị nhảy nếu sp không có rate */
}

.milano-rating .star-rating {
    font-size: 12px;
    color: #f5a623;
    /* Màu vàng cam */
    width: 60px;
    /* Chiều rộng mặc định của sao woo */
}

/* --- GIÁ TIỀN (WOOCOMMERCE PRICING) --- */
.milano-price {
    font-size: 15px;
    font-weight: 600;
    color: #111111;
    font-family:  var(--font-family-title-small);
}

.milano-price .price {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Khoảng cách giữa giá sale và giá gốc */
}

/* Giá Sale (Màu Đỏ) */
.milano-price ins {
    text-decoration: none;
    color: #d9534f;
    /* Đỏ */
    font-weight: 600;
}

/* Giá Gốc Bị Gạch Ngang (Màu Xám) */
.milano-price del {
    color: #888888;
    font-weight: 400;
    font-size: 13px;
    text-decoration: line-through;
}

/* --- SLIDER NAVIGATION ARROWS --- */
.milano-nav-prev,
.milano-nav-next {
    color: #111;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    /* Ẩn mặc định, hiện khi di chuột vào slider */
    transition: all 0.3s;
}

.milano-nav-prev:after,
.milano-nav-next:after {
    display: none;
    /* Ẩn icon mặc định của swiper */
}

.milano-best-selling-section:hover .milano-nav-prev {
    opacity: 1;
    left: 10px;
}

.milano-best-selling-section:hover .milano-nav-next {
    opacity: 1;
    right: 10px;
}

/* ==========================================================================
   SERVICE FEATURES SECTION (4 Columns - Yellow Accent)
   ========================================================================== */

/* --- SECTION CONTAINER --- */
.milano-features-section {
    padding: 50px 0;
    /* Khoảng cách trên dưới */
    background-color: transparent;
    border: none !important;
    /* Đảm bảo không có viền theo đúng ghi chú */
}

/* --- GRID LAYOUT --- */
.milano-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 cột bằng nhau */
    gap: 20px;
    align-items: center;
}

/* --- TỪNG ITEM --- */
.milano-feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Căn giữa cụm (Icon + Text) trong không gian cột */
    gap: 15px;
    /* Khoảng cách giữa Icon và Text */
    padding: 10px;
    transition: transform 0.3s ease;
}

.milano-feature-item:hover {
    transform: translateY(-3px);
    /* Hiệu ứng nảy nhẹ lên khi hover */
}

/* --- ICON BÊN TRÁI --- */
.milano-feature-icon .material-icons {
    font-size: 40px;
    /* Kích thước icon to rõ */
    color: #f5a623;
    /* Màu Vàng (Yellow) theo yêu cầu */
    line-height: 1;
    display: block;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* --- TEXT BÊN PHẢI --- */
.milano-feature-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.milano-feature-title {
    font-family: var(--font-family-title, sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    /* Text tiêu đề đen để dễ đọc */
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.milano-feature-desc {
    font-family: var(--font-family-primary, sans-serif);
    font-size: 13px;
    color: #666666;
    /* Text mô tả xám */
    margin: 0;
}

/* Nếu bạn muốn CHỮ (Text) cũng màu vàng theo đúng nghĩa đen, 
   hãy bỏ comment đoạn dưới đây: */
/*
.milano-feature-title, .milano-feature-desc {
    color: #f5a623 !important; 
}
*/

/* ==========================================================================
   RESPONSIVE (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 1024px) {
    .milano-features-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Tablet: Chuyển về 2 cột */
        row-gap: 30px;
    }

    .milano-feature-item {
        justify-content: flex-start;
        /* Căn trái cho ngay ngắn trên tablet */
        padding-left: 15%;
        /* Đẩy nhẹ vào giữa */
    }
}

@media (max-width: 768px) {
    .milano-features-section {
        padding: 40px 0;
    }

    .milano-feature-item {
        padding-left: 10%;
    }

    .milano-feature-title {
        font-size: 14px;
    }

    .milano-feature-icon .material-icons {
        font-size: 34px;
        /* Thu nhỏ icon 1 chút trên mobile */
    }
}

@media (max-width: 576px) {
    .milano-features-grid {
        grid-template-columns: 1fr;
        /* Điện thoại: Xếp dọc 1 cột */
        row-gap: 25px;
    }

    .milano-feature-item {
        justify-content: flex-start;
        /* Giữ căn trái để dễ đọc */
        padding-left: 20%;
        /* Căn vào giữa màn hình đt */
    }
}

/* ==========================================================================
   LATEST BLOG POSTS SECTION
   ========================================================================== */
.milano-blog-slider-section {
    padding-top: var(--spacing-xxl);
    padding-bottom: var(--spacing-xxl);
}

/* Bỏ gạch chân mặc định của thẻ A */
.milano-blog-link {
    text-decoration: none !important;
    display: block;
}

/* --- IMAGE BOX --- */
.milano-blog-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    /* Tỷ lệ ảnh ngang chuẩn cho Blog */
    background-color: #f5f5f5;
    overflow: hidden;
    /* Bắt buộc để ảnh không tràn khi zoom */
    margin-bottom: 20px;
}

.milano-blog-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Smooth zoom */
}

/* Phóng to ảnh khi hover vào toàn bộ card */
.milano-blog-card:hover .milano-blog-img-box img {
    transform: scale(1.05);
}

/* CATEGORY BADGE */
.milano-cat-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #ffffff;
    color: #111111;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- BLOG INFO TEXT --- */
.milano-blog-info {
    text-align: left;
}

/* Meta Data (Icon Lịch + Ngày) */
.milano-meta-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #777777;
    margin-bottom: 10px;
    font-weight: 500;
}

.milano-meta-date .material-icons {
    font-size: 14px;
}

/* Title */
.milano-post-title {
    font-size: 18px;
    font-weight: 600;
    color: #111111;
    margin: 0 0 15px 0;
    line-height: 1.4;
    font-family: var(--font-family-title, sans-serif);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Cắt chữ nếu quá 2 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.milano-blog-card:hover .milano-post-title {
    color: var(--color-accent-hover, #ff5500);
}

/* Read More Button */
.milano-read-btn {
    font-size: 13px;
    font-weight: 600;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 1.5px;
    transition: color 0.3s ease;
}

.milano-blog-card:hover .milano-read-btn {
    color: var(--color-accent-hover, #ff5500);
}

/* --- SWIPER PAGINATION (Chấm tròn ở dưới) --- */
.milano-blog-slider-section .swiper-pagination {
    position: relative;
    margin-top: 40px;
    /* Cách xa bài viết 1 chút */
}

.milano-blog-slider-section .swiper-pagination-bullet {
    background-color: #cccccc;
    width: 8px;
    height: 8px;
    opacity: 1;
    margin: 0 5px !important;
    transition: all 0.3s ease;
}

/* Chấm đang active sẽ kéo dài ra thành hình viên nang */
.milano-blog-slider-section .swiper-pagination-bullet-active {
    background-color: #111111;
    width: 25px;
    border-radius: 5px;
}

/* ==========================================================================
   FIX LỖI HEADER ĐÈ LÊN BREADCRUMB (TRANG SHOP & TRANG CON)
   ========================================================================== */

/* Sử dụng body:not(.home) để chọn TẤT CẢ các trang ngoại trừ Trang Chủ */
body:not(.home) .milano-header-absolute-wrap {
    position: relative !important;
    /* Trả Header về trạng thái bình thường, không bay lơ lửng */
    background-color: #fff;
    /* Đảm bảo có nền nếu cần */
}

/* Đảm bảo khung Main Header không bị trong suốt làm lộ nội dung cuộn bên dưới ở trang con */
body:not(.home) .milano-main-header {
    background-color: #ffffff !important;
    /* Thay mã màu này trùng với màu nền Header hiện tại của bạn nếu bạn đang dùng màu Cam nhạt */
}

/* Tinh chỉnh lại khoảng cách cho Breadcrumb để không bị sát lề */
body:not(.home) .wraper-content-bread {
    padding-top: 20px;
    padding-bottom: 20px;
    display: flex;
    align-items: center;
}