/* ======================  استایل پایه ====================== */

@font-face {
	font-family: shabnam;
	src: url(../fonts/Shabnam-Bold.ttf);
	font-weight: 700;
}

@font-face {
	font-family: shabnam;
	src: url(../fonts/Shabnam-Medium.ttf);
	font-weight: 500;
}

@font-face {
	font-family: shabnam;
	src: url(../fonts/Shabnam-Light.ttf);
	font-weight: 300;
}

@font-face {
	font-family: shabnam;
	src: url(../fonts/Shabnam-Thin.ttf);
	font-weight: 100;
}

* {
	margin: 0;
	padding: 0;
	border: none;
	outline: none;
	text-decoration: none;
	list-style: none;
	box-sizing: border-box;
	direction: rtl;
	font-family: "shabnam", Tahoma, sans-serif;
	user-select: none;
}

:root {
	/* Background Colors */
	--bg-main: #f6f6f6;
	--bg-surface: #ffffff;
	--bg-accent: #3b9644;
	--bg-accent-light: rgba(86, 181, 90, 0.12);
	--bg-modal: rgba(0, 0, 0, 0.5);

	/* Border Colors */
	--border-default: #e8ecef;
	--border-accent: rgba(86, 181, 90, 0.25);

	/* Text Colors */
	--text-primary: #1e3d1c;
	--text-secondary: #888787;
	--text-inverse: #ffffff;
	--text-accent: #0e8018;

	/* pitzachi page  */
	--gray-10: rgba(33, 31, 29, 1);
	--gray-20: rgba(33, 31, 29, 0.9);
	--gray-30: rgba(33, 31, 29, 0.8);
	--gray-40: rgba(33, 31, 29, 0.7);
	--gray-50: rgba(33, 31, 29, 0.6);
	--gray-60: rgba(33, 31, 29, 0.5);
	--overlay-gradient-dark: linear-gradient(
		0deg,
		var(--gray-10) 5%,
		var(--gray-20) 30%,
		var(--gray-30) 50%,
		var(--gray-40) 70%,
		var(--gray-50) 80%,
		var(--gray-60) 100%
	);
	--overlay-gradient-welcome: linear-gradient(
		0deg,
		var(--gray-10) 0%,
		var(--gray-20) 8%,
		var(--gray-40) 40%,
		var(--gray-50) 50%,
		var(--gray-40) 60%,
		var(--gray-20) 80%,
		var(--gray-10) 100%
	);

	--color-gradient: linear-gradient(
		160deg,
		rgba(86, 181, 90, 0.12),
		rgba(255, 233, 199, 0.35)
	);

	--color-success: #3b9644;
	--color-success-bg: rgba(86, 181, 90, 0.12);
	--color-warning: #a07200;
	--color-warning-bg: rgba(255, 193, 7, 0.15);
	--color-error: #b02a37;
	--color-error-bg: rgba(220, 53, 69, 0.12);
	--color-info: #0b64d0;
	--color-info-bg: rgba(13, 110, 253, 0.12);

	--chevron-right: url(../images/icons/light-mode/chevron-right.svg);
	--back: url(../images/icons/light-mode/back.svg);
	--plus: url(../images/icons/light-mode/plus.svg);
	--corner-up-left: url(../images/icons/light-mode/corner-up-left.svg);
	--check: url(../images/icons/light-mode/check.svg);
	--cross: url(../images/icons/light-mode/cross.svg);

	--bin: url(../images/icons/light-mode/bin.svg);
	--edit: url(../images/icons/light-mode/edit.svg);
	--upload: url(../images/icons/light-mode/upload.svg);

	--increase: url(../images/icons/light-mode/increase.svg);
	--decrease: url(../images/icons/light-mode/decrease.svg);

	--home-active: url(../images/icons/light-mode/home-active.svg);
	--home-inactive: url(../images/icons/light-mode/home-inactive.svg);
	--wallet-active: url(../images/icons/light-mode/wallet-active.svg);
	--wallet-inactive: url(../images/icons/light-mode/wallet-inactive.svg);
	--call-inactive: url(../images/icons/light-mode/call-inactive.svg);
	--call-active: url(../images/icons/light-mode/call-active.svg);
	--category-active: url(../images/icons/light-mode/category-active.svg);
	--category-inactive: url(../images/icons/light-mode/category-inactive.svg);
	--orders-active: url(../images/icons/light-mode/orders-active.svg);
	--orders-inactive: url(../images/icons/light-mode/orders-inactive.svg);

	--search-icon: url(../images/icons/light-mode/search.svg);
	--cart-icon: url(../images/icons/light-mode/cart.svg);
	--theme-icon: url(../images/icons/light-mode/moon.svg);
	--menu-icon: url(../images/icons/light-mode/menu.svg);

	--user: url(../images/icons/light-mode/user.svg);
	--exit: url(../images/icons/light-mode/exit.svg);
	--location: url(../images/icons/light-mode/location.svg);
	--chevron-left: url(../images/icons/light-mode/chevron-left.svg);

	--map-filter: none;
}

