* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #27ae60;
    --secondary-color: #229954;
    --light-bg: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e0e0e0;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: #fff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================ NAVBAR ================ */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo i {
    font-size: 2rem;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background-color: rgba(39, 174, 96, 0.1);
}

.login-btn,
.signup-btn {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.login-btn:hover,
.signup-btn:hover {
    background-color: var(--secondary-color);
}

.logout-btn {
    background-color: #e74c3c;
    color: white !important;
    padding: 0.5rem 1.5rem !important;
}

.logout-btn:hover {
    background-color: #c0392b;
}

.cart-icon {
    position: relative;
}

.cart-icon.active {
    background-color: var(--primary-color);
    color: white !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ================ HERO SECTION ================ */
.hero {
    background: linear-gradient(rgba(39, 174, 96, 0.25), rgba(34, 153, 84, 0.25)), url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=1200&h=600&fit=crop') center/cover;
    background-attachment: fixed;
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaves-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.leaf {
    position: absolute;
    bottom: -50px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.3);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 50% 85%, 18% 100%, 0% 38%);
    animation: fall 8s linear infinite;
    --delay: 0s;
}

@keyframes fall {
    0% {
        bottom: 100%;
        opacity: 1;
        transform: translateX(0) rotateZ(0deg);
    }
    90% {
        opacity: 1;
    }
    100% {
        bottom: -50px;
        opacity: 0;
        transform: translateX(100px) rotateZ(360deg);
    }
}

.leaf {
    animation-delay: var(--delay);
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ================ FEATURED PRODUCTS ================ */
.featured-products {
    padding: 80px 20px;
    background-color: var(--light-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background-color: var(--light-bg);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.stock {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.stock.in-stock {
    background-color: #27ae60;
    color: white;
}

.stock.out-stock {
    background-color: #e74c3c;
    color: white;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-info .description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.btn-add-cart {
    flex: 1;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-cart:hover:not(.disabled) {
    background-color: var(--secondary-color);
}

.btn-add-cart.disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* ================ WHY CHOOSE US ================ */
.why-choose-us {
    padding: 80px 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
}

/* ================ AUTH PAGES ================ */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.form-group input:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ================ ALERT MESSAGES ================ */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background-color: #fadbd8;
    color: #c0392b;
    border-left: 4px solid #c0392b;
}

.alert-success {
    background-color: #d5f4e6;
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

/* ================ PRODUCTS PAGE ================ */
.products-section {
    padding: 60px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box,
.category-filter {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-box:focus,
.category-filter:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* ================ CART PAGE ================ */
.cart-section {
    padding: 60px 20px;
    min-height: 70vh;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.cart-items {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table thead {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
}

.cart-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.product-image-cell {
    text-align: center;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quantity-input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

.btn-remove {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-remove:hover {
    background-color: #c0392b;
}

.cart-summary {
    position: sticky;
    top: 100px;
}

.summary-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-top: 1rem;
}

.total-amount {
    color: var(--primary-color);
}

.summary-card hr {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.btn-checkout {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.btn-checkout:hover {
    background-color: var(--secondary-color);
}

.btn-continue-shopping {
    display: block;
    width: 100%;
    text-align: center;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.75rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    margin-top: 0.75rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-continue-shopping:hover {
    background-color: var(--primary-color);
    color: white;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.empty-cart i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-cart h2 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-cart p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.btn-shop {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-shop:hover {
    background-color: var(--secondary-color);
}

/* ================ DASHBOARD ================ */
.dashboard-section {
    padding: 60px 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.dashboard-sidebar {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.user-profile {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #27ae60, #229954);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1rem;
}

.user-profile h3 {
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.user-profile p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-item:hover,
.menu-item.active {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--primary-color);
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    margin: 0;
    color: var(--text-dark);
}

.card-body {
    padding: 1.5rem;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    background-color: var(--light-bg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: bold;
    color: var(--text-dark);
    margin: 0;
}

.order-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    color: white;
}

.status-pending {
    background-color: var(--warning-color);
}

.status-completed {
    background-color: var(--success-color);
}

.status-cancelled {
    background-color: var(--error-color);
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.amount {
    font-weight: bold;
    color: var(--primary-color);
}

.no-orders {
    text-align: center;
    padding: 3rem 2rem;
}

.no-orders i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-orders p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ================ CONTACT PAGE ================ */
.contact-section {
    padding: 60px 20px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--text-light);
}

.contact-form-wrapper {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ================ FOOTER ================ */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 20px 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* ================ RESPONSIVE ================ */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .cart-container {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .cart-table {
        font-size: 0.9rem;
    }

    .cart-table th,
    .cart-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 1rem;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .logo span {
        display: none;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .filters {
        flex-direction: column;
    }

    .search-box,
    .category-filter {
        width: 100%;
    }

    .product-footer {
        flex-direction: column;
    }

    .btn-add-cart {
        width: 100%;
    }
}
