/* Existing Styles Content + New Cart Styles */

:root {
    /* Kawaii Palette */
    --primary-pink: #FFB7C5;
    --soft-pink: #FFC3D1;
    --hot-pink: #FF69B4;
    --pastel-purple: #E0BBE4;
    --deep-purple: #957DAD;
    --mint-green: #B2F7EF;
    --soft-yellow: #FFFFD1;
    --text-dark: #4A4A4A;
    --text-light: #7D7D7D;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.85);

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 15px rgba(255, 105, 180, 0.2);
    --radius-lg: 24px;
    --radius-full: 50px;
}

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

body {
    font-family: 'Quicksand', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    outline: none;
}

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

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--hot-pink);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(255, 105, 180, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--hot-pink);
    border: 2px solid var(--hot-pink);
}

.btn-secondary:hover {
    background: var(--hot-pink);
    color: var(--white);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* --- Navigation --- */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hot-pink);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 700;
    color: var(--text-dark);
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--hot-pink);
}

.cart-icon {
    font-size: 1.2rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-icon:hover {
    transform: scale(1.1);
    color: var(--hot-pink);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #ffeef1 0%, #ecd4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 183, 197, 0.2), rgba(255, 255, 255, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 20px;
    border: 2px solid var(--white);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: -webkit-linear-gradient(45deg, var(--hot-pink), var(--deep-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* --- Features Bar --- */
.features-bar {
    background: var(--pastel-purple);
    padding: 1.5rem 0;
    color: var(--white);
    font-weight: 700;
}

.features-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

/* --- Products Section & Shop Grid --- */
.products {
    padding: 5rem 0;
    background: #fff;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 2px solid #eee;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    color: var(--text-light);
    transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--mint-green);
    border-color: var(--mint-green);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-pink);
    box-shadow: var(--shadow-md);
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
}

.badge.out-of-stock {
    background: #eee;
    color: #999;
}

.badge.new {
    background: var(--soft-yellow);
    color: var(--text-dark);
}

.product-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: #f9f9f9;
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.price {
    color: var(--hot-pink);
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 1rem;
}

/* --- Testimonials --- */
.testimonials {
    background: linear-gradient(180deg, var(--white) 0%, var(--soft-pink) 100%);
    padding: 5rem 0;
    text-align: center;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-text {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial-author {
    color: var(--hot-pink);
    font-weight: 700;
}

/* --- CTA Section --- */
.cta {
    padding: 6rem 0;
    text-align: center;
    background-color: var(--soft-pink);
}

.cta-content {
    background: var(--white);
    display: inline-block;
    padding: 3rem 4rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--hot-pink);
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-content {
        padding: 2rem;
        width: 90%;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        text-align: center;
        display: none;
        /* Hidden by default on mobile for now */
    }

    /* --- Product Detail --- */
    .product-detail-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
    }

    .gallery {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .main-image {
        width: 100%;
        border-radius: var(--radius-lg);
        border: 1px solid #eee;
        background: #f9f9f9;
        aspect-ratio: 1;
        object-fit: contain;
    }

    .thumbnails {
        display: flex;
        gap: 1rem;
    }

    .thumb {
        width: 80px;
        height: 80px;
        border-radius: 12px;
        border: 2px solid transparent;
        cursor: pointer;
        object-fit: cover;
    }

    .thumb.active {
        border-color: var(--hot-pink);
    }

    .product-info-detail {
        text-align: left;
    }

    /* --- Forms --- */
    .form-input {
        width: 100%;
        padding: 15px;
        border: 2px solid #eee;
        border-radius: 12px;
        font-family: inherit;
        font-size: 1rem;
        transition: border-color 0.2s;
    }

    .form-input:focus {
        border-color: var(--hot-pink);
        outline: none;
    }
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes wiggle {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    50% { transform: rotate(-3deg); }
    75% { transform: rotate(1deg); }
    100% { transform: rotate(0deg); }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* Global Text Animations on Load */
h1,
h2.section-title {
    animation: fadeInUp 1s ease-out;
}

/* Hero Content */
.hero-content p {
    animation: fadeInUp 1.2s ease-out;
}

/* Buttons */
.btn:hover {
    animation: heartbeat 1.5s infinite;
}

/* Icons Wiggle on Hover */
.feature-item:hover span {
    display: inline-block;
    animation: wiggle 0.5s ease-in-out;
}

/* Navigation Links Hover */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--hot-pink);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Product Cards subtle entrance */
.product-card {
    animation: fadeInUp 0.8s ease-out both;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

/* Logo Float */
.nav-logo span {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

/* =========================================
   NEW CART STYLES & TOAST
   ========================================= */

/* Toast Container */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 5px solid var(--hot-pink);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
}

.toast-content h4 {
    color: var(--hot-pink);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.toast-content p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Cart Page Styles */
.cart-container {
    padding: 2rem 0;
    min-height: 60vh;
}

.cart-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cart-item {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
    border: 1px solid #f9f9f9;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cart-item-image img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0f0f0;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.item-price {
    color: var(--hot-pink);
    font-weight: bold;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 2px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    font-weight: bold;
    color: var(--text-dark);
}

.qty-btn:hover {
    color: var(--hot-pink);
}

.quantity-controls span {
    padding: 0 10px;
    font-weight: bold;
}

.remove-btn {
    background: #ffe5e5;
    color: #ff4d4d;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #ff4d4d;
    color: white;
}

.cart-item-total {
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 80px;
    text-align: right;
}

.cart-summary {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.summary-row.total {
    border-top: 2px solid #f0f0f0;
    padding-top: 1rem;
    margin-top: 1rem;
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--hot-pink);
}

.empty-cart {
    text-align: center;
    padding: 4rem 1rem;
    opacity: 0.7;
}

/* Responsive Cart */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }
    
    .cart-item-total {
        text-align: left;
        margin-top: 0.5rem;
    }

    .cart-item-image {
        width: 100%;
        text-align: center;
    }
    
    .cart-item-image img {
        width: 100%;
        height: auto;
        max-width: 150px;
    }
}