/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5a8d3b; /* Earthy green */
    --primary-hover: #4a7a2e;
    --secondary-color: #f8f5f0; /* Light neutral background */
    --text-color: #333;
    --light-text: #fff;
    --border-color: #e0e0e0;
    --footer-bg: #2c3e50;
    --card-bg: #fff;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-large {
    padding: 12px 30px;
    font-size: 18px;
    font-weight: 600;
}

/* Header styles */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px; /* Explicitly set header height for consistency */
}

.logo h1 {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0; /* Ensure no margin disrupts vertical alignment */
}

.logo img {
    height: 50px;
}

nav ul {
    display: flex;
    align-items: center;
    height: 100%;
}

nav ul li {
    margin-left: 25px;
    height: 100%;
    display: flex;
    align-items: center;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    height: 100%;
}

/* Header Search */
.header-search {
    margin-right: 20px;
}

.search-button {
    display: flex;
    align-items: center;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
}

.search-button:hover {
    background-color: var(--primary-hover);
}

.search-icon {
    font-size: 16px;
    margin-right: 5px;
}

.search-button span {
    font-weight: 500;
}

/* Hero section */
.hero {
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 120px 0;
    text-align: center;
    color: var(--light-text);
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

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

.hero h2 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--light-text);
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Categories section */
.categories {
    padding: 80px 0;
    background-color: var(--card-bg);
}

.categories h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
    color: var(--text-color);
    position: relative;
}

.categories h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.category-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    height: 100%;
}

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

.category-image {
    height: 180px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #f5f5f5;
    border-bottom: 1px solid var(--border-color);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.placeholder-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.category-icon {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
    font-style: normal;
    opacity: 0.8;
}

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

.category-info {
    padding: 20px;
    text-align: center;
}

.category-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Featured listings section */
.featured-listings {
    padding: 80px 0;
}

.featured-listings h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
    color: var(--text-color);
    position: relative;
}

.featured-listings h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

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

.product-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

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

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.product-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-info .btn {
    width: 100%;
}

/* Footer styles */
footer {
    background-color: var(--footer-bg);
    color: var(--light-text);
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--light-text);
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.footer-section p {
    margin-bottom: 15px;
    color: #ccc;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #ccc;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--light-text);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--light-text);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
}

/* Responsive styles */
@media (max-width: 992px) {
    header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 0;
    }
    
    .auth-buttons {
        margin-left: auto;
        height: auto;
    }
    
    nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    nav ul {
        justify-content: center;
        height: auto;
    }
    
    nav ul li {
        margin: 0 10px;
        height: auto;
    }
    
    nav ul li a {
        height: auto;
    }
    
    .header-search {
        margin-left: auto;
    }
    
    .user-account-nav {
        height: auto;
    }
    
    .user-account-nav ul {
        height: auto;
    }
    
    .user-account-nav li {
        height: auto;
    }
}

@media (max-width: 768px) {
    header .container {
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 10px 0;
    }
    
    .logo {
        margin-right: auto;
        order: 0;
    }
    
    /* Hide login/register buttons when not logged in at mobile sizes */
    .auth-buttons:not(.has-account-nav) {
        display: none;
    }
    
    .auth-buttons {
        order: 1;
        display: flex;
        align-items: center;
        margin-left: auto;
        height: auto;
    }
    
    /* Add this class to auth-buttons when user is logged in */
    .auth-buttons.has-account-nav {
        display: flex;
    }
    
    nav {
        order: 2;
        width: 100%;
        margin-top: 10px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
    }
    
    nav ul li {
        margin: 5px 10px;
        height: auto;
    }
    
    nav ul li a {
        height: auto;
    }
    
    .header-search input {
        width: 150px;
    }
    
    .header-search input:focus {
        width: 180px;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .categories, .featured-listings {
        padding: 50px 0;
    }
    
    .categories h2, .featured-listings h2 {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 28px;
    }
    
    .btn-large {
        padding: 10px 20px;
        font-size: 16px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-search {
        display: none;
    }
}

/* Wishlist Count */
.wishlist-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.btn-icon {
    position: relative;
}

/* Logout Button */
.logout-btn {
    color: #e74c3c !important;
}

.logout-btn:hover {
    background-color: #f8d7da !important;
}

/* Auth Page Styles */
.auth-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.tab.active {
    color: #5a8d3b;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #5a8d3b;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #5a8d3b;
    outline: none;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check input {
    margin-right: 10px;
}

.form-check label {
    font-size: 14px;
    color: #666;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-footer p {
    margin-bottom: 10px;
    color: #666;
}

.auth-links {
    margin-top: 15px;
}

.auth-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

/* User Account Navigation */
.user-account-nav {
    margin-right: 15px;
    display: flex;
    align-items: center;
    height: 100%;
}

.user-account-nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
}

.user-account-nav li {
    margin-left: 20px;
    list-style: none;
    display: flex;
    align-items: center;
    height: 100%;
}

.user-account-nav .account-link {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
}

.user-account-nav .account-link i {
    margin-right: 5px;
    font-size: 14px;
}

.user-account-nav .account-link:hover {
    color: var(--primary-color);
}

.user-account-nav .account-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.user-account-nav .account-link:hover::after {
    width: 100%;
}

/* Logout Button - Match login button styling */
.logout-btn {
    background-color: transparent !important;
    border: 2px solid var(--text-color) !important;
    color: var(--text-color) !important;
    padding: 8px 15px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 5px !important;
    display: flex !important;
    align-items: center !important;
    transition: var(--transition) !important;
}

.logout-btn:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.logout-btn i {
    margin-right: 5px;
    font-size: 14px;
}

/* Media queries for responsive user account nav */
@media (max-width: 992px) {
    .user-account-nav {
        order: 2;
        margin-right: 10px;
    }
}

@media (max-width: 768px) {
    .user-account-nav {
        order: 1;
        margin-left: auto;
    }
    
    .user-account-nav ul {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .user-account-nav li {
        margin-left: 15px;
        margin-bottom: 5px;
    }
    
    .user-account-nav .account-link {
        font-size: 0;
    }
    
    .user-account-nav .account-link i {
        font-size: 16px;
        margin-right: 0;
    }
    
    .logout-btn {
        font-size: 0;
        padding: 8px;
    }
    
    .logout-btn i {
        font-size: 16px;
        margin-right: 0;
    }
} 