/* ============================================
   CSS VARIABLES & ROOT STYLES
   ============================================ */
:root {
	--primary-color: #1a1a1a;
	--accent-color: #ff4757;
	--text-color: #2f3542;
	--light-text: #747d8c;
	--bg-color: #ffffff;
	--card-bg: #f8f9fa;
	--success: #2ed573;
	--error: #ff4757;
	--shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
	--shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
	--transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	--container-width: 1400px;
	--header-height: 90px;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
}
body {
	font-family: "Outfit", sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	line-height: 1.6;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}
.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 24px;
}

/* Accessibility */
.skip-link {
	position: absolute;
	top: -100px;
	left: 20px;
	background: var(--accent-color);
	color: white;
	padding: 10px 20px;
	z-index: 9999;
	border-radius: 0 0 10px 10px;
}
.skip-link:focus {
	top: 0;
}

/* ============================================
   HEADER
   ============================================ */
.header {
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(20px);
	height: var(--header-height);
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 1000;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	display: flex;
	align-items: center;
}
.navbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}
.logo {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 1.8rem;
	font-weight: 800;
	letter-spacing: -1px;
	color: var(--primary-color);
}
.logo i {
	color: var(--accent-color);
	font-size: 2rem;
}

.nav-links {
	display: flex;
	list-style: none;
	gap: 40px;
}
.nav-links a {
	text-decoration: none;
	color: var(--text-color);
	font-weight: 600;
	font-size: 1rem;
	transition: var(--transition);
	position: relative;
}
.nav-links a::after {
	content: "";
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--accent-color);
	transition: var(--transition);
}
.nav-links a:hover {
	color: var(--accent-color);
}
.nav-links a:hover::after {
	width: 100%;
}

.nav-icons {
	display: flex;
	align-items: center;
	gap: 24px;
}
.cart-icon {
	position: relative;
	background: var(--primary-color);
	color: white;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	transition: var(--transition);
}
.cart-icon:hover {
	transform: scale(1.1);
	background: var(--accent-color);
}
.cart-count {
	position: absolute;
	top: -5px;
	right: -5px;
	background: var(--accent-color);
	color: white;
	font-size: 0.75rem;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	border: 2px solid white;
}

.mobile-menu-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 1.8rem;
	cursor: pointer;
}

/* ============================================
   HERO
   ============================================ */
.hero {
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding-top: var(--header-height);

	/* الخلفية */
	background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
		url("https://i.ibb.co/ZpFGx1gM/cf95efa6-b5db-4233-a655-ac33c8b362e8.png");

	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.hero-content h1 {
	font-size: clamp(3rem, 8vw, 5.5rem);
	line-height: 1;
	margin-bottom: 24px;
	font-weight: 800;
	letter-spacing: -2px;
	color: whitesmoke;
	margin-right: 225px;
}

.hero-content p {
	font-size: 1.25rem;
	color: var(--light-text);
	margin-bottom: 48px;
	max-width: 600px;
	color: whitesmoke;
}
.container .hero-content {
	margin-left: 20px;
}
.btn {
	padding: 16px 36px;
	border-radius: 50px;
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	transition: var(--transition);
	cursor: pointer;
	border: none;
	font-size: 1rem;
}
.btn-primary {
	background: var(--primary-color);
	color: white;
}
.btn-primary:hover {
	background: var(--accent-color);
	transform: translateY(-5px);
	box-shadow: 0 15px 30px rgba(255, 71, 87, 0.3);
}
.btn-secondary {
	background: transparent;
	border: 2px solid var(--primary-color);
	color: var(--primary-color);
}
.btn-secondary:hover {
	background: var(--primary-color);
	color: white;
}

/* ============================================
   PRODUCTS
   ============================================ */
.products {
	padding: 100px 0;
}
.section-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 60px;
	flex-wrap: wrap;
	gap: 30px;
}
.section-title h2 {
	font-size: 3rem;
	font-weight: 800;
	margin-bottom: 10px;
}
.filters {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 10px;
}
.filter-btn {
	padding: 12px 28px;
	border-radius: 50px;
	border: 1px solid #eee;
	background: white;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: var(--transition);
}
.filter-btn.active,
.filter-btn:hover {
	background: var(--primary-color);
	color: white;
	border-color: var(--primary-color);
}

/* PRODUCT CARDS */
.product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 40px;
}
.product-card {
	background: white;
	border-radius: 32px;
	overflow: hidden;
	transition: var(--transition);
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(0, 0, 0, 0.03);
	position: relative;
}
.product-card:hover {
	transform: translateY(-15px);
	box-shadow: var(--shadow-lg);
}

.product-image-container {
	position: relative;
	padding-top: 110%;
	background: #f1f2f6;
	overflow: hidden;
}
.product-main-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.4s ease;
}
.product-badge {
	position: absolute;
	top: 24px;
	left: 24px;
	background: white;
	color: var(--primary-color);
	padding: 8px 16px;
	border-radius: 50px;
	font-size: 0.8rem;
	font-weight: 800;
	z-index: 2;
	box-shadow: var(--shadow-sm);
}

