/* ========================================
   FUNZ PAGE STYLES - DREAMWONDER
   Updated: Compact, Mobile-Optimized Design
======================================== */

/* ========================================
   BASE & COMMON STYLES
======================================== */
html {
    scroll-behavior: smooth;
}

.funz-image {
    opacity: 0;
    animation: fadeInImage 0.5s ease-in-out forwards;
}

@keyframes fadeInImage {
    to { opacity: 1; }
}

/* ========================================
   SIMPLE COMPACT FEATURED SECTION
======================================== */
.featured-section {
    padding: 40px 0;
    background: linear-gradient(135deg, var(--light-pink) 0%, var(--pastel-aqua) 100%);
}

.featured-card {
    background: white;
    border-radius: 15px;
    border: 2px solid var(--light-pink);
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(180, 152, 221, 0.15);
}

.featured-img {
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--light-pink);
}

.category-tag {
    background: linear-gradient(135deg, var(--lavender-pink), var(--bubblegum-pink));
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

.featured-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--lavender-pink), var(--bubblegum-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-code {
    color: var(--lavender-pink);
    font-size: 0.85rem;
    margin-bottom: 8px;
    opacity: 0.8;
}

.featured-desc {
    font-size: 0.9rem;
    color: var(--primary-text);
    margin-bottom: 15px;
    line-height: 1.4;
}

.btn-compact {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .featured-section {
        padding: 30px 0;
    }
    
    .featured-card {
        padding: 15px;
        margin: 0 15px;
    }
    
    .featured-img {
        width: 80px;
        height: 80px;
    }
    
    .featured-title {
        font-size: 1.2rem;
    }
    
    .featured-desc {
        font-size: 0.8rem;
    }
    
    .btn-compact {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* ========================================
   PAGE HEADER SECTION
======================================== */
.page-header {
    padding: 100px 0 60px;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--light-pink) 0%, var(--pastel-aqua) 100%);
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(248, 165, 218, 0.1) 0%, transparent 70%);
    animation: gentle-float 8s ease-in-out infinite;
    pointer-events: none;
}

.header-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.page-title {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--lavender-pink) 0%, var(--bubblegum-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.page-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: var(--font-weight-medium);
    color: var(--primary-text);
    opacity: 0.8;
    line-height: 1.6;
}

/* Page Header Mobile Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 80px 0 50px;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
}

/* ========================================
   ERROR SECTION
======================================== */
.error-section {
    padding: 100px 0;
    background: var(--primary-bg);
}

.error-card {
    background: var(--primary-bg);
    border-radius: 25px;
    padding: 50px;
    border: 2px solid var(--light-pink);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    font-size: 3.5rem;
    color: var(--lavender-pink);
    margin-bottom: 20px;
    animation: gentle-bounce 3s ease-in-out infinite;
}

.error-title {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-text);
    margin-bottom: 15px;
}

.error-message {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    color: var(--primary-text);
    opacity: 0.8;
    margin-bottom: 30px;
}

/* Error Section Mobile Responsive */
@media (max-width: 768px) {
    .error-card {
        padding: 40px 30px;
        margin: 0 20px;
    }
    
    .error-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .error-card {
        padding: 30px 20px;
    }
    
    .error-title {
        font-size: 1.6rem;
    }
}

/* ========================================
   SEARCH SECTION
======================================== */
.search-section {
    padding: 60px 0;
    background: var(--primary-bg);
}

.search-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(224, 210, 240, 0.15);
    border-radius: 25px;
    padding: 35px;
    border: 2px solid var(--light-pink);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-header h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-text);
    margin-bottom: 10px;
}

.search-header h2 i {
    color: var(--bubblegum-pink);
    margin-right: 10px;
}

.search-header p {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--primary-text);
    opacity: 0.8;
}

