:root {
    --primary: #0f4c81;
    --primary-dark: #0b3963;
    --secondary: #2e7d32;
    --secondary-dark: #1b5e20;
    --accent: #e67e22;
    --text: #333;
    --bg: #f5f7fa;
    --white: #fff;
    --shadow: 0 4px 15px rgba(0,0,0,0.06);
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; }
body { color: var(--text); background: var(--bg); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* Top Bar */
.top-bar { background: var(--secondary); color: var(--white); padding: 10px 5%; display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 500; }
.top-bar span { margin-right: 20px; }
@media(max-width: 768px) { .top-bar { flex-direction: column; text-align: center; gap: 5px; } .top-bar span { margin: 0; } }

/* Header */
.header-main { background: var(--white); padding: 15px 5%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eaeaea; }
.header-logo img { height: 80px; }
.header-search { display: flex; flex: 1; max-width: 600px; margin: 0 40px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-radius: 4px; }
.header-search input { width: 100%; padding: 12px 20px; border: 1px solid #ddd; border-right: none; border-radius: 4px 0 0 4px; outline: none; font-size: 1rem; }
.header-search button { background: var(--primary); color: white; border: none; padding: 0 25px; border-radius: 0 4px 4px 0; cursor: pointer; font-weight: 700; font-size: 1rem; transition: 0.3s; white-space: nowrap; display: flex; align-items: center; justify-content: center; }
.header-search button:hover { background: var(--primary-dark); }
.cart-btn { background: var(--accent); color: white; padding: 12px 25px; border-radius: 4px; font-weight: 700; display: flex; align-items: center; gap: 8px; transition: 0.3s; box-shadow: 0 4px 10px rgba(230,126,34,0.3); }
.cart-btn:hover { background: #d35400; transform: translateY(-2px); }
@media(max-width: 768px) { .header-main { flex-direction: column; gap: 15px; } .header-search { margin: 0; width: 100%; } .header-contact, .cart-btn { width: 100%; justify-content: center; } }

/* Navigation */
.nav-bar { background: var(--primary); padding: 0 5%; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.nav-links { list-style: none; display: flex; justify-content: center; }
.nav-links li a { display: block; padding: 16px 20px; color: white; font-weight: 700; text-transform: uppercase; transition: 0.3s; letter-spacing: 0.5px; }
.nav-links li a:hover { background: var(--secondary); }
@media(max-width: 768px) { .nav-links { flex-wrap: wrap; justify-content: flex-start; } .nav-links li a { padding: 10px 15px; font-size: 0.9rem; } }

/* Hero */
.hero { background: linear-gradient(to right, rgba(15,76,129,0.95) 0%, rgba(15,76,129,0.6) 100%), url('hinhtapthevinabio.jpg') center/cover; padding: 120px 5%; color: white; position: relative; }
.hero-content { max-width: 700px; position: relative; z-index: 10; }
.hero-content h1 { font-size: 3.5rem; font-weight: 900; margin-bottom: 20px; line-height: 1.2; text-shadow: 2px 4px 8px rgba(0,0,0,0.5); }
.hero-content p { font-size: 1.25rem; margin-bottom: 35px; opacity: 0.9; line-height: 1.6; }
.btn-hero { background: var(--secondary); color: white; padding: 16px 35px; font-size: 1.1rem; font-weight: 700; border-radius: 4px; display: inline-block; transition: 0.3s; box-shadow: 0 4px 15px rgba(46,125,50,0.4); text-transform: uppercase; border: none; cursor: pointer; }
.btn-hero:hover { background: var(--secondary-dark); transform: translateY(-3px); }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); background: white; margin: 0 5% 60px; box-shadow: var(--shadow); border-radius: 8px; transform: translateY(-40px); position: relative; z-index: 11; }
.feature-box { text-align: center; padding: 30px 20px; border-right: 1px solid #eee; }
.feature-box:last-child { border: none; }
.feature-icon { font-size: 3rem; margin-bottom: 15px; }
.feature-box h4 { color: var(--primary); margin-bottom: 10px; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; }
.feature-box p { font-size: 0.95rem; color: #555; }
@media(max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); transform: translateY(0); margin: 40px 5%; } .feature-box { border-bottom: 1px solid #eee; } }

/* Section Header */
.section-header { text-align: center; margin: 80px 0 40px; }
.section-header h2 { font-size: 2.2rem; color: var(--primary); font-weight: 800; text-transform: uppercase; position: relative; display: inline-block; padding-bottom: 15px; }
.section-header h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: var(--accent); border-radius: 2px; }

/* Farms Grid */
.farms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 0 5% 60px; }
.farm-card { position: relative; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); height: 300px; cursor: pointer; transition: 0.4s; }
.farm-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
.farm-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.farm-card:hover img { transform: scale(1.1); }
.farm-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; color: white; }
.farm-overlay h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.farm-overlay p { font-size: 1rem; opacity: 0.9; }
@media(max-width: 768px) { .farms-grid { grid-template-columns: 1fr; } }