.product-info {
	padding: 32px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
.product-category {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--accent-color);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 12px;
}
.product-title {
	font-size: 1.6rem;
	font-weight: 800;
	margin-bottom: 16px;
	line-height: 1.2;
}
.product-description {
	font-size: 0.95rem;
	color: var(--light-text);
	margin-bottom: 24px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 4.5em;
}

.product-variants-ui {
	margin-bottom: 30px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.variant-group {
	display: flex;
	align-items: center;
	gap: 20px;
}
.variant-group label {
	font-size: 0.9rem;
	font-weight: 800;
	min-width: 50px;
}

.size-options {
	display: flex;
	gap: 10px;
}
.size-btn {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	border: 1px solid #ddd;
	background: white;
	font-weight: 700;
	cursor: pointer;
	transition: var(--transition);
}
.size-btn.active {
	background: var(--primary-color);
	color: white;
	border-color: var(--primary-color);
}

.color-options {
	display: flex;
	gap: 12px;
}
.color-swatch {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 3px solid white;
	box-shadow: 0 0 0 1px #ddd;
	cursor: pointer;
	transition: var(--transition);
}
.color-swatch.active {
	box-shadow: 0 0 0 2px var(--accent-color);
	transform: scale(1.2);
}

.product-footer {
	margin-top: auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 24px;
	border-top: 1px solid #f1f2f6;
}
.product-price {
	font-size: 1.5rem;
	font-weight: 800;
}
.add-to-cart-btn {
	background: var(--primary-color);
	color: white;
	border: none;
	padding: 14px 24px;
	border-radius: 16px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 12px;
	transition: var(--transition);
}
.add-to-cart-btn:hover:not(:disabled) {
	background: var(--accent-color);
	transform: scale(1.05);
}
.add-to-cart-btn:disabled {
	background: #dfe4ea;
	cursor: not-allowed;
	color: #a4b0be;
}

/* ============================================
   CART SIDEBAR
   ============================================ */
.cart-sidebar {
	position: fixed;
	top: 0;
	right: -500px;
	width: 500px;
	height: 100vh;
	background: white;
	z-index: 2000;
	box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
	transition: var(--transition);
	display: flex;
	flex-direction: column;
}
.cart-sidebar.active {
	right: 0;
}
.cart-header {
	padding: 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #f1f2f6;
}
.cart-header h2 {
	font-size: 2rem;
	font-weight: 800;
}
.close-btn {
	background: none;
	border: none;
	font-size: 2rem;
	cursor: pointer;
}

.cart-items {
	flex-grow: 1;
	overflow-y: auto;
	padding: 40px;
}
.cart-item {
	display: flex;
	gap: 20px;
	margin-bottom: 30px;
	animation: slideUp 0.5s ease;
}
.cart-item img {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 20px;
}
.cart-item-info h4 {
	font-size: 1.1rem;
	font-weight: 800;
	margin-bottom: 8px;
}
.cart-item-qty {
	display: flex;
	align-items: center;
	gap: 15px;
	margin: 12px 0;
}
.qty-btn {
	width: 32px;
	height: 32px;
	border: 1px solid #ddd;
	background: white;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 700;
}

.cart-footer {
	padding: 40px;
	background: #f8f9fa;
}
.cart-summary div {
	display: flex;
	justify-content: space-between;
	margin-bottom: 12px;
	font-weight: 600;
}
.total {
	font-size: 1.5rem;
	font-weight: 800;
	margin-top: 20px;
	border-top: 2px solid #ddd;
	padding-top: 20px;
}

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */
.cart-flyer {
	position: fixed;
	width: 60px;
	height: 60px;
	z-index: 3000;
	pointer-events: none;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
	animation: cartFly 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
@keyframes cartFly {
	0% {
		transform: scale(1);
		opacity: 1;
	}
	100% {
		transform: translate(var(--tx), var(--ty)) scale(0.2);
		opacity: 0;
	}
}
@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================
   RESPONSIVE (320px, 375px, 768px, 1440px)
   ============================================ */
@media (max-width: 1440px) {
	.container {
		max-width: 1200px;
	}
}

@media (max-width: 1024px) {
	.product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.cart-sidebar {
		width: 400px;
	}
}

@media (max-width: 768px) {
	.nav-links {
		display: none;
	}
	.mobile-menu-toggle {
		display: block;
	}
	.hero-content h1 {
		font-size: 4rem;
	}
	.section-title h2 {
		font-size: 2.5rem;
	}
	.cart-sidebar {
		width: 100%;
		right: -100%;
	}
}

@media (max-width: 480px) {
	.hero-content h1 {
		font-size: 3rem;
	}
	.product-grid {
		grid-template-columns: 1fr;
	}
	.section-header {
		flex-direction: column;
		align-items: flex-start;
	}
	.nav-icons {
		gap: 12px;
	}
}

@media (max-width: 375px) {
	.hero-content h1 {
		font-size: 2.5rem;
	}
	.container {
		padding: 0 16px;
	}
	.product-info {
		padding: 24px;
	}
	.product-price {
		font-size: 1.5rem;
	}
	.add-to-cart-btn {
		padding: 12px 16px;
		font-size: 0.9rem;
	}
}

@media (max-width: 320px) {
	.hero-content h1 {
		font-size: 2.2rem;
	}
	.logo {
		font-size: 1.5rem;
	}
	.section-title h2 {
		font-size: 2rem;
	}
	.variant-group {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
	background: #f8f9fa;
	padding: 80px 0 40px;
	margin-top: 100px;
	border-top: 1px solid #f1f2f6;
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1.5fr;
	gap: 60px;
	margin-bottom: 60px;
}

.footer-info p {
	color: var(--light-text);
	margin: 24px 0;
	max-width: 350px;
	font-size: 0.95rem;
}

.social-icons {
	display: flex;
	gap: 15px;
}

.social-icons a {
	width: 44px;
	height: 44px;
	background: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--primary-color);
	text-decoration: none;
	transition: var(--transition);
	box-shadow: var(--shadow-sm);
	font-size: 1.1rem;
}

.social-icons a:hover {
	background: var(--accent-color);
	color: white;
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(255, 71, 87, 0.2);
}

.footer-links h3,
.footer-contact h3 {
	font-size: 1.25rem;
	font-weight: 800;
	margin-bottom: 30px;
	color: var(--primary-color);
}

.footer-links ul {
	list-style: none;
}

.footer-links li {
	margin-bottom: 15px;
}

.footer-links a {
	text-decoration: none;
	color: var(--light-text);
	transition: var(--transition);
	font-weight: 500;
}

.footer-links a:hover {
	color: var(--accent-color);
	padding-left: 8px;
}

.footer-contact p {
	display: flex;
	align-items: center;
	gap: 15px;
	color: var(--light-text);
	margin-bottom: 20px;
	font-size: 0.95rem;
}

.footer-contact i {
	color: var(--accent-color);
	font-size: 1.1rem;
}

.footer-bottom {
	text-align: center;
	padding-top: 40px;
	border-top: 1px solid #eee;
	color: var(--light-text);
	font-size: 0.9rem;
	font-weight: 500;
}

@media (max-width: 992px) {
	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 768px) {
	.footer-grid {
		grid-template-columns: 1fr;
		gap: 50px;
	}
	.footer {
		padding: 60px 0 30px;
	}
}

/* Mobile improvements */
@media (max-width: 768px) {
	.navbar {
		flex-wrap: wrap;
		padding: 12px 0;
	}
	.mobile-menu-toggle {
		display: block;
		cursor: pointer;
	}
	#nav-links {
		display: none;
		width: 100%;
		flex-direction: column;
		gap: 16px;
		padding: 16px 0;
		background: #fff;
	}
	#nav-links.active {
		display: flex;
		margin-top: 20px;
		padding-left: 10px;
	}
	.hero {
		padding-top: 110px;
	}
	.products-grid {
		grid-template-columns: 1fr !important;
	}
	.container {
		padding-inline: 16px;
	}
	.cart-sidebar {
		width: 100% !important;
	}
}

