* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-color: #A7D8DE; /* Pastel Blue/Mint */
    --secondary-color: #FFCCB6; /* Pastel Peach */
    --accent-color: #F3B0C3; /* Pastel Pink */
    --text-color: #5D5D5D;
    --bg-color: #FFF9F4; /* Very Light Cream */
    --white: #ffffff;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    --border-radius: 15px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navbar */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

/* Search Bar */
.search-container {
    flex: 0 1 400px;
    display: flex;
    background: #f0f2f5;
    border-radius: 25px;
    padding: 5px 15px;
    margin: 0 20px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.search-container:focus-within {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.2);
}

.search-container input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    font-size: 0.9rem;
    outline: none;
}

.search-container button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0 5px;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Login Button */
.login-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.login-btn i {
    color: #4285F4; /* Google Blue */
}

.login-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* User Profile UI (After Login) */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background 0.3s;
}

.user-profile:hover {
    background: #f0f2f5;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.logout-link {
    font-size: 0.7rem;
    color: #ff4757;
    text-decoration: none;
    font-weight: 400;
}

.logout-link:hover {
    text-decoration: underline;
}

/* Profile Modal Content */
.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-large-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 4px solid var(--primary-color);
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.profile-email {
    color: #666;
    font-size: 0.9rem;
}

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

.profile-section h4 {
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 10px;
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.3rem;
}

.info-value {
    font-weight: 600;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.history-date {
    font-size: 0.85rem;
    color: #666;
}

.history-total {
    font-weight: 600;
    color: var(--primary-color);
}

/* Account Picker Styles */
.account-list {
    border: 1px solid #dadce0;
    border-radius: 8px;
    overflow: hidden;
}

.account-item {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #dadce0;
    transition: background 0.2s;
}

.account-item:hover {
    background: #f7f8f8;
}

.account-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
}

.account-info {
    display: flex;
    flex-direction: column;
}

.account-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #3c4043;
}

.account-email {
    font-size: 0.8rem;
    color: #5f6368;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 10%;
    background: linear-gradient(135deg, #E0F2F1, #FFEDD5);
    color: var(--text-color);
    border-radius: 0 0 50px 50px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #4A4A4A;
}

.hero p {
    font-size: 1.1rem;
    color: #777;
}

/* Product Section */
.products {
    padding: 2rem 5%;
}

.products h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: #4A4A4A;
    position: relative;
}

.products h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    margin: 10px auto;
    border-radius: 2px;
}

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

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.02);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: #fcfcfc;
}

.product-info {
    padding: 1.8rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #444;
}

.product-price {
    color: #88B04B; /* Soft Green */
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-description {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary-color);
    color: #444;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: #95c8ce;
    transform: scale(1.02);
}

.add-to-cart-btn i {
    font-size: 1rem;
}

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

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

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

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

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

.cart-item-info h4 {
    font-size: 0.9rem;
}

.cart-item-info p {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

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

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.checkout-btn:hover {
    background: #e67e22;
}

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

.overlay.active {
    display: block;
}

/* Modal */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 800px;
    background: var(--white);
    border-radius: 15px;
    z-index: 200;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    position: relative;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f0f0f0;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.close-modal:hover {
    background: #e0e0e0;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.modal-image {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.modal-info h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.modal-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.modal-desc-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-description {
    color: #666;
    margin-bottom: 2rem;
}

.modal-specs-list {
    list-style: none;
    margin-bottom: 2rem;
}

.modal-specs-list li {
    margin-bottom: 0.5rem;
    color: #555;
    display: flex;
    align-items: center;
}

.modal-specs-list li i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 0.8rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1.5rem;
    }
}
