/*
Theme Name: KiddoPlay Kids Theme
Theme URI: https://sarimedia.in/
Author: Kishan kumar
Author URI: https://sarimedia.in/
Description: A colorful, responsive child-oriented theme for coloring books and audiobooks, matching SariMedia.In style.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-background, custom-colors, custom-menu, featured-images, full-width-template, translation-ready
Text Domain: kiddoplay-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #ffd700;
    --dark: #1f2937;
    --light: #f3f4f6;
    --gray: #6b7280;
    --white: #ffffff;
    --radius-lg: 20px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: #f9fafb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }

/* ============================================= */
/* TOP BAR
/* ============================================= */
#top-bar {
    background: #1a1a2e;
    color: #fff;
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar-left .top-bar-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-social {
    display: flex;
    gap: 12px;
}

.top-bar-social a {
    color: #fff;
    transition: all 0.3s;
}

.top-bar-social a:hover {
    color: #13aff0;
    transform: translateY(-2px);
}

/* ============================================= */
/* HEADER
/* ============================================= */
.site-header {
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    font-size: 24px;
}

.site-logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.site-description {
    font-size: 12px;
    color: var(--gray);
}

/* ============================================= */
/* NAVIGATION
/* ============================================= */
.main-navigation {
    display: flex;
    align-items: center;
}

/* Desktop Menu */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .main-menu {
        display: flex !important;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 25px;
    }
    
    .main-menu li {
        position: relative;
        list-style: none;
    }
    
    .main-menu a {
        display: block;
        padding: 10px 0;
        color: var(--dark);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95rem;
    }
    
    .main-menu a:hover,
    .main-menu li:hover > a {
        color: var(--primary);
    }
    
    /* Hide submenus by default */
    .main-menu .sub-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        min-width: 200px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-radius: 8px;
        padding: 10px 0;
        z-index: 999;
    }
    
    /* Show submenu on hover */
    .main-menu li:hover > .sub-menu {
        display: block !important;
    }
    
    /* Arrow for items with children */
    .main-menu .menu-item-has-children > a::after {
        content: " ▼";
        font-size: 8px;
        transition: transform 0.3s;
        display: inline-block;
    }
    
    .main-menu .menu-item-has-children:hover > a::after {
        transform: rotate(180deg);
    }
    
    /* Submenu styling */
    .main-menu .sub-menu li {
        width: 100%;
    }
    
    .main-menu .sub-menu a {
        padding: 8px 20px;
        font-size: 14px;
        font-weight: 500;
    }
    
    .main-menu .sub-menu a:hover {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        padding-left: 25px;
    }
    
    /* Third level submenu */
    .main-menu .sub-menu .sub-menu {
        top: 0;
        left: 100%;
        margin-left: 5px;
    }
}

/* Mobile Menu */
@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 50px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }
    
    .main-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        list-style: none;
        margin: 0;
        padding: 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .main-menu.active {
        display: flex !important;
    }
    
    .main-menu li {
        width: 100%;
        border-bottom: 1px solid #eee;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .main-menu a {
        display: block;
        padding: 15px 20px;
        color: #333;
        text-decoration: none;
        font-size: 15px;
    }
    
    /* Arrow on mobile */
    .main-menu .menu-item-has-children > a::after {
        content: " ▼";
        float: right;
        font-size: 10px;
        transition: transform 0.3s;
    }
    
    .main-menu .menu-item-has-children.active > a::after {
        transform: rotate(180deg);
    }
    
    /* Submenu on mobile */
    .main-menu .sub-menu {
        display: none !important;
        position: static;
        background: #f8f9fa;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .main-menu li.active > .sub-menu {
        display: block !important;
    }
    
    .main-menu .sub-menu a {
        padding: 12px 20px 12px 35px;
        font-size: 14px;
        background: #f8f9fa;
    }
    
    .main-menu .sub-menu .sub-menu a {
        padding-left: 50px;
    }
}

/* ============================================= */
/* HEADER SEARCH ACTIONS & OVERLAY
/* ============================================= */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-toggle {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}

.search-toggle svg {
    width: 18px;
    height: 18px;
    stroke: white;
    fill: none;
}