.search-bar {
    margin-bottom: 25px;
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lavender-pink);
    font-size: 1.1rem;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 16px 22px 16px 50px;
    border: 2px solid var(--light-pink);
    border-radius: 20px;
    background: var(--primary-bg);
    color: var(--primary-text);
    font-size: 1rem;
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--bubblegum-pink);
    background: rgba(248, 165, 218, 0.05);
}

.search-input::placeholder {
    color: rgba(20, 11, 40, 0.5);
    font-style: italic;
}

.clear-search {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--lavender-pink);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 50%;
}

.clear-search:hover {
    color: var(--bubblegum-pink);
    background: rgba(248, 165, 218, 0.1);
}

/* Category Filter Pills */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.filter-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-bg);
    border: 2px solid var(--light-pink);
    color: var(--primary-text);
    padding: 10px 16px;
    border-radius: 20px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 165, 218, 0.2), transparent);
    transition: left 0.6s ease;
}

.filter-pill:hover::before {
    left: 100%;
}

.filter-pill:hover {
    border-color: var(--bubblegum-pink);
    transform: translateY(-1px);
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--lavender-pink), var(--bubblegum-pink));
    color: var(--primary-bg);
    border-color: var(--bubblegum-pink);
}

.filter-pill i {
    font-size: 0.9rem;
}

/* Search Section Mobile Responsive */
@media (max-width: 768px) {
    .search-container {
        padding: 25px 20px;
        margin: 0 20px;
    }
    
    .search-header h2 {
        font-size: 1.8rem;
    }
    
    .category-filters {
        gap: 10px;
    }
    
    .filter-pill {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .search-container {
        padding: 20px 15px;
    }
    
    .search-header h2 {
        font-size: 1.6rem;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .filter-pill {
        padding: 6px 10px;
        font-size: 0.8rem;
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
}

/* ========================================
   SEARCH RESULTS SECTION
======================================== */
.search-results {
    margin-bottom: 50px;
}

.results-title {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-text);
    margin-bottom: 25px;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.no-results {
    text-align: center;
    padding: 50px 20px;
}

.no-results-icon {
    font-size: 3.5rem;
    color: var(--lavender-pink);
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-results h3 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-text);
    margin-bottom: 12px;
}

.no-results p {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--primary-text);
    opacity: 0.7;
}

/* ========================================
   FUNZ GALLERY SECTION
======================================== */
.funz-gallery-section {
    padding: 0 0 60px;
    background: var(--primary-bg);
}

.category-gallery {
    max-width: 1200px;
    margin: 0 auto;
}

.category-section {
    margin-bottom: 60px;
    padding: 0 20px;
}

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

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-pink);
}

.category-title {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-title i {
    color: var(--bubblegum-pink);
    font-size: 1.6rem;
}

.category-count {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    color: var(--lavender-pink);
    background: rgba(200, 167, 241, 0.2);
    padding: 6px 12px;
    border-radius: 15px;
    border: 2px solid var(--lavender-pink);
}

/* ========================================
   FUNZ GRID - 3 COLUMNS ON MOBILE
======================================== */
.funz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Mobile: Force 3 columns */
@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .category-title {
        font-size: 1.6rem;
    }
    
    .funz-grid,
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 1.4rem;
        flex-direction: column;
        gap: 6px;
    }
    
    .funz-grid,
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

/* ========================================
   FUNZ CARDS - COMPACT & CENTERED
======================================== */
.funz-card {
    background: var(--primary-bg);
    border-radius: 15px;
    border: 2px solid var(--light-pink);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: none !important;
}

.funz-card:hover {
    transform: translateY(-2px);
    border-color: var(--bubblegum-pink);
}