.dark-mode {
	/* Dark Theme Colors */
	--bg-main: #0f1510;
	--bg-surface: #1a231a;
	--bg-accent: #4eb45a;
	--bg-accent-light: rgba(78, 180, 90, 0.15);
	--bg-modal: rgba(0, 0, 0, 0.7);

	/* Border Colors */
	--border-default: #2d352d;
	--border-accent: rgba(78, 180, 90, 0.35);

	/* Text Colors */
	--text-primary: #e6f2e4;
	--text-secondary: #dfdfdfcb;
	--text-inverse: #0f1510;
	--text-accent: #4eb45a;

	--gray-10: rgba(45, 52, 45, 1);       
    --gray-20: rgba(45, 52, 45, 0.9);
    --gray-30: rgba(45, 52, 45, 0.8);
    --gray-40: rgba(45, 52, 45, 0.7);
    --gray-50: rgba(45, 52, 45, 0.6);
    --gray-60: rgba(45, 52, 45, 0.5);    

    /* Overlay Gradients - Dark Theme */
    --overlay-gradient-dark: linear-gradient(
        0deg,
        var(--gray-10) 5%,
        var(--gray-20) 30%,
        var(--gray-30) 50%,
        var(--gray-40) 70%,
        var(--gray-50) 80%,
        var(--gray-60) 100%
    );
    
    --overlay-gradient-welcome: linear-gradient(
        0deg,
        var(--gray-10) 0%,
        var(--gray-20) 8%,
        var(--gray-40) 40%,
        var(--gray-50) 50%,
        var(--gray-40) 60%,
        var(--gray-20) 80%,
        var(--gray-10) 100%
    );

	

    /* Gradient Colors - Dark Theme */
    --color-gradient: linear-gradient(
        160deg,
        rgba(86, 181, 91, 0.459),
        rgba(255, 233, 199, 0.479)
    );

    /* Status Colors - Dark Theme */
    --color-success: #4eb45a;
    --color-success-bg: rgba(125, 209, 129, 0.15);
    --color-warning: #ffc34d;
    --color-warning-bg: rgba(255, 193, 77, 0.15);
    --color-error: #f08080;
    --color-error-bg: rgba(240, 128, 128, 0.15);
    --color-info: #6cb2ff;
    --color-info-bg: rgba(108, 178, 255, 0.15);

    --chevron-right: url(../images/icons/dark-mode/chevron-right.svg);
	--back: url(../images/icons/dark-mode/back.svg);
	--plus: url(../images/icons/dark-mode/plus.svg);
	--corner-up-left: url(../images/icons/dark-mode/corner-up-left.svg);
	--check: url(../images/icons/dark-mode/check.svg);
	--cross: url(../images/icons/dark-mode/cross.svg);

	--bin: url(../images/icons/dark-mode/bin.svg);
	--edit: url(../images/icons/dark-mode/edit.svg);
	--upload: url(../images/icons/dark-mode/upload.svg);

	--increase: url(../images/icons/dark-mode/increase.svg);
	--decrease: url(../images/icons/dark-mode/decrease.svg);

	--home-active: url(../images/icons/dark-mode/home-active.svg);
	/* --home-inactive: url(../images/icons); */
	--wallet-active: url(../images/icons/dark-mode/wallet-active.svg);
	/* --wallet-inactive: url(../images); */
	/* --call-inactive: url(../images); */
	--call-active: url(../images/icons/dark-mode/call-active.svg);
	--category-active: url(../images/icons/dark-mode/category-active.svg);
	/* --category-inactive: url(../images); */
	--orders-active: url(../images/icons/dark-mode/orders-active.svg);
	/* --orders-inactive: url(../images); */

	--search-icon: url(../images/icons/dark-mode/search.svg);
	--cart-icon: url(../images/icons/dark-mode/cart.svg);
	--theme-icon: url(../images/icons/dark-mode/theme.svg);
	--menu-icon: url(../images/icons/dark-mode/menu.svg);

	--user: url(../images/icons/dark-mode/user.svg);
	--exit: url(../images/icons/dark-mode/exit.svg);
	--location: url(../images/icons/dark-mode/location.svg);
	--chevron-left: url(../images/icons/dark-mode/chevron-left.svg);

	--map-filter: brightness(0.8) contrast(1.2) invert(0.9) hue-rotate(180deg) saturate(0.5);

}

