/* ==========================================================================
   DESIGN SYSTEM & VARIABLES (AMMANI.STORE & APPLE INSPIRED)
   ========================================================================== */
:root {
	--bg-site: #f8fafc;
	--bg-card: #ffffff;
	
	--text-main: #0f172a;
	--text-muted: #64748b;
	--text-light: #94a3b8;
	
	--primary-hover: #1e4620; /* Darker green */
	--accent-hover: #9b720b;  /* Darker gold */
	
	--success-color: #10b981;
	--error-color: #ef4444;
	
	--border-light: #e2e8f0;
	--border-focus: var(--accent-color);
	
	--font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */
body {
	font-family: var(--font-family);
	background-color: var(--bg-site);
	color: var(--text-main);
	line-height: 1.6;
	font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
	margin-top: 0;
	margin-bottom: 0.5em;
	color: var(--text-main);
	font-weight: 700;
	line-height: 1.25;
}

p {
	margin-top: 0;
	margin-bottom: 1rem;
	color: var(--text-muted);
}

/* Buttons */
.btn, .button, button, input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--primary-color);
	color: #ffffff;
	border: 1px solid var(--primary-color);
	padding: 0.75rem 2rem;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: var(--border-radius-md);
	cursor: pointer;
	transition: var(--transition-smooth);
	outline: none;
	text-align: center;
}

.btn:hover, .button:hover, button:hover, input[type="submit"]:hover {
	background-color: var(--primary-hover);
	border-color: var(--primary-hover);
	transform: translateY(-1px);
	box-shadow: var(--shadow-sm);
}

.btn-accent {
	background-color: var(--accent-color);
	border-color: var(--accent-color);
	color: #ffffff;
}

.btn-accent:hover {
	background-color: var(--accent-hover);
	border-color: var(--accent-hover);
}

.btn-secondary {
	background-color: transparent;
	color: var(--text-main);
	border: 1px solid var(--border-light);
}

.btn-secondary:hover {
	background-color: var(--border-light);
	border-color: var(--border-light);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
	box-shadow: var(--shadow-sm);
}

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

.header-search form {
	display: flex;
	position: relative;
	width: 100%;
}

.header-search input[type="search"] {
	width: 100%;
	padding: 0.65rem 1rem;
	padding-inline-end: 2.75rem;
	border: 1px solid var(--border-light);
	border-radius: var(--border-radius-lg);
	background-color: #f1f5f9;
	font-family: inherit;
	font-size: 0.9rem;
	transition: var(--transition-smooth);
}

.header-search input[type="search"]:focus {
	background-color: #ffffff;
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
	outline: none;
}

.header-search .search-submit {
	position: absolute;
	inset-inline-end: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0;
	color: var(--text-muted);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.header-search .search-submit svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.header-action-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	color: var(--text-main);
	transition: var(--transition-smooth);
}

.header-action-btn:hover {
	background-color: #f1f5f9;
	color: var(--accent-color);
}

.header-action-btn svg {
	width: 22px;
	height: 22px;
	stroke-width: 1.75;
}

.header-action-btn .badge-count {
	position: absolute;
	top: 2px;
	inset-inline-end: 2px;
	background-color: var(--accent-color);
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	border: 2px solid #ffffff;
}

/* Navigation Menu */
.main-navigation {
	display: none;
}

@media (min-width: 1024px) {
	.main-navigation {
		display: block;
	}
	.nav-menu {
		display: flex;
		list-style: none;
		margin: 0;
		padding: 0;
		gap: 24px;
	}
	.nav-menu a {
		font-weight: 600;
		font-size: 0.95rem;
		padding: 8px 0;
		color: var(--text-main);
		transition: var(--transition-smooth);
		position: relative;
	}
	.nav-menu a:hover,
	.nav-menu .current-menu-item > a {
		color: var(--accent-color);
	}
	.nav-menu a::after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 0;
		width: 0;
		height: 2px;
		background-color: var(--accent-color);
		transition: var(--transition-smooth);
	}
	.nav-menu a:hover::after,
	.nav-menu .current-menu-item > a::after {
		width: 100%;
	}
}

/* ==========================================================================
   DYNAMIC SEARCH DROPDOWN
   ========================================================================== */
.ajax-search-results {
	position: absolute;
	top: calc(100% + 8px);
	inset-inline-start: 0;
	width: 100%;
	background-color: #ffffff;
	border-radius: var(--border-radius-md);
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--border-light);
	z-index: 1001;
	max-height: 400px;
	overflow-y: auto;
	display: none;
}