/* Products Grid */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; padding: 0 5%; margin-bottom: 60px; }
.product-card { background: white; border: 1px solid #eaeaea; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); overflow: hidden; transition: 0.3s; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: 0 12px 25px rgba(0,0,0,0.08); border-color: var(--primary); transform: translateY(-5px); }
.product-img-wrap { height: 240px; padding: 20px; position: relative; display: flex; align-items: center; justify-content: center; }
.product-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; transition: 0.3s; }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-cat { position: absolute; top: 12px; left: 12px; background: var(--secondary); color: white; font-size: 0.75rem; padding: 4px 10px; border-radius: 20px; font-weight: 700; text-transform: uppercase; z-index: 5; }
.product-info { padding: 20px; border-top: 1px solid #f5f5f5; flex-grow: 1; display: flex; flex-direction: column; }
.product-title { font-size: 1.15rem; color: #111; margin-bottom: 12px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #d32f2f; font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.product-desc { font-size: 0.95rem; line-height: 1.5; color: #666; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; width: 100%; }
.btn-outline { background: white; border: 2px solid var(--primary); color: var(--primary); padding: 12px 10px; border-radius: 6px; font-weight: 700; cursor: pointer; transition: 0.3s; text-align: center; font-size: 1rem; width: 100%; }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-solid { background: var(--secondary); border: 2px solid var(--secondary); color: white; padding: 12px 10px; border-radius: 6px; font-weight: 700; cursor: pointer; transition: 0.3s; text-align: center; font-size: 1rem; width: 100%; }
.btn-solid:hover { background: var(--secondary-dark); border-color: var(--secondary-dark); }

/* About Section */
.about-section { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 80px 5%; background: white; align-items: center; }
.about-img img { width: 100%; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.about-text h2 { color: var(--primary); font-size: 2.5rem; font-weight: 800; margin-bottom: 25px; text-transform: uppercase; }
.about-text p { margin-bottom: 20px; font-size: 1.1rem; color: #555; line-height: 1.8; }
.about-text ul { list-style: none; margin-top: 25px; }
.about-text li { margin-bottom: 15px; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; color: var(--secondary); }
@media(max-width: 768px) { .about-section { grid-template-columns: 1fr; padding: 40px 5%; } }

/* Footer */
.footer { background: #1a1a1a; color: #bbb; padding: 70px 5% 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-col h3 { color: white; font-size: 1.3rem; margin-bottom: 25px; text-transform: uppercase; font-weight: 800; position: relative; padding-bottom: 10px; }
.footer-col h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 3px; background: var(--accent); }
.footer-col p { margin-bottom: 15px; font-size: 1rem; line-height: 1.6; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 15px; }
.footer-links li a { color: #bbb; transition: 0.3s; font-size: 1rem; }
.footer-links li a:hover { color: var(--accent); padding-left: 5px; }
.footer-bottom { text-align: center; padding-top: 25px; border-top: 1px solid #333; font-size: 0.95rem; color: #888; }
@media(max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* Product Detail */
.detail-container { max-width: 1200px; margin: 50px auto; padding: 40px; background: white; border-radius: 12px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; }
.detail-img { width: 100%; border: 1px solid #eee; border-radius: 12px; padding: 30px; background: #fff; max-height: 500px; object-fit: contain; }
.detail-info h1 { font-size: 2.5rem; color: var(--primary); margin-bottom: 15px; font-weight: 800; }
.detail-info .cat-badge { display: inline-block; background: #e3f2fd; color: var(--primary); padding: 5px 15px; border-radius: 20px; font-weight: 700; margin-bottom: 20px; font-size: 0.9rem; text-transform: uppercase; }
.detail-price { font-size: 2.5rem; color: #d32f2f; font-weight: 900; margin-bottom: 25px; }
.detail-desc { font-size: 1.15rem; line-height: 1.8; color: #444; margin-bottom: 40px; background: #f9f9f9; padding: 25px; border-left: 5px solid var(--secondary); border-radius: 6px; }
.detail-actions { display: flex; gap: 20px; }
.detail-actions button { flex: 1; padding: 18px; font-size: 1.2rem; border-radius: 6px; font-weight: 700; }
@media(max-width: 768px) { .detail-container { grid-template-columns: 1fr; padding: 20px; margin: 20px; } .detail-actions { flex-direction: column; } }

/* Checkout Page overrides */
.checkout-container { max-width: 1000px; margin: 40px auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; padding: 0 5%; }
.checkout-section { background: white; padding: 30px; border-radius: 8px; box-shadow: var(--shadow); }
.checkout-section h2 { font-size: 1.5rem; color: var(--primary); margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #444; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; }
.order-total { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: 800; border-top: 2px solid #eee; padding-top: 15px; margin-top: 15px; color: #d32f2f; }
.btn-checkout { background: var(--secondary); color: white; width: 100%; padding: 15px; border: none; border-radius: 4px; font-size: 1.2rem; font-weight: 700; cursor: pointer; margin-top: 20px; transition: 0.3s; }
.btn-checkout:hover { background: var(--secondary-dark); }
.freeship-badge { background: #e8f5e9; color: var(--secondary); padding: 10px; border-radius: 4px; text-align: center; font-weight: 600; margin-bottom: 20px; }
.payment-method { display: flex; align-items: flex-start; gap: 15px; padding: 15px; border: 1px solid var(--primary); border-radius: 4px; background: #f0f7ff; }
@media(max-width: 768px) { .checkout-container { grid-template-columns: 1fr; gap: 20px; margin: 20px auto; } .checkout-section { padding: 20px; } }
