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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

header {
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.2rem;  /* adjust text size */
    font-weight: bold;
    display: flex;
    align-items: center;   /* vertically center image and text */
    border-radius: 10px;
    color: #fff; 
}


.logo img {
     width: 100px;       /* same size as your emoji */
     height: auto;
    margin-right: 0.5rem;
    border-radius: 24px;   /* Making the imoje round */
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links button {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-links button:hover,
.nav-links button.active {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* 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.7);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease-out;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    position: relative;
    animation: modalSlideIn 0.4s ease-out;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: #2c5530;
    transform: scale(1.1);
}

.auth-container {
    padding: 2rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e1e8ed;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: #2c5530;
    border-bottom-color: #4a7c59;
}

.auth-tab:hover {
    color: #2c5530;
    background-color: rgba(74, 124, 89, 0.1);
}

.auth-form {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.auth-form.active {
    display: block;
}

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

.auth-form h2 {
    text-align: center;
    color: #2c5530;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.auth-form input:focus {
    outline: none;
    border-color: #4a7c59;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
    transform: scale(1.02);
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 124, 89, 0.4);
}

/* Sell Button Animation */
.nav-links button[onclick*="sell"] {
    position: relative;
    overflow: hidden;
}

.nav-links button[onclick*="sell"]:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: width 0.6s, height 0.6s;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.nav-links button[onclick*="sell"]:hover:before {
    width: 300px;
    height: 300px;
}

.nav-links button[onclick*="sell"] span {
    position: relative;
    z-index: 1;
}

/* User Status */
.user-status {
    display: none;
    align-items: center;
    gap: 1rem;
    color: white;
    font-size: 0.9rem;
}

.user-status.logged-in {
    display: flex;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.logout-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

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

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

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.page.active {
    display: block;
}

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

.welcome-section {
    text-align: center;
    background: linear-gradient(135deg, #ffffff, #f1f8e9);
    padding: 3rem 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.welcome-section h1 {
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.form-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c5530;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a7c59;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.form-group select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

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

.submit-btn {
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 124, 89, 0.4);
}

.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
    flex: 1;
}

.filter-group label {
    font-weight: 600;
    color: #2c5530;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.9rem;
}

.filter-group select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

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

.listing-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

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

.listing-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #ccc;
}

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

.listing-content {
    padding: 1.5rem;
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.listing-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c5530;
}

.livestock-type {
    background: linear-gradient(135deg, #4a7c59, #2c5530);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.listing-details {
    margin-bottom: 1rem;
}

.listing-details p {
    margin-bottom: 0.5rem;
    color: #666;
}

.age-badge {
    display: inline-block;
    background: #e8f5e8;
    color: #2c5530;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #8B4513;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.9rem;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #777;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.listing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e1e8ed;
}

.root-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.root-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
}

.root-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2c5530;
}

.no-listings {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

@media (max-width: 968px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links button {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    main {
        padding: 1rem;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }

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

    .nav-right {
        flex-direction: column;
        gap: 1rem;
    }

    .form-container {
        padding: 1rem;
    }

    .filters {
        padding: 1rem;
    }
}

/* Slideshow container */
.slideshow-container {
  position: relative;
  max-width: 100%;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Slides */
.slide {
  display: none;
}

.slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 10px;
}

/* Fading effect */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: 0.4} 
  to {opacity: 1}
}

/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: 0.3s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background: rgba(0,0,0,0.4);
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background: rgba(0,0,0,0.8);
}

/* Dots */
.dots-container {
  margin-top: 10px;
}

.dot {
  cursor: pointer;
  height: 12px;
  width: 12px;
  margin: 0 4px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background 0.6s ease;
}

.active-dot {
  background-color: #2c5530;
}

/* Overlay text on slides */
.slide .overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.slide .overlay h2 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.slide .overlay p {
  font-size: 2rem;
  font-family: 'Brush Script MT', cursive;
  margin-bottom: 1rem;
}

.hero-btn {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid white;
  border-radius: 4px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.hero-btn:hover {
  background: #2c5530;
  border-color: #2c5530;
}


