/* =====================================================
   ROOT VARIABLES
===================================================== */
:root{
  --grad1:#2e7d32;
  --grad2:#4caf50;
  --accent:#ff9800;
  --muted:#374151;
  --bg:#f8fafc;
  --card:#ffffff;
  --radius:14px;
  --shadow:0 8px 24px rgba(0,0,0,.06);
}

/* =====================================================
   RESET & BASE
===================================================== */
*,
*::before,
*::after{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:'Vazirmatn',sans-serif;
  background:var(--bg);
  color:#0f172a;
  line-height:1.8;
}

img{
  max-width:100%;
  display:block;
}

a{
  text-decoration:none;
  color:inherit;
}

/* =====================================================
   LAYOUT
===================================================== */
.container{
  max-width:1200px;
  margin:auto;
  padding:0 18px;
}

.section{
  padding:48px 0;
}

.section h3{
  color:var(--grad1);
  border-bottom:3px solid var(--accent);
  display:inline-block;
  padding-bottom:8px;
  margin-bottom:28px;
  text-align:center;
}

/* =====================================================
   HEADER
===================================================== */
.site-header{
  background:linear-gradient(90deg,var(--grad1),var(--grad2));
  color:#fff;
  position:sticky;
  top:0;
  z-index:1000;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.brand img{
  width:40px;
  height:40px;
}

.nav-desktop{
  display:flex;
  gap:8px;
}

.nav-desktop a{
  padding:8px 12px;
  border-radius:10px;
  transition:.25s;
}

.nav-desktop a:hover,
.nav-desktop a.active{
  background:rgba(255,255,255,.2);
}

.lang-switch{
  display:flex;
  gap:6px;
  font-size:14px;
}

.nav-toggle{
  display:none;
  background:none;
  border:none;
  color:#fff;
  font-size:22px;
}

/* Language switch active state */
.lang-switch a{
  padding:6px 10px;
  border-radius:10px;
  transition:.25s;
}

.lang-switch a.active,
.lang-switch a:hover{
  background:rgba(255,255,255,.2);
}
/* =====================================================
   LANGUAGE SWITCH (PRO)
===================================================== */

.lang-switch{
  display:flex;
  gap:6px;
}

.lang-switch a{
  padding:6px 12px;
  border-radius:999px;
  font-size:14px;
  transition:.25s;
}

.lang-switch a:hover{
  background:rgba(255,255,255,.15);
}

.lang-switch a.active{
  background:rgba(255,255,255,.28);
  font-weight:700;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
}

/* =====================================================
   HERO
===================================================== */
.hero{
  height:260px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#fff;
}

.hero h2{
  font-size:24px;
  max-width:90%;
}


/* بنر صفحه اصلی */
.hero-home{
  background:
    linear-gradient(135deg,rgba(46,125,50,.6),rgba(76,175,80,.5)),
    url("../img/banners/home.jpg") center/cover no-repeat;
}
/* بنر صفحه درباره ما */
.hero-company{
  background:
    linear-gradient(135deg,rgba(46,125,50,.6),rgba(76,175,80,.5)),
    url("../img/banners/company.jpg") center/cover no-repeat;
}

/* بنر صفحه محصولات تره‌بار */
.hero-products-fruits{
  background:
    linear-gradient(135deg,rgba(46,125,50,.6),rgba(76,175,80,.5)),
    url("../img/banners/fruits.jpg") center/cover no-repeat;
}

/* بنر صفحه محصولات خشکبار */
.hero-products-dry{
  background:
    linear-gradient(135deg,rgba(46,125,50,.6),rgba(76,175,80,.5)),
    url("../img/banners/dry-fruits.jpg") center/cover no-repeat;
}

/* بنر صفحه خدمات */
.hero-services{
  background:
    linear-gradient(135deg,rgba(46,125,50,.6),rgba(76,175,80,.5)),
    url("../img/banners/services.jpg") center/cover no-repeat;
}
/* بنر صفحه تماس با ما */
.hero-contact{
  background:
    linear-gradient(135deg,rgba(46,125,50,.6),rgba(76,175,80,.5)),
    url("../img/banners/contact.jpg") center/cover no-repeat;
}
/* بنر صفحه انگلیسی */
.hero-home-en{
  background:
    linear-gradient(135deg,rgba(46,125,50,.6),rgba(76,175,80,.5)),
    url("../img/banners/home.jpg") center/cover no-repeat;
}

/* =====================================================
   CATEGORY HEADER
===================================================== */
.category-header{
  margin:40px 0 20px;
  text-align:center;
}

.category-header h4{
  font-size:20px;
  color:#1b5e20;
}

/* =====================================================
   PRODUCT CARD
===================================================== */
.product-card{
  background:var(--card);
  border-radius:var(--radius);
  padding:16px;
  height:100%;
  box-shadow:var(--shadow);
  transition:.3s;
  text-align:center;
}

.product-card:hover{
  transform:translateY(-6px);
  box-shadow:0 14px 30px rgba(0,0,0,.1);
}

.product-card img{
  height:170px;
  object-fit:cover;
  border-radius:10px;
  margin:0 auto 12px;
}

.product-card h4{
  font-size:16px;
  margin:8px 0;
}

.product-card p{
  font-size:14px;
  color:var(--muted);
}

/* Badge */
.product-badge{
  display:inline-block;
  background:var(--accent);
  color:#fff;
  font-size:12px;
  padding:4px 10px;
  border-radius:20px;
  margin-bottom:8px;
}

/* =====================================================
   FEATURE BOX
===================================================== */
.feature-box{
  background:#fff;
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
  text-align:center;
}
/* =====================================================
   BENEFITS SECTION
===================================================== */

.benefits-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:24px;
  margin-top:30px;
}

