@import url("fonts.css");
/* Color Variables */
:root {
  --main: #fea03b;
  --main-dark: #FF6F3C;
  --del:#ff0000;
  --white: #fff;
  --black: #222;
  --gray: #555;
  --grey1: #f0f0f0;
  --grey2: #e9d7d3;
  --grey3: #f5f5f5;
  --bg-light: #f7f7f7;
  --transition: all 0.3s ease-in-out;
  --bg: #fff;
  --text: #222;
  --card: #fff;
  --border: #e5e5e5;
  --price:#fff0e0;
}


body.dark {
  --white: #111;
  --black: #fff;
  --bg-light: #222;
  --gray: #ccc;
  --bg: #111;
  --text: #f5f5f5;
  --card: #1a1a1a;
  --border: #333;
}


* { 
  direction: rtl; 
  margin:0; 
  padding:0; 
  box-sizing:border-box; 
}

html { 
  scroll-behavior: smooth; 
  font-size:62.5%; 
}

body { 
  font-family: 'Vazir'!important; 
  font-size:1.6rem; 
  background:var(--white); 
  color:var(--black); 
  line-height:1.5; 
  transition:var(--transition); 
  padding-bottom:0; 
}

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

.container { 
  max-width:114rem; 
  margin:0 auto; 
  padding:0 3rem; 
}

header { 
  position:sticky;
  top:0; 
  background:var(--white); 
  box-shadow:0 2px 8px rgba(0,0,0,0.05); 
  z-index:1000; 
}

/* =================== */
.d-flex {
  display: flex;
  align-items: center;
}
.top-nav {
  background-color: var(--main);
  font-size: 1.3rem;
  color: var(--gray);
}

.top-nav div {
  justify-content: space-between;
  height: 4.5rem;
}

.top-nav a {
  color: var(--gray);
  padding: 0 0.5rem;
  font-size: 30px;
}
/*===========================*/
.nav { 
  display:flex; 
  justify-content:space-between; 
  align-items:center; 
  height:70px; 
  gap:2rem; 
}

.logo {
  font-size: 2rem;
  font-weight: 700;
}

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

.logo .main {
  color: var(--main); 
}

.search-box { 
  position:relative; 
  flex:1; display:flex; 
  align-items:center; 
}

.search-box input { 
  width:100%; 
  padding:0.8rem 3.5rem 0.8rem 1.2rem; 
  border:1px solid #ddd; 
  border-radius:30px; 
  background:var(--bg-light); 
  color:var(--black); 
  font-size:1.5rem; 
  transition:var(--transition); 
  font-family:inherit; 
}

.search-box input:focus { 
  border-color:var(--main); 
  background:var(--white); 
  outline:none; 
}

.search-box i { 
  position:absolute; 
  left:15px; 
  font-size:2rem; 
  color:var(--gray); 
  pointer-events:none; 
}

.icons { 
  display:flex; 
  align-items:center; 
}

.icon {
   cursor:pointer; 
   font-size:2.4rem; 
   color:var(--gray);
   margin-right:1.2rem; 
   position:relative; 
   transition:color 0.3s;
}

.icon:hover { 
  color:var(--main); 
}

.icon span { 
  position:absolute; 
  top:-4px; 
  right:-10px; 
  background-color:var(--main); 
  color: var(--white); 
  border-radius:50%; 
  font-size:1.2rem; height:1.8rem; width:1.8rem; display:flex; align-items:center; justify-content:center; }
.dark-toggle { background:none; border:none; font-size:2.2rem; cursor:pointer; color:var(--gray); margin-right:1rem; }

/* ===== NAV-BAR DESKTOP ===== */
.sub-nav { background: var(--white); padding:0.8rem 0;}
.sub-nav .container { display:flex; gap:2rem; justify-content:right;}
.sub-nav a { color:var(--black); font-weight:500; font-size:1.6rem; transition:color 0.3s;}
.sub-nav a:hover { color:var(--main);}
.sub-nav .container h3 {margin-right: auto;}
/* ===== MOBILE HAMBURGER BUTTON ===== */
.mobile-hamburger-btn { display: none; background: none; border: none; font-size: 2.4rem; cursor: pointer; color: var(--gray); margin-right: 1rem; }