body {
	background-color: var(--bg-main);
}

.container {
	width: 90%;
	max-width: 800px;
	margin: 0 auto;
}

.row-center,
.row-start,
.row-spacing,
.column-center,
.column-spacing,
.column-start {
	display: flex;
	align-items: center;
	justify-content: center;
}

.column-center,
.column-spacing,
.column-start {
	flex-direction: column;
}

.row-start,
.column-start {
	justify-content: start;
}

.row-spacing,
.column-spacing {
	justify-content: space-between;
}

.column-start {
	align-items: start;
}

/* ======================  دکمه ====================== */

.btn {
	width: 100%;
	padding: 10px;
	font-size: 15px;
	font-weight: 500;
	text-align: center;
	border-radius: 10px;
	border: 1px solid;
	gap: 2px;
	transition: all 0.2s ease-in-out;
}

.btn-primary {
	background-color: var(--bg-accent);
	color: var(--text-inverse);
	border-color: transparent;
}

.btn-ghost {
	background-color: var(--bg-accent-light);
	color: var(--text-accent);
	border-color: var(--border-accent);
}

.btn:hover {
	transform: translateY(-2px);
	opacity: 0.9;
}

.icon {
	background-size: 100% !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
}

/* ======================  متن و عنوان ====================== */

h1 {
	font-size: 18px;
	font-weight: 500;
	color: var(--text-primary);
}

h2 {
	font-size: 16px;
	font-weight: 500;
	color: var(--text-primary);
}

h3 {
	font-size: 14px;
	font-weight: 500;
	color: var(--text-primary);
}

h4 {
	font-size: 12px;
	font-weight: 500;
	color: var(--text-secondary);
}

h6 {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-accent);
}

p.p1 {
	font-size: 14px;
	font-weight: 300;
	color: var(--text-secondary);
}

p.p2 {
	font-size: 14px;
	font-weight: 300;
	color: var(--text-primary);
}

/* ======================  main ====================== */

.card {
	background-color: var(--bg-surface);
	border: 1px solid var(--border-default);
	color: var(--text-primary);
}

section {
	margin: 40px 0;
}

.margin-top {
	margin-top: 20px;
}

.chip {
	padding: 4px 12px;
	border-radius: 8px;
	font-size: 12px;
	transition: all 0.3s ease-in-out;
}

.corner-up-left {
	background: var(--corner-up-left);
	width: 13px;
	height: 13px;
	margin-right: 5px;
	margin-bottom: 2px;
	transition: all 0.3s ease-in-out;
}

.section-head a {
	transition: all 0.3s ease-in-out;
}

.chip:hover,
.section-head a:hover {
	transform: translateY(-2px);
	opacity: 0.9;
}

/* ======================  هدر ====================== */

header,
footer {
	left: 0;
	right: 0;
	position: fixed;
	z-index: 100;
}

header {
	top: 0;
	background-color: var(--bg-main);
	padding: 16px 0;
}

header .header-container .icon {
	width: 28px;
	height: 28px;
}

header .header-container {
	gap: 4px;
}

header .header-container .profile {
	width: 100%;
	gap: 5px;
	padding: 0 12px;
}

header hr {
	display: block;
	width: 2px;
	height: 25px;
	background-color: var(--border-default);
	border-radius: 8px;
	margin-left: 4px;
}

header .header-container a {
	height: 52px;
	border-radius: 10px;
	position: relative;
	min-width: 52px;
	width: 52px;
	transition: all 0.3s ease-in-out;
}

header .header-container a:hover {
	transform: translateY(-2px);
	opacity: 0.9;
}

header .header-container a .number {
	position: absolute;
	background-color: var(--color-error);
	font-size: 10px;
	color: var(--text-inverse);
	font-weight: 500;
	top: -5px;
	right: -5px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
}

header h2 {
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	width: calc(100% - 30px);
}

.search-icon {
	background: var(--search-icon);
}

.cart-icon {
	background: var(--cart-icon);
}

