/* Home Page (Trang chủ) specific styles */
.home-page{
    margin:15px 0 0;
}
/* ===== Home hero (two-column slider) ===== */
.home-hero{display:flex;gap:16px}
.home-hero .hero-left{position:relative;flex:1 1 56%;min-width:0}
.home-hero .hero-right{flex:1 1 44%;display:flex;flex-direction:column;gap:12px;min-width:280px}

.home-hero.is-guest {
    display: grid;
    grid-template-columns: 1fr;
}
.home-hero.is-guest .hero-right {
    display: none;
}
.home-hero.is-guest .hero-left {
    width: 100%;
    max-width: none;
}

.hero-viewport, .right-top .side-viewport{overflow:hidden;border-radius:12px;background:#f3f4f6;border-radius: 0.5rem;border: 1px solid #e1e1e1;}
.hero-track{display:flex}
.hero-slide{flex:0 0 100%;display:block}
.hero-slide img{width:100%;height:100%;object-fit:cover;display:block}

.home-hero .nav{position:absolute;top:50%;transform:translateY(-50%);border:none;background:rgba(255,255,255,.9);width:36px;height:36px;border-radius:999px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.home-hero .nav.prev{left:8px}
.home-hero .nav.next{right:8px}
.home-hero .hero-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;gap:6px;justify-content:center}
.home-hero .hero-dots .dot{width:8px;height:8px;border-radius:999px;background:rgba(255,255,255,.7);border:1px solid rgba(0,0,0,.08)}
.home-hero .hero-dots .dot.active{background:#111827}

.right-top .side-track{display:flex}
.right-top .side-slide{flex:0 0 100%;display:block}
.right-top .side-slide img{width:100%;height:100%;object-fit:cover;display:block}
.right-top .side-dots{display:flex;gap:6px;justify-content:center;margin-top:6px}
.right-top .side-dots .dot{width:6px;height:6px;border-radius:999px;background:#e5e7eb}
.right-top .side-dots .dot.active{background:#111827}

.right-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.right-grid .grid-card{display:flex;flex-direction:column;gap:4px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:12px;text-decoration:none;color:#111827;transition:box-shadow .2s ease,transform .2s ease}
.right-grid .grid-card:hover{box-shadow:0 8px 24px rgba(0,0,0,.08);transform:translateY(-1px)}
.right-grid .gc-title{font-weight:700;color:#111827}
.right-grid .gc-desc{font-size:12px;color:#6b7280}
.right-grid .gc-cta{font-size:12px;color:#0ea5e9;font-weight:600}

/* ===== Products Blocks ===== */
.sale-product,
.new-products {
    margin: 32px 0;
}

.sale-product h2,
.new-products h2,
.best-products h2 {
    font-size: 24px;
    margin: 0 0 16px;
}

.product-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}


.best-products,
.sale-product,
.new-products {
    margin: 32px 0;
}


@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
    .product-grid.grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sale-product h2,
    .new-products h2,
    .best-products h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .product-grid.grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sale-product h2,
    .new-products h2,
    .best-products h2 {
        font-size: 20px;
    }
}

@media (max-width: 1024px){
  .home-hero{flex-direction:column}
  .home-hero .hero-right{min-width:0}
  .right-grid{grid-template-columns:repeat(3, minmax(0,1fr))}
}
@media (max-width: 640px){
  .right-grid{grid-template-columns:repeat(2, minmax(0,1fr))}
}

/* ===== Home Categories Grid ===== */
.home-categories {
    margin: 32px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    max-width: 100%;
}

.category-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    text-align: center;
}

.category-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #e21736;
}

.category-image {
    width: 100%;
    height: 80px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    color: #9ca3af;
}

.category-placeholder .material-icons {
    font-size: 32px;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #111827;
    line-height: 1.3;
}

.category-count {
    font-size: 12px;
    color: #6b7280;
}

/* View All Button */
.categories-view-all {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}



/* Off-Canvas Styles */
.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

.offcanvas-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.offcanvas-overlay.active .offcanvas-content {
    transform: translateX(0);
}

.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.offcanvas-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.offcanvas-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.offcanvas-close:hover {
    background: #e5e7eb;
}

.offcanvas-close .material-icons {
    font-size: 24px;
    color: #6b7280;
}

.offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.offcanvas-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.offcanvas-category-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #111827;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    text-align: center;
}

.offcanvas-category-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #0ea5e9;
}

.offcanvas-category-image {
    width: 100%;
    height: 80px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offcanvas-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offcanvas-category-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    color: #9ca3af;
}

.offcanvas-category-placeholder .material-icons {
    font-size: 32px;
}

.offcanvas-category-info {
    flex: 1;
}

.offcanvas-category-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #111827;
    line-height: 1.3;
}

.offcanvas-category-count {
    font-size: 12px;
    color: #6b7280;
}

/* Responsive Off-Canvas */
@media (max-width: 768px) {
    .offcanvas-content {
        width: 60%;
    }
    
    .offcanvas-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .offcanvas-category-card {
        padding: 12px;
    }
    
    .offcanvas-category-image {
        height: 60px;
        margin-bottom: 8px;
    }
    
    .offcanvas-category-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .offcanvas-content {
        width: 80%;
    }
    
    .offcanvas-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .offcanvas-category-card {
        padding: 8px;
    }
    
    .offcanvas-category-image {
        height: 50px;
        margin-bottom: 6px;
    }
    
    .offcanvas-category-name {
        font-size: 12px;
    }
    
    .offcanvas-category-count {
        font-size: 11px;
    }
}

/* Responsive Categories Grid */
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
}

@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 12px;
    }
    
    .category-card {
        padding: 12px;
    }
    
    .category-image {
        height: 60px;
        margin-bottom: 8px;
    }
    
    .category-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .category-card {
        padding: 8px;
    }
    
    .category-image {
        height: 50px;
        margin-bottom: 6px;
    }
    
    .category-name {
        font-size: 12px;
    }
    
    .category-count {
        font-size: 11px;
    }
}


