/* ========================================================
   Toyworld Interactive Animations & Motion Styles
   ======================================================== */

/* --- 1. Floating Decorative Shapes --- */
.hero-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1);
}

.shape-balloon {
    top: 14%;
    right: 18%;
    width: 80px;
    animation: float-y 5s ease-in-out infinite;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.08));
}

.shape-star {
    bottom: 22%;
    left: 10%;
    width: 52px;
    animation: float-y 4.2s ease-in-out 1s infinite, float-rotate 12s linear infinite;
    filter: drop-shadow(0 10px 20px rgba(255, 110, 105, 0.2));
}

.shape-badge {
    top: 25%;
    right: 8%;
    background: #fff;
    color: var(--ink, #17224d);
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 16px 36px rgba(32, 43, 92, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: float-y 6s ease-in-out 0.5s infinite;
}

.shape-badge i {
    color: var(--coral, #ff6e69);
    font-style: normal;
    font-size: 18px;
}

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

@keyframes float-rotate {
    0% { rotate: 0deg; }
    100% { rotate: 360deg; }
}

/* --- 3. GSAP Reveal & Animation Classes --- */
.gsap-reveal-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    margin-right: 0.22em;
}

.gsap-reveal-word-inner {
    display: inline-block;
    will-change: transform, opacity;
}

.reveal-clip {
    clip-path: inset(0 100% 0 0);
    will-change: clip-path, transform;
    transition: clip-path 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-clip.is-revealed {
    clip-path: inset(0 0% 0 0);
}

.reveal-fade-up {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.reveal-fade-up.is-in-view {
    opacity: 1;
    transform: translateY(0);
}

/* --- 4. Swiper Testimonials Slider --- */
.testimonials-slider {
    position: relative;
    padding-bottom: 50px !important;
}

.testimonials-slider .swiper-slide {
    display: flex;
    justify-content: center;
    height: auto;
}

.testimonials-slider .testimonial-card {
    width: 100%;
    margin: 0 auto;
    transform: translateY(40px);
}

.testimonials-slider .swiper-pagination {
    bottom: 0 !important;
}

.testimonials-slider .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #fff;
    opacity: 0.35;
    margin: 0 6px !important;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.testimonials-slider .swiper-pagination-bullet-active {
    width: 32px;
    opacity: 1;
    background: var(--coral, #ff6e69);
}

/* --- 5. Interactive Three.js WebGL Distortion Container --- */
.distortion-canvas-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius, 8px);
}

.distortion-canvas-wrap canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
}

/* --- 6. Dropdown & Navigation Adjustments --- */
.store-nav .wrap {
    gap: clamp(14px, 1.8vw, 32px);
    flex-wrap: nowrap;
}

.store-nav a {
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown > a {
    display: inline-flex;
    align-items: center;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--line, #e7e9f0);
    border-radius: var(--radius, 8px);
    box-shadow: 0 16px 40px rgba(31, 43, 91, 0.12);
    padding: 8px 0;
    display: none;
    flex-direction: column;
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: flex;
}

.nav-dropdown .dropdown-menu a {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink, #17224d);
    white-space: nowrap;
    border-bottom: 1px solid #f6f7fa;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-dropdown .dropdown-menu a:last-child {
    border-bottom: none;
}

.nav-dropdown .dropdown-menu a:hover {
    background: var(--mint, #eefbf9);
    color: var(--coral, #ff6e69);
}

@media (max-width: 1024px) {
    .nav-dropdown {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    .nav-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 14px;
        display: flex;
        background: transparent;
    }
}

/* Load More Section */
.load-more-container {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff6e69 0%, #ff4f81 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    padding: 16px 36px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 110, 105, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.load-more-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(255, 110, 105, 0.45);
    background: linear-gradient(135deg, #ff5751 0%, #e83e6f 100%);
}

.load-more-btn:active {
    transform: translateY(0) scale(0.98);
}

.load-more-btn:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}

.load-more-status {
    color: #627d98;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.load-more-status span,
.load-more-status b {
    color: #102a43;
    font-weight: 700;
}

.all-loaded-notice {
    margin-top: 40px;
    text-align: center;
    padding: 14px 28px;
    background: #f0fdf4;
    color: #15803d;
    font-weight: 600;
    font-size: 15px;
    border-radius: 50px;
    border: 1px solid #bbf7d0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

/* Clean Collections Section */
.category-row-centered {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 36px 28px !important;
}

.category-row-centered .category-chip {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-row-centered .category-chip:hover {
    transform: translateY(-8px);
}

.category-chip-thumb {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    background: #f7f9fa;
    border: 4px solid transparent;
    box-shadow: 0 8px 24px rgba(32, 43, 92, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-row-centered .category-chip:hover .category-chip-thumb {
    border-color: var(--coral, #ff6e69);
    box-shadow: 0 12px 32px rgba(255, 110, 105, 0.28);
    transform: scale(1.03);
}

.category-chip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-row-centered .category-chip:hover img {
    transform: scale(1.1);
}

.category-row-centered .category-chip b {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink, #17224d);
    line-height: 1.3;
    margin-bottom: 4px;
    transition: color 0.25s ease;
}

.category-row-centered .category-chip:hover b {
    color: var(--coral, #ff6e69);
}

.category-chip-count {
    font-size: 12px;
    font-weight: 600;
    color: #829ab1;
}

@media (max-width: 767px) {
    .category-row-centered {
        gap: 24px 14px !important;
    }
    .category-row-centered .category-chip {
        flex: 0 0 135px;
    }
    .category-chip-thumb {
        width: 105px;
        height: 105px;
        margin-bottom: 10px;
    }
    .category-row-centered .category-chip b {
        font-size: 13px;
    }
}

/* Sidebar Hierarchy & Accordion */
.sidebar-category-group {
    border-bottom: 1px solid var(--line, #edf0f5);
}

.sidebar-category-group .parent-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 8px;
}

.sidebar-category-group .parent-category {
    font-weight: 700;
    font-size: 14px;
    color: var(--ink, #161f48);
    text-decoration: none;
    flex: 1;
    transition: color 0.15s ease;
}

.sidebar-category-group .parent-category:hover,
.sidebar-category-group .parent-category.active {
    color: var(--coral, #ff6e69);
}

.sidebar-category-group .category-meta-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 2px 0 2px 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.sidebar-category-group .category-count {
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    transition: color 0.15s ease;
}

.sidebar-category-group .category-meta-toggle:hover .category-count {
    color: var(--coral, #ff6e69);
}

.sidebar-category-group .category-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-category-group .category-toggle-btn:hover,
.sidebar-category-group.expanded .category-toggle-btn {
    background: #fff1f0;
    border-color: #ffcdd2;
    color: var(--coral, #ff6e69);
}

.sidebar-category-group .chevron-icon {
    display: block;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-category-group.expanded .chevron-icon {
    transform: rotate(180deg);
}

.sidebar-category-group .sub-category-list {
    display: none;
    margin: 2px 0 12px 10px;
    padding-left: 12px;
    border-left: 2px solid #fed7d7;
    flex-direction: column;
    gap: 4px;
}

.sidebar-category-group.expanded .sub-category-list {
    display: flex;
    animation: sidebarSubFade 0.22s ease-out;
}

@keyframes sidebarSubFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-category-group .child-category {
    font-size: 13px !important;
    padding: 6px 8px !important;
    color: #627d98 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sidebar-category-group .child-category:hover,
.sidebar-category-group .child-category.active {
    color: var(--coral, #ff6e69) !important;
    background: #fff5f5;
    font-weight: 600;
}

/* --- Balanced Header Layout & Modern Cart Button --- */
.header-main {
    grid-template-columns: 200px 1fr auto !important;
    gap: 32px !important;
    align-items: center !important;
}

.header-search {
    max-width: 660px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.header-cart-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 18px !important;
    border: 1.5px solid var(--line, #e7e9f0) !important;
    border-radius: 30px !important;
    background: #ffffff !important;
    color: var(--navy, #202b5c) !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.2, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(32, 43, 92, 0.04) !important;
}

.header-cart-btn:hover {
    border-color: var(--coral, #ff6e69) !important;
    color: var(--coral, #ff6e69) !important;
    box-shadow: 0 4px 14px rgba(255, 110, 105, 0.18) !important;
    transform: translateY(-1px);
}

.cart-icon-wrapper {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cart-icon-wrapper .cart-svg {
    display: block;
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.cart-icon-wrapper .cart-badge {
    position: absolute !important;
    top: -8px !important;
    right: -10px !important;
    background: var(--coral, #ff6e69) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    font-style: normal !important;
    min-width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    text-align: center !important;
    border-radius: 10px !important;
    padding: 0 4px !important;
    box-shadow: 0 2px 5px rgba(255, 110, 105, 0.4) !important;
}

.header-cart-btn .cart-label {
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
}

/* ========================================================
   Back to Top Button with Circular Scroll Progress
   ======================================================== */
.scroll-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    z-index: 999;
    cursor: pointer;
    border-radius: 50%;
    background: linear-gradient(145deg, #202b5c 0%, #151d42 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(32, 43, 92, 0.35), 0 3px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.85);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s ease,
                background 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    transform: translateY(-3px) scale(1.08);
    background: linear-gradient(145deg, #ff6e69 0%, #ff4f81 100%);
    box-shadow: 0 12px 28px rgba(255, 79, 129, 0.45), 0 4px 10px rgba(32, 43, 92, 0.3);
}

.scroll-to-top:active {
    transform: translateY(0) scale(0.96);
}

.scroll-to-top .progress-ring {
    position: absolute;
    inset: 0;
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
    pointer-events: none;
}

.scroll-to-top .progress-ring__circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.22);
    stroke-width: 3.5;
}

.scroll-to-top .progress-ring__circle {
    fill: none;
    stroke: #ff6e69;
    stroke-width: 3.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.08s linear;
}

.scroll-to-top:hover .progress-ring__circle {
    stroke: #ffffff;
}

.scroll-to-top:hover .progress-ring__circle-bg {
    stroke: rgba(255, 255, 255, 0.3);
}

.scroll-to-top__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.scroll-to-top:hover .scroll-to-top__arrow {
    transform: translateY(-2px);
    color: #ffffff;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
    .scroll-to-top .progress-ring {
        width: 44px;
        height: 44px;
    }
}


/* ========================================================
   Feature Collage (2 + 3 Native Aspect Ratio Layout)
   - Row 1: 2 wide cards (640x340 px -> span 3 / 50% width)
   - Row 2: 3 cards (420x340 px -> span 2 / 33.3% width)
   - Eliminates background-size: cover cut-offs. 100% full images visible.
   ======================================================== */
.feature-collage {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 20px !important;
    margin-top: 90px;
}

.feature-collage a {
    position: relative;
    border-radius: 8px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 320px !important;
    padding: 35px 30px !important;
    color: #fff;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.feature-collage a:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(31, 43, 91, 0.14);
}

.feature-collage a:nth-child(1),
.feature-collage a:nth-child(2) {
    grid-column: span 3 !important;
    grid-row: auto !important;
}

.feature-collage a:nth-child(3),
.feature-collage a:nth-child(4),
.feature-collage a:nth-child(5) {
    grid-column: span 2 !important;
    grid-row: auto !important;
}

.feature-collage b {
    font: 400 28px/1.1 var(--display) !important;
    max-width: 260px !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.feature-collage span {
    font-size: 13px !important;
    font-weight: 800 !important;
    margin-top: 14px !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease;
}

.feature-collage a:hover span {
    transform: translateX(4px);
}

@media (max-width: 991px) {
    .feature-collage {
        grid-template-columns: 1fr 1fr !important;
    }
    .feature-collage a:nth-child(1),
    .feature-collage a:nth-child(2),
    .feature-collage a:nth-child(3),
    .feature-collage a:nth-child(4) {
        grid-column: span 1 !important;
    }
    .feature-collage a:nth-child(5) {
        grid-column: span 2 !important;
    }
}

@media (max-width: 640px) {
    .feature-collage {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin-top: 50px !important;
    }
    .feature-collage a,
    .feature-collage a:nth-child(1),
    .feature-collage a:nth-child(2),
    .feature-collage a:nth-child(3),
    .feature-collage a:nth-child(4),
    .feature-collage a:nth-child(5) {
        grid-column: span 1 !important;
        min-height: 240px !important;
        padding: 24px !important;
    }
}

/* ========================================================
   Shop AJAX Filter Loading State
   ======================================================== */
.shop-products {
    position: relative;
    min-height: 420px;
}

.shop-products.is-loading > *:not(.shop-products-loader) {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.shop-products-loader {
    display: none;
    position: absolute;
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    background: rgba(32, 43, 92, 0.94);
    color: #ffffff;
    padding: 12px 26px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 13.5px;
    box-shadow: 0 10px 28px rgba(32, 43, 92, 0.25);
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.shop-products.is-loading .shop-products-loader {
    display: inline-flex;
}

/* ========================================================
   Sticky Product Filter Sidebar
   ======================================================== */
.shop-layout {
    align-items: start !important;
}

.shop-sidebar {
    position: sticky !important;
    top: 25px !important;
    align-self: start !important;
    max-height: calc(100vh - 50px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding-right: 8px !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(32, 43, 92, 0.25) transparent !important;
}

.shop-sidebar::-webkit-scrollbar {
    width: 4px !important;
}

.shop-sidebar::-webkit-scrollbar-track {
    background: transparent !important;
}

.shop-sidebar::-webkit-scrollbar-thumb {
    background: rgba(32, 43, 92, 0.2) !important;
    border-radius: 4px !important;
}

.shop-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--coral, #ff6e69) !important;
}

