@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root{
  --green:#234b38;
  --green2:#315f48;
  --cream:#f8f5ed;
  --gold:#c99532;
  --text:#253029;
  --muted:#69736c;
  --white:#fff;
  --shadow:0 10px 35px rgba(30,50,40,.10);
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  background:var(--cream);
  color:var(--text);
  font-family:Vazirmatn,Tahoma,sans-serif;
}

a{
  color:inherit;
  text-decoration:none;
}

button{
  font-family:inherit;
}

.hero{
  min-height:430px;
  position:relative;
  background:
    linear-gradient(rgba(22,42,34,.12),rgba(22,42,34,.35)),
    url("images/hero-mountain.jpg?v=2")
    center/cover;
}

.hero-overlay{
  min-height:430px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:40px 20px;
}

.hero-content{
  color:white;
  max-width:800px;
}

.brand{
  display:inline-block;
  border:1px solid rgba(255,255,255,.55);
  padding:8px 22px;
  border-radius:40px;
  margin-bottom:22px;
  backdrop-filter:blur(5px);
  font-weight:700;
}

.hero h1{
  margin:0 0 14px;
  font-size:clamp(32px,6vw,58px);
  font-weight:800;
}

.hero p{
  font-size:18px;
  margin:0 auto 28px;
  opacity:.95;
}

.hero-btn{
  display:inline-block;
  background:white;
  color:var(--green);
  padding:13px 30px;
  border-radius:12px;
  font-weight:700;
  transition:.2s;
}

.hero-btn:hover{
  transform:translateY(-2px);
}

.nav{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.96);
  box-shadow:0 2px 15px rgba(0,0,0,.07);
}

.nav-inner{
  max-width:1200px;
  margin:auto;
  min-height:70px;
  padding:10px 20px;
  display:flex;
  align-items:center;
  gap:25px;
}

.logo{
  color:var(--green);
  font-weight:800;
  font-size:20px;
  white-space:nowrap;
}

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

.nav-links a{
  color:#4d5751;
  font-size:14px;
}

.nav-links a:hover{
  color:var(--green);
}

.cart-button{
  border:0;
  background:var(--green);
  color:white;
  padding:10px 16px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
}

.cart-button span{
  display:inline-flex;
  min-width:23px;
  height:23px;
  align-items:center;
  justify-content:center;
  background:white;
  color:var(--green);
  border-radius:50%;
  margin-right:5px;
  font-size:12px;
}

.intro{
  max-width:800px;
  margin:auto;
  text-align:center;
  padding:70px 20px 35px;
}

.intro span,
.about span{
  color:var(--gold);
  font-size:14px;
  font-weight:700;
}

.intro h2,
.about h2{
  margin:8px 0 12px;
  font-size:32px;
  color:var(--green);
}

.intro p,
.about p{
  color:var(--muted);
  line-height:2;
  margin:0;
}

.products-section{
  max-width:1200px;
  margin:auto;
  padding:20px 20px 80px;
}

.section-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:25px;
}

.section-heading h2{
  margin:0;
  color:var(--green);
  font-size:27px;
}

.filters{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.filters button{
  border:1px solid #d9ded9;
  background:white;
  color:#59625c;
  padding:8px 13px;
  border-radius:30px;
  cursor:pointer;
}

.filters button.active{
  background:var(--green);
  color:white;
  border-color:var(--green);
}

.products-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
}

.product-card{
  background:white;
  border-radius:17px;
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:.25s;
}

.product-card:hover{
  transform:translateY(-4px);
}

.product-image{
  position:relative;
  height:220px;
  overflow:hidden;
  background:#eee;
}

.product-image img{
  width:80% !important;
  height:80% !important;
  object-fit:contain !important;
  display:block !important;
  margin:10% auto !important;
}

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

.category{
  position:absolute;
  top:12px;
  right:12px;
  background:rgba(255,255,255,.90);
  color:var(--green);
  border-radius:20px;
  padding:5px 10px;
  font-size:11px;
  font-weight:700;
}

.product-info{
  padding:17px;
}

.product-info h3{
  margin:0 0 5px;
  font-size:17px;
  color:#26342c;
}

.variant{
  color:var(--muted);
  font-size:13px;
  margin-bottom:16px;
}

.product-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.price{
  color:var(--green);
  font-size:15px;
}

.add-button{
  border:0;
  background:var(--green);
  color:white;
  padding:9px 11px;
  border-radius:9px;
  cursor:pointer;
  font-size:12px;
  white-space:nowrap;
}