.funz-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.funz-image-container {
    position: relative;
    padding: 12px;
    background: linear-gradient(135deg, rgba(224, 210, 240, 0.1) 0%, rgba(184, 224, 240, 0.1) 100%);
    text-align: center;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.funz-image {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.funz-card:hover .funz-image {
    transform: scale(1.05);
}

.funz-info {
    padding: 12px;
    text-align: center;
}

.funz-category-badge {
    display: inline-block;
    background: rgba(200, 167, 241, 0.2);
    color: var(--lavender-pink);
    padding: 3px 6px;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.65rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 6px;
    border: 1px solid var(--lavender-pink);
}

.funz-name {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-text);
    margin-bottom: 4px;
    line-height: 1.2;
    text-align: center;
}

.funz-code {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    color: var(--lavender-pink);
    opacity: 0.8;
    text-align: center;
}

/* Funz Cards Mobile Responsive */
@media (max-width: 768px) {
    .funz-image-container {
        height: 100px;
        padding: 10px;
    }
    
    .funz-image {
        max-width: 70px;
        max-height: 70px;
    }
    
    .funz-info {
        padding: 10px 8px;
    }
    
    .funz-name {
        font-size: 0.85rem;
    }
    
    .funz-code {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .funz-image-container {
        height: 90px;
        padding: 8px;
    }
    
    .funz-image {
        max-width: 60px;
        max-height: 60px;
    }
    
    .funz-info {
        padding: 8px 6px;
    }
    
    .funz-name {
        font-size: 0.8rem;
    }
    
    .funz-code {
        font-size: 0.65rem;
    }
    
    .funz-category-badge {
        font-size: 0.6rem;
        padding: 2px 4px;
    }
}

/* ========================================
   CALL TO ACTION SECTION
======================================== */
.cta-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--light-pink) 0%, var(--pastel-aqua) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(248, 165, 218, 0.1) 0%, transparent 70%);
    animation: gentle-float 8s ease-in-out infinite;
    pointer-events: none;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.cta-title {
    font-family: var(--font-primary);
    font-size: 2.4rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--lavender-pink) 0%, var(--bubblegum-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.cta-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: var(--font-weight-medium);
    color: var(--primary-text);
    opacity: 0.8;
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-large {
    padding: 18px 35px;
    font-size: 1.1rem;
    min-width: 180px;
}

/* CTA Mobile Responsive */
@media (max-width: 768px) {
    .cta-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .cta-title {
        font-size: 1.8rem;
    }
    
    .cta-subtitle {
        font-size: 1.1rem;
    }
    
    .btn-large {
        padding: 16px 30px;
        font-size: 1rem;
        min-width: 160px;
    }
}

/* ========================================
   FLOATING ELEMENTS & ANIMATIONS
======================================== */
.floating-sparkle {
    position: absolute;
    font-size: 1.8rem;
    animation: sparkle-float 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes sparkle-float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-12px) rotate(180deg); 
        opacity: 1;
    }
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(180deg); }
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
}

/* ========================================
   ACCESSIBILITY & FOCUS STYLES
======================================== */
.funz-link:focus-visible {
    outline: 3px solid var(--bubblegum-pink);
    outline-offset: 2px;
    border-radius: 15px;
}

.search-input:focus-visible,
.filter-pill:focus-visible {
    outline: 3px solid var(--bubblegum-pink);
    outline-offset: 2px;
}

/* ========================================
   REDUCED MOTION SUPPORT
======================================== */
@media (prefers-reduced-motion: reduce) {
    .floating-sparkle,
    .sparkle-float,
    .gentle-float,
    .gentle-bounce {
        animation: none !important;
    }
    
    .funz-card:hover {
        transform: none;
    }
    
    .funz-card:hover .funz-image {
        transform: none;
    }
    
    .featured-funz-image:hover {
        transform: none;
    }
}

/* ========================================
   HIGH CONTRAST MODE SUPPORT
======================================== */
@media (prefers-contrast: high) {
    .funz-card {
        border-width: 3px;
    }
    
    .funz-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .filter-pill.active {
        border-width: 3px;
    }
    
    .search-input:focus {
        border-width: 3px;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .floating-sparkle,
    .search-section,
    .cta-section {
        display: none;
    }
    
    .funz-card {
        break-inside: avoid;
    }
    
    .featured-funz-section::before,
    .page-header::before,
    .cta-section::before {
        display: none;
    }
}