/* Little Aanya - Kids Theme CSS */
html, body {
    font-family: 'Nunito', 'Baloo 2', sans-serif;
    background-color: #fdf6ff;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5 {
    font-family: 'Baloo 2', cursive;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: #fff0f5;
    border-top: 3px solid #e91e8c;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: 'Nunito', sans-serif;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #e91e8c;
    padding: 1rem 1rem 1rem 1.5rem;
    color: white;
    border-radius: 12px;
    margin: 1rem;
    font-family: 'Nunito', sans-serif;
}

    .blazor-error-boundary::after {
        content: "Oops! Something went wrong 😢"
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #f3e5f5;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #e91e8c;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    font-family: 'Baloo 2', cursive;
    color: #7c4dff;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #e91e8c 0%, #7c4dff 50%, #00bcd4 100%);
    border-radius: 0 0 2rem 2rem;
    padding: 3rem 2rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* ── Home Page Sections ── */
.home-section {
    padding: 48px 0;
}

.home-section-alt {
    background: #fafafa;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-cta {
    text-align: center;
    margin-top: 32px;
}

/* Age Category Cards */
.age-card-item {
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.age-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.06);
}

.age-card-emoji {
    font-size: 2.5rem;
    margin-bottom: 8px;
    line-height: 1;
}

/* Delivery Banner */
.delivery-banner {
    text-align: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, #f5f0ff 0%, #edf7ff 100%);
    border-radius: 16px;
    border: 1px solid #e8e0f7;
}

@media (max-width: 768px) {
    .home-section {
        padding: 32px 0;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .age-card-emoji {
        font-size: 2rem;
    }

    .age-card-item {
        padding: 16px 12px;
    }

    .delivery-banner {
        padding: 28px 16px;
    }
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 7;
    background: #111;
    margin-top: -24px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

.hero-slide-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
    color: #fff;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.08);
}

.hero-arrow-left {
    left: 20px;
}

.hero-arrow-right {
    right: 20px;
}

.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    padding: 0;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.hero-dot-active {
    background: #fff;
    border-color: #fff;
    transform: scale(1.25);
}

@media (max-width: 768px) {
    .hero-slider {
        aspect-ratio: 3 / 4;
        margin-top: -16px;
    }

    .hero-arrow {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .hero-arrow-left {
        left: 10px;
    }

    .hero-arrow-right {
        right: 10px;
    }

    .hero-dots {
        bottom: 14px;
        gap: 8px;
    }

    .hero-dot {
        width: 8px;
        height: 8px;
    }
}

/* Product Cards */
.product-card {
    border-radius: 12px !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    height: 100%;
    background: #fff;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

.product-card-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f8f8f8;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.08);
}

.product-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
}

.product-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.product-card-badge .mud-chip {
    border-radius: 6px !important;
    padding: 0 8px;
    height: 22px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.product-card-wishlist {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-card-wishlist {
    opacity: 1;
}

.product-card-wishlist .mud-icon-button {
    border-radius: 50% !important;
    width: 34px;
    height: 34px;
}

.product-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.product-card-overlay span {
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 6px;
}

.product-card-title {
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.product-card-price {
    font-family: 'Baloo 2', cursive;
    color: #e91e8c;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ── Skeleton / Shimmer Loading ── */
@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #ececec 25%, #f5f5f5 50%, #ececec 75%);
    background-size: 1200px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 8px;
}

.skeleton-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0;
}

.skeleton-body {
    padding: 12px;
}

.skeleton-line {
    height: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
}

.skeleton-line-sm  { width: 40%; }
.skeleton-line-md  { width: 70%; }
.skeleton-line-lg  { width: 90%; }
.skeleton-line-price { height: 18px; width: 50%; margin-top: 10px; }

.skeleton-chip {
    display: inline-block;
    height: 32px;
    width: 100px;
    border-radius: 20px;
    margin: 4px;
}

/* Age Group Cards */
.age-card {
    border-radius: 20px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    padding: 1.5rem;
}

.age-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(124, 77, 255, 0.2) !important;
}

/* Buttons */
.kids-btn {
    border-radius: 24px !important;
    text-transform: none !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}

/* ── Product Detail Page ── */
.pdp-gallery {
    position: sticky;
    top: 80px;
}

.pdp-main-image {
    position: relative;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.pdp-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 16px;
}

.pdp-main-image:hover .pdp-main-img {
    transform: scale(1.03);
}

.pdp-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pdp-main-image:hover .pdp-zoom-hint {
    opacity: 1;
}

.pdp-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    min-height: 400px;
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
}

