/*
Theme Name: Sayurindo
Theme URI: https://sayurindo.id
Author: PT. Trisula Jayadi
Author URI: https://sayurindo.id
Description: Tema khusus untuk distributor sayur dan sembako
Version: 1.0
Text Domain: sayurindo
*/

/* =Global Styles
----------------------------------------------- */
:root {
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --secondary: #FFC107;
    --dark: #1B5E20;
    --light: #F1F8E9;
    --gray: #f5f5f5;
    --text: #333;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
    /* Add padding-top to body to prevent content from going under fixed header */
    padding-top: 90px; /* Adjust this value if your header height changes */
}

h1, h2, h3, h4, h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark);
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-wa {
    background: #25D366;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-wa:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 36px;
    display: inline-block;
    margin-bottom: 15px;
}

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

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.logo span {
    color: var(--dark);
    font-weight: 300;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin: 0 15px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary);
}

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

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark);
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), url('https://images.unsplash.com/photo-1542838132-92c53300491e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--dark);
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 40px;
    color: var(--text);
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* About Section */
.about {
    background-color: var(--light);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-content {
    flex: 1;
}

.about-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon i {
    font-size: 24px;
    color: var(--white);
}

.feature-text h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

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

/* Clients Section */
.clients {
    background: var(--gray);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.client-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: var(--transition);
}

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

.client-logo {
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo img {
    max-height: 100%;
    max-width: 100%;
}

.client-info h4 {
    margin-bottom: 10px;
    font-size: 18px;
}

.client-info p {
    font-style: italic;
    color: #666;
}

/* Products Section */
.products-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none; /* Ensure it looks like a button even if it's an <a> */
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: var(--white);
}

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

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column; /* Ensure content stacks vertically */
}

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

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

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

.product-info {
    padding: 20px;
    flex-grow: 1; /* Allow content to grow and push button to bottom */
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-category {
    display: inline-block;
    background: var(--light);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
}

.product-info p {
    margin-bottom: 15px;
    flex-grow: 1; /* Allow description to grow */
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
    align-items: center;
}

.pagination .nav-links {
    display: flex;
    gap: 10px;
    list-style: none; /* Remove default list styling */
    padding: 0;
    margin: 0;
}

.pagination .page-numbers {
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none; /* For page number links */
}

.pagination .page-numbers:hover {
    background: var(--primary-light);
}

.pagination .page-numbers.current {
    background: var(--dark);
    font-weight: bold;
}

/* Specific styling for previous/next links within pagination */
.pagination .prev.page-numbers,
.pagination .next.page-numbers {
    background: var(--primary);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: var(--transition);
    display: flex; /* Allow icon and text to be side-by-side */
    align-items: center;
    gap: 5px;
}

.pagination .prev.page-numbers:hover,
.pagination .next.page-numbers:hover {
    background: var(--primary-light);
}

.pagination .prev.page-numbers.current,
.pagination .next.page-numbers.current { /* Should not happen, but for consistency */
    background: var(--dark);
}

.pagination .page-numbers.dots {
    background: none;
    color: var(--dark);
    cursor: default;
}

.pagination .page-numbers.dots:hover {
    background: none;
}


/* Target Market */
.market {
    background: linear-gradient(rgba(43, 119, 48, 0.9), rgba(43, 119, 48, 0.9)), url('https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    color: var(--white);
}

.section-title.market-title h2 {
    color: var(--white);
}

.section-title.market-title h2::after {
    background: var(--white);
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.market-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.market-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

.market-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--secondary);
}

.market-card h3 {
    color: var(--white);
    margin-bottom: 15px;
}

/* Contact Section */
.contact {
    background-color: var(--light);
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--white);
    font-size: 20px;
}

.contact-text h4 {
    margin-bottom: 5px;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding-top: 70px;
}

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

.footer-col h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

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

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.wa-order-btn {
    display: block;
    background: #25D366;
    color: var(--white);
    text-align: center;
    padding: 15px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 20px;
    transition: var(--transition);
}

.wa-order-btn:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.copyright {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.7;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .section-title h2 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px; /* Adjust for smaller header on mobile */
    }
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        transition: var(--transition);
        overflow-y: auto; /* Enable scrolling for long menus */
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .hero {
        padding: 150px 0 80px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .hero-btns {
        flex-direction: column;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
}

/* Tambahkan ini ke style.css Anda */

/* Header Scrolled Effect */
header.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Fix Navigation Menu Structure */
.nav-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu ul li {
    margin: 0 15px;
    position: relative;
}

.nav-menu ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
    display: block;
    padding: 5px 0;
}

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

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

.nav-menu ul li a:hover::after,
.nav-menu ul li.current-menu-item a::after {
    width: 100%;
}

/* Mobile Menu Fixes */
@media (max-width: 768px) {
    .nav-menu ul {
        flex-direction: column;
        width: 100%;
        padding: 20px;
    }
    
    .nav-menu ul li {
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }
    
    .nav-menu ul li a {
        padding: 10px;
        width: 100%;
    }
    
    /* Fix mobile menu z-index */
    .nav-menu {
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    body.menu-open {
        overflow: hidden;
    }
}

/* Product Filter Active State Fix */
.products-filter {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
}

.products-filter::-webkit-scrollbar {
    display: none;
}

/* Ensure filter buttons stay in line on mobile */
@media (max-width: 576px) {
    .products-filter {
        padding: 10px 5px;
        margin: 0 -5px;
    }
    
    .filter-btn {
        font-size: 14px;
        padding: 8px 20px;
    }
}

/* Logo link styling */
.logo a {
    text-decoration: none;
    color: inherit;
}

.logo a:hover {
    opacity: 0.8;
}

/* Active menu item */
.nav-menu ul li a.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-menu ul li a.active::after {
    width: 100%;
}

/* Product grid improvements */
.products-archive {
    min-height: 80vh;
    padding-top: 100px;
}

.products-grid {
    margin-bottom: 50px;
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

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

.product-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-info p {
    flex-grow: 1;
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.product-info .btn-wa {
    margin-top: auto;
    width: 100%;
    justify-content: center;
}

/* No products found */
.no-products {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-products p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

/* Filter buttons scrollable on mobile */
@media (max-width: 768px) {
    .products-filter {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        margin-bottom: 30px;
    }
    
    .products-filter::-webkit-scrollbar {
        height: 4px;
    }
    
    .products-filter::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .products-filter::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 2px;
    }
}

/* Pagination improvement */
.pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header shadow when scrolled */
header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* Make sure navigation is visible */
.nav-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}