/* ================================
   صفحه تست واقعی (Home Test)
   ================================ */

/* ریست و تنظیمات عمومی */
.home-container {
    font-family: "IRANSans", sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 2200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* -------------------------------
   🔹 اسلایدر

--------------------------------*/
.home-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 450px;
  border-radius: 10;
}

.slider-wrapper { 
    width: 100%; 
    height: 100%; 
    position: relative; 
}

.slide { 
    display: none; 
    width: 100%; 
    height: 100%; 
    transition: opacity 0.6s ease; 
}

.slide.active { 
    display: block; 
}

.slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 10px; 
}

.slider-controls { 
    position: absolute; 
    top: 50%; 
    width: 100%; 
    display: flex; 
    justify-content: space-between; 
    transform: translateY(-50%); 
    padding: 0 15px; 
}

.slider-controls span { 
    cursor: pointer; 
    background: rgba(0,0,0,0.4); 
    color: #fff; 
    padding: 8px 12px; 
    border-radius: 50%; 
    font-size: 20px; 
    user-select: none; 
    transition: background 0.3s; 
}

.slider-controls span:hover { 
    background: rgba(0,0,0,0.7); 
}

/* -------------------------------
   🔹 دسته‌بندی محصولات (سر دسته‌ها)
--------------------------------*/
.product-categories {
    padding: 50px 0 30px;
    text-align: center;
}

.product-categories h2 {
    font-size: 26px;
    margin-bottom: 25px;
    font-weight: 600;
    color: #222;
}

.category-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
    justify-items: center; 
}

.category-item { 
    background:#fff; 
    border-radius:8px; 
    box-shadow:0 2px 8px rgba(0,0,0,0.1); 
    transition:all 0.3s ease; 
    display:flex; 
    flex-direction:column; 
    overflow:hidden; 
    width: 100%;
    max-width: 380px;
    padding: 10px;
}

.category-item:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
}

.category-item img { 
    width:100%; 
    height:220px; 
    object-fit:contain; 
    border-radius: 6px;
}

.category-item h3 { 
    font-size:16px; 
    text-align:center; 
    margin:10px 0 0 0; 
}

/* -------------------------------
   🔹 featured grid (دو بخش با تصویر + عنوان + توضیح)
--------------------------------*/
.featured-items { 
    display: grid; 
    grid-template-columns: repeat(2,1fr); 
    gap: 15px; 
    margin:40px 0; 
    justify-items:center; 
}

.featured-item { 
    background:#fff; 
    border-radius:8px; 
    overflow:hidden; 
    text-align:center; 
    padding:15px; 
    box-shadow:0 2px 8px rgba(0,0,0,0.1); 
    width:100%;
    max-width: 500px;
}

.featured-item img { 
    width:100%; 
    height:240px; 
    object-fit:contain; 
    margin-bottom:10px; 
}

.featured-item h3 { 
    font-size:18px; 
    margin-bottom:5px; 
}

.featured-item p { 
    font-size:14px; 
    color:#555; 
}

/* -------------------------------
   🔹 محصولات جدید
--------------------------------*/
.latest-products {
    padding: 50px 0 30px;
    text-align: center;
}

.latest-products h2 {
    font-size: 26px;
    margin-bottom: 25px;
    font-weight: 600;
    color: #222;
}

.product-grid { 
    display:grid; 
    grid-template-columns:repeat(4,1fr); 
    gap:15px; 
    justify-items:center; 
}

.product-item { 
    background:#fff; 
    border-radius:8px; 
    overflow:hidden; 
    box-shadow:0 2px 8px rgba(0,0,0,0.1); 
    text-align:center; 
    width:100%;
    max-width: 380px;
}

.product-item img { 
    width:100%; 
    height:220px; 
    object-fit:contain; 
}

.product-item h3 { 
    font-size:16px; 
    margin:10px 0; 
}

.product-item .product-price { 
    font-size:14px; 
    color:#ff6200; 
    margin-bottom:10px; 
}

/* -------------------------------
   🔹 آخرین مقالات
--------------------------------*/
.latest-posts {
    padding: 50px 0 30px;
    text-align: center;
}

.latest-posts h2 {
    font-size: 26px;
    margin-bottom: 25px;
    font-weight: 600;
    color: #222;
}

.posts-grid { 
    display:grid; 
    grid-template-columns:repeat(4,1fr); 
    gap:15px; 
    justify-items:center; 
}

.post-item { 
    background:#fff; 
    border-radius:8px; 
    overflow:hidden; 
    box-shadow:0 2px 8px rgba(0,0,0,0.1); 
    text-align:center; 
    width:100%;
    max-width: 380px;
}

.post-item img { 
    width:100%; 
    height:200px; 
    object-fit:conver; 
}

.post-item h3 { 
    font-size:16px; 
    margin:10px 0; 
}

/* -------------------------------
   🔹 ریسپانسیو
--------------------------------*/
@media (max-width:992px){
    .category-grid, .product-grid { grid-template-columns:repeat(2,1fr); }
    .featured-items { grid-template-columns:1fr; }
    .posts-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width:600px){
    .category-grid, .product-grid, .featured-items, .posts-grid { grid-template-columns:1fr; }
    .home-slider { height:250px; }
    .slider-controls span { font-size:16px; padding:6px 10px; }
    .category-item img { height:180px; }
    .product-item img { height:180px; }
    .post-item img { height:160px; }
    .featured-item img { height:180px; }
}