.ajax-search-results.active {
	display: block;
}

.search-result-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-color);
	transition: var(--transition-smooth);
}

.search-result-item:last-child {
	border-bottom: none;
}

.search-result-item:hover {
	background-color: #f8fafc;
}

.search-result-image {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: var(--border-radius-sm);
}

.search-result-info {
	flex: 1;
}

.search-result-title {
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 2px;
	color: var(--text-main);
}

.search-result-price {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--accent-color);
}

/* ==========================================================================
   PRODUCT ARCHIVES (SHOP / CATEGORY CARDS)
   ========================================================================== */
.products {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	list-style: none;
	padding: 0;
	margin: 0;
}

@media (min-width: 768px) {
	.products {
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
	}
}

@media (min-width: 1024px) {
	.products {
		grid-template-columns: repeat(4, 1fr);
	}
}

.product-card {
	background-color: var(--bg-card);
	border-radius: var(--border-radius-md);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-light);
	transition: var(--transition-smooth);
	display: flex;
	flex-direction: column;
	position: relative;
}

.product-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lg);
	border-color: #cbd5e1;
}

.product-card-image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background-color: #f1f5f9;
}

.product-card-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-card-badge {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	background-color: var(--accent-color);
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: var(--border-radius-sm);
	z-index: 1;
}

.product-card-badge.sale {
	background-color: var(--error-color);
}

.product-card-actions {
	position: absolute;
	bottom: 12px;
	left: 12px;
	right: 12px;
	display: flex;
	gap: 8px;
	transform: translateY(60px);
	opacity: 0;
	transition: var(--transition-smooth);
	z-index: 2;
}

.product-card:hover .product-card-actions {
	transform: translateY(0);
	opacity: 1;
}

.product-card-action-btn {
	flex: 1;
	background-color: rgba(255, 255, 255, 0.95);
	color: var(--text-main);
	border: none;
	border-radius: var(--border-radius-md);
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition: var(--transition-smooth);
}

.product-card-action-btn:hover {
	background-color: var(--primary-color);
	color: #ffffff;
}

.product-card-action-btn svg {
	width: 18px;
	height: 18px;
}

.product-card-info {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.product-card-cats {
	font-size: 0.75rem;
	color: var(--text-light);
	font-weight: 600;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.product-card-title {
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 8px;
	line-height: 1.4;
}

.product-card-title a {
	color: var(--text-main);
	transition: var(--transition-smooth);
}

.product-card-title a:hover {
	color: var(--accent-color);
}

.product-card-price {
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--primary-color);
}

.product-card-price del {
	font-size: 0.85rem;
	color: var(--text-light);
	font-weight: 400;
}

.product-card-price ins {
	text-decoration: none;
	color: var(--error-color);
}

/* ==========================================================================
   SINGLE PRODUCT PAGE
   ========================================================================== */
.product-single-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	margin-bottom: 48px;
}

@media (min-width: 768px) {
	.product-single-container {
		grid-template-columns: repeat(2, 1fr);
		gap: 48px;
	}
}

.product-gallery {
	position: relative;
}

.product-gallery-main {
	border-radius: var(--border-radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-md);
	background-color: #ffffff;
	border: 1px solid var(--border-light);
	aspect-ratio: 4 / 5;
}

.product-gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-info-summary {
	display: flex;
	flex-direction: column;
}

.product-title {
	font-size: 2rem;
	margin-bottom: 12px;
	font-weight: 800;
}

.product-meta-row {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.product-meta-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.product-meta-item svg {
	width: 16px;
	height: 16px;
	stroke: var(--text-light);
}

.product-price-box {
	background-color: #f1f5f9;
	padding: 20px;
	border-radius: var(--border-radius-md);
	margin-bottom: 28px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.product-single-price {
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--primary-color);
}

.product-single-price del {
	font-size: 1.15rem;
	color: var(--text-light);
	font-weight: 500;
}

.product-single-price ins {
	text-decoration: none;
	color: var(--error-color);
}

.product-short-desc {
	margin-bottom: 28px;
	font-size: 0.95rem;
	color: var(--text-muted);
}

.product-actions-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 32px;
}

.quantity-input-wrap {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--border-light);
	border-radius: var(--border-radius-md);
	background-color: #ffffff;
	overflow: hidden;
	height: 52px;
	width: 130px;
}

.quantity-btn {
	width: 40px;
	height: 100%;
	background: none;
	border: none;
	font-size: 1.2rem;
	color: var(--text-main);
	cursor: pointer;
	transition: var(--transition-smooth);
	display: flex;
	align-items: center;
	justify-content: center;
}

