/* ============================================
   My Smart Solutions Store - Main Stylesheet
   ============================================ */

:root {
	--primary-color: #007bff; /* Professional Blue */
	--primary-dark: #0056b3;
	--secondary-color: #fff;
	--text-dark: #333;
	--text-light: #666;
	--border-color: #eee;
	--bg-light: #f2f2f2;
	--shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.08);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
	--shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.15);
}

* {
	box-sizing: border-box;
}

body {
	font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background-color: var(--bg-light);
	color: var(--text-dark);
	line-height: 1.6;
	direction: rtl;
	text-align: right;
}

a {
	color: var(--primary-color);
	text-decoration: none;
	transition: all 0.3s ease;
}

a:hover {
	color: var(--primary-dark);
}

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

/* ============================================
   HEADER STYLES
   ============================================ */

header {
	background: var(--secondary-color);
	box-shadow: var(--shadow-sm);
	position: relative;
	z-index: 100;
}

.top-header {
	background: #f8f8f8;
	border-bottom: 1px solid var(--border-color);
	padding: 8px 0;
	font-size: 12px;
}

.top-header a {
	margin: 0 15px;
	color: var(--text-light);
}

.header-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0;
	gap: 20px;
}

.logo {
	flex-shrink: 0;
}

.logo img {
	max-height: 50px;
	width: auto;
}

.search-bar {
	flex-grow: 1;
	position: relative;
	max-width: 500px;
}

.search-bar form {
	display: flex;
	align-items: center;
	background: var(--secondary-color);
	border: 2px solid var(--primary-color);
	border-radius: 30px;
	overflow: hidden;
}

.search-bar input[type="search"] {
	flex: 1;
	border: none;
	padding: 12px 20px;
	outline: none;
	font-size: 14px;
	background: transparent;
}

.search-bar button {
	background: var(--primary-color);
	color: var(--secondary-color);
	border: none;
	padding: 12px 25px;
	cursor: pointer;
	font-weight: 600;
	transition: background 0.3s ease;
}

.search-bar button:hover {
	background: var(--primary-dark);
}

.user-actions {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-shrink: 0;
}

.user-actions a {
	font-size: 14px;
	color: var(--text-dark);
	font-weight: 500;
}

.user-actions a:hover {
	color: var(--primary-color);
}

.cart-icon {
	position: relative;
	font-size: 20px;
}

.cart-count {
	position: absolute;
	top: -8px;
	left: -8px;
	background: var(--primary-color);
	color: var(--secondary-color);
	border-radius: 50%;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: bold;
}

/* ============================================
   MEGA MENU
   ============================================ */

.mega-menu {
	background: var(--secondary-color);
	border-top: 1px solid var(--border-color);
	padding: 15px 0;
	box-shadow: var(--shadow-sm);
}

.mega-menu ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: flex-end;
	gap: 0;
}

.mega-menu li {
	position: relative;
}

.mega-menu > ul > li > a {
	display: block;
	padding: 15px 20px;
	color: var(--text-dark);
	font-weight: 500;
	font-size: 14px;
	transition: all 0.3s ease;
}

.mega-menu > ul > li:hover > a {
	background: var(--bg-light);
	color: var(--primary-color);
}

/* ============================================
   HERO BANNER
   ============================================ */

.hero-banner {
	background: linear-gradient(135deg, var(--primary-color) 0%, #00c6ff 100%);
	color: var(--secondary-color);
	padding: 60px 40px;
	border-radius: 15px;
	margin: 20px 0;
	text-align: center;
	box-shadow: var(--shadow-md);
	position: relative;
	overflow: hidden;
}

.hero-banner h1 {
	font-size: 36px;
	margin: 0 0 15px 0;
	font-weight: 900;
	position: relative;
	z-index: 1;
}

.hero-banner p {
	font-size: 18px;
	margin: 0 0 30px 0;
	position: relative;
	z-index: 1;
}

.hero-banner .btn {
	background: var(--secondary-color);
	color: var(--primary-color);
	padding: 12px 40px;
	border-radius: 30px;
	display: inline-block;
	font-weight: bold;
	transition: all 0.3s ease;
	position: relative;
	z-index: 1;
}

.hero-banner .btn:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */

.categories-section {
	margin: 40px 0;
}

.categories-section h2 {
	font-size: 24px;
	margin-bottom: 25px;
	font-weight: 700;
	color: var(--text-dark);
}

.categories-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 20px;
}