.add-button:hover{
  background:var(--green2);
}

.about{
  background:white;
  padding:75px 20px;
  text-align:center;
}

.about > div{
  max-width:750px;
  margin:auto;
}

.contact{
  text-align:center;
  padding:65px 20px;
}

.contact h2{
  color:var(--green);
  margin-bottom:8px;
}

.contact p{
  color:var(--muted);
}

.phone{
  display:inline-block;
  margin-top:10px;
  background:var(--green);
  color:white;
  padding:12px 25px;
  border-radius:10px;
  direction:ltr;
}

footer{
  background:#193629;
  color:white;
  padding:45px 20px 20px;
}

.footer-content{
  max-width:1100px;
  margin:auto;
  display:flex;
  justify-content:space-between;
  gap:40px;
}

.footer-content h3{
  margin-top:0;
}

.footer-content p{
  color:#c9d3cd;
  max-width:450px;
  line-height:2;
}

.trust{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:120px;
}

.trust img{
  max-width:110px;
  max-height:130px;
  background:white;
  padding:5px;
  border-radius:7px;
}

.copyright{
  max-width:1100px;
  margin:35px auto 0;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.15);
  color:#aebbb3;
  font-size:12px;
  text-align:center;
}

.cart-modal{
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:15px;
}

.cart-modal.open{
  display:flex;
}

.cart-box{
  width:min(650px,100%);
  max-height:90vh;
  overflow:auto;
  background:white;
  border-radius:18px;
  padding:20px;
}

.cart-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #eee;
  padding-bottom:15px;
  margin-bottom:10px;
}

.cart-header h2{
  margin:0;
  color:var(--green);
}

.cart-header button{
  border:0;
  background:#f1f1f1;
  width:35px;
  height:35px;
  border-radius:50%;
  font-size:25px;
  cursor:pointer;
}

.cart-item{
  display:grid;
  grid-template-columns:1fr auto auto auto;
  align-items:center;
  gap:12px;
  padding:15px 0;
  border-bottom:1px solid #eee;
}

.cart-item small{
  display:block;
  color:var(--muted);
  margin-top:3px;
}

.qty{
  display:flex;
  align-items:center;
  gap:8px;
}

.qty button{
  width:27px;
  height:27px;
  border:1px solid #ddd;
  background:white;
  border-radius:7px;
  cursor:pointer;
}

.remove{
  border:0;
  background:none;
  color:#b33b3b;
  cursor:pointer;
}

.empty-cart{
  padding:45px 10px;
  text-align:center;
  color:var(--muted);
}

.cart-total{
  display:flex;
  justify-content:space-between;
  padding:20px 0;
  font-size:18px;
}

.cart-total strong{
  color:var(--green);
}

.checkout-button{
  width:100%;
  border:0;
  background:var(--green);
  color:white;
  padding:14px;
  border-radius:10px;
  font-size:15px;
  cursor:pointer;
  font-weight:700;
}

@media(max-width:900px){

  .products-grid{
    grid-template-columns:repeat(3,1fr);
  }

}

@media(max-width:700px){

  .hero,
  .hero-overlay{
    min-height:380px;
  }

  .hero h1{
    font-size:35px;
  }

  .hero p{
    font-size:15px;
  }

  .nav-inner{
    min-height:60px;
    padding:8px 12px;
  }

  .nav-links{
    display:none;
  }

  .logo{
    flex:1;
    font-size:17px;
  }

  .cart-button{
    padding:9px 11px;
    font-size:12px;
  }

  .intro{
    padding-top:50px;
  }

  .intro h2,
  .about h2{
    font-size:27px;
  }

  .section-heading{
    display:block;
  }

  .section-heading h2{
    margin-bottom:15px;
  }

  .filters{
    justify-content:flex-start;
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:5px;
  }

  .filters button{
    flex:0 0 auto;
  }

  .products-grid{
    grid-template-columns:repeat(2,1fr);
    gap:12px;
  }

  .product-image{
    height:165px;
  }

  .product-info{
    padding:12px;
  }

  .product-info h3{
    font-size:14px;
  }

  .variant{
    font-size:12px;
  }

  .product-bottom{
    display:block;
  }

  .price{
    display:block;
    margin-bottom:9px;
    font-size:13px;
  }

  .add-button{
    width:100%;
  }

  .footer-content{
    display:block;
    text-align:center;
  }

  .trust{
    margin-top:25px;
  }

  .cart-item{
    grid-template-columns:1fr auto;
  }

  .cart-item > strong{
    grid-column:1;
  }

  .remove{
    grid-column:2;
    grid-row:1;
  }

}