.quantity-btn:hover {
	background-color: #f1f5f9;
	color: var(--accent-color);
	box-shadow: none;
	transform: none;
}

.quantity-input-wrap input[type="number"] {
	width: 50px;
	border: none;
	text-align: center;
	font-weight: 700;
	font-size: 1rem;
	font-family: inherit;
	background: none;
	-moz-appearance: textfield;
}

.quantity-input-wrap input[type="number"]::-webkit-outer-spin-button,
.quantity-input-wrap input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.product-purchase-row {
	display: flex;
	gap: 16px;
	align-items: center;
}

.single-add-to-cart-btn {
	flex: 1;
	height: 52px;
	border-radius: var(--border-radius-md);
}

/* Trust Badges */
.trust-badges-box {
	border: 1px solid var(--border-light);
	border-radius: var(--border-radius-md);
	padding: 20px;
	background-color: #ffffff;
	margin-bottom: 32px;
}

.trust-badges-title {
	font-size: 0.9rem;
	font-weight: 700;
	text-align: center;
	margin-bottom: 16px;
	color: var(--text-muted);
}

.trust-badges-grid {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.trust-badge-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-muted);
	width: 80px;
	text-align: center;
}

.trust-badge-item svg {
	width: 24px;
	height: 24px;
	stroke: var(--accent-color);
}

/* ==========================================================================
   STICKY ADD-TO-CART (MOBILE & DESKTOP)
   ========================================================================== */
.sticky-add-to-cart {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: #ffffff;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
	border-top: 1px solid var(--border-light);
	padding: 12px 16px;
	z-index: 99;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	transform: translateY(100%);
	transition: transform 0.3s ease;
}

.sticky-add-to-cart.active {
	transform: translateY(0);
}

.sticky-cart-product {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sticky-cart-img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: var(--border-radius-sm);
	border: 1px solid var(--border-light);
}

.sticky-cart-details {
	display: flex;
	flex-direction: column;
}

.sticky-cart-title {
	font-weight: 700;
	font-size: 0.9rem;
	margin-bottom: 2px;
}

.sticky-cart-price {
	color: var(--primary-color);
	font-weight: 700;
	font-size: 0.85rem;
}

.sticky-cart-btn {
	background-color: var(--accent-color);
	border-color: var(--accent-color);
	padding: 10px 20px;
	font-size: 0.85rem;
	font-weight: 700;
	border-radius: var(--border-radius-md);
}

.sticky-cart-btn:hover {
	background-color: var(--accent-hover);
	border-color: var(--accent-hover);
}

/* ==========================================================================
   MINI-CART DRAWER & SLIDE-OUT PANEL
   ========================================================================== */
.cart-drawer-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(4px);
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: var(--transition-smooth);
}

.cart-drawer-overlay.active {
	opacity: 1;
	visibility: visible;
}

.cart-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	inset-inline-end: 0;
	width: 100%;
	max-width: 420px;
	background-color: #ffffff;
	z-index: 10001;
	box-shadow: -10px 0 40px rgba(0,0,0,0.15);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.rtl .cart-drawer {
	transform: translateX(-100%);
}

.cart-drawer.active {
	transform: translateX(0);
}

body.rtl .cart-drawer.active {
	transform: translateX(0);
}

.cart-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	border-bottom: 1px solid var(--border-light);
}

.cart-drawer-title {
	font-size: 1.15rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cart-drawer-close {
	background: none;
	border: none;
	color: var(--text-main);
	cursor: pointer;
	font-size: 1.5rem;
	padding: 4px;
	transition: var(--transition-smooth);
}

.cart-drawer-close:hover {
	color: var(--error-color);
	transform: rotate(90deg);
}

.cart-drawer-items {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
}

.cart-drawer-item {
	display: flex;
	gap: 16px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border-color);
	position: relative;
}

.cart-drawer-item-img {
	width: 72px;
	height: 90px;
	object-fit: cover;
	border-radius: var(--border-radius-sm);
	border: 1px solid var(--border-light);
}

.cart-drawer-item-details {
	flex: 1;
}

.cart-drawer-item-title {
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 6px;
	line-height: 1.4;
}

.cart-drawer-item-title a {
	color: var(--text-main);
}

.cart-drawer-item-price {
	font-weight: 700;
	color: var(--primary-color);
	font-size: 0.9rem;
}

