/* ------------------------------- */
/* تنظیمات اصلی و فونت‌ها */
/* ------------------------------- */
* {
    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;
}

/* ------------------------------- */
/* سبد خرید اصلی */
/* ------------------------------- */
.cart-main {
    padding: 40px;
    min-height: 500px;
}

.cart-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

/* لیست محصولات */
.cart-items-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.cart-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    padding: 15px 0;
    border-bottom: 2px solid #e8ecf1;
    font-family: "vazir";
    font-weight: bold;
    color: #333;
    text-align: center;
}

.cart-header h3:first-child {
    text-align: right;
}

.cart-items-list {
    min-height: 300px;
}

/* آیتم محصول */
.cart-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e8ecf1;
    text-align: center;
}

.product-info-cart {
    display: flex;
    gap: 15px;
    align-items: center;
    text-align: right;
}

.product-info-cart img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
}

.product-info-cart h4 {
    font-family: "vazir";
    color: #333;
    margin-bottom: 5px;
}

.product-info-cart p {
    font-family: "vazir";
    font-size: 12px;
    color: #888;
}

.cart-item-price,
.cart-item-total {
    font-family: "lalezar";
    font-size: 18px;
    color: #4f8ec1;
}

.quantity-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #6ba7d7;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s;
}

.quantity-btn:hover {
    background: #4f8ec1;
    transform: scale(1.05);
}

.quantity-control span {
    font-family: "vazir";
    font-size: 18px;
    min-width: 30px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ff6b6b;
    transition: 0.2s;
}

.remove-item:hover {
    color: #ff4444;
    transform: scale(1.1);
}

/* سبد خرید خالی */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.cart-empty h2 {
    font-family: "lalezar";
    color: #4f8ec1;
    margin-bottom: 10px;
}

.cart-empty p {
    font-family: "vazir";
    color: #666;
    margin-bottom: 25px;
}

.shop-now-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #6ba7d7;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-family: "lalezar";
    transition: 0.3s;
}

.shop-now-btn:hover {
    background: #4f8ec1;
    transform: translateY(-2px);
}

/* خلاصه سبد خرید */
.cart-summary {
    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;
}

.cart-summary h3 {
    font-family: "lalezar";
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8ecf1;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-family: "vazir";
    color: #555;
}

.total-row {
    border-top: 2px solid #e8ecf1;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: bold;
    font-size: 18px;
    color: #4f8ec1;
}

.discount-row {
    color: #ff8c00;
}

.coupon-section {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.coupon-section input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: "vazir";
    outline: none;
}

.coupon-section input:focus {
    border-color: #6ba7d7;
}

.coupon-section button {
    padding: 10px 20px;
    background: #e8ecf1;
    border: none;
    border-radius: 50px;
    font-family: "vazir";
    cursor: pointer;
    transition: 0.2s;
}

.coupon-section button:hover {
    background: #6ba7d7;
    color: white;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    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-bottom: 15px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

.continue-shopping {
    display: block;
    text-align: center;
    color: #6ba7d7;
    text-decoration: none;
    font-family: "vazir";
    transition: 0.2s;
}

.continue-shopping:hover {
    color: #4f8ec1;
}

/* مودال‌ها */
.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: 5% auto;
    width: 90%;
    max-width: 550px;
    border-radius: 25px;
    position: relative;
    animation: slideDown 0.3s ease;
    max-height: 85vh;
    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);
}

.modal-body {
    padding: 20px 30px 30px 30px;
    direction: rtl;
    text-align: right;
}

.modal-body h2 {
    font-family: "lalezar";
    color: #4f8ec1;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: "vazir";
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: "vazir";
    outline: none;
    transition: 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #6ba7d7;
    box-shadow: 0 0 0 3px rgba(107, 167, 215, 0.1);
}

.order-summary {
    background: #f5f7fb;
    padding: 15px;
    border-radius: 15px;
    margin: 20px 0;
    text-align: center;
}

.order-summary p {
    font-family: "lalezar";
    font-size: 18px;
}

.order-summary strong {
    color: #ff8c00;
    font-size: 22px;
}

.submit-order {
    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;
}

.submit-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

/* مودال موفقیت */
.success-modal {
    text-align: center;
}

.success-icon {
    font-size: 70px;
    margin-bottom: 20px;
}

.continue-shop-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: #6ba7d7;
    border: none;
    border-radius: 50px;
    color: white;
    font-family: "lalezar";
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.continue-shop-btn:hover {
    background: #4f8ec1;
}

/* ریسپانسیو */
@media (max-width: 1000px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
}

@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;
    }
    
    .cart-main {
        padding: 20px;
    }
    
    .cart-header {
        display: none;
    }
    
    .cart-item {
        display: flex;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .product-info-cart {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-header-mobile {
        display: block;
    }
}

@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;
    }
    
    .cart-items-section {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
}