.category-card {
	background: var(--secondary-color);
	border-radius: 12px;
	padding: 20px;
	text-align: center;
	box-shadow: var(--shadow-sm);
	transition: all 0.3s ease;
	cursor: pointer;
	display: block;
}

.category-card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-5px);
}

.category-card img {
	width: 80px;
	height: 80px;
	margin-bottom: 15px;
	object-fit: cover;
}

.category-card h3 {
	font-size: 14px;
	margin: 0;
	font-weight: 600;
	color: var(--text-dark);
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */

.products-section {
	margin: 40px 0;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
}

.section-header h2 {
	font-size: 24px;
	margin: 0;
	font-weight: 700;
}

.section-header a {
	color: var(--primary-color);
	font-weight: 600;
	font-size: 14px;
}

.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.product-card {
	background: var(--secondary-color);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: all 0.2s ease;
	border: 1px solid #f0f0f0;
}

.product-card:hover {
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

.temu-lightning-deal {
	background: #fb7701;
	color: white;
	font-size: 11px;
	font-weight: 900;
	padding: 2px 8px;
	border-radius: 4px;
	display: inline-block;
	margin-bottom: 5px;
}

.temu-sold-count {
	font-size: 12px;
	color: #888;
	margin-top: 5px;
}

.temu-countdown {
	background: #fff0e0;
	color: #fb7701;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 8px;
}

.product-card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-8px);
}

.product-image {
	position: relative;
	overflow: hidden;
	height: 200px;
	background: var(--bg-light);
}

.product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
	transform: scale(1.1);
}

.product-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: var(--primary-color);
	color: var(--secondary-color);
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: bold;
}

.product-info {
	padding: 15px;
}

.product-title {
	font-size: 14px;
	margin: 0 0 10px 0;
	font-weight: 600;
	color: var(--text-dark);
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	min-height: 35px;
}

.product-rating {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
	font-size: 12px;
}

.stars {
	color: #007bff;
	margin-left: 5px;
}

.product-price {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.price-current {
	color: var(--primary-color);
	font-size: 18px;
	font-weight: 700;
}

.price-original {
	color: var(--text-light);
	text-decoration: line-through;
	font-size: 14px;
}

.product-discount {
	background: var(--primary-color);
	color: var(--secondary-color);
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: bold;
}

.product-actions {
	display: flex;
	gap: 10px;
}

.btn-add-cart {
	flex: 1;
	background: var(--primary-color);
	color: var(--secondary-color);
	border: none;
	padding: 10px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
	transition: all 0.3s ease;
}

.btn-add-cart:hover {
	background: var(--primary-dark);
}

.btn-wishlist {
	width: 40px;
	height: 40px;
	border: 1px solid var(--border-color);
	background: var(--secondary-color);
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.btn-wishlist:hover {
	border-color: var(--primary-color);
	color: var(--primary-color);
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */

.testimonials-section {
	margin: 60px 0;
	text-align: center;
}

.testimonials-section h2 {
	font-size: 28px;
	margin-bottom: 40px;
	font-weight: 700;
}

.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
}

.testimonial-card {
	background: var(--secondary-color);
	padding: 30px;
	border-radius: 12px;
	box-shadow: var(--shadow-md);
	transition: all 0.3s ease;
	text-align: right;
}

.testimonial-card:hover {
	transform: translateY(-10px);
	box-shadow: var(--shadow-lg);
}

.testimonial-rating {
	color: #007bff;
	font-size: 20px;
	margin-bottom: 15px;
}

.testimonial-text {
	font-size: 15px;
	line-height: 1.8;
	color: var(--text-light);
	margin-bottom: 20px;
	font-style: italic;
}

.testimonial-author {
	font-weight: 700;
	color: var(--text-dark);
	margin: 0;
}

/* ============================================
   CAROUSEL
   ============================================ */

.product-carousel {
	position: relative;
	margin: 40px 0;
}

.carousel-wrapper {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding: 10px 0;
}

.carousel-wrapper::-webkit-scrollbar {
	height: 6px;
}

.carousel-wrapper::-webkit-scrollbar-track {
	background: var(--bg-light);
	border-radius: 10px;
}

.carousel-wrapper::-webkit-scrollbar-thumb {
	background: var(--primary-color);
	border-radius: 10px;
}

.carousel-item {
	flex: 0 0 200px;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
	background: #2c2c2c;
	color: #ccc;
	padding: 50px 0 20px 0;
	margin-top: 60px;
}

.footer-content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 40px;
	margin-bottom: 40px;
}

.footer-column h3 {
	color: var(--secondary-color);
	font-size: 16px;
	margin-bottom: 20px;
	font-weight: 700;
}

.footer-column ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-column li {
	margin-bottom: 12px;
}

.footer-column a {
	color: #ccc;
	font-size: 14px;
	transition: color 0.3s ease;
}

.footer-column a:hover {
	color: var(--primary-color);
}

.footer-bottom {
	border-top: 1px solid #444;
	padding-top: 20px;
	text-align: center;
	font-size: 13px;
	color: #999;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
	.header-main {
		flex-wrap: wrap;
	}

	.search-bar {
		max-width: 100%;
		order: 3;
		flex-basis: 100%;
		margin: 10px 0;
	}

	.user-actions {
		gap: 10px;
		font-size: 12px;
	}

	.hero-banner {
		padding: 40px 20px;
	}

	.hero-banner h1 {
		font-size: 24px;
	}

	.categories-grid {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
		gap: 15px;
	}

	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 15px;
	}

	.testimonials-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.products-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hero-banner h1 {
		font-size: 20px;
	}

	.section-header h2 {
		font-size: 18px;
	}
}