@media(max-width:390px){

  .products-grid{
    grid-template-columns:1fr;
  }

  .product-image{
    height:220px;
  }

}

/* FINAL PRODUCT IMAGE OVERRIDE */
.product-card .product-image{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:12px !important;
  box-sizing:border-box !important;
}

.product-card .product-image img{
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  margin:0 auto !important;
  display:block !important;
  transform:none !important;
}

.product-card:hover .product-image img{
  transform:scale(1.02) !important;
}

.cart-product{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.cart-product-image{
  width:72px;
  height:72px;
  object-fit:contain;
  border-radius:12px;
  background:#f5f5f5;
  flex:none;
}

.cart-product-info{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}

.cart-product-info strong{
  font-size:14px;
}

.cart-product-info small{
  color:#777;
}

@media (max-width:700px){

  .cart-product-image{
    width:62px;
    height:62px;
  }

  .cart-item{
    gap:8px;
  }

}


/* =========================
   Checkout Modal
========================= */

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.checkout-box {
  width: min(680px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  color: #222;
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.checkout-header h2 {
  margin: 0;
  font-size: 22px;
}

.checkout-header button {
  border: 0;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
}

.checkout-section {
  margin-bottom: 22px;
}

.checkout-section h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.checkout-section label:not(.choice) {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
}

.checkout-section input[type="text"],
.checkout-section input[type="tel"],
.checkout-section textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
}

.checkout-section textarea {
  resize: vertical;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 13px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.choice:hover {
  border-color: #999;
}

.choice input {
  flex: 0 0 auto;
}

.choice span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.choice small {
  color: #777;
  font-weight: normal;
}

.choice b {
  white-space: nowrap;
  font-size: 14px;
}

.disabled-choice {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkout-summary {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 15px;
  margin-top: 20px;
}

.checkout-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 7px 0;
}

.checkout-final {
  border-top: 1px solid #ddd;
  margin-top: 8px;
  padding-top: 14px !important;
  font-size: 18px;
}

.checkout-submit {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px;
  margin-top: 18px;
  background: #222;
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
}

.checkout-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 600px) {

  .checkout-modal {
    padding: 10px;
    align-items: flex-start;
  }

  .checkout-box {
    margin-top: 10px;
    padding: 17px;
    max-height: 95vh;
    border-radius: 14px;
  }

  .choice {
    align-items: flex-start;
  }

  .choice b {
    font-size: 13px;
  }

  .checkout-final {
    font-size: 16px;
  }
}


/* Best Sellers */
.bestsellers-section {
  padding-top: 30px;
  padding-bottom: 50px;
}

.bestsellers-section .section-heading {
  text-align: center;
  margin-bottom: 28px;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #1976d2;
  font-weight: 700;
}

.section-description {
  margin-top: 8px;
  color: #666;
}

.bestseller-card {
  position: relative;
}

.bestseller-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 20px;
  background: #16803c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}


/* Best Sellers Button */

.bestsellers-button {
  display: inline-block;
  margin: 12px 0;
  padding: 9px 22px;
  border: 1px solid #b7dfc5;
  border-radius: 20px;
  background: #f0faf3;
  color: #16803c;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.bestsellers-button:hover,
.bestsellers-button.active {
  background: #dff3e5;
  color: #126b32;
}

.bestsellers-panel {
  margin: 20px 0 35px;
}

.bestsellers-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}

.bestsellers-title h3 {
  margin: 0;
  color: #16803c;
}

.close-bestsellers {
  border: 0;
  background: transparent;
  color: #1976d2;
  cursor: pointer;
  font-weight: 700;
}

.bestseller-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 20px;
  background: #16803c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}


/* فرم ورود */
.login-form input[type="tel"],
.login-form input[type="password"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 15px;
  box-sizing: border-box;
  font-size: 16px;
  border: 1px solid #d8dedb;
  border-radius: 10px;
  background: #fff;
}

.login-form label {
  display: block;
  margin-top: 16px;
  font-weight: 600;
}

.login-form input:focus {
  outline: none;
  border-color: #6fae8b;
  box-shadow: 0 0 0 3px rgba(111, 174, 139, .12);
}


/* ================================
   Product weight selector
================================ */

.product-info {
  position: relative;
}

.weight-title {
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #555;
}

.weight-select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  color: #222;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: .2s;
}

.weight-select:focus {
  border-color: #888;
  box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}

.weight-select.weight-error {
  border-color: #d93025;
  box-shadow: 0 0 0 3px rgba(217,48,37,.10);
  animation: weightShake .25s linear;
}

.variant-price {
  display: none;
}

@keyframes weightShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

/* دو محصول کنار هم در دسکتاپ */
#productsGrid,
#bestsellersGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* موبایل */
@media (max-width: 700px) {

  #productsGrid,
  #bestsellersGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .weight-title {
    font-size: 12px;
  }

  .weight-select {
    font-size: 12px;
    min-height: 38px;
    padding: 6px 8px;
  }

  .product-card {
    min-width: 0;
  }

}



