/* ====================================
   ALGHANDOOL FODDER TRADING - STYLES
   ==================================== */

/* CSS VARIABLES */
:root {
    --ag-green: #173A1F;
    --ag-green-2: #0F2A16;
    --ag-orange: #F2A21A;
    --bg: #FFFFFF;
    --muted: #4B5563;
    --border: #E5E7EB;
    
    --max-width: 1120px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    --radius: 16px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #111827;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* CONTAINER */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (max-width: 767px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--ag-green);
}

.section-title {
    font-size: 32px;
    margin-bottom: var(--spacing-sm);
}

.section-title-center {
    font-size: 36px;
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 18px;
    color: var(--muted);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header {
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 767px) {
    .section-title {
        font-size: 24px;
    }
    .section-title-center {
        font-size: 28px;
    }
    .section-subtitle {
        font-size: 16px;
    }
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: var(--ag-orange);
    color: #fff;
}

.btn-primary:hover {
    background: #D8900E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(242, 162, 26, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-cta {
    background: var(--ag-orange);
    color: #fff;
    font-size: 18px;
    padding: 16px 40px;
}

.btn-cta:hover {
    background: #D8900E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 162, 26, 0.4);
}

.btn-submit {
    width: 100%;
    background: var(--ag-orange);
    color: #fff;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background: #D8900E;
    transform: translateY(-1px);
}

/* HEADER */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 40px;
    height: 40px;
}

.company-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ag-green);
}

.header-nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--ag-green);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--ag-green);
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .company-name {
        font-size: 14px;
    }
    
    .header-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
        border-bottom: 1px solid var(--border);
        display: none;
    }
    
    .header-nav.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* HERO */
.hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--ag-green-2) 0%, var(--ag-green) 100%);
    background-image: url('../../images/05/c_header2.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: var(--spacing-xl) 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 42, 22, 0.85);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-title {
    font-size: 48px;
    color: #fff;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .hero {
        min-height: 480px;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* TRUST SECTION */
.trust-section {
    padding: var(--spacing-xl) 0;
    background: #F9FAFB;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.trust-card {
    background: var(--bg);
    padding: var(--spacing-md);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.2s ease;
}

.trust-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.trust-icon {
    margin-bottom: var(--spacing-sm);
    display: flex;
    justify-content: center;
}

.trust-title {
    font-size: 18px;
    margin-bottom: var(--spacing-xs);
}

.trust-text {
    font-size: 14px;
    color: var(--muted);
}

@media (max-width: 1024px) {
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .trust-section {
        padding: var(--spacing-lg) 0;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

/* STATS SECTION */
.stats-section {
    padding: var(--spacing-lg) 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 40px;
    font-weight: 700;
    color: var(--ag-green);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 14px;
    color: var(--muted);
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border);
}

@media (max-width: 767px) {
    .stats-grid {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .stat-item {
        flex: 0 0 calc(50% - 12px);
    }
    
    .stat-divider {
        display: none;
    }
    
    .stat-value {
        font-size: 32px;
    }
}

/* ABOUT SECTION */
.about-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-content {
    padding-right: var(--spacing-md);
}

.about-text {
    font-size: 16px;
    color: #374151;
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.about-note {
    font-size: 14px;
    color: var(--muted);
    font-style: italic;
    margin-top: var(--spacing-md);
}

.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-placeholder {
    aspect-ratio: 4/3;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767px) {
    .about-section {
        padding: var(--spacing-lg) 0;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-content {
        padding-right: 0;
    }
}

/* PRODUCTS SECTION */
.products-section {
    padding: var(--spacing-xl) 0;
    background: #F9FAFB;
}

.category-section {
    margin-bottom: var(--spacing-xl);
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.category-title {
    font-size: 28px;
    color: var(--ag-green);
    margin: 0;
    flex: 1;
}

.category-divider {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--border), transparent);
    margin-left: var(--spacing-md);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.product-card {
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: var(--spacing-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    aspect-ratio: 4/3;
    background: #F3F4F6;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--ag-green);
    margin-bottom: var(--spacing-sm);
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    flex: 1;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    border: 1px solid var(--border);
    background: #F6F7F7;
    color: var(--muted);
}

.badge-accent {
    background: rgba(242, 162, 26, 0.15);
    border-color: rgba(242, 162, 26, 0.35);
    color: var(--ag-orange);
    font-weight: 600;
}

.product-button {
    width: 100%;
    background: var(--ag-orange);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.product-button:hover {
    background: #D8900E;
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .products-section {
        padding: var(--spacing-lg) 0;
    }
    
    .category-section {
        margin-bottom: var(--spacing-lg);
    }
    
    .category-title {
        font-size: 24px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

/* CTA BAND */
.cta-band {
    background: var(--ag-green);
    color: #fff;
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.cta-content {
    max-width: 720px;
    margin: 0 auto;
}

.cta-title {
    font-size: 32px;
    color: #fff;
    margin-bottom: var(--spacing-sm);
}

.cta-text {
    font-size: 18px;
    margin-bottom: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 767px) {
    .cta-band {
        padding: var(--spacing-lg) 0;
    }
    
    .cta-title {
        font-size: 24px;
    }
    
    .cta-text {
        font-size: 16px;
    }
}

/* CONTACT SECTION */
.contact-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--spacing-lg);
}

.contact-info-card,
.contact-form-card {
    background: #F9FAFB;
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.contact-card-title {
    font-size: 24px;
    color: var(--ag-green);
    margin-bottom: var(--spacing-lg);
}

.contact-item {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(23, 58, 31, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-details {
    flex: 1;
}

.contact-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-value {
    font-size: 16px;
    color: #111827;
    font-weight: 500;
}

.contact-value:hover {
    color: var(--ag-green);
}

/* FORM STYLES */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-input,
.form-textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--bg);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--ag-green);
    box-shadow: 0 0 0 3px rgba(23, 58, 31, 0.1);
}

.form-input.error,
.form-textarea.error {
    border-color: #EF4444;
}

.form-error {
    font-size: 13px;
    color: #EF4444;
    margin-top: 4px;
    display: none;
}

.form-input.error ~ .form-error,
.form-textarea.error ~ .form-error {
    display: block;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* FORM SUCCESS */
.form-success {
    text-align: center;
    padding: var(--spacing-lg);
}

.form-success svg {
    margin: 0 auto var(--spacing-md);
}

.form-success h4 {
    font-size: 20px;
    color: #10B981;
    margin-bottom: var(--spacing-sm);
}

.form-success p {
    font-size: 16px;
    color: var(--muted);
}

@media (max-width: 767px) {
    .contact-section {
        padding: var(--spacing-lg) 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* FOOTER */
.footer {
    background: var(--ag-green-2);
    color: #fff;
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: var(--spacing-sm);
}

.footer-text {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-sm);
}

.footer-note {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.footer-links,
.footer-contact {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a,
.footer-contact a {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--ag-orange);
}

.footer-contact strong {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 13px;
}

.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 767px) {
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* UTILITY CLASSES */
.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

/* SMOOTH ANIMATIONS */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ====================================
   PRODUCTION-READY MOBILE FIXES
   ==================================== */

/* Prevent horizontal scroll on all devices */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Mobile-specific fixes (375px and below) */
@media (max-width: 480px) {
    /* Container padding */
    .container {
        padding: 0 16px;
    }
    
    /* Full-width buttons */
    .btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Product button full width */
    .product-button {
        width: 100%;
    }
    
    /* CTA button */
    .btn-cta {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
    }
    
    /* Form submit button */
    .btn-submit {
        width: 100%;
    }
    
    /* Header logo text smaller */
    .company-name {
        font-size: 12px;
        max-width: 180px;
        line-height: 1.2;
    }
    
    /* Hero text adjustments */
    .hero-title {
        font-size: 28px;
        line-height: 1.15;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    /* Section titles */
    .section-title-center {
        font-size: 24px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    /* Product cards - ensure single column */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Trust cards - single column */
    .trust-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Stats - 2x2 grid on mobile */
    .stats-grid {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .stat-item {
        flex: 0 0 calc(50% - 8px);
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Contact form */
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Contact cards */
    .contact-info-card,
    .contact-form-card {
        padding: 20px;
    }
    
    /* Footer logo and title stack */
    .footer-col > div[style*="flex"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Image error handling - graceful fallback */
.product-image {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Form states */
.form-input.success,
.form-textarea.success {
    border-color: #10B981;
}

/* Error message styling */
.form-error-message {
    text-align: center;
    padding: var(--spacing-lg);
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--radius);
    margin-top: var(--spacing-md);
    display: none;
}

.form-error-message svg {
    margin: 0 auto var(--spacing-md);
}

.form-error-message h4 {
    font-size: 20px;
    color: #EF4444;
    margin-bottom: var(--spacing-sm);
}

.form-error-message p {
    font-size: 16px;
    color: var(--muted);
}

/* Loading state for form button */
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Ensure about image has proper height */
.about-image {
    min-height: 300px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

