/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
:root {
    --primary-green: #2E7D32;
    --primary-green-hover: #1b5e20;
    --secondary-green: #66BB6A;
    --secondary-green-light: #e8f5e9;
    --white: #ffffff;
    --black: #111111;
    --gray-dark: #333333;
    --gray-light: #f5f5f5;
    --gray-border: #e0e0e0;
    --text-main: #424242;
    --text-muted: #757575;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
    
    --transition: all 0.3s ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--gray-light);
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--black);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

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

.section-title.left {
    text-align: left;
}

.underline {
    height: 4px;
    width: 60px;
    background-color: var(--primary-green);
    margin: 0 auto;
    border-radius: 2px;
}

.section-title.left .underline {
    margin: 0;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--primary-green-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-green);
    border-color: var(--primary-green);
}

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

.w-100 {
    width: 100%;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
    height: 80px;
    display: flex;
    align-items: center;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
}

.logo span {
    color: var(--black);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--black);
    transition: var(--transition);
}

.cart-icon:hover {
    color: var(--primary-green);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-green);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--white);
    z-index: 999;
    transition: var(--transition);
    padding: 20px;
}

.mobile-menu.active {
    left: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.mobile-link {
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
    padding: 10px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('assets/hero_banner.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 100%);
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    animation: fadeInUp 1s ease;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--black);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-main);
}

/* ==========================================================================
   Products Section
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-border);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background-color: var(--gray-light);
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-green);
}

.product-rating {
    color: #FFB300;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    background: none;
    border: none;
    width: 30px;
    height: 40px;
    cursor: pointer;
    font-size: 1rem;
    background-color: var(--gray-light);
    transition: var(--transition);
}

.qty-btn:hover {
    background-color: var(--gray-border);
}

.qty-input {
    width: 40px;
    height: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    flex-grow: 1;
    padding: 0 15px;
    height: 40px;
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--secondary-green-light);
    border-radius: 8px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-main);
    font-size: 0.95rem;
}

/* ==========================================================================
   About Us Section
   ========================================================================== */
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-content {
    flex: 1;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-image {
    flex: 1;
}

.image-placeholder {
    width: 100%;
    padding-top: 70%;
    background: linear-gradient(135deg, var(--secondary-green-light) 0%, var(--primary-green) 100%);
    border-radius: 12px;
    position: relative;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 5rem;
}

.image-placeholder i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.contact-info {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.contact-info h3 {
    color: var(--white);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-green-light);
}

.social-links {
    margin-top: 40px;
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--white);
    color: var(--primary-green);
}

.contact-form {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--black);
    color: var(--white);
    padding-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3, .footer h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-links ul li,
.footer-legal ul li {
    margin-bottom: 10px;
}

.footer-links ul li a,
.footer-legal ul li a {
    color: var(--text-muted);
}

.footer-links ul li a:hover,
.footer-legal ul li a:hover {
    color: var(--secondary-green);
    padding-left: 5px;
}

.footer-bottom {
    background-color: #0a0a0a;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--gray-dark);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Shopping Cart Sidebar
   ========================================================================== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--white);
    z-index: 1002;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover {
    color: red;
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background-color: var(--gray-light);
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remove-item {
    color: #e53935;
    background: none;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.remove-item:hover {
    text-decoration: underline;
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-muted);
    margin-top: 50px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-border);
    background-color: var(--gray-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .about-container {
        flex-direction: column;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-icon {
        display: block;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 60px 0;
    }
}
