/* ======================================================
   HERO SLIDER
   ====================================================== */
.hero-slider .item {
    position: relative;
    height: 580px;
    overflow: hidden;
}

@media (min-width: 1400px) {
    .hero-slider .item {
        height: 640px;
    }
}

.hero-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient overlay — tối ở dưới, trong suốt ở giữa */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(5, 15, 30, 0.72) 0%,
        rgba(5, 15, 30, 0.15) 45%,
        rgba(0, 0, 0, 0.08) 70%,
        rgba(0, 0, 0, 0.18) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-hero {
    padding: 12px 35px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 30px;
    transition: 0.3s;
}

/* ======================================================
   USP SECTION — Dùng brand colors từ admin
   ====================================================== */
.usp-section {
    background: linear-gradient(
        135deg,
        var(--footer-color, #0a192f) 0%,
        color-mix(in srgb, var(--footer-color, #0a192f) 75%, var(--primary-color, #e63946)) 100%
    );
    padding: 55px 0;
    position: relative;
    overflow: hidden;
}

/* Dot pattern overlay tinh tế */
.usp-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 1;
    pointer-events: none;
}

/* Glow accent góc phải */
.usp-section::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-color, #e63946) 30%, transparent);
    filter: blur(80px);
    pointer-events: none;
}

.usp-box {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 18px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

/* Thêm accent line trái khi hover */
.usp-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--primary-color, #e63946);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: center;
}

.usp-box:hover::before {
    transform: scaleY(1);
}

.usp-box:nth-child(1) { animation-delay: 0.1s; }
.usp-box:nth-child(2) { animation-delay: 0.2s; }
.usp-box:nth-child(3) { animation-delay: 0.3s; }
.usp-box:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.usp-box:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 50px color-mix(in srgb, var(--primary-color, #e63946) 25%, rgba(0,0,0,0.1));
}

/* Icon dùng brand color */
.usp-icon {
    font-size: 30px;
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        var(--primary-color, #e63946) 0%,
        color-mix(in srgb, var(--primary-color, #e63946), black 20%) 100%
    );
    color: white;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary-color, #e63946) 40%, transparent);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.usp-box:hover .usp-icon {
    transform: scale(1.12) rotate(5deg);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--primary-color, #e63946) 55%, transparent);
}

.usp-content h6 {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 3px;
    color: #1a202c;
}

.usp-content small {
    color: #64748b;
    font-size: 12.5px;
}

/* ======================================================
   FLASH SALE — Glassmorphism countdown
   ====================================================== */
.flash-sale-section {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--primary-color, #e63946) 90%, black) 0%,
        color-mix(in srgb, var(--primary-color, #e63946) 70%, #c1121f) 100%
    );
    padding: 50px 0;
    color: white;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

/* Texture noise nhẹ */
.flash-sale-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.countdown-item {
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 2px;
    letter-spacing: 1px;
    min-width: 42px;
    text-align: center;
    display: inline-block;
}

/* Product Card */
.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
    position: relative;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.product-thumb {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    display: block;
}

.product-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: 0.5s;
}

.product-card:hover .product-thumb img {
    transform: scale(1.08);
}

.badge-label {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    color: white;
    z-index: 2;
}

.bg-red {
    background: #dc3545;
}

.bg-blue {
    background: #0d6efd;
}

.btn-add-cart-hover {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 12px;
    transition: 0.3s;
    font-weight: bold;
    border: none;
}

.product-card:hover .btn-add-cart-hover {
    bottom: 0;
}

/* Categories Grid */
.cat-grid-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 200px;
    display: block;
}

.cat-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.cat-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.cat-grid-item:hover .cat-overlay {
    opacity: 1;
}

.cat-grid-item:hover img {
    transform: scale(1.1);
}

.cat-title {
    position: absolute;
    bottom: 15px;
    left: 15px;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

/* Nav Pills */
.nav-pills .nav-link {
    color: #555;
    font-weight: 600;
    border-radius: 30px;
    padding: 10px 25px;
    margin: 0 5px;
    border: 1px solid #eee;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
    border-color: var(--primary-color);
}

/* ======================================================
   WHY CHOOSE US — Brand color icons
   ====================================================== */
.why-section {
    background: #f5f7fa;
    padding: 70px 0;
}

.why-box {
    text-align: center;
    padding: 32px 22px;
    background: white;
    border-radius: 20px;
    margin-bottom: 20px;
    height: 100%;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.04);
}

.why-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px color-mix(in srgb, var(--primary-color, #e63946) 12%, rgba(0,0,0,0.06));
    border-color: color-mix(in srgb, var(--primary-color, #e63946) 15%, transparent);
}

.why-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--primary-color, #e63946) 10%, white);
    color: var(--primary-color, #e63946);
    font-size: 32px;
    margin: 0 auto 20px;
    transition: all 0.35s ease;
    border: 1px solid color-mix(in srgb, var(--primary-color, #e63946) 18%, transparent);
}

.why-box:hover .why-icon {
    background: var(--primary-color, #e63946);
    color: white;
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--primary-color, #e63946) 40%, transparent);
}

/* Newsletter */
.newsletter-section {
    background: url('https://images.unsplash.com/photo-1552321554-5fefe8c9ef14?auto=format&fit=crop&w=1600&q=80') center/cover fixed;
    position: relative;
    padding: 80px 0;
}

.newsletter-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 30, 60, 0.85);
}

.newsletter-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
}

/* ======================================================
   PARTNERS — Subtle brand glow hover
   ====================================================== */
.partners-section {
    background: #f8f9fa;
}

.partner-logo {
    background: white;
    padding: 22px;
    border-radius: 16px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.partner-logo img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    transition: all 0.35s ease;
    filter: grayscale(30%);
    opacity: 0.85;
}

.partner-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--primary-color, #e63946) 18%, rgba(0,0,0,0.08));
    border-color: color-mix(in srgb, var(--primary-color, #e63946) 20%, transparent);
}

.partner-logo:hover img {
    transform: scale(1.06);
    filter: grayscale(0%);
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .hero-slider .item {
        height: 300px;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .usp-section {
        padding: 30px 0;
    }

    .usp-box {
        padding: 15px 12px;
        gap: 12px;
        border-radius: 12px;
    }

    .usp-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .usp-content h6 {
        font-size: 13px;
    }

    .usp-content small {
        font-size: 11px;
    }

    .cat-grid-item {
        height: 120px;
    }

    .cat-title {
        font-size: 0.875rem;
        bottom: 8px;
        left: 8px;
    }

    .flash-sale-section {
        padding: 30px 0;
    }

    .countdown-item {
        font-size: 0.9rem;
        padding: 4px 8px;
    }
}

@media (max-width: 575px) {
    .hero-slider .item {
        height: 250px;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .btn-hero {
        padding: 8px 20px;
        font-size: 0.875rem;
    }

    .usp-section {
        padding: 20px 0;
    }

    .usp-box {
        padding: 12px 10px;
        gap: 10px;
        border-radius: 10px;
    }

    .usp-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .usp-content h6 {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .usp-content small {
        font-size: 10px;
    }

    .cat-grid-item {
        height: 80px;
    }

    .cat-title {
        font-size: 0.7rem;
        bottom: 5px;
        left: 5px;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    .countdown-item {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
}

/* ======================================================
   HERO STAT BAR — Số liệu nổi phía dưới hero
   ====================================================== */
.hero-stat-bar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 60px;
    padding: 14px 36px;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 28px;
}

.stat-num {
    font-size: 1.7rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -0.5px;
}

.stat-plus {
    font-size: 1.1rem;
    color: var(--primary-color, #e63946);
    font-weight: 900;
    margin-left: 1px;
}

.stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 3px;
    font-weight: 500;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}

/* ======================================================
   SECTION HEADER PATTERN — Nhất quán toàn trang
   ====================================================== */
.section-label {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary-color, #e63946);
    margin-bottom: 10px;
    position: relative;
    padding: 0 12px;
}

.section-label::before,
.section-label::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1.5px;
    background: color-mix(in srgb, var(--primary-color, #e63946) 50%, transparent);
    transform: translateY(-50%);
}

.section-label::before { right: 100%; margin-right: -8px; }
.section-label::after  { left: 100%;  margin-left: -8px;  }

/* ======================================================
   RESPONSIVE — Điều chỉnh cho hero mới cao hơn
   ====================================================== */
@media (max-width: 991px) {
    .hero-slider .item {
        height: 380px;
    }

    .hero-stat-bar {
        padding: 10px 20px;
        bottom: 14px;
    }

    .hero-stat-item {
        padding: 0 14px;
    }

    .stat-num {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 9.5px;
    }

    .hero-stat-divider {
        height: 28px;
    }
}

@media (max-width: 575px) {
    .hero-slider .item {
        height: 300px;
    }

    .hero-stat-bar {
        padding: 8px 12px;
        bottom: 10px;
        gap: 0;
    }

    .hero-stat-item {
        padding: 0 10px;
    }

    .stat-num {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 8.5px;
        letter-spacing: 0.5px;
    }

    .hero-stat-divider {
        height: 22px;
    }
}