.benefit-item{
  background:#fff;
  padding:20px;
  border-radius:14px;
  text-align:center;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  transition:.3s;
}

.benefit-item:hover{
  transform:translateY(-6px);
  box-shadow:0 14px 30px rgba(0,0,0,.1);
}

.benefit-item i{
  font-size:28px;
  color:var(--grad1);
  margin-bottom:10px;
}

.benefit-item h5{
  margin:10px 0 6px;
  font-size:16px;
}

.benefit-item p{
  font-size:14px;
  color:var(--muted);
}

/* =====================================================
   TABLE
===================================================== */
.table-responsive{
  width:100%;
  overflow-x:auto;
  margin-top:20px;
}

.table-responsive table{
  width:100%;
  min-width:900px;
  border-collapse:collapse;
  background:#fff;
}

.table-responsive th,
.table-responsive td{
  padding:10px 12px;
  text-align:center;
  font-size:14px;
  border:1px solid #e5e7eb;
  white-space:nowrap;
}

.table-responsive thead th{
  background:linear-gradient(90deg,var(--grad1),var(--grad2));
  color:#fff;
  font-weight:700;
}

.table-responsive td:first-child,
.table-responsive th:first-child{
  background:#f1f5f9;
  font-weight:700;
  position:sticky;
  right:0;
  z-index:2;
}

/* =====================================================
   FOOTER
===================================================== */
.site-footer{
  background:linear-gradient(90deg,var(--grad2),var(--grad1));
  color:#fff;
  text-align:center;
  padding:24px;
  margin-top:60px;
}