/* ==========================================
   HORIZONTAL PRODUCT WEIGHT OPTIONS
========================================== */

.weight-title {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    margin-bottom: 7px;
}

.weight-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 7px;
    direction: rtl;
    margin-top: 6px;
    margin-bottom: 12px;
}

.weight-option {
    appearance: none;
    border: 1px solid #b9d8c0;
    background: #f8fcf9;
    color: #356b42;
    border-radius: 9px;
    padding: 7px 12px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition: all .18s ease;
}

.weight-option:hover {
    background: #eef8f1;
    border-color: #8fbe99;
    transform: translateY(-1px);
}

.weight-option.active {
    background: #e5f4e9;
    border-color: #65a874;
    color: #245d31;
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(101,168,116,.08);
}

.weight-option.error {
    border-color: #d88;
    animation: weightShake .25s ease-in-out;
}

@keyframes weightShake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

@media (max-width: 700px) {

    .weight-options {
        gap: 6px;
    }

    .weight-option {
        padding: 6px 10px;
        font-size: 12px;
    }

}


/* ==========================================
   REDUCE PRODUCT IMAGE / INFO GAP
========================================== */

.product-image {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.product-info {
    margin-top: 0 !important;
    padding-top: 2px !important;
}

.product-image img {
    display: block;
    margin-bottom: 0 !important;
}

.product-card {
    gap: 0 !important;
}

/* ==========================================
   FINAL PRODUCT IMAGE + INFO SPACING
========================================== */

.product-card .product-image {
    height: 195px !important;
    padding: 2px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.product-card .product-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
}

.product-card .product-info {
    margin: 0 !important;
    padding: 2px 14px 12px !important;
}

.product-card .product-info h3 {
    margin: 0 0 3px !important;
    line-height: 1.5 !important;
}

.product-card .weight-title {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

.product-card .weight-options {
    margin-top: 2px !important;
    margin-bottom: 6px !important;
}

/* وزن‌ها */
.product-card .weight-option {
    border: 1px solid #b9d8c0 !important;
    background: #f8fcf9 !important;
    padding: 6px 10px !important;
}

/* موبایل */
@media (max-width: 700px) {

    .product-card .product-image {
        height: 150px !important;
        padding: 1px !important;
    }

    .product-card .product-info {
        padding: 1px 9px 9px !important;
    }

    .product-card .product-info h3 {
        margin: 0 0 2px !important;
        line-height: 1.4 !important;
    }

    .product-card .weight-title {
        margin-top: 3px !important;
        margin-bottom: 3px !important;
    }

    .product-card .weight-options {
        margin-top: 2px !important;
        margin-bottom: 5px !important;
        gap: 5px !important;
    }

    .product-card .weight-option {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }
}

/* موبایل خیلی کوچک */
@media (max-width: 390px) {

    .product-card .product-image {
        height: 190px !important;
    }

}

.user-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--green);
  color: white !important;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none !important;
  font-weight: bold;
  white-space: nowrap;
}

.user-button:hover {
  background: var(--green);
}



.user-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  border:0;
  background:var(--green);
  color:white !important;
  padding:10px 16px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
  font-size:inherit;
  text-decoration:none;
}

.user-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 0;
  background: var(--green);
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: inherit;
  line-height: normal;
  text-decoration: none;
  min-height: 43px;
}

.user-button:hover {
  color: white;
  opacity: 0.9;
}

@media (max-width: 700px) {
  .user-button {
    padding: 9px 11px;
    font-size: 12px;
    min-height: 37px;
  }
}

