* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    overflow-x: hidden;
    width: 100%;
}

/* ========== TOP BAR - GIỐNG TRANG CHỦ ========== */
.top-bar {
    background: linear-gradient(135deg, #ff9eb7 0%, #ffb3c6 100%);
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-bar a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Marquee Text - Chữ chạy */
.marquee-container {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    max-width: 900px;
    margin: 0 15px;
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
    color: white;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.marquee-container:hover .marquee-text {
    animation-play-state: paused;
}

/* ========== MAIN HEADER - GIỐNG TRANG CHỦ ========== */
.main-header {
    background: linear-gradient(135deg, #ffb3c6 0%, #ffc9d6 100%);
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(255, 158, 183, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
    text-decoration: none;
}

.search-bar {
    flex: 1;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.search-bar button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0 20px;
    background: #ff6b9d;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

.search-bar button:hover {
    background: #ff5a8f;
}

/* ========== NAVIGATION MENU - GIỐNG TRANG CHỦ ========== */
.nav-menu {
    background: white;
    border-bottom: 1px solid #ffcdd9;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 25px;
    overflow-x: auto;
    white-space: nowrap;
}

.nav-content::-webkit-scrollbar {
    height: 0;
}

.nav-item {
    padding: 12px 0;
    color: #ff6b9d;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav-item:hover {
    color: #ff5a8f;
    border-bottom-color: #ff6b9d;
}

.nav-item.active {
    color: #ff5a8f;
    border-bottom-color: #ff6b9d;
    font-weight: bold;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #ff6b9d;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ========== CATEGORY PAGE CONTENT ========== */
.category-page {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ffe4ec;
}

.category-title {
    font-size: 24px;
    color: #ff6b9d;
    font-weight: bold;
}

/* ========== GRADE NAVIGATION ========== */
.grade-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #fff5f8, #ffe4ec);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .grade-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px 10px;
        gap: 8px;
    }
    
    .grade-nav::-webkit-scrollbar {
        height: 4px;
    }
    
    .grade-nav::-webkit-scrollbar-track {
        background: #ffe4ec;
        border-radius: 2px;
    }
    
    .grade-nav::-webkit-scrollbar-thumb {
        background: #ffb3c6;
        border-radius: 2px;
    }
}

.grade-nav-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ffb3c6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #ff6b9d;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.grade-nav-btn:hover,
.grade-nav-btn.active {
    background: #ff6b9d;
    color: white;
    border-color: #ff6b9d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

/* ========== GRADE SECTION ========== */
.grade-section {
    margin-bottom: 40px;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #ffe4ec;
}

.grade-title {
    font-size: 20px;
    color: #ff6b9d;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #ffb3c6;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.grade-title::before {
    display: none;
}

.grade-title .grade-number {
    background: linear-gradient(135deg, #ff6b9d, #ff9eb7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
    white-space: nowrap;
    flex-shrink: 0;
}

.grade-title .grade-text {
    white-space: nowrap;
}

/* ========== PRODUCT ROW - HORIZONTAL SCROLL ========== */
.product-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.product-row::-webkit-scrollbar {
    height: 8px;
}

.product-row::-webkit-scrollbar-track {
    background: #ffe4ec;
    border-radius: 4px;
}

.product-row::-webkit-scrollbar-thumb {
    background: #ffb3c6;
    border-radius: 4px;
}

.product-row::-webkit-scrollbar-thumb:hover {
    background: #ff9eb7;
}

/* ========== PRODUCT CARD ========== */
.product-card {
    min-width: 220px;
    max-width: 220px;
    background: white;
    border: 1px solid #ffe4ec;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.2);
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, #fff0f5, #ffe4ec);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b9d;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 36px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.stars {
    color: #ffc107;
    font-size: 12px;
}

.sold-count {
    color: #888;
    font-size: 12px;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 16px;
    color: #ff6b9d;
    font-weight: bold;
}

.product-discount {
    font-size: 11px;
    color: #888;
    text-decoration: line-through;
}

/* ========== VIEW ALL BUTTON ========== */
.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: linear-gradient(135deg, #ff6b9d, #ff9eb7);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 15px;
    transition: all 0.3s;
    text-decoration: none;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

/* ========== SCROLL BUTTONS ========== */
.scroll-container {
    position: relative;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #ffb3c6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ff6b9d;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.scroll-btn:hover {
    background: #ff6b9d;
    color: white;
}

.scroll-btn.prev {
    left: -20px;
}

.scroll-btn.next {
    right: -20px;
}

/* ========== FOOTER - GIỐNG TRANG CHỦ ========== */
.footer {
    background: linear-gradient(135deg, #fff5f8, #ffe4ec);
    padding: 40px 0 20px 0;
    margin-top: 50px;
    border-top: 2px solid #ffcdd9;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #ff6b9d;
}

.payment-icons, .shipping-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.payment-icon, .shipping-icon {
    background: white;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.payment-icon img, .shipping-icon img {
    max-width: 100%;
    height: 30px;
    object-fit: contain;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.social-link:hover {
    color: #ff6b9d;
}

.app-download {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.qr-code {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-button {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.app-button:hover {
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.2);
}

.app-button img {
    height: 24px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ffcdd9;
    color: #888;
    font-size: 12px;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .top-bar-content {
        font-size: 11px;
        gap: 10px;
        padding: 0 10px;
    }

    .top-bar-left, .top-bar-right {
        gap: 8px;
    }

    .marquee-container {
        max-width: calc(100vw - 180px);
        margin: 0 10px;
        font-size: 11px;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 15px;
        padding: 0 10px;
    }

    .logo {
        font-size: 24px;
    }

    .search-bar {
        width: 100%;
        order: 3;
    }

    .nav-content {
        padding: 0 10px;
        gap: 15px;
    }

    .nav-item {
        font-size: 13px;
    }

    .breadcrumb {
        padding: 0 10px;
        margin: 20px 10px;
    }

    .category-page {
        padding: 0 10px;
    }

    .main-content {
        padding: 15px 10px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .category-title {
        font-size: 20px;
    }

    .grade-nav {
        gap: 8px;
        padding: 10px;
    }

    .grade-nav-btn {
        padding: 8px 15px;
        font-size: 12px;
    }

    .grade-section {
        padding: 15px;
        margin-bottom: 25px;
    }

    .grade-title {
        font-size: 16px;
        gap: 8px;
    }

    .grade-title .grade-number {
        font-size: 14px;
        padding: 4px 12px;
    }
    
    .grade-title .grade-text {
        font-size: 14px;
    }

    .product-card {
        min-width: 160px;
        max-width: 160px;
    }

    .product-image {
        font-size: 40px;
    }

    .product-info {
        padding: 8px;
    }

    .product-name {
        font-size: 12px;
        min-height: 34px;
    }

    .product-price {
        font-size: 14px;
    }

    .scroll-btn {
        display: none;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .payment-icons, .shipping-icons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .marquee-container {
        max-width: calc(100vw - 150px);
        font-size: 10px;
    }

    .top-bar-content {
        font-size: 10px;
        padding: 0 5px;
    }

    .header-content,
    .nav-content {
        padding: 0 5px;
    }

    .category-page,
    .breadcrumb {
        margin-left: 5px;
        margin-right: 5px;
        padding: 0 5px;
    }

    .main-content {
        padding: 10px 5px;
    }

    .category-title {
        font-size: 18px;
    }

    .grade-nav-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    .product-card {
        min-width: 140px;
        max-width: 140px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}