/* ============================================
   MOBILE APP-LIKE STYLES
   ============================================ */

@media (max-width: 768px) {
	body {
		padding-bottom: 70px; /* Space for bottom nav */
	}

	.top-header {
		display: none;
	}

	.header-main {
		padding: 10px 0;
		position: sticky;
		top: 0;
		background: #fff;
		z-index: 1000;
		box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	}

	.mega-menu {
		display: none; /* Hide desktop menu on mobile */
	}

	.search-bar {
		margin: 5px 0;
	}

	.search-bar form {
		border-radius: 10px;
		border-width: 1px;
	}

	.search-bar input[type="search"] {
		padding: 8px 15px;
	}

	.search-bar button {
		padding: 8px 15px;
	}

	/* Bottom Navigation Bar */
	.mobile-bottom-nav {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		background: #fff;
		display: flex;
		justify-content: space-around;
		align-items: center;
		height: 65px;
		box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
		z-index: 2000;
		border-top: 1px solid #eee;
	}

	.nav-item {
		display: flex;
		flex-direction: column;
		align-items: center;
		color: #666;
		font-size: 11px;
		font-weight: 600;
		text-decoration: none;
		transition: all 0.3s ease;
		flex: 1;
	}

	.nav-item i, .nav-item span.icon {
		font-size: 22px;
		margin-bottom: 4px;
	}

	.nav-item.active {
		color: var(--primary-color);
	}

	/* App-like Product Cards */
	.products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		padding: 5px;
	}

	.product-card {
		border-radius: 15px;
		box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	}

	.product-image {
		height: 160px;
	}

	.product-info {
		padding: 10px;
	}

	.product-title {
		font-size: 13px;
		min-height: 32px;
	}

	.product-price {
		font-size: 16px;
	}

	/* App-like Hero */
	.hero-banner {
		padding: 30px 15px;
		border-radius: 12px;
		margin: 10px 0;
	}

	.hero-banner h1 {
		font-size: 22px;
	}

	.hero-banner p {
		font-size: 14px;
	}

	/* App-like Sections */
	.section-header h2 {
		font-size: 18px;
	}

	/* Mobile Product Page */
	.single-product-mobile {
		display: flex;
		flex-direction: column !important;
		padding: 15px !important;
		gap: 20px !important;
	}

	.product-actions-mobile {
		position: fixed;
		bottom: 65px;
		left: 0;
		right: 0;
		background: #fff;
		padding: 10px 15px;
		display: flex;
		gap: 10px;
		box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
		z-index: 1500;
	}

	.btn-buy-now {
		flex: 2;
		background: var(--primary-color);
		color: #fff;
		border: none;
		padding: 12px;
		border-radius: 10px;
		font-weight: 700;
	}

	.btn-cart-mobile {
		flex: 1;
		background: #f0f9f4;
		color: var(--primary-color);
		border: 1px solid var(--primary-color);
		padding: 12px;
		border-radius: 10px;
		font-weight: 700;
	}
}