.pdp-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.pdp-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
    background: transparent;
}

.pdp-thumb:hover {
    border-color: #ddd;
    transform: scale(1.05);
}

.pdp-thumb-active {
    border-color: #e91e8c !important;
    box-shadow: 0 0 0 2px rgba(233, 30, 140, 0.2);
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    background: transparent;
}

.pdp-price {
    font-family: 'Baloo 2', cursive;
    font-size: 1.8rem;
    font-weight: 800;
    color: #e91e8c;
    line-height: 1.2;
}

.pdp-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pdp-size-chip {
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    color: #555;
    user-select: none;
}

.pdp-size-chip:hover {
    border-color: #e91e8c;
    color: #e91e8c;
}

.pdp-size-selected {
    border-color: #e91e8c !important;
    background: #fce4ec;
    color: #e91e8c !important;
}

.pdp-qty {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2px 4px;
    gap: 4px;
}

/* Zoom overlay */
.pdp-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}

.pdp-zoom-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

/* PDP Image Arrows */
.pdp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.2s;
    color: #333;
}

.pdp-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.pdp-arrow-left {
    left: 10px;
}

.pdp-arrow-right {
    right: 10px;
}

.pdp-image-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
    letter-spacing: 1px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 960px) {
    .pdp-gallery {
        position: static;
    }
    .pdp-price {
        font-size: 1.5rem;
    }
}

/* Cart Badge */
.cart-badge .mud-badge-content {
    background-color: #00bcd4;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}

/* Section Headers */
.section-header {
    font-family: 'Baloo 2', cursive;
    color: #7c4dff;
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, #e91e8c, #7c4dff);
    border-radius: 2px;
}

/* Playful Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
}

.float-anim {
    animation: float 3s ease-in-out infinite;
}

.wiggle-anim:hover {
    animation: wiggle 0.5s ease-in-out;
}

/* Price Styling */
.price-tag {
    font-family: 'Baloo 2', cursive;
    color: #e91e8c;
    font-size: 1.3rem;
    font-weight: 700;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

/* Rating Stars */
.rating-stars {
    color: #ffc107;
}

/* Chip Styles */
.stock-chip {
    border-radius: 12px !important;
    font-weight: 600;
}

/* Stepper */
.checkout-stepper .mud-stepper {
    font-family: 'Nunito', sans-serif;
}

/* Responsive */
@media (max-width: 600px) {
    .hero-section h1 {
        font-size: 1.6rem;
    }
    .hero-section {
        padding: 2rem 1rem;
    }
}

code {
    color: #e91e8c;
}

/* Paper & Card polish */
.mud-paper { border-radius: 12px !important; }
.mud-card { border-radius: 16px !important; }

/* Dialog styling */
.mud-dialog { border-radius: 16px !important; }

/* Button polish */
.mud-button-root { transition: all 0.2s ease; }
.mud-icon-button { transition: all 0.15s ease; }
.mud-icon-button:hover { transform: scale(1.08); }

/* Focus ring for inputs */
.mud-input-outlined .mud-input-outlined-border { transition: border-color 0.2s ease; }

/* Navigation drawer hover */
.mud-nav-item .mud-nav-link:hover { background-color: rgba(233, 30, 140, 0.06); border-radius: 8px; }

/* Table styling */
.mud-table-root { border-radius: 12px !important; }
.mud-table-root .mud-table-head .mud-table-cell {
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
}

/* Order card hover */
.mud-card[style*="cursor: pointer"]:hover {
    box-shadow: 0 6px 16px rgba(124, 77, 255, 0.12) !important;
    transform: translateY(-2px);
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e0c4ec; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #d4a4e0; }
