/* ---------------
   استایل کلی
   --------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}


@font-face {
	font-family: IRANSansWeb_Light;
	font-style: normal;
	font-weight: bold;
	src:url('../font/IRANSansWeb_Light.eot');
	src:url('../font/IRANSansWeb_Light.eot?#iefix') format('embedded-opentype'),  /* IE6-8 */
		 url('../font/IRANSansWeb_Light.woff2') format('woff2'),  /* FF39+,Chrome36+, Opera24+*/
		 url('../font/IRANSansWeb_Light.woff') format('woff'),  /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
		 url('../font/IRANSansWeb_Light.ttf') format('truetype');
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "IRANSansWeb_Light", sans-serif;
    background-color: #f6f6f6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    padding: 1.5rem 0 3rem;
}

.page-title {
    font-size: 1.2rem;
    margin: 1.5rem 0 1rem;
}

/* هدر */

.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.logo a {
    font-weight: 700;
    text-decoration: none;
    color: #e73844;
}

.main-nav a {
    margin-left: 1rem;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
}

.main-nav a:hover {
    color: #000;
}

/* سبد خرید */

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-gap: 1rem;
    align-items: flex-start;
}

.cart-box,
.summary-box,
.checkout-form-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.cart-item {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1fr;
    grid-gap: 1rem;
    align-items: center;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-image {
    border-radius: 8px;
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.product-title {
    font-size: 0.95rem;
    margin: 0 0 0.25rem;
}

.product-code {
    margin: 0;
    font-size: 0.8rem;
    color: #888;
}

.cart-item-price,
.cart-item-qty,
.cart-item-total {
    font-size: 0.9rem;
}

.cart-item-price span:last-child,
.cart-item-total span:last-child {
    font-weight: 600;
}

/* تعداد */

.qty-controls {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #ddd;
    overflow: hidden;
}

.qty-btn {
    border: none;
    background-color: #f1f1f1;
    padding: 0.2rem 0.7rem;
    font-size: 1rem;
    cursor: pointer;
}

#qty-input {
    width: 45px;
    border: none;
    text-align: center;
    padding: 0.2rem;
    font-size: 0.9rem;
    background-color: #fff;
}

/* خلاصه سفارش */

.summary-box h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.summary-total {
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
    font-weight: 700;
}

.muted {
    color: #999;
}

/* دکمه‌ها */

.primary-btn,
.secondary-btn,
.text-btn {
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    text-align: center;
    display: inline-block;
}

.primary-btn {
    background-color: #e73844;
    color: #fff;
}

.primary-btn:hover {
    background-color: #d02f3a;
}

.secondary-btn {
    background-color: #fff;
    border: 1px solid #e73844;
    color: #e73844;
}

.secondary-btn:hover {
    background-color: #fff4f4;
}

.text-btn {
    background: none;
    color: #666;
}

.full-width {
    width: 100%;
}

/* فرم صفحه پرداخت */

.checkout-layout {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    grid-gap: 1rem;
}

.checkout-form-box h3 {
    margin-top: 0;
}

.form-row {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.form-row label {
    display: block;
    margin-bottom: 0.25rem;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
    background-color: #fff;
}

.required {
    color: #e73844;
}

.form-separator {
    border: none;
    border-top: 1px solid #eee;
    margin: 1rem 0;
}

/* ردیف محصول در خلاصه صفحه دوم */

.summary-product {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.summary-product-title {
    margin-bottom: 0.15rem;
}

.summary-product-qty {
    color: #888;
    font-size: 0.8rem;
}

/* فوتر */

.site-footer {
    border-top: 1px solid #e5e5e5;
    background-color: #fff;
    padding: 1rem 0;
    font-size: 0.8rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a {
    margin-left: 0.75rem;
    text-decoration: none;
    color: #777;
}

.footer-copy {
    margin: 0;
}

/* پاپ‌آپ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    background-color: #fff;
    max-width: 400px;
    width: 90%;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal h3 {
    margin-top: 0;
}

/* ریسپانسیو */

@media (max-width: 900px) {
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 1fr;
        grid-row-gap: 0.5rem;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .main-nav a {
        margin-left: 0.5rem;
    }
}
