html, body {
    height: 100%;
    margin: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #2E7D32;
    --secondary: #4CAF50;
    --accent: #FFC107;
    --light: #F1F8E9;
    --dark: #1B5E20;
    --text: #333333;
}

.navbar .nav-link:focus,
.navbar .nav-link:active,
.navbar .nav-link.active,
.navbar .dropdown-toggle.show {
    background-color: transparent !important;
    color: #198754 !important;
}

.dropdown-item:active {
    background-color: #e9f5ee !important;
    color: #198754 !important;
}

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

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;   /* expands to fill empty space */
}

.section-title {
    text-align: center;
    padding-top: 80px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--dark);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    width: 70px;
    height: 3px;
    background-color: var(--secondary);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
.bg-product {
    background-color: #e8f5e9;
}
.product-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}
.product-card:hover {
    transform: translateY(-10px);
}
.feature-card {
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.custom-green {
    color: var(--dark) !important;
}
.contact {
    padding: 80px 0;
    background-color: var(--light);
}
.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark);
}
.product-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark);
}
.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

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

.t-box {
background-color: #e8f5e9;
height: 400px;
border-radius: 10px;
}

.carousel-dark {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.seed-card {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.seed-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* Tall image for seed bag */
.seed-img {
    height: 300px;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.seed-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #198754;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 20px;
}

.reply-preview {
    border-left: 3px solid #28a745;
    padding-left: 10px;
    margin-left: 5px;
}
.replied-toggle {
    cursor: pointer;
}

.message-preview{
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

.reply-preview {
    border-left: 3px solid #28a745;
    padding-left: 12px;
    margin-left: 5px;
    margin-top: 8px;

    width: 100%;
    max-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.reply-preview.show {
    max-height: 200px;
    opacity: 1;
}

.reply-preview::-webkit-scrollbar, .message-preview::-webkit-scrollbar {
    width: 6px;
}

.reply-preview::-webkit-scrollbar-thumb, .message-preview::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 10px;
}

.reply-preview::-webkit-scrollbar-track, .message-preview::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.preserve-lines {
    white-space: pre-line;
}

.pagination .page-link {
    color: #28a745;
    border: 1px solid #28a745;
    margin: 0 4px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: #28a745;
    color: #fff;
}

.pagination .page-item.active .page-link {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
    box-shadow: 0 0 0 0.15rem rgba(40, 167, 69, 0.25);
}

.pagination .page-item.disabled .page-link {
    color: #9ccc9c;
    border-color: #9ccc9c;
    background-color: #f8f9fa;
}

.pagination {
    gap: 4px;
}

.form-control:focus,
.form-select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    outline: none;
}

.color-preview-box {
    width: 42px;
    height: 38px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    background: transparent;
    transition: background 0.2s ease, transform 0.15s ease;
}

.has-install-banner {
    padding-bottom: 70px; /* adjust to button height */
}

#installDiv {
    padding-bottom: env(safe-area-inset-bottom);
}

#navbar {
  transition: transform 0.3s ease-in-out;
}

.navbar-hidden {
  transform: translateY(-100%);
}

@media (max-width: 768px) {
  #navbar {
    transition: transform 0.3s ease-in-out;
  }
}

@keyframes loaderFadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#pageLoader.show-loader {
    animation: loaderFadeIn 0.3s ease-out forwards;
}

.form-check-input:checked {
    background-color: var(--dark) !important;
    border-color: var(--dark) !important;
}

#carouselTable .btn:hover i {
    transform: scale(1.1);
    transition: 0.2s ease;
}

.drag-handle {
    background: rgba(255,255,255,0.8);
    padding: 6px 8px;
    border-radius: 8px;
    transition: 0.2s ease;
}

.drag-handle:hover {
    color: #198754;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.5;
}

