/* ============================================
   Homepage Styles - Thiên Long Shop
   Matching thienlong.vn design
   ============================================ */

/* Hero Slider - Full Width style */
.hero-slider-section {
    padding: 0;
    background: #dce5f0;
    overflow: hidden;
    position: relative;
}

.hero-slider-container {
    width: 100%;
    padding: 0;
}

.hero-swiper {
    padding: 0;
    overflow: hidden;
}

.hero-swiper .swiper-wrapper {
    align-items: stretch;
}

/* Slide styling - full width */
.hero-swiper .swiper-slide {
    transition: all 0.5s ease;
    border-radius: 0;
    overflow: hidden;
    opacity: 1 !important;
}

.hero-swiper .swiper-slide:not(.swiper-slide-active) {
    opacity: 1;
    filter: none;
    transform: none;
}

.hero-swiper .swiper-slide-active {
    opacity: 1;
    filter: brightness(1);
    z-index: 2;
    transform: none;
    border-radius: 0;
}

.hero-slide-link {
    display: block;
    width: 100%;
    line-height: 0;
}

.hero-slide-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    display: block;
}

/* Arrows - inside the slider */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    transition: var(--tl-transition);
    z-index: 10;
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
    background: white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

/* Position arrows at the edges */
.hero-swiper .swiper-button-prev {
    left: 20px;
}

.hero-swiper .swiper-button-next {
    right: 20px;
}

/* Quick Categories - thienlong.vn style */
.quick-categories-section {
    padding: 20px 0 24px;
    background: var(--tl-white);
    border-bottom: 1px solid #eee;
}

.quick-categories-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--tl-transition);
    width: 100px;
}

.quick-category-item:hover {
    transform: translateY(-4px);
}

.category-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--tl-transition);
    background: #f5f7fa;
    border: 2px solid transparent;
}

.category-circle i {
    font-size: 28px;
    transition: var(--tl-transition);
}

.quick-category-item:hover .category-circle {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0,102,204,0.2);
    border-color: var(--tl-primary);
}

.category-icon-img,
.category-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--tl-text);
    text-align: center;
    line-height: 1.3;
    max-width: 100px;
}

/* ==========================================
   Flash Sale - Red themed like thienlong.vn
   ========================================== */
.flash-sale-section {
    background: #FFF5F5;
    padding: 32px 0 40px;
    position: relative;
    overflow: hidden;
}

.flash-sale-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E53935, #FF6B00, #E53935);
}

.flash-sale-header {
    align-items: center;
    margin-bottom: 20px !important;
}

.flash-sale-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flash-sale-title i {
    font-size: 28px;
    color: var(--tl-red);
    animation: flash-icon 1.5s ease-in-out infinite;
}

@keyframes flash-icon {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

.flash-sale-title h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--tl-red);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flash-countdown {
    display: flex;
    align-items: center;
    gap: 4px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 42px;
}

.countdown-value {
    background: var(--tl-red);
    color: var(--tl-white);
    font-size: 16px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 9px;
    color: var(--tl-text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.countdown-sep {
    font-size: 18px;
    font-weight: 700;
    color: var(--tl-red);
    margin-bottom: 14px;
}

/* Flash Sale Product - Sold Progress Bar */
.sold-progress-wrap {
    margin-top: 8px;
    padding: 0 2px;
}

.sold-progress-bar {
    width: 100%;
    height: 18px;
    min-height: 18px;
    background: #FFE0E0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: block;
}

.sold-progress-fill {
    height: 100%;
    min-height: 18px;
    background: linear-gradient(90deg, #FF6B6B, #E53935);
    border-radius: 10px;
    min-width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.6s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.sold-progress-text {
    font-size: 9px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    padding: 0 6px;
}

/* ==========================================
   Featured Products - Grid 5 cols
   ========================================== */
.featured-products-section {
    background: var(--tl-white);
    padding: 36px 0;
}

.featured-products-section .section-title i {
    color: var(--tl-accent);
}

/* ==========================================
   Product Tabs Sections - Category Themed
   ========================================== */
.product-tabs-section {
    padding: 36px 0;
    background: var(--tl-white);
    border-top: 1px solid #f0f0f0;
}

.product-tabs-section .section-header {
    padding-bottom: 16px;
    border-bottom: 2px solid var(--tl-primary);
    margin-bottom: 20px;
}

.product-tabs-section .section-title {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--tl-primary);
    letter-spacing: 0.5px;
}

/* Different color accents for each category section */
.product-tabs-section[id*="but-viet"] .section-header {
    border-bottom-color: #0066CC;
}
.product-tabs-section[id*="but-viet"] .section-title {
    color: #0066CC;
}

.product-tabs-section[id*="my-thuat"] .section-header {
    border-bottom-color: #E91E63;
}
.product-tabs-section[id*="my-thuat"] .section-title {
    color: #E91E63;
}

.product-tabs-section[id*="but-cao-cap"] .section-header {
    border-bottom-color: #1A237E;
}
.product-tabs-section[id*="but-cao-cap"] .section-title {
    color: #1A237E;
}

/* Product Section (no tabs - VPP, Giấy in, Học cụ) */
.product-section {
    padding: 36px 0;
    background: var(--tl-bg-light);
    border-top: 1px solid #eee;
}

.product-section .section-header {
    padding-bottom: 16px;
    border-bottom: 2px solid var(--tl-primary);
    margin-bottom: 20px;
}

.product-section .section-title {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--tl-primary);
}

/* Alternate backgrounds */
.product-section:nth-of-type(even) {
    background: var(--tl-white);
}

/* ==========================================
   Promo Banners
   ========================================== */
.promo-banners-section {
    padding: 24px 0;
    background: var(--tl-bg-light);
}

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

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

.promo-banner-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--tl-primary);
    display: flex;
    align-items: flex-end;
    transition: var(--tl-transition);
}

