/* 
    Children Psychology Books Store - Stylesheet
    Focus: Emotions & Feelings
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-yellow: #FFEB3B;
    --primary-blue: #03A9F4;
    --primary-pink: #F48FB1;
    --primary-mint: #A5D6A7;
    
    --soft-yellow: #FFF9C4;
    --soft-blue: #E1F5FE;
    --soft-pink: #FCE4EC;
    --soft-mint: #E8F5E9;
    --soft-purple: #F3E5F5;
    
    --emotion-happy: #FFD54F;
    --emotion-sad: #64B5F6;
    --emotion-brave: #81C784;
    --emotion-shy: #BA68C8;
    --emotion-comfortable: #FFAB91;
    --emotion-food: #AED581;

    --text-dark: #2D3436;
    --text-muted: #636E72;
    --bg-light: #F9F9F9;
    --white: #FFFFFF;
    
    --radius-lg: 25px;
    --radius-md: 15px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-soft);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-blue) !important;
}

.navbar-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

/* Mobile Toggle via Logo Styles */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: none !important; /* Hide default hamburger */
    }
    
    .navbar-brand {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .navbar-brand:active {
        opacity: 0.7;
    }

    /* Ensure icons don't overlap on very small screens */
    .navbar .container {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }

    .navbar .d-flex.align-items-center {
        gap: 0.5rem !important;
    }

    .cart-icon {
        padding: 5px !important;
    }

    .navbar-collapse {
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1rem 2rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        z-index: 1050;
    }
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    font-weight: 600;
    margin: 0 10px;
    color: var(--text-dark) !important;
}

.nav-link:hover {
    color: var(--primary-blue) !important;
}

.cart-icon {
    position: relative;
    padding: 10px;
}

.cart-badge, .wishlist-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--primary-pink);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

.wishlist-badge {
    background-color: var(--primary-blue);
}

/* Hero Section */
.hero-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--soft-blue) 0%, var(--soft-mint) 100%);
    border-bottom-left-radius: 100px;
    border-bottom-right-radius: 100px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero-video-container {
    max-width: 80%;
    max-height: 500px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    background-color: #000;
}

.hero-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

@media (max-width: 991px) {
    .hero-video-container {
        max-width: 100%;
        max-height: 300px;
    }
}

.bg-soft-yellow { background-color: var(--soft-yellow); }
.bg-soft-blue { background-color: var(--soft-blue); }
.bg-soft-pink { background-color: var(--soft-pink); }
.bg-soft-mint { background-color: var(--soft-mint); }
.bg-soft-purple { background-color: var(--soft-purple); }
.text-primary-blue { color: var(--primary-blue); }
.text-primary-pink { color: var(--primary-pink); }
.bg-primary-blue { background-color: var(--primary-blue); }
.bg-primary-pink { background-color: var(--primary-pink); }

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: #0288D1;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    color: white;
}

/* Category Cards */
.category-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Product Cards */
.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-pink);
    box-shadow: var(--shadow-soft);
    z-index: 10;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    color: #e91e63;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.emotion-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.badge-happy { background-color: var(--emotion-happy); color: #5D4037; }
.badge-sad { background-color: var(--emotion-sad); }
.badge-brave { background-color: var(--emotion-brave); }
.badge-shy { background-color: var(--emotion-shy); }
.badge-comfortable { background-color: var(--emotion-comfortable); }
.badge-food { background-color: var(--emotion-food); }

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-weight: 800;
    color: var(--primary-pink);
    font-size: 1.2rem;
}

/* Footer */
footer {
    background-color: var(--white);
    padding: 80px 0 30px;
    border-top-left-radius: 100px;
    border-top-right-radius: 100px;
    margin-top: 100px;
}

/* Cart Sidebar / Toast */
.toast-container {
    z-index: 1060;
}

.cart-item-img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-section {
        padding: 60px 0;
        border-bottom-left-radius: 50px;
        border-bottom-right-radius: 50px;
    }
}

/* Testimonials */
.testimonial-text {
    font-style: italic;
    line-height: 1.8;
    max-height: 200px;
    overflow-y: auto;
    padding: 0 15px;
}

/* Custom scrollbar for long testimonials */
.testimonial-text::-webkit-scrollbar {
    width: 4px;
}
.testimonial-text::-webkit-scrollbar-track {
    background: transparent;
}
.testimonial-text::-webkit-scrollbar-thumb {
    background: var(--primary-pink);
    border-radius: 10px;
    opacity: 0.3;
}

.testimonial-avatar-wrapper {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.testimonial-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid #fff;
}

/* Instagram Reels */
.reel-card {
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #f8f9fa;
    min-height: 250px;
}

.reel-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.reel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    opacity: 1; /* Always show the play icon for better UX */
    transition: all 0.3s ease;
}

.reel-card:hover .reel-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.reel-card:hover .reel-thumb {
    transform: scale(1.05);
}

.reel-caption {
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