/* =====================================================
   QUICK CONTACT
===================================================== */
.quick-contact{
  position:fixed;
  left:18px;
  bottom:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.quick-contact a{
  width:48px;
  height:48px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:20px;
}

.quick-contact .wh{background:#25d366}
.quick-contact .ph{background:#f44336}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width:768px){
  .hero{height:220px}
  .hero h2{font-size:20px}
}

.feature-box img{
  width:100%;
  height:160px;
  object-fit:cover;
  border-radius:10px;
  margin-bottom:12px;
}

.feature-box h4,
.feature-box p{
  text-align:center;
}

/* =====================================================
   MOBILE HEADER IMPROVEMENTS
===================================================== */
@media (max-width: 992px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }
  
  .brand {
    order: 1;
    flex: 1;
    min-width: 200px;
  }
  
  .brand h1 {
    font-size: 16px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }
  
  .brand img {
    width: 32px !important;
    height: 32px !important;
  }
  
  .lang-switch {
    order: 2;
  }
  
  .nav-toggle {
    order: 3;
  }
  
  /* Navigation menu improvements */
  .nav-desktop {
    display: none;
    position: absolute;
    order: 4;
    top: 60px;
    width: calc(100% - 36px);
    background: linear-gradient(135deg, var(--grad1), var(--grad2));
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    padding: 20px;
    z-index: 1001;
    flex-direction: column;
  }
  
  .nav-desktop.open {
    display: flex;
  }
  
  .nav-desktop a {
    padding: 14px 16px;
    border-radius: 12px;
    margin: 4px 0;
    text-align: center;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .nav-desktop a:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
  }
  
  /* Enhanced Nav Toggle Button */
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
  }
  
  .nav-toggle:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
  }
  
  .nav-toggle.active {
    background: rgba(255,255,255,0.3);
    transform: rotate(180deg);
  }
  
  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }
  
  /* Smooth animation for mobile menu */
  .nav-desktop {
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* =====================================================
   MOBILE ENHANCEMENTS
===================================================== */
@media (max-width: 768px) {
  /* Hero section improvement */
  .hero {
    height: 200px;
    padding: 20px;
  }
  
  .hero h2 {
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    line-height: 1.4;
    padding: 15px;
    background: rgba(0,0,0,0.4);
    border-radius: 16px;
    backdrop-filter: blur(4px);
  }
  
  /* Section improvements */
  .section {
    padding: 40px 0;
  }
  
  .section h3 {
    font-size: 22px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-width: 4px;
  }
  
  /* Feature boxes improvement */
  .feature-box {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 18px;
    transition: all 0.3s ease;
  }
  
  .feature-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  }
  
  .feature-box img {
    height: 180px;
    border-radius: 14px;
    object-fit: cover;
  }
  
  .feature-box h4 {
    font-size: 18px;
    margin: 15px 0 10px;
    color: var(--grad1);
  }
  
  .feature-box p {
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
  }
  
  /* Row spacing */
  .row {
    margin-top: 20px;
  }
  
  /* Country flags improvement */
  #brands .col-6 {
    margin-bottom: 20px;
  }
  
  #brands img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  #brands p {
    font-weight: 700;
    font-size: 16px;
    color: var(--grad1);
  }
  
  /* Icons enhancement */
  .feature-box i {
    font-size: 36px;
    color: var(--accent);
    margin-bottom: 15px;
    display: inline-block;
    background: linear-gradient(135deg, var(--grad1), var(--grad2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  /* Footer improvement */
  .site-footer {
    padding: 30px 20px;
    border-radius: 20px 20px 0 0;
    margin-top: 50px;
  }
  
  .site-footer p {
    font-size: 14px;
    margin: 8px 0;
    line-height: 1.6;
  }
  
  /* Quick contact buttons enhancement */
  .quick-contact {
    left: 15px;
    bottom: 15px;
    gap: 8px;
  }
  
  .quick-contact a {
    width: 54px;
    height: 54px;
    font-size: 22px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
  }
  
  .quick-contact a:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  }
  
  .quick-contact .wh {
    background: linear-gradient(135deg, #25d366, #128C7E);
  }
  
  .quick-contact .ph {
    background: linear-gradient(135deg, #f44336, #d32f2f);
  }
  
  /* Fade-in animation for sections */
  .section {
    animation: fadeInUp 0.8s ease-out;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Stagger animation for feature boxes */
  .row .col-6 {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
  }
  
  .row .col-6:nth-child(1) { animation-delay: 0.1s; }
  .row .col-6:nth-child(2) { animation-delay: 0.2s; }
  .row .col-6:nth-child(3) { animation-delay: 0.3s; }
  .row .col-6:nth-child(4) { animation-delay: 0.4s; }
}

/* =====================================================
   PRODUCT CARD MOBILE ENHANCEMENT
===================================================== */
@media (max-width: 768px) {
  .product-card {
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 20px;
  }
  
  .product-card img {
    height: 200px;
    border-radius: 14px;
  }
  
  .product-card h4 {
    font-size: 18px;
    margin: 12px 0;
  }
  
  .product-card p {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .product-badge {
    font-size: 13px;
    padding: 5px 12px;
  }
}

/* =====================================================
   BENEFITS MOBILE ENHANCEMENT
===================================================== */
@media (max-width: 768px) {
  .benefit-item {
    padding: 24px;
    border-radius: 18px;
    margin-bottom: 20px;
  }
  
  .benefit-item i {
    font-size: 32px;
  }
  
  .benefit-item h5 {
    font-size: 18px;
    margin: 12px 0 8px;
  }
  
  .benefit-item p {
    font-size: 14px;
    line-height: 1.6;
  }
}