/**
 * Toy Kingdom Homepage Styles
 * Matches Figma design exactly
 */

/* Full Page Background */
body.home #main-content.main-page-homepage,
body.page-template-front-page #main-content.main-page-homepage,
body #main-content.main-page-homepage {
    background: #FFEDE0;
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    margin-top: 0 !important;
}

/* Section Divider - Thin line at the exact joining point of sections */
.toy-kingdom-hero-section::after,
.toy-kingdom-flash-sale-section::after,
.toy-kingdom-promo-banner::after,
.toy-kingdom-image-banners::after,
.toy-kingdom-two-banners-section::after,
.toy-kingdom-featured-products::after,
.toy-kingdom-popular-products-section::after,
.toy-kingdom-category-products-section::after,
.toy-kingdom-all-categories-section::after,
.toy-kingdom-blogs-section::after,
.category-section::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: #FAD8BF;
    margin: 0;
    padding: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

/* Hero Section */
.toy-kingdom-hero-section {
    margin-bottom: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
    background: transparent;
    position: relative;
    overflow: visible;
}

.toy-kingdom-hero-container {
    display: flex;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: flex-start;
    position: relative;
}

/* Sidebar Categories */
.toy-kingdom-sidebar-categories {
    width: 320px;
    background: #FFEDE0;
    border: none;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    margin-top: 0;
    position: relative;
}

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

.category-item {
    margin: 0;
    border-bottom: 1px solid #ffe8dc;
}

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

.category-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    color: #333;
    text-decoration: none;
    background: #fff;
    transition: all 0.2s;
    position: relative;
}

.category-item a:hover {
    background: #fff5f0;
    color: #ff6b35;
}

.category-item.active a {
    background: #ff6b35;
    color: #fff;
}

.category-item.active a .category-arrow {
    color: #fff;
}

.category-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.category-arrow {
    color: #999;
    font-size: 16px;
    font-weight: 300;
    transition: all 0.2s;
}

.category-item a:hover .category-arrow {
    color: #ff6b35;
}

.category-item.active a .category-arrow {
    color: #fff;
}

.category-item.hidden-category {
    display: none;
}

.category-item.hidden-category.show {
    display: block;
}

