/* style.css */

/* فونت */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

/* Reset ساده */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* بدنه کلی سایت */
body {
    font-family: 'Poppins', sans-serif;
    background: #fff; /* پس‌زمینه سفید کلی */
    color: #222;
    min-height: 100vh;
    /* حذف display:flex از body برای جلوگیری از تداخل با about.css */
}

/* ====== هدر ====== */
header {
    background: #0f172a;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: #60a5fa;
}

nav a {
    color: #ccc;
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #60a5fa;
}

.header-buttons a {
    margin-left: 15px;
    padding: 8px 15px;
    background: #60a5fa;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.header-buttons a:hover {
    background: #3b82f6;
}

/* ====== فوتر ====== */
footer {
    background: #0f172a;
    color: #ccc;
    padding: 40px 20px 20px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}

.footer-container div {
    flex: 1 1 250px;
}

.footer-container h3 {
    color: #60a5fa;
    margin-bottom: 10px;
}

.footer-container ul {
    list-style: none;
    padding: 0;
}

.footer-container a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-container a:hover {
    color: #60a5fa;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.9em;
    border-top: 1px solid #334155;
    margin-top: 30px;
}

.spacer {
  height: 5px; /* نیم سانت */
  width: 100%;
  background: transparent; /* یا رنگ دلخواه */
}

/* ====== ریسپانسیو ====== */
@media (max-width: 992px) {
    h1 {
        font-size: 40px;
    }
    .products-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }
    nav {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 10px;
    }
    nav a {
        margin: 10px;
    }
    h1 {
        font-size: 28px;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .product-info {
        font-size: 16px;
        padding: 0 10px;
    }
    footer .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 22px;
    }
    .breadcrumb {
        font-size: 12px;
        text-align: center;
    }
    .header-buttons {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 10px;
    }
}

.product {
  transition: transform 0.3s ease;
}

.product:hover {
  animation: shake 0.5s;
}

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

/* ====== ریسپانسیو پیشرفته ====== */

/* اسلایدر اصلی */
.slider-wrapper,
.slider-box,
.banner-slider,
.banner-slides,
.slides {
    width: 100%;
    overflow: hidden;
}

.banner-slides img,
.slides img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* دکمه‌های اسلایدر */
.banner-prev, .banner-next,
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    font-size: 2em;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
}

.banner-prev, .prev { left: 10px; }
.banner-next, .next { right: 10px; }

.banner-prev:hover, .banner-next:hover,
.prev:hover, .next:hover {
    background: rgba(0,0,0,0.7);
}

/* info-box و main-box */
.info-box, .main-box {
    width: 95%;
    margin: 20px auto;
}

/* slider-box */
.slider-box {
    margin-bottom: 30px;
}

/* caption */
.caption {
    text-align: center;
    padding: 10px 5px;
    font-size: 16px;
}

/* محصولات مرتبط */
.related-products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    align-items:center;
    justify-content:center;
}

.related-products .product {
    flex: 1 1 200px;
    max-width: 350px;
}

.related-products .product img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* متن‌ها و هدر */
.info-box h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

/* Media Queries اضافی برای موبایل */
@media (max-width: 1024px) {
    .caption { font-size: 15px; }
    .banner-prev, .banner-next, .prev, .next { font-size: 1.5em; }
}

@media (max-width: 768px) {
    .banner-prev, .banner-next, .prev, .next { font-size: 1.2em; padding: 4px 8px; }
    .info-box h2 { font-size: 1.5em; }
    .caption { font-size: 14px; }
    .related-products { gap: 10px; }
}

@media (max-width: 480px) {
    .banner-prev, .banner-next, .prev, .next { font-size: 1em; padding: 3px 6px; }
    .info-box h2 { font-size: 1.2em; }
    .caption { font-size: 13px; }
}