.cart-drawer-item-quantity {
	margin-top: 8px;
	font-size: 0.8rem;
	color: var(--text-muted);
}

.cart-drawer-item-remove {
	position: absolute;
	top: 0;
	inset-inline-end: 0;
	color: var(--text-light);
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	font-size: 0.8rem;
	transition: var(--transition-smooth);
}

.cart-drawer-item-remove:hover {
	color: var(--error-color);
}

.cart-drawer-footer {
	padding: 20px;
	background-color: #f8fafc;
	border-top: 1px solid var(--border-light);
}

.cart-drawer-subtotal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 700;
	font-size: 1.1rem;
	margin-bottom: 20px;
}

.cart-drawer-subtotal-price {
	color: var(--primary-color);
}

.cart-drawer-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cart-drawer-buttons .btn {
	width: 100%;
	height: 48px;
	border-radius: var(--border-radius-md);
}

/* ==========================================================================
   CONVERSION OPTIMIZED CHECKOUT
   ========================================================================== */
.checkout-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}

@media (min-width: 1024px) {
	.checkout-layout {
		grid-template-columns: 1.4fr 1fr;
		gap: 48px;
	}
}

.checkout-section-box {
	background-color: #ffffff;
	border-radius: var(--border-radius-lg);
	border: 1px solid var(--border-light);
	padding: 28px;
	margin-bottom: 24px;
	box-shadow: var(--shadow-sm);
}

.checkout-box-title {
	font-size: 1.25rem;
	font-weight: 800;
	margin-bottom: 24px;
	border-bottom: 2px solid var(--border-color);
	padding-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--primary-color);
}

/* Standard WooCommerce Form Fields Styling */
.form-row {
	margin-bottom: 18px;
	display: flex;
	flex-direction: column;
}

.form-row label {
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 6px;
	color: var(--text-main);
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row select,
.form-row textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--border-light);
	border-radius: var(--border-radius-md);
	font-family: inherit;
	font-size: 0.95rem;
	background-color: #f8fafc;
	transition: var(--transition-smooth);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
	background-color: #ffffff;
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
	outline: none;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.site-footer {
	background-color: #0f172a;
	color: #94a3b8;
	padding-top: 60px;
	padding-bottom: 30px;
	border-top: 1px solid #1e293b;
}

.footer-columns {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
	margin-bottom: 48px;
}

@media (min-width: 640px) {
	.footer-columns {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.footer-columns {
		grid-template-columns: 2fr 1fr 1fr 1.5fr;
	}
}

.footer-widget-title {
	color: #ffffff;
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 20px;
}

.footer-widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer-widget ul a {
	color: #94a3b8;
	transition: var(--transition-smooth);
}

.footer-widget ul a:hover {
	color: var(--accent-color);
	padding-inline-start: 4px;
}

/* Newsletter Widget */
.newsletter-box form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.newsletter-input {
	padding: 12px;
	border-radius: var(--border-radius-md);
	border: 1px solid #334155;
	background-color: #1e293b;
	color: #ffffff;
	font-family: inherit;
}

.newsletter-input:focus {
	outline: none;
	border-color: var(--accent-color);
}

.newsletter-submit {
	background-color: var(--accent-color);
	border-color: var(--accent-color);
	color: #ffffff;
	font-weight: 700;
	border-radius: var(--border-radius-md);
	height: 46px;
}

.newsletter-submit:hover {
	background-color: var(--accent-hover);
	border-color: var(--accent-hover);
}

/* Footer Bottom */
.footer-bottom {
	border-top: 1px solid #1e293b;
	padding-top: 30px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

@media (min-width: 768px) {
	.footer-bottom {
		flex-direction: row;
	}
}

.footer-copyright {
	font-size: 0.85rem;
}

.footer-trust {
	display: flex;
	align-items: center;
	gap: 16px;
}

.footer-trust-title {
	font-size: 0.85rem;
	font-weight: 600;
	color: #64748b;
}

.footer-trust-icons {
	display: flex;
	gap: 12px;
}

.footer-trust-icon {
	height: 24px;
	opacity: 0.7;
	transition: var(--transition-smooth);
}

.footer-trust-icon:hover {
	opacity: 1;
}

/* ==========================================================================
   ACCESSIBILITY & UTILITIES
   ========================================================================== */
.skeleton {
	animation: skeleton-loading 1.5s infinite ease-in-out;
}

@keyframes skeleton-loading {
	0% { background-color: #f1f5f9; }
	50% { background-color: #cbd5e1; }
	100% { background-color: #f1f5f9; }
}
