/* ------------------------------- */
/* تنظیمات اصلی و فونت‌ها */
/* ------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fb;
}

@font-face {
    font-family: "lalezar";
    src: url("../assets/font/lalezar.ttf");
}
@font-face {
    font-family: "vazir";
    src: url(../assets/font/Vazir.ttf);
}
@font-face {
    font-family: "iransans";
    src: url("../assets/font/iran-sans.ttf");
}

/* ------------------------------- */
/* تنظیمات هدر */
/* ------------------------------- */
.header {
    width: 100%;
    height: 75px;
    background-color: #6ba7d7;
    display: flex;
    border-radius: 3px;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
}

.header-div-sec1 {
    width: 20%;
    height: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: "iransans";
    border-right: 2px solid yellow;
}

.header-div-sec1 p {
    font-size: 22px;
    color: white;
    margin: 0;
}

.header-div-sec1 a {
    text-decoration: none;
    color: white;
}

.header-div-sec2 {
    width: 80%;
    height: 75px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    font-family: "vazir";
}

.header-div-sec2 p {
    font-size: 18px;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
}

.header-div-sec2 a {
    text-decoration: none;
    padding: 10px 20px;
    color: white;
    border-radius: 90px;
    display: inline-block;
    transition: 0.3s;
}

.header-div-sec2 a:hover,
.header-div-sec2 a.active {
    background-color: rgba(255, 255, 255, 0.25);
    color: black;
}

/* ------------------------------- */
/* بنر */
/* ------------------------------- */
.banner-side {
    width: 100%;
    height: 350px;
    overflow: hidden;
    margin-top: 75px;
}

.banner-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ------------------------------- */
/* متن بخش */
/* ------------------------------- */
.sec-txt {
    font-size: 30px;
    font-family: "iransans";
    color: #4f8ec1;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fb, #e8ecf1);
    margin: 20px 0;
}

.sec-txt p {
    position: relative;
    padding-bottom: 10px;
}

.sec-txt p::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: #ffb347;
    border-radius: 3px;
}

/* ------------------------------- */
/* صفحه محصولات */
/* ------------------------------- */
.products-main {
    padding: 40px;
    min-height: 500px;
}

.products-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* ------------------------------- */
/* سایدبار فیلتر */
/* ------------------------------- */
.filter-sidebar {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-sidebar h3 {
    font-family: "lalezar";
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8ecf1;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h4 {
    font-family: "vazir";
    color: #555;
    margin-bottom: 12px;
    font-size: 15px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: "vazir";
    font-size: 14px;
    color: #666;
}

.filter-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6ba7d7;
}

.price-range {
    margin-top: 10px;
}

.price-range input {
    width: 100%;
    margin: 15px 0;
    accent-color: #ffb347;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-family: "vazir";
    font-size: 13px;
    color: #666;
}

.reset-filters {
    width: 100%;
    padding: 10px;
    background: #e8ecf1;
    border: none;
    border-radius: 12px;
    font-family: "vazir";
    cursor: pointer;
    transition: 0.2s;
    margin-top: 15px;
}

.reset-filters:hover {
    background: #6ba7d7;
    color: white;
}

/* ------------------------------- */
/* نوار ابزار محصولات */
/* ------------------------------- */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: "vazir";
    outline: none;
    transition: 0.2s;
    padding-right: 45px;
}

