/* Home Page (Trang chủ) specific styles */
.home-page{
    margin:30px 0 0;
}

/* ===== Slider Home (Full Width) ===== */
.slider-home {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ===== Home hero (two-column slider) ===== */
.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}

.hero-viewport, .right-top .side-viewport{overflow:hidden;background:#f3f4f6;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:#000}

.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:#000}

.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:#000;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:#000}
.right-grid .gc-desc{font-size:12px;color:#6b7280}
.right-grid .gc-cta{font-size:12px;color:#0ea5e9;font-weight:600}

@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;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.category-tab {
    padding: 10px 24px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-tab:hover {
    background: #e5e7eb;
}

.category-tab.active {
    background: #000;
    color: #ffffff;
}

.categories-tab-content {
    display: none;
}

.categories-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== Home Banners ===== */
.home-banners {
    margin: 48px 0;
}

.banners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.banner-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.banner-image {
    width: 100%;
    height: 0;
    padding-bottom: 60%;
    position: relative;
    overflow: hidden;
}

.banner-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.banner-item:hover .banner-image img {
    transform: scale(1.1);
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.banner-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.banner-button {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.banner-button:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .banners-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .banner-content {
        padding: 20px;
    }
    
    .banner-title {
        font-size: 24px;
    }
    
    .banner-button {
        padding: 10px 24px;
        font-size: 13px;
    }
}

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

/* Limit to 6 columns max */
.categories-grid:not(.cp-slider-track) {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

@media (min-width: 1200px) {
    .categories-grid:not(.cp-slider-track) {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Categories Slider */
.categories-slider {
    position: relative;
    padding: 0 50px;
}

.categories-slider .cp-slider-viewport {
    overflow: hidden;
}

.categories-slider .categories-grid {
    display: flex !important;
    gap: 16px;
    flex-wrap: nowrap;
    transition: transform 0.3s ease;
}

.categories-slider .category-card {
    flex: 0 0 calc((100% - 80px) / 6);
    min-width: 0;
    max-width: none;
}

.categories-slider .cp-slider-viewport {
    overflow: hidden;
}

.categories-slider .cp-slider-track {
    display: flex;
    transition: transform 0.3s ease;
}

.categories-slider .cp-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

.categories-slider .cp-slider-btn:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.categories-slider .cp-slider-btn.prev {
    left: -20px;
}

.categories-slider .cp-slider-btn.next {
    right: -20px;
}

.categories-slider .cp-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.categories-slider .cp-slider-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.categories-slider .cp-slider-dots .dot.active {
    background: #000;
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 1200px) {
    .categories-slider .category-card {
        flex: 0 0 calc((100% - 64px) / 5);
    }
}

@media (max-width: 992px) {
    .categories-slider .category-card {
        flex: 0 0 calc((100% - 48px) / 4);
    }
}

@media (max-width: 768px) {
    .categories-slider .category-card {
        flex: 0 0 calc((100% - 32px) / 3);
    }
    
    .categories-slider .cp-slider-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .categories-slider .cp-slider-btn.prev {
        left: -10px;
    }
    
    .categories-slider .cp-slider-btn.next {
        right: -10px;
    }
}

@media (max-width: 480px) {
    .categories-slider .category-card {
        flex: 0 0 calc((100% - 16px) / 2);
    }
}

/* ===== Product Sections ===== */
.product-section-wrapper {
    margin: 48px 0;
}

.section-banner {
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.section-banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.section-banner-image {
    width: 100%;
    height: 0;
    padding-bottom: 30%;
    position: relative;
    overflow: hidden;
}

.section-banner-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.section-banner:hover .section-banner-image img {
    transform: scale(1.05);
}

.section-banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-banner-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.section-banner-button {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.section-banner-button:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.product-section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 24px 0;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .section-banner-content {
        padding: 24px;
    }
    
    .section-banner-title {
        font-size: 32px;
    }
    
    .section-banner-button {
        padding: 12px 32px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

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

.category-image {
    width: 100%;
    height: auto;
    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;
    transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.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;
    margin-bottom: 10px;
}

.category-name {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 4px 0;
    color: #000;
    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: #000;
}

.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: #000;
    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: #000;
    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;
    }
}


