:root {
    --primary-pink: #ff69b4;
    --soft-pink: #ffc0cb;
    --deep-pink: #ff1493;
    --light-pink: #ffe4e9;
    --blush: #fff0f3;
    --chocolate: #7b3f00;
    --cream: #fffbf7;
    --white: #ffffff;
    --text-dark: #2d2d2d;
    --text-light: #666666;
    --shadow-sm: 0 2px 4px rgba(255, 105, 180, 0.1);
    --shadow-md: 0 4px 12px rgba(255, 105, 180, 0.15);
    --shadow-lg: 0 8px 24px rgba(255, 105, 180, 0.2);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--cream);
}

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

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--white) 0%, var(--blush) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.site-header h1 {
    font-size: 2rem;
    color: var(--primary-pink);
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.2);
}

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

.site-header nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.site-header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-pink);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.site-header nav a:hover {
    color: var(--primary-pink);
}

.site-header nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--soft-pink) 0%, var(--primary-pink) 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--light-pink);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 105, 180, 0.3);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

/* Product Grid */
.products-section {
    padding: 4rem 0;
}

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

.section-title::after {
    content: '🍪';
    display: block;
    font-size: 2rem;
    margin-top: 0.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
}

.product-card * {
    color: var(--text-dark) !important;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-content {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-name a {
    color: var(--text-dark);
    text-decoration: none;
}

.product-name a:hover {
    color: var(--primary-pink);
}

.product-price {
    font-size: 1.5rem;
    color: var(--primary-pink) !important;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.add-to-cart {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--soft-pink) 0%, var(--primary-pink) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--deep-pink) 100%);
    transform: scale(1.02);
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, var(--chocolate) 0%, #5d2f00 100%);
    color: var(--white);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: var(--soft-pink);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-header nav {
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* Cart Icon */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--deep-pink);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 105, 180, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-pink);
    animation: spin 1s ease-in-out infinite;
}

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

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: var(--light-pink);
    color: var(--deep-pink);
    border: 1px solid var(--soft-pink);
}

.alert-error {
    background: #ffe4e4;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

/* Animations */
.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.product-card {
    opacity: 0;
    transform: translateY(20px);
}

.product-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.bounce {
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Success/Error states for buttons */
.add-to-cart.success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.add-to-cart.error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

/* Mobile menu */
@media (max-width: 768px) {
    .site-header nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .site-header nav.mobile-active {
        transform: translateY(0);
    }
    
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

/* Smooth transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

/* Products Page */
.products-header {
    background: linear-gradient(135deg, var(--light-pink) 0%, var(--soft-pink) 100%);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.products-header h1 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.filters-bar {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray);
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-pink);
}

.search-group {
    display: flex;
    flex: 1;
    min-width: 250px;
}

.search-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray);
    border-radius: 10px 0 0 10px;
    font-size: 1rem;
}

.search-group button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-pink);
    color: var(--white);
    border: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    font-size: 1.2rem;
}

.search-group button:hover {
    background: var(--deep-pink);
}

.results-info {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
}

.product-category {
    display: inline-block;
    background: var(--light-pink);
    color: var(--deep-pink);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.product-link {
    text-decoration: none;
    color: inherit;
}

.allergen-info {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #fff9c4;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #f57c00;
}

.no-products {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.page-link {
    padding: 0.75rem 1.5rem;
    background: var(--primary-pink);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
}

.page-link:hover {
    background: var(--deep-pink);
    transform: translateY(-2px);
}

.page-info {
    color: var(--text-light);
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block;
}

.modal-content {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 450px;
    max-width: 90%;
    background: var(--white);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 2001;
}

.modal.show .modal-content {
    transform: translateX(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray);
    background: linear-gradient(135deg, var(--light-pink) 0%, var(--soft-pink) 100%);
}

.modal-header h2 {
    color: var(--primary-pink);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--gray-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Cart Styles */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
    align-items: center;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

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

.cart-item-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary-pink);
    font-weight: 500;
}

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--gray);
    background: var(--white);
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: var(--gray-light);
}

.cart-remove {
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
}

.cart-remove:hover {
    color: var(--error);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--gray-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.cart-total span:last-child {
    color: var(--primary-pink);
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--deep-pink) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-cart p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* Cart modal responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        max-width: 100%;
    }
}

/* Fix for navigation active state */
nav a.active {
    color: var(--primary-pink);
    font-weight: 600;
}

nav a.active::after {
    width: 100%;
}