/* Reset and soft baby colors */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --baby-pink: #f8e8e8;
    --baby-blue: #e8f4f8;
    --baby-yellow: #fff8e8;
    --soft-gray: #f5f5f5;
    --text-dark: #333;
    --accent-pink: #ffb3ba;
    --accent-blue: #b3d9ff;
    --white: #ffffff;
    --border-light: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--baby-pink), var(--baby-blue));
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header */
header {
    background: var(--white);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.social-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.social-link svg {
    width: 20px;
    height: 20px;
}

h1 {
    color: var(--text-dark);
    font-size: 1.8rem;
    font-weight: 600;
}

.cart-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.8rem 1rem;
    border-radius: 25px;
    background: var(--accent-pink);
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-toggle:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
}

/* Main Content */
main {
    padding: 2rem 1rem;
    min-height: calc(100vh - 80px);
}

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

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

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--soft-gray);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

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

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-pink);
    margin-bottom: 1rem;
}

.add-to-cart-btn {
    background: var(--accent-pink);
    color: var(--text-dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--baby-yellow);
}

.cart-header h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
}

.cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 400px);
    min-height: 150px;
    -webkit-overflow-scrolling: touch;
}

.empty-cart {
    text-align: center;
    color: #666;
    margin-top: 2rem;
    font-style: italic;
}

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

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.cart-item-price {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

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

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-light);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--accent-pink);
    border-color: var(--accent-pink);
}

.quantity {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.cart-item-total {
    font-weight: 600;
    color: var(--accent-pink);
    margin: 0;
}

.remove-item {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-item:hover {
    background: #ffebee;
    color: #f44336;
}

.cart-footer {
    border-top: 1px solid var(--border-light);
    padding: 1rem;
    margin-top: auto;
    background: var(--white);
    flex-shrink: 0;
}

.cart-notes {
    margin-bottom: 1rem;
}

.cart-notes label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.cart-notes textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.cart-notes textarea:focus {
    outline: none;
    border-color: var(--accent-pink);
}

.cart-total {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
    padding: 1rem;
    background: var(--soft-gray);
    border-radius: 8px;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-pink);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover:not(:disabled) {
    background: var(--accent-blue);
    transform: translateY(-2px);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--baby-blue);
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
}

/* Form Styles */
form {
    padding: 1.5rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-pink);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #f44336;
    background-color: #ffebee;
}

.field-error {
    color: #f44336;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Order Summary */
.order-summary {
    background: var(--soft-gray);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.order-item:last-child {
    border-bottom: none;
}

.item-name {
    flex: 1;
    font-weight: 500;
}

.item-quantity {
    color: #666;
    margin: 0 1rem;
}

.item-total {
    font-weight: 600;
    color: var(--accent-pink);
}

.order-total {
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem;
    background: var(--baby-yellow);
    border-radius: 8px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-pink);
    color: var(--text-dark);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-blue);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--soft-gray);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--border-light);
}

/* Close Button */
.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: var(--border-light);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.overlay.show {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        padding: 0.8rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .social-link svg {
        width: 18px;
        height: 18px;
    }
    
    .social-links {
        gap: 0.3rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cart-item-details {
        width: 100%;
    }
    
    .quantity-controls {
        justify-content: center;
        margin: 0.5rem 0;
    }
    
    .remove-item {
        align-self: flex-end;
        margin-top: -2rem;
    }
    
    .cart-items {
        max-height: calc(100vh - 450px);
        min-height: 120px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 1.2rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem 0.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 1.1rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }
}