@media (max-width: 768px) {
    .search-toggle {
        width: 40px;
        height: 40px;
    }
    
    .search-toggle svg {
        width: 16px;
        height: 16px;
    }
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

.search-overlay-content {
    text-align: center;
    max-width: 600px;
    width: 90%;
    position: relative;
}

.search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-close:hover {
    transform: scale(1.1);
    color: var(--secondary);
}

.search-overlay-content h2 {
    color: #fff;
    margin-bottom: 20px;
}

.search-overlay-content input[type="search"] {
    width: 100%;
    padding: 15px 25px;
    border-radius: 50px;
    border: none;
    font-size: 18px;
    outline: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-overlay-content input[type="submit"] {
    margin-top: 15px;
    padding: 10px 30px;
    border-radius: 50px;
    border: none;
    background: var(--accent);
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.search-overlay-content input[type="submit"]:hover {
    background: #ffea00;
    transform: translateY(-2px);
}

/* ============================================= */
/* HERO SECTION
/* ============================================= */
.hero-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 80px 0;
    color: var(--white);
    position: relative;
    border-radius: 0 0 50px 50px;
    margin-bottom: 40px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1.2;
    min-width: 300px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: var(--dark);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-primary:hover {
    background: #ffea00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.hero-image {
    flex: 0.8;
    text-align: center;
    min-width: 250px;
}

.hero-placeholder {
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================= */
/* MAIN CONTENT LAYOUT
/* ============================================= */
.site-main {
    padding: 40px 0;
}

/* Grid Layout */
.kids-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.kids-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.kids-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.15);
    border-color: var(--primary);
}

.card-thumb-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #ffffff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.card-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Default cover behavior: crops vertical/portrait images to fit clean full bleed */
    border-radius: 10px;
}

/* Coloring sketches must remain fully visible inside the card, do not crop them */
.post-type-coloring .card-thumb-wrapper,
.coloring-home-card .card-thumb-wrapper,
.coloring-card .card-thumb-wrapper {
    padding: 10px;
}

.post-type-coloring .card-thumb-wrapper img,
.coloring-home-card .card-thumb-wrapper img,
.coloring-card .card-thumb-wrapper img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-info {
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.card-badge {
    align-self: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #eef2ff;
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

.card-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.card-info p {
    font-size: 14px;
    color: var(--gray);
}

.card-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
    margin-top: auto;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.card-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    color: #fff;
    transform: scale(1.02);
}

/* Single Pages */
.post-detail-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid #f0f0f0;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    margin: 20px auto;
    max-width: 900px;
}

.post-detail-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
    margin-bottom: 30px;
}

/* ============================================= */
/* FOOTER
/* ============================================= */
.site-footer {
    background: #1a1a2e;
    color: #a9a2d8;
    padding: 40px 0 20px;
    text-align: center;
    font-size: 14px;
}

.site-footer p {
    margin-bottom: 8px;
}

.site-footer p:last-child {
    margin-bottom: 0;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    h3 { font-size: 20px; }
    
    .hero-section {
        padding: 50px 0;
        text-align: center;
        border-radius: 0 0 30px 30px;
    }
    
    .hero-content {
        flex-direction: column;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .post-detail-container {
        padding: 20px;
    }
    
    .post-detail-title {
        font-size: 26px;
    }
}

/* ============================================= */
/* WOOCOMMERCE COMPATIBILITY OVERRIDES
/* ============================================= */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    border: 4px solid var(--kid-border);
    border-radius: var(--radius-lg) !important;
    padding: 20px !important;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.01);
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(102,126,234,0.1);
}

.woocommerce ul.products li.product .woocommerce-loop-category__title, 
.woocommerce ul.products li.product .woocommerce-loop-product__title, 
.woocommerce h1.page-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    color: var(--dark);
}

.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    padding: 12px 30px !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2) !important;
}

.woocommerce #respond input#submit.alt:hover, 
.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary)) !important;
    transform: translateY(-2px);
}

/* Homepage Scaling Cards */
.scale-card-hover {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.scale-card-hover:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0,0,0,0.06) !important;
}