.theme-icon {
	background: var(--theme-icon);
}

.menu-icon {
	background: var(--menu-icon);
}

/* ====================== فوتر ====================== */

footer {
	bottom: 0;
	background-color: var(--bg-main);
	border-radius: 20px 20px 0 0;
	padding: 16px 4px;
}

footer .icon {
	width: 32px;
	height: 32px;
}

footer a {
	gap: 2px;
	transition: all 0.3s ease-in-out;
}

footer a:hover {
	transform: translateY(-2px);
	opacity: 0.9;
}

.home-icon-active {
	background: var(--home-active);
}

.home-icon {
	background: var(--home-inactive);
}

.wallet-icon-active {
	background: var(--wallet-active);
}

.wallet-icon {
	background: var(--wallet-inactive);
}

.orders-icon-active {
	background: var(--orders-active);
}

.orders-icon {
	background: var(--orders-inactive);
}

.category-icon-active {
	background: var(--category-active);
}

.category-icon {
	background: var(--category-inactive);
}

.call-icon-active {
	background: var(--call-active);
}

.call-icon {
	background: var(--call-inactive);
}

footer h4.active {
	color: var(--text-primary);
}

.actions {
	gap: 8px;
}

/* ======================  اینپوت  ====================== */

.label {
	font-size: 14px;
	font-weight: 500;
	color: var(--text-primary);
	margin-bottom: 10px;
	display: block;
}

.input,
textarea {
	background-color: var(--bg-main);
	color: var(--text-primary);
	font-size: 14px;
	font-weight: 500;
	padding: 12px;
	border: 1px solid var(--border-default);
	border-radius: 10px;
	width: 100%;
	transition: all 0.3s ease-in;
}

.input.ltr {
	direction: ltr;
	text-align: left;
}

::placeholder {
	font-weight: 300;
	font-size: 12px;
}

.error-message {
	color: var(--color-error);
	font-size: 12px;
	margin-top: 12px;
	display: none;
	transition: all 0.3s ease-in-out;
	width: 100%;
}

.error-message.show {
	display: flex;
}

.input:hover,
textarea:hover,
.input:focus,
textarea:focus {
	transform: translateY(-2px);
	border: 1px solid var(--bg-accent);
}

/* ======================  دکمه بازگشت   ====================== */

.back {
	background: var(--back);
	width: 32px;
	height: 32px;
	margin-left: 14px;
	transition: all 0.3s ease-in-out;
}

.back:hover {
	transform: translateY(-2px);
	opacity: 0.9;
}

/* ======================  modal  ====================== */

.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--bg-modal);
	z-index: 1000;
	display: none;
	transition: all 0.3s ease-in-out;
}

.modal.show {
	display: flex;
}

.modal .container {
	height: 100%;
}

.modal-card {
	padding: 24px;
	border-radius: 20px;
	width: 100%;
	max-width: 500px;
}

.modal .actions {
	margin-top: 16px;
}

.modal .btn {
	font-size: 13px;
}

.modal .text {
	background-color: var(--bg-surface);
	font-weight: 500;
	padding: 8px 28px;
	width: fit-content;
	border-radius: 6px;
	margin-top: 24px;
	font-size: 14px;
}

.modal .margin-top {
	margin-top: 12px;
}

.modal .text.success {
	color: var(--text-accent);
}

.modal .text.error {
	color: var(--color-error);
}

/* ============= product =============== */

.product-card {
	padding: 12px 14px;
	border-radius: 24px;
	min-width: 235px;
	width: 235px;
	gap: 32px;
	transition: all 0.3s ease-in-out;
}

.product-card:hover {
	transform: translateY(-2px);
	opacity: 0.8;
}

.product-card-media {
	gap: 6px;
	position: relative;
	width: 100%;
}

.product-img {
	background: var(--color-gradient);
	width: 100%;
	height: 150px;
	border-radius: 20px;
}

.product-card-media h3 {
	width: 100%;
	text-align: right;
	margin-top: 12px;
}

.product-card .product-card-media img {
	width: 130px;
	height: 130px;
	object-fit: contain;
}

.product-card-footer {
	width: 100%;
}

.current small {
	color: var(--text-secondary);
	font-size: 12px;
	font-weight: 300;
	margin-right: 4px;
}

.pricing {
	align-items: start;
	justify-content: end;
	gap: 1px;
}

.previous {
	color: var(--text-secondary);
	font-size: 14px;
	font-weight: 300;
	text-decoration: line-through;
}