@media (max-width: 768px) {
	body {
		overflow-x: hidden;
	}
	.container,
	.hero-content {
		max-width: 100%;
		padding-left: 14px;
		padding-right: 14px;
	}
	.products-grid {
		display: grid;
		grid-template-columns: 1fr !important;
		gap: 18px;
	}
	.product-card {
		width: 100%;
		max-width: 100%;
	}
	.nav-links {
		display: none;
	}
	.nav-links.active {
		display: flex !important;
		flex-direction: column;
	}
}

html,
body {
	max-width: 100%;
	overflow-x: hidden;
}
@media (max-width: 768px) {
	body {
		font-size: 14px;
	}
	.container,
	.section,
	.hero,
	.footer {
		width: 100% !important;
		max-width: none !important;
		padding: 0 16px !important;
		box-sizing: border-box;
	}
	.hero-content {
		width: 100% !important;
	}
	.products-grid {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		padding: 0 !important;
	}
	.product-card {
		width: 100% !important;
		max-width: none !important;
	}
	.product-image img {
		width: 100%;
		height: auto;
	}
	header,
	.navbar {
		width: 100%;
		padding: 10px 16px !important;
	}
	.nav-links {
		position: absolute;
		top: 60px;
		left: 0;
		right: 0;
		background: #fff;
		padding: 16px;
		z-index: 99;
	}
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
	position: fixed;
	bottom: 30px;
	right: 30px;
	background: #111;
	color: #fff;
	padding: 14px 22px;
	border-radius: 14px;
	font-size: 14px;
	font-weight: 500;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.toast.show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}