:root {
    --primary-color: #2e7d32;
    /* Vibrant Agriculture Green */
    --primary-light: #4caf50;
    --secondary-color: #263238;
    /* Sophisticated Industrial Steel */
    --accent-color: #ffb300;
    /* Golden Harvest */
    --text-dark: #121212;
    --text-muted: #607d8b;
    --text-light: #ffffff;
    --bg-light: #f8fbf9;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(46, 125, 50, 0.15);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --radius: 16px;
}

.stock-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.low-stock {
    background: #fff3e0;
    color: #ef6c00;
}

.out-of-stock {
    background: #ffebee;
    color: #c62828;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 16px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo img {
    height: 80px;
    width: auto;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .logo img {
        height: 60px;
    }
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1001;
        gap: 3rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-actions {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 800;
    line-height: 1;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-dark);
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 90vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(46, 125, 50, 0.4) 100%), url('../img/yd_kismet_torna_hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 100px 5% 0;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-light);
    transform: skewY(-2deg);
}

.hero-content h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    max-width: 1000px;
    margin-bottom: 2rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    max-width: 800px;
    margin: 0 auto 3rem;
    opacity: 0.9;
    font-weight: 400;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 1.2rem 3rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-5px);
}

/* Features Section */
.features {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: -5rem;
}

.feature-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

/* Header Actions & Search */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-dark);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.icon-btn:hover {
    background: rgba(46, 125, 50, 0.1);
    color: var(--primary-color);
}

.cart-btn .cart-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50px;
    font-weight: 800;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-container {
    width: 90%;
    max-width: 800px;
    text-align: center;
}

.search-input {
    width: 100%;
    border: none;
    border-bottom: 3px solid var(--primary-color);
    background: transparent;
    padding: 1.5rem 0;
    font-size: 2.5rem;
    color: var(--text-dark);
    font-weight: 700;
    outline: none;
}

.close-search {
    position: absolute;
    top: 2rem;
    right: 5%;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Product Card Fixes */
.product-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    height: 2.8rem;
    /* Multi-line support */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Form Styles */
.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: #f8fafc;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

/* Footer Fixes */
.footer-logo img {
    filter: brightness(0) invert(1);
    max-width: 180px;
    height: 80px;
    width: auto;
    display: block;
}

.footer-logo {
    background: transparent !important;
    margin-bottom: 2rem;
}

/* Filters & Search */
.shop-container {
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

.filters {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    height: fit-content;
    box-shadow: var(--shadow);
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-light);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.search-bar {
    margin-bottom: 2rem;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 71, 161, 0.1);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.product-image {
    height: 280px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Using contain for parts to avoid cropping, with a light bg */
    padding: 1rem;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
}

.product-cat {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.5rem 0;
    height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    /* Added for compatibility */
    overflow: hidden;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-light);
    border: none;
    border-radius: 10px;
    margin-top: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Footer Enhancement */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 6rem 5% 2rem;
    margin-top: 0;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--secondary-color);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.footer-col h3 {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
}

.footer-col p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Page Headers */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/agriculture_bg.png');
    background-size: cover;
    background-position: center;
    padding: 6rem 5%;
    text-align: center;
    color: white;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
}

/* Legal Content Styles */
.legal-content {
    max-width: 900px;
    margin: 5rem auto;
    padding: 0 5%;
}

.legal-content h2 {
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.legal-content p {
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
    .shop-container {
        grid-template-columns: 1fr;
    }

    .filters {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .footer-container {
        gap: 2rem;
    }
}