:root {
    --scarlet: #ef233c;
    --scarlet-dark: #d90429;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --text-dark: #2b2d42;
    --text-muted: #8d99ae;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.navbar-custom {
    background-color: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-dark) !important;
    letter-spacing: -1px;
}

.navbar-brand span {
    color: var(--scarlet);
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark) !important;
    font-size: 0.95rem;
    margin: 0 15px;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--scarlet) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--scarlet);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.search-container {
    position: relative;
    min-width: 300px;
}

.search-container .form-control {
    border-radius: 30px;
    padding-left: 20px;
    padding-right: 45px;
    border: 1px solid #e0e0e0;
    box-shadow: none;
    height: 45px;
}

.search-container .search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--scarlet);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search-container .search-btn:hover {
    background: var(--scarlet-dark);
}

.cart-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-dark);
    position: relative;
    margin-left: 20px;
    transition: color 0.3s;
}

.cart-btn:hover {
    color: var(--scarlet);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--scarlet);
    color: var(--white);
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    border: 2px solid var(--white);
}

.hero-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--bg-light) 100%);
    padding: 80px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 50%;
    height: 200%;
    background: var(--scarlet);
    transform: rotate(-15deg);
    z-index: 0;
    border-radius: 40px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--scarlet);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.btn-scarlet {
    background-color: var(--scarlet);
    color: var(--white);
    padding: 12px 35px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(239, 35, 60, 0.3);
}

.btn-scarlet:hover {
    background-color: var(--scarlet-dark);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(217, 4, 41, 0.4);
}

.hero-image {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15));
}

@keyframes scarletGlow {
    0%   { box-shadow: 0 0 18px 6px rgba(239,35,60,0.25); }
    50%  { box-shadow: 0 0 42px 16px rgba(239,35,60,0.55); }
    100% { box-shadow: 0 0 18px 6px rgba(239,35,60,0.25); }
}

.sidebar-wrapper {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.sidebar-title i {
    color: var(--scarlet);
    margin-right: 10px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s;
    background: var(--bg-light);
}

.category-list a:hover, .category-list a.active {
    background: var(--scarlet);
    color: var(--white);
    transform: translateX(5px);
}

.category-list a i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--scarlet);
    border-radius: 2px;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.3s;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(239, 35, 60, 0.1);
    border-color: rgba(239, 35, 60, 0.2);
}

.badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badges-right {
    position: absolute;
    top: 20px;
    right: 20px;
    left: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badge-custom {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.badge-new {
    background: var(--scarlet);
    color: var(--white);
}

.badge-hot {
    background: #ffb703;
    color: #023047;
}

.badge-stock-card {
    background: #198754;
    color: #ffffff;
}

.brand-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

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

.product-category {
    font-size: 0.8rem;
    color: var(--scarlet);
    font-weight: 600;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.btn-add {
    width: 100%;
    background: var(--bg-light);
    color: var(--text-dark);
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.product-card:hover .btn-add {
    background: var(--scarlet);
    color: var(--white);
}

.newsletter-section {
    background: var(--scarlet);
    padding: 60px 0;
    border-radius: 30px;
    margin: 60px 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '\f0e0';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    font-size: 15rem;
    right: -20px;
    bottom: -50px;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    flex-wrap: nowrap;
    align-items: stretch;
}

.newsletter-form .form-control {
    border-radius: 30px;
    padding: 15px 25px;
    border: none;
    flex: 1 1 0;
    min-width: 0;
}

.newsletter-form .btn {
    border-radius: 30px;
    padding: 15px 30px;
    background: var(--text-dark);
    color: var(--white);
    font-weight: 700;
    border: none;
    transition: background 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.newsletter-form .btn:hover {
    background: #1a1c29;
}

.footer {
    background: var(--text-dark);
    color: var(--text-muted);
    padding: 80px 0 30px;
}

.footer-logo {
    font-weight: 800;
    font-size: 2rem;
    color: var(--white) !important;
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--scarlet);
}

.footer-title {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--scarlet);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--scarlet);
    font-size: 1.2rem;
    margin-right: 15px;
    margin-top: 3px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    color: var(--white);
    border-radius: 50%;
    margin-right: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--scarlet);
    transform: translateY(-3px);
}

.bottom-bar {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    margin-top: 50px;
    text-align: center;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.brands-band {
    background: var(--white);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 22px 0;
    overflow: hidden;
    width: 100%;
}

.brands-track {
    display: flex;
    align-items: center;
    width: calc(130px * 24);
    animation: marquee 30s linear infinite;
    will-change: transform;
}

.brands-track:hover {
    animation-play-state: paused;
}

.brands-item {
    flex-shrink: 0;
    width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

.brands-item img {
    max-height: 60px;
    max-width: 90px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.3s, transform 0.3s;
}

.brands-item img:hover {
    opacity: 1;
    transform: scale(1.05);
}
@media (max-width: 991px) {
    body {
        overflow-x: hidden;
    }
    .navbar-collapse {
        background: #fff;
        border-radius: 16px;
        padding: 18px;
        margin-top: 12px;
        box-shadow: 0 12px 35px rgba(0,0,0,0.1);
    }
    .navbar-nav {
        margin-bottom: 14px !important;
    }
    .navbar-nav .nav-link {
        padding: 10px 4px;
        border-bottom: 1px solid #f3f3f3;
    }
    .navbar-collapse .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 14px;
        margin-top: 6px;
    }
    .search-container {
        min-width: 0;
        width: 100%;
        margin-right: 0 !important;
    }
    .search-container .form-control {
        min-width: 0;
        width: 100%;
    }
    .search-container .search-btn {
        right: 5px;
    }
    .cart-btn {
        align-self: flex-start;
    }
    .search-container .search-autocomplete {
        position: fixed;
        left: 12px;
        right: 12px;
        min-width: 0;
        width: auto;
        max-width: none;
    }
    .hero-title {
        font-size: 2.6rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
    .hero-image {
        margin-top: 40px;
    }
    .section-title {
        font-size: 1.7rem;
    }
}

@media (max-width: 767px) {
    [style*="15rem"] {
        display: none !important;
    }
    .hero-section {
        padding-top: 50px;
        padding-bottom: 50px;
        text-align: center;
    }
    .hero-section::before {
        display: none;
    }
    .hero-content {
        margin: 0 auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 575px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
    }
    .product-card {
        padding: 14px;
    }
    .product-img {
        height: 150px;
    }
    .hero-title {
        font-size: 2.1rem;
    }
    .hero-subtitle {
        font-size: 0.96rem;
    }
    .section-title {
        font-size: 1.45rem;
    }
    .btn-scarlet {
        padding: 12px 24px !important;
        font-size: 0.9rem;
    }
    .modal-dialog {
        margin: 10px;
    }
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    .btn-add {
        font-size: 0.78rem;
        padding-left: 8px;
        padding-right: 8px;
    }
    .btn-add i {
        margin-right: 4px;
    }
    .newsletter-form {
        flex-direction: column;
        gap: 12px;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    .newsletter-form .form-control {
        width: 100%;
    }
    .newsletter-form .btn {
        width: 100%;
    }
    .badge-hot {
        font-size: 0;
        padding: 6px 9px;
    }
    .badge-hot i {
        font-size: 0.8rem;
        margin: 0 !important;
    }
}

.search-autocomplete {
    position: absolute;
    top: 52px;
    right: 0;
    min-width: 420px;
    width: max-content;
    max-width: 90vw;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    overflow: hidden;
    z-index: 1050;
    display: none;
}
.search-autocomplete.show {
    display: block;
}
.sa-item {
    display: flex;
    align-items: center;
    padding: 11px 15px;
    text-decoration: none;
    border-bottom: 1px solid #f3f3f3;
    transition: background 0.15s;
}
.sa-item:hover, .sa-item.active {
    background: var(--bg-light);
}
.sa-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-right: 12px;
    flex-shrink: 0;
    background: #fff;
}
.sa-meta {
    flex-grow: 1;
    min-width: 0;
}
.sa-name {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sa-cat {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}
.sa-price {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--scarlet);
    white-space: nowrap;
    margin-left: 10px;
}
.sa-empty {
    padding: 18px 15px;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
}
.sa-all {
    display: block;
    width: 100%;
    border: none;
    background: var(--bg-light);
    color: var(--scarlet);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 12px;
    text-align: center;
    transition: background 0.15s;
}
.sa-all:hover {
    background: #fff0f1;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e6e6e6;
    border-radius: 30px;
    overflow: hidden;
}
.cart-qty button {
    border: none;
    background: var(--bg-light);
    width: 32px;
    height: 32px;
    font-weight: 700;
    color: var(--text-dark);
    transition: all 0.2s;
}
.cart-qty button:hover {
    background: var(--scarlet);
    color: #fff;
}
.cart-qty span {
    min-width: 38px;
    text-align: center;
    font-weight: 700;
}
.cart-remove {
    border: none;
    background: transparent;
    color: var(--text-muted);
    transition: color 0.2s;
    padding: 6px 8px;
}
.cart-remove:hover {
    color: var(--scarlet);
}
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 50px;
}
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--white);
    color: var(--text-dark);
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
}
.pager-btn:hover {
    background: var(--bg-light);
    color: var(--scarlet);
    transform: translateY(-2px);
}
.pager-btn.active {
    background: var(--scarlet);
    color: var(--white);
    border-color: var(--scarlet);
    box-shadow: 0 8px 18px rgba(239, 35, 60, 0.3);
}
.pager-btn.active:hover {
    background: var(--scarlet-dark);
    color: var(--white);
    transform: none;
}
.pager-arrow {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.pager-dots {
    color: var(--text-muted);
    font-weight: 700;
    padding: 0 4px;
    align-self: flex-end;
    padding-bottom: 12px;
}