.see-more-btn {
    width: 100%;
    padding: 14px 18px;
    margin: 0;
    background: #2c2c2c;
    border: none;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.see-more-btn:hover {
    background: #1a1a1a;
}

.arrow-down {
    font-size: 12px;
    transition: transform 0.3s;
}

.see-more-btn.expanded .arrow-down {
    transform: rotate(180deg);
}

/* Hero Banner - Image Only */
.toy-kingdom-hero-banner {
    flex: 1;
    position: relative;
    border-radius: 12px;
    min-height: 500px;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0;
}

.hero-banner-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-background {
    position: relative;
    width: 100%;
    z-index: 2;
}

.hero-content {
    max-width: 600px;
    z-index: 3;
    position: relative;
}

.hero-logo {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 50%, #ff6b9d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.hero-description {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-shop-button {
    display: inline-block;
    padding: 15px 40px;
    background: #ff6b9d;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.hero-shop-button:hover {
    background: #c44569;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.hero-image {
    position: absolute;
    right: 40px;
    bottom: 0;
    z-index: 1;
    max-width: 400px;
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.wave-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 100"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,100 L0,100 Z" fill="rgba(255,255,255,0.3)"/></svg>') repeat-x;
    opacity: 0.3;
}

.dots-decoration {
    position: absolute;
    top: 20%;
    right: 20%;
    width: 100px;
    height: 100px;
    background-image: radial-circle(circle, #fff 2px, transparent 2px);
    background-size: 20px 20px;
    opacity: 0.2;
}

.hero-social-icons {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 4;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.social-icon:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Flash Sale Section */
.toy-kingdom-flash-sale-section {
    padding: 30px 0;
    background: #FAD8BF;
    margin: 0;
    position: relative;
}

/* Promotional Banner */
.toy-kingdom-promo-banner {
    background: #1e88e5;
    padding: 20px 0;
    margin: 0;
    position: relative;
}

/* Image Banners Section */
.toy-kingdom-image-banners {
    padding: 30px 0;
    margin: 0;
    background: #FFEDE0;
    position: relative;
}

.toy-kingdom-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.flash-sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.flash-sale-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.countdown-timer {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-value {
    display: block;
    background: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    min-width: 50px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.timer-label {
    display: block;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
    text-align: center;
}

.flash-sale-products {
    position: relative;
}

.products-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}


/* Two Banners Section */
.toy-kingdom-two-banners-section {
    padding: 30px 0;
    background: #FFEDE0;
    position: relative;
}

/* Featured Products Section - After 2 sections (Image Banners + Two Banners), use flash sale color */
.toy-kingdom-featured-products {
    padding: 30px 0;
    background: #FAD8BF;
    margin: 0;
    position: relative;
}

/* Popular Products Section - Back to default (part of pair with Featured) */
.toy-kingdom-popular-products-section {
    padding: 30px 0;
    background: #FFEDE0;
    position: relative;
}

.two-banners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.banner-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}


.toy-kingdom-popular-products-section .section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

/* Kids Toy Category Section - Second section with flash sale color */
.toy-kingdom-kids-toy-section {
    padding: 30px 0;
    background: #FAD8BF;
}

.toy-kingdom-kids-toy-section .section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

.category-filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.filter-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.filter-btn.active {
    background: #ff6b35;
    color: #fff;
}

.filter-btn:hover {
    background: #ff6b35;
    color: #fff;
}

/* Category with Products Section - After 2 sections (Featured + Popular), use flash sale color */
.toy-kingdom-category-products-section {
    padding: 30px 0;
    background: #FAD8BF;
    position: relative;
}

.category-products-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-image-side img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.category-placeholder {
    background: #fff;
    padding: 60px 20px;
    text-align: center;
    border-radius: 8px;
}

.category-products-slider {
    overflow: hidden;
    position: relative;
}

.category-products-side {
    position: relative;
}

.products-rows-container {
    display: flex;
    flex-direction: row;
    gap: 0;
    transition: transform 0.3s ease;
    width: 200%;
}

.products-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    flex: 0 0 50%;
    min-width: 50%;
}


/* Center align all section titles */
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

/* All Categories Section */
.toy-kingdom-all-categories-section {
    padding: 0;
    background: transparent;
    position: relative;
}

.category-section {
    padding: 50px 0 30px 0;
    margin-bottom: 0;
    border-radius: 0;
    width: 100%;
    position: relative;
}

.category-section:last-child {
    margin-bottom: 0;
    padding-bottom: 30px;
}

.category-section:last-child::after {
    display: none;
}

.category-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

/* Blogs Section - After 2 sections (Popular + Category), use flash sale color */
.toy-kingdom-blogs-section {
    padding: 30px 0;
    background: #FAD8BF;
    position: relative;
}

/* Remove divider from last section */
.toy-kingdom-blogs-section::after {
    display: none;
}

.blogs-header {
    background: #4A90E2;
    padding: 12px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.blogs-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.blogs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.blog-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.blog-date {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.blog-tag {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.blog-content {
    padding: 20px;
}

.blog-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-title a {
    color: #333;
    text-decoration: none;
}

.blog-author {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.blog-read-more {
    display: block;
    width: 100%;
    background: #ff6b35;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    box-sizing: border-box;
}

.blog-read-more:hover {
    background: #c44569;
}

@media (max-width: 1200px) {
    .products-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blogs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .two-banners-grid {
        grid-template-columns: 1fr;
    }
    
    .category-products-layout {
        grid-template-columns: 1fr;
    }
    
    .products-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blogs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.products-carousel::-webkit-scrollbar {
    display: none;
}

/* Product Card */
.toy-kingdom-product-card {
    min-width: 240px;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    transition: all 0.3s;
}

.toy-kingdom-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* Wishlist Icon Top Left */
.product-wishlist {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
}

.wishlist-btn {
    background: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.wishlist-btn:hover {
    background: #f5f5f5;
}

.wishlist-btn svg {
    width: 18px;
    height: 18px;
}

.wishlist-btn.active svg {
    fill: #ff4444;
    stroke: #ff4444;
}

/* OFF Tag Top Right */
.product-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    color: #ff4444;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    line-height: 1.2;
    border: 1px solid #333;
}

.product-image {
    margin-bottom: 12px;
    text-align: center;
    position: relative;
    margin-top: 0;
    padding: 0;
    width: 100%;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 4px;
    padding: 0;
}

.product-info {
    text-align: left;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
    min-height: 40px;
}

.product-name a {
    color: #333;
    text-decoration: none;
}

.product-name a:hover {
    color: #ff6b35;
}

/* SKU and Rating on Same Line */
.product-sku-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.product-sku {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

.product-rating-single {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-star {
    font-size: 14px;
    color: #ff4444;
}

.rating-value {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

/* Price and Add to Cart on Same Line */
.product-price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

.add-to-cart-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    display: inline-block;
    background: #F4F4F4;
    color: #333;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    background: #e5e5e5;
    color: #000;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.carousel-navigation {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.carousel-prev,
.carousel-next {
    padding: 8px 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #ff6b35;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.carousel-prev::before {
    content: '←';
    font-size: 14px;
}

.carousel-next::after {
    content: '→';
    font-size: 14px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: #fff5f0;
    border-color: #ff6b35;
    color: #e55a2b;
}

/* Promotional Banner */
.toy-kingdom-promo-banner {
    background: #1e88e5;
    padding: 20px 0;
    margin: 0;
    position: relative;
}

.promo-banner-content {
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

/* Image Banners */
.toy-kingdom-image-banners {
    padding: 30px 0;
    margin: 0;
    background: #FFEDE0;
}

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

.banner-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.banner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.banner-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

.featured-products-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.featured-products-grid {
    position: relative;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .toy-kingdom-hero-container {
        flex-direction: column;
    }
    
    .toy-kingdom-sidebar-categories {
        width: 100%;
    }
    
    .toy-kingdom-hero-banner {
        min-height: 400px;
    }
    
    .hero-banner-image {
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    /* Hide category sidebar on mobile */
    .toy-kingdom-sidebar-categories {
        display: none !important;
    }
    
    .toy-kingdom-hero-container {
        flex-direction: column;
    }
    
    .toy-kingdom-hero-banner {
        width: 100% !important;
        min-height: 300px;
        border-radius: 8px;
    }
    
    .hero-banner-image {
        object-fit: cover;
    }
    
    .flash-sale-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .countdown-timer {
        flex-wrap: wrap;
    }
    
    .banners-grid {
        grid-template-columns: 1fr;
    }
    
    .toy-kingdom-product-card {
        min-width: 240px;
    }
}