.search-box input:focus {
    border-color: #6ba7d7;
    box-shadow: 0 0 0 3px rgba(107, 167, 215, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.sort-box select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: "vazir";
    background: white;
    cursor: pointer;
    outline: none;
}

.sort-box select:focus {
    border-color: #6ba7d7;
}

/* ------------------------------- */
/* گرید محصولات */
/* ------------------------------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff8c00;
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-family: "lalezar";
    font-size: 12px;
    z-index: 1;
}

.product-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f7fb;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    padding: 20px;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-family: "vazir";
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.product-brand {
    font-family: "vazir";
    font-size: 12px;
    color: #6ba7d7;
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 12px 0;
}

.current-price {
    font-family: "lalezar";
    font-size: 22px;
    color: #ff8c00;
}

.old-price {
    font-family: "vazir";
    font-size: 13px;
    color: #aaa;
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.stars {
    color: #ffb347;
    font-size: 14px;
    letter-spacing: 2px;
}

.rating-count {
    font-family: "vazir";
    font-size: 12px;
    color: #888;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: #6ba7d7;
    border: none;
    border-radius: 12px;
    color: white;
    font-family: "lalezar";
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.add-to-cart-btn:hover {
    background: #4f8ec1;
}

/* ------------------------------- */
/* صفحه‌بندی */
/* ------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: "vazir";
    cursor: pointer;
    transition: 0.2s;
}

.page-btn:hover {
    background: #6ba7d7;
    color: white;
    border-color: #6ba7d7;
}

.page-btn.active {
    background: #6ba7d7;
    color: white;
    border-color: #6ba7d7;
}

/* ------------------------------- */
/* مودال محصول */
/* ------------------------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 3% auto;
    width: 90%;
    max-width: 900px;
    border-radius: 25px;
    position: relative;
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: sticky;
    top: 10px;
    left: 20px;
    float: left;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    background: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 10px;
    z-index: 10;
}

.close-modal:hover {
    color: #ff4d4d;
    transform: scale(1.1);
}

.product-modal .modal-body {
    padding: 30px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.product-detail-image img {
    width: 100%;
    border-radius: 20px;
}

.product-detail-info h2 {
    font-family: "lalezar";
    color: #333;
    margin-bottom: 10px;
}

.product-detail-info .brand {
    font-family: "vazir";
    color: #6ba7d7;
    margin-bottom: 15px;
}

.product-detail-info .price {
    font-family: "lalezar";
    font-size: 28px;
    color: #ff8c00;
    margin: 15px 0;
}

.product-detail-info .description {
    font-family: "vazir";
    line-height: 1.8;
    color: #666;
    margin: 15px 0;
}

.product-detail-info .stock {
    font-family: "vazir";
    color: #4caf50;
    margin: 15px 0;
}

.detail-add-to-cart {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ffb347, #ff8c00);
    border: none;
    border-radius: 50px;
    color: white;
    font-family: "lalezar";
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 20px;
}

.detail-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

/* ------------------------------- */
/* نوتیفیکیشن */
/* ------------------------------- */
.notification {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #4caf50;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "vazir";
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1001;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.notification.show {
    transform: translateX(0);
}

.notification-icon {
    font-size: 20px;
    font-weight: bold;
}

/* ------------------------------- */
/* بدون محصول */
/* ------------------------------- */
.no-products {
    text-align: center;
    padding: 60px;
    background: white;
    border-radius: 20px;
    grid-column: 1 / -1;
}

.no-products p {
    font-family: "vazir";
    color: #666;
    font-size: 18px;
}

/* ------------------------------- */
/* ریسپانسیو */
/* ------------------------------- */
@media (max-width: 1000px) {
    .products-container {
        grid-template-columns: 1fr;
    }
    
    .filter-sidebar {
        position: static;
        display: none;
    }
    
    .filter-sidebar.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .header-div-sec1 {
        width: 30%;
    }
    
    .header-div-sec1 p {
        font-size: 14px;
    }
    
    .header-div-sec2 {
        width: 70%;
    }
    
    .header-div-sec2 a {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .banner-side {
        height: 200px;
    }
    
    .sec-txt {
        font-size: 20px;
        height: 60px;
    }
    
    .products-main {
        padding: 20px;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .products-toolbar {
        flex-direction: column;
    }
    
    .search-box {
        max-width: 100%;
    }
}

@media (max-width: 550px) {
    .header-div-sec1 p {
        font-size: 10px;
    }
    
    .header-div-sec2 a {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .banner-side {
        height: 150px;
    }
    
    .sec-txt {
        font-size: 16px;
        height: 50px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}