.product-action {
	width: 30px;
	height: 30px;
	background-color: var(--bg-accent);
	border-radius: 7px;
}

.aroow-icon {
	background: var(--plus);
	width: 20px;
	height: 20px;
}

.badge {
	position: absolute;
	font-size: 13px;
	padding: 5px 10px;
	border-radius: 16px;
	color: var(--text-inverse);
	font-weight: 300;
	top: 5px;
	left: 5px;
	background-color: var(--text-primary);
}

.discount {
	background-color: var(--color-error);
}

.product-card p {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	width: 100%;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
	gap: 12px;
}

.product-grid .product-card {
	width: 100%;
}

/* ===================== failed / success =========================== */

.payment-failed,
.payment-success {
	gap: 16px;
	text-align: center;
	padding: 20px;
	border-radius: 20px;
}

.payment-failed .btn,
.payment-success .btn {
	width: 100%;
	font-size: 12px;
}

.result-actions {
	max-width: 350px;
	width: 100%;
	margin: 0 auto;
	gap: 8px;
	margin-top: 8px;
}

.success .result-icon {
	background-color: var(--color-success-bg);
}

.failed .result-icon {
	background-color: var(--color-error-bg);
}

.result-icon {
	width: 80px;
	height: 80px;
	border-radius: 50%;
}

.check {
	background: var(--check);
	width: 50px;
	height: 50px;
}

.cross {
	background: var(--cross);
	width: 50px;
	height: 50px;
}

@media screen and (max-width: 768px) {
	h1 {
		font-size: 15px;
	}

	h2 {
		font-size: 14px;
	}

	p.p1 {
		font-size: 12px;
	}

	p.p2 {
		font-size: 13px;
	}

	footer .icon {
		width: 30px;
		height: 30px;
	}

	header .header-container .icon {
		width: 25px;
		height: 25px;
	}

	header .header-container a {
		height: 48px;
	}

	header .header-container a {
		width: 43px;
		min-width: 43px;
	}

	header .header-container a .number {
		padding-top: 3px;
		font-size: 8px;
		width: 17px;
		height: 17px;
	}

	.product-card .product-card-media img {
		width: 110px;
		height: 110px;
	}

	.product-img {
		height: 130px;
	}

	.product-card {
		min-width: 220px;
		width: 220px;
		gap: 24px;
	}

	.badge,
	.previous,
	h6 {
		font-size: 11px;
	}

	.product-action {
		width: 26px;
		height: 26px;
	}

	.aroow-icon {
		width: 18px;
		height: 18px;
	}

	.corner-up-left {
		width: 11px;
		height: 11px;
	}

	.result-icon {
		width: 70px;
		height: 70px;
	}

	.check,
	.cross {
		width: 38px;
		height: 38px;
	}
}

@media screen and (max-width: 425px) {
	.error-message {
		font-size: 10px;
	}

	.input,
	textarea,
	.btn,
	.label,
	h3,
	.modal .text {
		font-size: 12px;
	}

	.back {
		width: 28px;
		height: 28px;
		margin-left: 10px;
	}

	footer .icon {
		width: 28px;
		height: 28px;
	}

	h4 {
		font-size: 10px;
	}

	header .header-container a {
		height: 42px;
	}

	header.header-container a {
		width: 42px;
		min-width: 42px;
	}

	.product-card {
		min-width: 200px;
		width: 200px;
	}

	.product-card .product-card-media img {
		width: 100px;
		height: 100px;
	}

	.product-img {
		height: 115px;
	}

	.product-action {
		width: 24px;
		height: 24px;
	}

	.aroow-icon {
		width: 14px;
		height: 14px;
	}

	.modal .btn {
		font-size: 11px;
	}

	.result-actions {
		flex-direction: column;
		max-width: 157px;
	}
}

.scroll-container {
	overflow: auto;
	cursor: grab;
	scrollbar-width: none;
	-ms-overflow-style: none;
	user-select: none;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	touch-action: pan-x;
	width: 100%;
}

.scroll-container::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.scroll-container.dragging {
	cursor: grabbing;
	scroll-behavior: auto !important;
}

.scroll-container.dragging .category-wrapper a,
.scroll-container.dragging .product-wrapper a,
.scroll-container.dragging .product-card ,
.scroll-container.dragging .select-group{
	pointer-events: none;
}

.category-wrapper a,
.product-wrapper a,
.product-card ,
.select-group{
	pointer-events: auto;
	cursor: pointer;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* برای Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}