/* ===== MOBILE MENU ===== */
.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 70px;
  right: 10px;
  background: var(--bg-light);
  width: 200px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 0.8rem;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}
.mobile-menu.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu a {
  padding:1rem;
  font-size:1.6rem;
  color: var(--black);
  border-bottom:1px solid #ddd;
}
.mobile-menu a:last-child { border-bottom:none; }
.mobile-menu a:hover { background-color: var(--main);color: var(--white); }

/* ===== MOBILE FOOTER ===== */
footer { background:var(--bg-light); padding:2rem; text-align:center; font-size:1.4rem; color:var(--gray);}
.mobile-footer { display:none; }

/* ===== MEDIA QUERY ===== */
@media(max-width:768px){
  .sub-nav { display:none;}
  .mobile-hamburger-btn { display:block; }
  .nav { flex-wrap:wrap; height:auto; gap:1rem; padding:1rem 0; }
  .search-box { width:100%; flex:1 1 100%; order:3; }
  .search-box input { font-size:1.4rem; }
  .search-box i { left:12px; }
  .icon.profile { display:none; }
  .mobile-footer { display:flex; justify-content:space-around; align-items:center; background:var(--white); border-top:1px solid #ddd; position:fixed; bottom:0; right:0; width:100%; height:60px; z-index:1000; box-shadow:0 -2px 8px rgba(0,0,0,0.1);}
  body.dark .mobile-footer { background:#111; border-top:1px solid #333; }
  .mobile-footer .footer-item { display:flex; flex-direction:column; align-items:center; font-size:1.2rem; color:var(--gray);}
  .mobile-footer i { font-size:2.2rem; margin-bottom:3px;}
  .mobile-footer .footer-item.active,.mobile-footer .footer-item:hover { color:var(--main);}
}


@media only screen and (max-width: 567px) {
  footer{
   display: none;
  }
  body {padding-bottom: 70px;}
}
/* ===== silider  index ===== */
.slider-container {
  position: relative;
  width: 98%;
  max-width: 1100px;
  margin: auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: none;
}

.slider {
  display: flex;
  transition: transform 0.5s ease;
}

/* ===== اسلاید ===== */
.slide {
  min-width: 100%;
  position: relative;
  height: 340px;  
  overflow: hidden;
  background: #000;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  display: block;
}
/* ===== موبایل ===== */

@media (max-width: 768px) {
  .slide {
    height: 35vh;
    min-height: 220px;
  }

  .slide img {
    object-fit: cover;
  }
}
/* ============= categoy btn =========== */
.category-wrapper {
  max-width: 1100px;
  margin: 25px auto 25px auto;
  padding: 0 10px;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 14px;
}

.button-grid button {
  font-family: 'Vazir' !important;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.button-grid img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 6px;
  transition: 0.2s;
}

.button-grid span {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.button-grid button:hover img {
  transform: scale(1.05);
}

h2 {
  text-align: center;
  margin-bottom: 15px;
}

/* ================== catagoy btn =================*/
@media (max-width: 768px) {

  .button-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 8px;
    -webkit-overflow-scrolling: touch;
  }

  .button-grid::-webkit-scrollbar {
    display: none;
  }

  .button-grid button {
    flex: 0 0 auto;
    min-width: 110px;
    padding: 10px 6px;
  }

  .button-grid img {
    width: 60px;
    height: 60px;
  }

  .button-grid span {
    font-size: 13px;
  }
}

/* New Arrivals */

.new-arrival .title {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.new-arrival .title h1 {
  font-size: 3rem;
  text-transform: uppercase;
  font-weight: 600;
  color: #ff6f61; /* رنگ جذاب */
  letter-spacing: 2px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.1);
  display: inline-block;
  transition: color 0.3s ease;
  position: relative;
}

/* خط gradient زیر عنوان */
.new-arrival .title h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  margin: 10px auto 0;
  background: linear-gradient(90deg, #ff6f61, #f7d794);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* افکت هنگام هاور */
.new-arrival .title h1:hover {
  color: #f7d794;
}

.new-arrival .title h1:hover::after {
  width: 100px;
}

/* اگر بخواهید یک متن توضیح کوتاه زیر عنوان اضافه کنید */
.new-arrival .title p {
  font-size: 1.2rem;
  color: #555;
  margin-top: 0.5rem;
}

/* =================Banner Section ============== */
.banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10rem 10%;
  background: linear-gradient(135deg, #ffe8e0, #fff0f5); /* gradient ملایم */
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

/* Left content */
.banner .left {
  max-width: 50%;
}

.banner .trend {
  display: block;
  font-size: 1.8rem;
  font-weight: 500;
  color: #ff6f61;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.banner h1 {
  font-size: 4rem;
  color: var(--black);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.banner p {
  font-size: 1.4rem;
  color: var(--gray);
  margin-bottom: 2rem;
}

.banner .Bannr-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: #ff6f61;
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.banner .Bannr-btn:hover {
  background: #f78c7b;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Right image */
.banner .right {
  max-width: 45%;
  position: relative;
}

.banner .right img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 1200px) {
  .banner {
    flex-direction: column-reverse;
    text-align: center;
    padding: 6rem 5%;
  }

  .banner .left,
  .banner .right {
    max-width: 100%;
  }

  .banner h1 {
    font-size: 3rem;
  }

  .banner p {
    font-size: 1.2rem;
  }
}

/* ======================Login Form=============== */
.login-form {
  padding: 5rem 0;
  max-width: 50rem;
  margin: 5rem auto;
}

.login-form form {
  display: flex;
  flex-direction: column;
}

.login-form form h1 {
  margin-bottom: 1rem;
}
.login-form form p {
  margin-bottom: 2rem;
}

.login-form form label {
  margin-bottom: 1rem;
}

.login-form form input {
  border: 1px solid #ccc;
  outline: none;
  padding: 1.5rem 0;
  text-indent: 1rem;
  font-size: 1.6rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
}

.login-form form input::placeholder {
  font-size: 1.6rem;
  color: #222;
}

.login-form form .buttons {
  margin-top: 1rem;
}

.login-form form button {
  outline: none;
  border: none;
  font-size: 1.6rem;
  padding: 1rem 3rem;
  margin-right: 1.5rem;
  border-radius: 15px;
  background-color: var(--main);
  color: white;
  cursor: pointer;
}

.login-form form p a {
  color: var(--main-dark);
}

/* ==========Mega Menu================ */
.mega-wrapper {
  position: relative;
}

.mega-toggle {
  cursor: pointer;
}

.mega-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 1100px;
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 5px 30px rgba(0,0,0,.15);
  display: none;
  grid-template-columns: 200px 1fr;
  overflow: hidden;
  z-index: 999;
}

/* نمایش با hover */
.mega-wrapper:hover .mega-menu {
  display: grid;
}

/* ستون راست */
.mega-right {
  background: #f7f7f7;
  padding: 10px;
}

.mega-right-item {
  padding: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  color: #444;
  font-size: 15px;
}

.mega-right-item:hover {
  background: #fff;
  color: var(--main-dark);
}

/* ستون چپ */
.mega-left {
  position: relative;
  background: #fff;
  padding: 20px;
}

.mega-left-panel {
  display: none;
}

.mega-left-panel.active {
  display: block;
}

.mega-left-panel h4 {
  font-size: 17px;
  margin-bottom: 10px;
}

.mega-left-panel a {
  display: block;
  padding: 5px 0;
  color: #555;
}

.mega-left-panel a:hover {
  background: #f7f7f7;
  color: var(--main-dark);
}
/* ==================Cart Items====================== */
.cart {
  margin: 1rem auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.cart-info {
  display: flex;
  flex-wrap: wrap;
}

th {
  text-align: center;
  padding: 0.5rem;
  color: #fff;
  background-color: var(--main);
  font-weight: normal;
}

td {
  padding: 1rem 0.5rem;
}

td input {
  width: 5rem;
  height: 3rem;
  padding: 0.5rem;
}

td a {
  color: var(--main);
  font-size: 1.4rem;
}

td img {
  width: 8rem;
  height: 8rem;
  margin-right: 1rem;
}

.total-price {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  margin-top: 2rem;
}

.total-price table {
  border-top: 3px solid var(--orange);
  width: 100%;
  max-width: 35rem;
}

td:last-child {
  text-align: right;
}

th:last-child {
  text-align: right;
}

.checkout {
  display: inline-block;
  background-color: var(--main);
  color: white;
  padding: 1rem;
  margin-top: 1rem;
}

.checkout-btn{
  display: inline-block; 
  width: 40%;
  text-align: center; 
  padding: 10px 20px; 
  background-color: var(--main); 
  color: white; 
  text-decoration: none;
   border-radius: 5px;
  }


@media only screen and (max-width: 567px) {
  .cart-info p {
    display: none;
  }
}

/* ========================Products  css New ========================== */
/* استایل شما بدون تغییر */
.products-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* دقیقاً ۵ ستون */
  gap: 16px;
  padding: 16px;
  background: var(--card);
}

.product-card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: 0.3s ease;
  position: relative;
  cursor: pointer;
}

.product-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.discount-badge {
  position: absolute;
  top: 0;
  right: 7px;
  background: var(--main);
  color: #3a3a3a;
  font-size: 14px;
  padding: 8px 10px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  z-index: 50;
}

.image-box {
  position: relative;
  padding: 12px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-box i {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 20px;
  color: var(--main);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

.info { 
  padding: 15px; 
  flex:1; 
  display:flex; 
  flex-direction: column; 
}

.title-pro { font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.brand { font-size: 14px; color: #555; margin-bottom: 8px; }
.stock-status { font-size: 14px; margin-bottom: 8px; }
.in-stock { color: #27ae60; font-weight: 600; }
.out-stock { color: #e74c3c; font-weight: 600; }

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 10px;
}

.price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 18px;
  color: var(--black);
  line-height: 1.2;
}

.price del {
  order: -1;              /* انتقال del به بالا */
  font-size: 13px;
  color: var(--del);
  margin: 0;
}


/* آیکن‌ها */
.btn-box {
  display: flex;
  gap: 8px;
}

.btn-pro {
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #444;
  font-size: 22px;
  border: none;
  cursor: pointer;
}

.btn-pro:hover {
  background: transparent;
  color: #FF6F3C;
}

.btn.favorite {
  font-size: 20px;
}

.btn.favorite:hover {
  background: transparent;
  color: #FF6F3C;
}

.disabled-btn {
  background: #fdcc99 !important;
  cursor: not-allowed !important;
  color: #666 !important;
}

@media (max-width: 600px) {
  .products-container {
      grid-template-columns: 1fr;
  }

  .product-card {
      flex-direction: row;
      height: 180px;
  }

  .image-box {
      flex: 0 0 35%;
      padding: 8px;
      border-bottom: none;
      border-left: 1px solid #eee;
  }

  .product-card img {
      height: 100%;
  }

  .info {
      padding: 8px;
  }

  .title { font-size: 16px; }
  .brand, .stock-status, .price { font-size: 18px; }
  .btn-box { margin-top: 5px; gap: 5px; flex-wrap: wrap; }
  .btn-pro { font-size: 20px; padding: 5px 0; }
  .btn.favorite { font-size: 20px; }
}
/* ====================== Product Details =========================== */
.product-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--card);
  padding: 20px;
  border-radius: 10px;
}

.images {
  flex: 1;
  min-width: 300px;
}

.main-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e5e5e5; /* بردر نازک و ظریف */
}

.thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.thumbnails img {
  width: 60px;
  height: 60px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 5px;
}

.thumbnails img.active {
  border-color: var(--main-dark);
}

.details {
  flex: 1;
  min-width: 300px;
}


.colors {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.color-option {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  cursor: pointer;
  border: 2px solid transparent;
}

.color-option.active {
  border-color: var(--main-dark);
}

.sizes {
  margin: 15px 0;
}

.sizes select {
  padding: 8px;
  font-size: 16px;
}

.description, .specs {
  margin-top: 20px;
  max-width: 95%;
}

.description ul {
  padding-right: 20px; /* برای فارسی */
  margin-top: 10px;
}

.description li {
  line-height: 1.9;
}

/* ---------- Specs Table ---------- */
.specs table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
}

.specs th {
  background: var(--main);
  color: var(--gray);
  padding: 12px;
  text-align: center;
  font-weight: bold;
}

.specs td {
  padding: 12px;
  background: var(--bg-light);
  border-bottom: 1px solid #eee;
}

.specs tr:last-child td {
  border-bottom: none;
}

.add-to-cart-box {
display: flex;
align-items: center;
gap: 15px;
margin: 20px 0;
}

.qty-box {
display: flex;
align-items: center;
background: #f5f5f5;
border-radius: 25px;
overflow: hidden;
border: 1px solid #f5f5f5;
}

.qty-input {
width: 60px;
text-align: center;
padding: 8px;
border: none;
background: transparent;
font-size: 18px;
}

.add-cart-btn {
padding: 12px 30px;
background: var(--main);
border: none;
color: var(--gray);
font-size: 18px;
border-radius: 10px;
cursor: pointer;
transition: 0.3s;
}

.add-cart-btn:hover {
background: var(--main);
}
/* =================  filter-buttons  ============================ */
/* فیلتر پیشرفته وسط‌چین */
.filter-buttons-wrapper {
    display: flex;
    justify-content: center; /* وسط‌چین کل کانتینر */
    overflow: hidden; /* جلوگیری از overflow اصلی */
    width: 100%;
}

.filter-buttons {
    display: inline-flex; /* نمایش به صورت inline-flex برای وسط‌چین بهتر */
    flex-wrap: wrap;      /* ردیف‌بندی خودکار */
    gap: 10px;
    padding-bottom: 5px;
    scroll-behavior: smooth;
    margin-top: 15px; /* فاصله از بالای بخش */
}

.filter-btn {
    flex: 0 0 auto;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: transparent;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
}
.filter-btn i { font-size: 16px; transition: transform 0.3s; }
.filter-btn.active i { transform: scale(1.2) rotate(-10deg); }
.filter-btn:hover, .filter-btn.active {
    background-color: var(--main);
    border: 1px solid var(--main);
    color: #fff;
    box-shadow: 0 4px 12px rgba(39,174,96,0.15);
}
.filter-buttons::-webkit-scrollbar { display: none; }
.filter-buttons { -ms-overflow-style: none; scrollbar-width: none; }

@media (max-width: 768px) {

  .filter-buttons-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .filter-buttons {
    flex-wrap: nowrap;        /* ❌ شکستن ردیف */
    justify-content: flex-start;
    padding: 10px 8px;
    gap: 8px;
  }

  .filter-btn {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
  }

  .filter-btn i {
    font-size: 14px;
  }
}
/* =============================== index Post ================================== */
.posts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding-bottom: 60px; /* فاصله از فوتر */
}
.post-card {
  width: 250px;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s;
}
.post-card:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.post-card .image-box img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.post-card .info {
  padding: 10px;
}
.post-card .title {
  font-size: 18px;
  margin: 0 0 10px 0;
}
.post-card .summary {
  font-size: 14px;
  color: #555;
  height: 50px;
  overflow: hidden;
}
.read-more {
  display: inline-block;
  margin-top: 5px;
  color: #007bff;
  text-decoration: none;
}
.read-more:hover {
  text-decoration: underline;
}
/* =============================== */