.promo-banner-item:hover .promo-banner-image {
    transform: scale(1.03);
}

.promo-overlay {
    width: 100%;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: var(--tl-white);
}

.promo-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.promo-cta {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--tl-gold);
}

/* ==========================================
   Blog Section - Thư viện Thiên Long
   ========================================== */
.blog-section {
    background: var(--tl-bg-light);
    padding: 36px 0 44px;
}

.blog-section .section-header {
    margin-bottom: 20px;
}

.blog-section .section-title {
    color: var(--tl-primary);
}

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

.blog-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--tl-white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: var(--tl-transition);
    border: 1px solid #eee;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--tl-primary);
}

.blog-card-link {
    display: block;
    color: var(--tl-text);
}

.blog-card-image {
    height: 180px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--tl-transition);
}

/* ==========================================
   Blog Section - thienlong.vn layout
   ========================================== */
.section-header-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tl-primary);
}

.section-title-simple {
    font-size: 20px;
    font-weight: 700;
    color: var(--tl-text);
}

.section-viewall {
    font-size: 14px;
    font-weight: 600;
    color: var(--tl-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Blog 2-column layout: big post left + list right */
.blog-layout-tl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.blog-featured-img {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.blog-featured-img .featured-thumb {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    transition: var(--tl-transition);
}

.blog-featured-img:hover .featured-thumb {
    transform: scale(1.03);
}

.blog-featured-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.blog-featured-title a {
    color: var(--tl-text);
    transition: var(--tl-transition);
}

.blog-featured-title a:hover {
    color: var(--tl-primary);
}

.blog-featured-meta {
    margin-bottom: 10px;
}

.blog-date {
    font-size: 12px;
    color: var(--tl-text-muted);
}

.blog-featured-excerpt {
    font-size: 14px;
    color: var(--tl-text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.blog-readmore-link {
    font-size: 13px;
    color: var(--tl-primary);
    font-weight: 600;
}

/* Side posts */
.blog-side-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-side-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.blog-side-item:last-child {
    border-bottom: none;
}

.blog-side-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.blog-side-thumb .side-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-side-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.blog-side-title a {
    color: var(--tl-text);
    transition: var(--tl-transition);
}

.blog-side-title a:hover {
    color: var(--tl-primary);
}

.blog-side-date {
    font-size: 11px;
    color: var(--tl-text-muted);
    display: block;
    margin-bottom: 4px;
}

.blog-side-excerpt {
    font-size: 12px;
    color: var(--tl-text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tl-bg);
    color: var(--tl-text-light);
    font-size: 36px;
}

.blog-placeholder-sm {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tl-bg);
    color: var(--tl-text-light);
    font-size: 20px;
}

/* ==========================================
   Products Grid - 5 columns for featured
   ========================================== */
section.featured-products-section .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* Flash sale swiper slide width */
.flash-sale-swiper .swiper-slide {
    width: 220px;
}

/* Section "Xem tất cả" centered button (thienlong.vn style) */
.section-view-all-center {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.btn-viewall-center {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #1a1a2e;
    color: #fff;
    border: 2px solid #1a1a2e;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--tl-transition);
}

.btn-viewall-center:hover {
    background: transparent;
    color: #1a1a2e;
}

