/* ==================================================
   SWEETS ANDALUS - HTML+CSS+JS Version
   طبق الأصل من Next.js ولكن بدون dependencies!
   ================================================== */

/* ===== ROOT VARIABLES ===== */
:root {
	/* Gold fabric palette — matches sergiwa_site / future_theme gold.css */
	--ss-primary: #a68d44;
	--ss-primary-dark: #8c7340;
	--ss-primary-mid: #b8954a;
	--ss-primary-light: #cbb677;
	--ss-primary-lighter: #e5d4b0;
	--ss-primary-panel: #d9c9a3;
	--ss-primary-transparent: rgba(166, 141, 68, 0.12);
	--ss-primary-shadow: #5c4e29;

	--ss-dark: #2d2612;
	--ss-text: #2d2612;
	--ss-text-muted: #5c4e29;
	--ss-text-light: #8c7340;

	--ss-bg: #fff;
	--ss-bg-light: #e5d4b0;
	--ss-bg-panel: #d9c9a3;
	--ss-bg-overlay: rgba(45, 38, 18, 0.5);

	--ss-border: #cfc09a;
	--ss-border-light: #e5d4b0;

	/* Promo / CTA — aligned with gold primary */
	--ss-discount-red: #d31e44;
	--ss-discount-red-dark: #b01838;
	--ss-cta-orange: var(--ss-primary);
	--ss-cta-orange-dark: var(--ss-primary-dark);
	--primary-color: var(--ss-primary);
	--ss-card-radius: 1.25rem;

	/* Shadows */
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
	--shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);

	/* Spacing */
	--spacing-xs: 0.5rem;
	--spacing-sm: 1rem;
	--spacing-md: 1.5rem;
	--spacing-lg: 2rem;
	--spacing-xl: 3rem;
	--spacing-2xl: 4rem;

	/* Border Radius */
	--radius-sm: 0.375rem;
	--radius-md: 0.625rem;
	--radius-lg: 1rem;
	--radius-xl: 1.5rem;
	--radius-2xl: 2rem;
	--radius-full: 9999px;

	/* Transitions */
	--transition-fast: 150ms ease;
	--transition-base: 300ms ease;
	--transition-slow: 500ms ease;

	/* Hero: image crossfade + text fade (half + half = same total) */
	--hero-crossfade-duration: 2.8s;
	--hero-text-phase: calc(var(--hero-crossfade-duration) / 2);

	/* Container */
	--container-max-width: 1400px;
	--container-padding: 1rem;

	/* Header */
	--header-height: 5rem;
	--header-height-mobile: 4rem;
}

/* ===== RESET & BASE ===== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

@font-face {
  font-family: 'DG Kufi Arabic';
  src: url('fonts/dg-kufi.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: 'DG Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;
	color: var(--ss-text);
	background: var(--ss-bg-light);
	line-height: 1.6;
	direction: rtl;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 0.5em;
}

h1 {
	font-size: 2.5rem;
}
h2 {
	font-size: 2rem;
}
h3 {
	font-size: 1.75rem;
}
h4 {
	font-size: 1.5rem;
}
h5 {
	font-size: 1.25rem;
}
h6 {
	font-size: 1rem;
}

p {
	margin-bottom: 1rem;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--transition-base);
}

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

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ===== UTILITIES ===== */
.container {
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: 0 var(--container-padding);
}

.text-center {
	text-align: center;
}
.text-right {
	text-align: right;
}
.text-left {
	text-align: left;
}

.text-primary {
	color: var(--ss-primary);
}
.text-muted {
	color: var(--ss-text-muted);
}
.text-light {
	color: var(--ss-text-light);
}

.bg-primary {
	background: var(--ss-primary);
}
.bg-light {
	background: var(--ss-bg-light);
}

/* ===== HEADER ===== */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	transition: all var(--transition-base);
	background: linear-gradient(180deg, #cbb677 0%, #a68d44 55%, #8c7340 100%);
}

.site-header.scrolled {
	box-shadow: var(--shadow-lg);
}

.header-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-height);
	gap: 2rem;
	overflow: visible;
}

.header-logo-text {
	font-size: clamp(1rem, 4vw, 1.2rem);
	font-weight: 700;
	color: white;
	transition: color var(--transition-base);
}

.site-header.scrolled .header-logo-text {
	color: var(--ss-text);
}

.header-logo img {
	height: 3rem;
	width: auto;
}

/* Navigation */
html.storefront-booting .header-nav,
html.storefront-booting .mobile-menu-nav,
html.storefront-booting .header-logo {
	visibility: hidden;
}

.header-nav {
	display: none;
	align-items: center;
	gap: 2.5rem;
	overflow: visible;
}

.header-nav > a,
.header-nav > .nav-item > .nav-link-storefront {
	font-weight: 500;
	font-size: .9rem;
	color: white;
	position: relative;
	padding: 0.3rem 0;
}

.site-header.scrolled .header-nav > a,
.site-header.scrolled .header-nav > .nav-item > .nav-link-storefront {
	color: white;
}

.header-nav > a:hover,
.header-nav > .nav-item > .nav-link-storefront:hover {
	color: var(--ss-primary);
}

.header-nav > a::after,
.header-nav > .nav-item > .nav-link-storefront::after {
	content: '';
	position: absolute;
	bottom: 0;
	right: 0;
	width: 0;
	height: 2px;
	background: var(--ss-primary);
	transition: width var(--transition-base);
}

.header-nav > a:hover::after,
.header-nav > .nav-item > .nav-link-storefront:hover::after {
	width: 100%;
}

/* Dropdown Menu */
.nav-item {
	position: relative;
}

.nav-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 20;
	background: var(--ss-bg);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-xl);
	min-width: 13rem;
	padding: 0.5rem 0;
	margin-top: 0.5rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all var(--transition-base);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.header-nav .nav-dropdown a,
.header-nav .nav-dropdown span {
	display: block;
	padding: 0.75rem 1.5rem;
	color: var(--ss-text);
	font-size: 0.9rem;
	position: static;
	white-space: nowrap;
	font-weight: 500;
}

.header-nav .nav-dropdown a::after {
	content: none;
	display: none;
}

.header-nav .nav-dropdown a:hover {
	background: var(--ss-bg-light);
	color: var(--ss-primary);
}

.nav-dropdown-link-all {
	font-weight: 700;
	border-bottom: 1px solid var(--ss-border-light);
}

.nav-dropdown-loading,
.nav-dropdown-empty {
	color: var(--ss-text-muted);
	cursor: default;
}

/* Header Actions */
.header-actions {
	display: flex;
	align-items: center;
}
.cart-group{
	display: flex;
    background-color:  rgba(225, 225, 225, .4);
    align-items: center;
    border-radius: 30px;
    padding: 0 10px;
}
.header-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: var(--radius-full);
	background: transparent;
	border: none;
	color: white;
	cursor: pointer;
	transition: all var(--transition-base);
	font-size: 1.25rem;
}

.site-header.scrolled .header-btn {
	color: var(--ss-text);
}

.header-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.site-header.scrolled .header-btn:hover {
	background: var(--ss-bg-light);
}

.cart-btn {
	position: relative;
	padding: 0.5rem;
	width: auto;
	color: white;
	border-radius: var(--radius-full);
	/* gap: 0.5rem; */
}

.cart-badge {
	background: var(--ss-primary);
	color: white;
	font-size: 0.9rem;
	font-weight: 700;
	min-width: 1.25rem;
	height: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-full);
	padding: .6rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
	display: flex;
	font-size: 1.5rem;
}

/* Mobile Menu */
.mobile-menu {
	position: fixed;
	top: 0;
	right: -100%;
	width: min(88vw, 22rem);
	height: 100vh;
	height: 100dvh;
	background: var(--ss-bg);
	box-shadow: var(--shadow-xl);
	padding: 1.25rem;
	overflow-y: auto;
	transition: right var(--transition-base);
	z-index: 1001;
}

.mobile-menu.open {
	right: 0;
}

.mobile-menu-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--ss-border);
}

.mobile-menu-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--ss-text);
}

.mobile-menu-nav {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.mobile-menu-nav a {
	padding: 1rem;
	color: var(--ss-text);
	font-weight: 500;
	border-radius: var(--radius-md);
	transition: all var(--transition-fast);
}

.mobile-menu-nav a:hover {
	background: var(--ss-bg-light);
	color: var(--ss-primary);
}

.mobile-storefront-item {
	border-radius: var(--radius-md);
}

.mobile-storefront-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem;
	border: 0;
	background: transparent;
	color: var(--ss-text);
	font: inherit;
	font-weight: 500;
	text-align: right;
	cursor: pointer;
	transition: all var(--transition-fast);
}

.mobile-storefront-toggle:hover,
.mobile-storefront-item.open .mobile-storefront-toggle {
	background: var(--ss-bg-light);
	color: var(--ss-primary);
}

.mobile-storefront-toggle i {
	font-size: 0.8rem;
	transition: transform var(--transition-fast);
}

.mobile-storefront-item.open .mobile-storefront-toggle i {
	transform: rotate(180deg);
}

.mobile-storefront-submenu.nav-dropdown {
	position: static;
	display: flex;
	flex-direction: column;
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 0.25rem 0 0.5rem;
	box-shadow: none;
	border-radius: var(--radius-md);
	background: var(--ss-bg-light);
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: none;
}

.mobile-storefront-submenu.nav-dropdown[hidden] {
	display: none !important;
}

.mobile-storefront-submenu.nav-dropdown a,
.mobile-storefront-submenu.nav-dropdown span {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	text-align: right;
	white-space: normal;
	word-break: break-word;
	line-height: 1.5;
	color: var(--ss-text);
}

.mobile-storefront-submenu.nav-dropdown a:hover {
	background: var(--ss-bg);
	color: var(--ss-primary);
}

.mobile-menu-overlay {
	position: fixed;
	inset: 0;
	background: var(--ss-bg-overlay);
	opacity: 0;
	visibility: hidden;
	transition: all var(--transition-base);
	z-index: 1000;
}

.mobile-menu-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* ===== HERO SECTION ===== */
.hero {
	position: relative;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: linear-gradient(135deg, var(--ss-primary-dark), var(--ss-primary));
}

.hero-slideshow {
	position: absolute;
	inset: 0;
}

.hero-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--hero-crossfade-duration) ease-in-out;
}

.hero-slide.active {
	opacity: 1;
}

.hero-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}

.hero-video-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	z-index: 0;
	pointer-events: none;
}

.hero-video-wrap .hero-video-element {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	transform: translate(-50%, -50%);
	object-fit: cover;
	border: 0;
	pointer-events: none;
}

.hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6));
}

.hero-content {
	position: relative;
	z-index: 10;
	text-align: center;
	color: rgba(255, 255, 255, 0.96);
	padding: clamp(1rem, 4vw, 2rem) clamp(1.25rem, 5vw, 2.75rem);
	max-width: 1000px;
	opacity: 1;
	transition: opacity var(--hero-text-phase) ease-in-out;
	background: none;
	border: none;
	box-shadow: none;
}

.hero-content.hero-content--text-hidden {
	opacity: 0;
	pointer-events: none;
}

.hero-content h1 {
	margin-bottom: 1.5rem;
    font-size: clamp(1.2rem,6vw ,3rem);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0;
	color: rgba(255, 255, 255, 0.98);
	text-shadow:
		0 1px 2px rgba(0, 0, 0, 0.45),
		0 4px 24px rgba(0, 0, 0, 0.5),
		0 0 40px rgba(0, 0, 0, 0.25);
}

.hero-content p {
	margin-bottom: 2rem;
    font-size: clamp(1rem,3vw ,1.5rem);
    line-height: 1.8;
    font-weight: 400;
	color: rgba(255, 255, 255, 0.92);
	text-shadow:
		0 1px 2px rgba(0, 0, 0, 0.4),
		0 3px 18px rgba(0, 0, 0, 0.45);
}

.hero-buttons {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.5rem 2.5rem;
	border-radius: var(--radius-full);
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	border: none;
	transition: all var(--transition-base);
	text-decoration: none;
}

.btn-primary {
	background: var(--ss-primary);
	color: white !important;
}

.btn-primary:active {
	background: var(--ss-primary-dark);
}

.btn-primary:hover,
.btn-primary:focus {
	background: var(--ss-primary-dark);
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.btn-primary {
	background: var(--ss-primary);
	color: #060606; /* Dark text for AAA contrast on orange */
}

.btn-primary.full {
	width: 100%;
}

.btn:focus {
	outline: 2px solid var(--ss-primary);
	outline-offset: 2px;
}

.btn-secondary {
	background: white;
	color: var(--ss-primary);
}

.btn-secondary:hover {
	background: var(--ss-bg-light);
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.btn-outline {
	background: transparent;
	color: white;
	border: 2px solid white;
}

.btn-outline:hover {
	background: white;
	color: var(--ss-primary);
}

.btn-lg {
	padding: 1rem 2.5rem;
	font-size: 1.1rem;
}

/* ===== SECTIONS ===== */
.section {
	padding: 4rem 0;
}

/* Pages without hero: main content starts below fixed header */
main.section {
	padding-top: calc(var(--header-height) + 2rem);
}

/* Hero already clears the fixed header — no duplicate header offset */
.hero + main.section {
	padding-top: 3rem;
}

.section-header {
	text-align: center;
	margin-bottom: 3rem;
}

.section-header h2 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.section-header h2::before,
.section-header h2::after {
    content: "";
    height: 2px;
    flex: 1;
    max-width: 100px; /* طول الخط الزخرفي */
    background: linear-gradient(to left, transparent, var(--ss-primary-light));
}

.section-header h2::after {
    background: linear-gradient(to right, transparent, var(--ss-primary-light));
}
.section-header p {
	font-size: 1.125rem;
	color: var(--ss-text-muted);
	max-width: 750px;
	margin: 0 auto;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	justify-content: center;
	gap: 2rem;
}

/* Product Card */
.product-card {
	background: var(--ss-bg);
	border-radius: var(--ss-card-radius);
	overflow: hidden;
	transition: all var(--transition-base);
	cursor: pointer;
	border: 1px solid var(--ss-border-light);
	box-shadow: var(--shadow-md);
}

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

/* Multi-image cards: do not translate on hover — movement drops :hover and stops the gallery. */
.product-card.product-card--has-gallery:hover {
	transform: none;
	box-shadow: var(--shadow-xl);
}

.product-image {
	position: relative;
	width: 100%;
	height: 250px;
	overflow: hidden;
	background: var(--ss-bg-light);
	border-radius: var(--ss-card-radius) var(--ss-card-radius) 0 0;
}

.product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--transition-slow);
}

/* Single-image card: zoom on hover. Gallery uses layered images instead. */
.product-card:hover .product-image:not(.product-image--gallery) img {
	transform: scale(1.1);
}

/* Multi-image gallery: CSS animation while .product-card:hover (no JS timer). */
.product-card:not(:hover) .product-image--gallery .product-image__layer:first-child {
	opacity: 1;
	z-index: 1;
	transform: none;
}

.product-card:not(:hover) .product-image--gallery .product-image__layer:not(:first-child) {
	opacity: 0;
}

.product-image--gallery .product-image__layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
	z-index: 0;
}

.product-card:hover .product-image--gallery .product-image__layer {
	transition: none;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

/* One visible segment per image; duration = n * 0.85s (see shared.js GALLERY_STEP_SEC). */
@keyframes ssGal2 {
	0%,
	49.99% {
		opacity: 1;
		z-index: 2;
		transform: scale(1.06);
	}
	50%,
	100% {
		opacity: 0;
		z-index: 0;
		transform: scale(1);
	}
}

@keyframes ssGal3 {
	0%,
	33.32% {
		opacity: 1;
		z-index: 2;
		transform: scale(1.06);
	}
	33.33%,
	100% {
		opacity: 0;
		z-index: 0;
		transform: scale(1);
	}
}

@keyframes ssGal4 {
	0%,
	24.99% {
		opacity: 1;
		z-index: 2;
		transform: scale(1.06);
	}
	25%,
	100% {
		opacity: 0;
		z-index: 0;
		transform: scale(1);
	}
}

@keyframes ssGal5 {
	0%,
	19.99% {
		opacity: 1;
		z-index: 2;
		transform: scale(1.06);
	}
	20%,
	100% {
		opacity: 0;
		z-index: 0;
		transform: scale(1);
	}
}

@keyframes ssGal6 {
	0%,
	16.66% {
		opacity: 1;
		z-index: 2;
		transform: scale(1.06);
	}
	16.67%,
	100% {
		opacity: 0;
		z-index: 0;
		transform: scale(1);
	}
}

@keyframes ssGal7 {
	0%,
	14.27% {
		opacity: 1;
		z-index: 2;
		transform: scale(1.06);
	}
	14.28%,
	100% {
		opacity: 0;
		z-index: 0;
		transform: scale(1);
	}
}

@keyframes ssGal8 {
	0%,
	12.49% {
		opacity: 1;
		z-index: 2;
		transform: scale(1.06);
	}
	12.5%,
	100% {
		opacity: 0;
		z-index: 0;
		transform: scale(1);
	}
}

@keyframes ssGal9 {
	0%,
	11.1% {
		opacity: 1;
		z-index: 2;
		transform: scale(1.06);
	}
	11.11%,
	100% {
		opacity: 0;
		z-index: 0;
		transform: scale(1);
	}
}

@keyframes ssGal10 {
	0%,
	9.99% {
		opacity: 1;
		z-index: 2;
		transform: scale(1.06);
	}
	10%,
	100% {
		opacity: 0;
		z-index: 0;
		transform: scale(1);
	}
}

.product-card:hover .product-image--gallery.gallery-n-2 .product-image__layer {
	animation-name: ssGal2;
	animation-duration: 1.7s;
}

.product-card:hover .product-image--gallery.gallery-n-3 .product-image__layer {
	animation-name: ssGal3;
	animation-duration: 2.55s;
}

.product-card:hover .product-image--gallery.gallery-n-4 .product-image__layer {
	animation-name: ssGal4;
	animation-duration: 3.4s;
}

.product-card:hover .product-image--gallery.gallery-n-5 .product-image__layer {
	animation-name: ssGal5;
	animation-duration: 4.25s;
}

.product-card:hover .product-image--gallery.gallery-n-6 .product-image__layer {
	animation-name: ssGal6;
	animation-duration: 5.1s;
}

.product-card:hover .product-image--gallery.gallery-n-7 .product-image__layer {
	animation-name: ssGal7;
	animation-duration: 5.95s;
}

.product-card:hover .product-image--gallery.gallery-n-8 .product-image__layer {
	animation-name: ssGal8;
	animation-duration: 6.8s;
}

.product-card:hover .product-image--gallery.gallery-n-9 .product-image__layer {
	animation-name: ssGal9;
	animation-duration: 7.65s;
}

.product-card:hover .product-image--gallery.gallery-n-10 .product-image__layer {
	animation-name: ssGal10;
	animation-duration: 8.5s;
}

@media (prefers-reduced-motion: reduce) {
	.product-card:hover .product-image--gallery .product-image__layer {
		animation: none !important;
		opacity: 0;
	}

	.product-card:hover .product-image--gallery .product-image__layer:first-child {
		opacity: 1;
		z-index: 1;
	}
}

.product-badge {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: var(--ss-primary);
	color: white;
	padding: 0.25rem 0.75rem;
	border-radius: var(--radius-full);
	font-size: 0.875rem;
	font-weight: 600;
}

.product-content {
	padding: 1.25rem 1.5rem 1.5rem;
	text-align: center;
}

.product-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ss-text);
	margin-bottom: 0.5rem;
	line-height: 1.35;
	text-align: center;
}

.product-description {
	font-size: 0.9rem;
	color: var(--ss-text-muted);
	margin-bottom: 1rem;
	line-height: 1.5;
}

.product-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.5rem;
	gap: 1rem;
}

.product-price-row-wrap {
	display: block;
	width: 100%;
	text-align: center;
}

/* صف الخصم: شارة يمين، نص العرض يسارها (RTL) — مجموعة في المنتصف */
.product-discount-row {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.45rem 0.6rem;
	width: 100%;
	margin: 0.35rem 0 0.55rem;
	box-sizing: border-box;
}

.product-discount-pct-badge {
	display: inline-block;
	background: var(--ss-discount-red);
	color: #fff;
	padding: 0.2rem 0.55rem;
	border-radius: 4px;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.35;
	white-space: nowrap;
}

.product-discount-label-outside {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--ss-discount-red);
	line-height: 1.35;
	flex: 0 1 auto;
	max-width: 100%;
}

/* سطر واحد — متمركز؛ مع خصم: رقم جديد + رقم قديم + وحدة مرة واحدة */
.product-price-row-inline {
	display: inline-flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0.35rem 0.55rem;
	width: 100%;
}

.product-price-row-inline--discount {
	flex-wrap: nowrap;
	max-width: 100%;
}

@media (max-width: 360px) {
	.product-price-row-inline--discount {
		flex-wrap: wrap;
		justify-content: center;
	}
}

.product-price-line {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.12rem 0.2rem;
	line-height: 1.25;
}

/* رقم السعر برتقالي كبير؛ «ر.س / وحدة» أسود أصغر (مرجع andalus) */
.product-price-amount {
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--ss-cta-orange);
	line-height: 1.2;
}

.product-price-currency-unit {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--ss-text);
	line-height: 1.25;
	white-space: nowrap;
}

.product-price--sale {
	color: var(--ss-cta-orange);
}

.product-price-original {
	display: inline;
	font-size: 0.88rem;
	font-weight: 600;
	color: #9ca3af;
	text-decoration: line-through;
	line-height: 1.25;
	white-space: nowrap;
}

.product-price--plain {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.12rem 0.2rem;
}

.quantity-selector{
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 5px;
	gap: .5rem;
	border-radius: 10px;
}
.product-price {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.12rem 0.2rem;
}

.product-add-btn {
	background: var(--ss-primary);
	color: white;
	border: none;
	font-size: 1.2rem;
	margin-top: 1rem;
	width: 100%;
	padding: 0.3rem 1.5rem;
	border-radius: var(--radius-full);
	font-weight: 600;
	cursor: pointer;
	transition: all var(--transition-base);
	text-align: center;
}

.product-add-btn:hover {
	background: var(--ss-primary-dark);
	transform: scale(1.05);
}
.product-action-container {
	margin-top: 1rem;
	width: 100%;
	text-align: center;
}

/* ===== FOOTER ===== */
.site-footer {
	background: var(--ss-bg-light);
	border-top: 1px solid var(--ss-border);
	padding: 3rem 0 0rem;
}

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

.footer-section h3,
.footer-section h2.footer-heading {
	font-size: 1.125rem;
	margin-bottom: 1rem;
}

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

.footer-section ul li {
	margin-bottom: 0.75rem;
}

.footer-section a,
.footer-section p{
	color: var(--ss-text-muted);
	transition: color var(--transition-fast);
	font-size: .8rem;
}

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

.footer-social {
	display: flex;
	gap: 1rem;
	margin-top: 1rem;
}

.social-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: var(--radius-full);
	background: var(--ss-bg);
	color: var(--ss-text-muted);
	transition: all var(--transition-base);
	font-size: 1.25rem;
}

.social-icon:hover {
	background: var(--ss-primary);
	color: white;
	transform: translateY(-3px);
}
.orderNotFound{
	display:flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
	background-color: var(--ss-primary-transparent);
	padding: 5rem 2rem;
	margin: 2rem 0;
	border-radius: var(--radius-md);
}

.footer-slot-subtitle:empty {
	display: none;
}

.footer-brand-logo-wrap {
	margin-bottom: 0.75rem;
}

.footer-brand-logo-wrap .footer-logo {
	display: block;
	max-height: 50px;
	width: auto;
	object-fit: contain;
}

.contact-link a,
.location-link a
{
	display: flex;
	gap: .5rem;
}

.footer-branch-location a,
.footer-branch-location__static {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.footer-branch-contact {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.footer-branch-contact__link,
.footer-branch-contact__text {
	color: inherit;
}

.footer-branch-contact__link:hover {
	color: var(--ss-primary);
}

.footer-branch-whatsapp {
	color: #25d366;
	font-size: 1.1rem;
}

.footer-branch-whatsapp:hover {
	color: #128c7e;
}

.footer-branch-location__icon {
	color: var(--ss-primary);
}

.footer-bottom {
	border-top: 1px solid var(--ss-border);
	padding: 1.5rem 0;
	color: var(--ss-text-muted);
	font-size: 0.9rem;
	p{
		margin-bottom: 0;
	}
}

/* Floating cart FAB — injected on all storefront pages by shared.js */
.cart-fab {
	position: fixed;
	bottom: 1.5rem;
	inset-inline-start: 1.5rem;
	z-index: 900;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background: var(--ss-primary);
	color: #fff;
	box-shadow: 0 4px 16px rgba(166, 141, 68, 0.45);
	text-decoration: none;
	animation: cart-fab-pulse 2.8s ease-in-out infinite;
}

.cart-fab:hover {
	filter: brightness(1.06);
}

.cart-fab .cart-badge {
	position: absolute;
	top: -0.15rem;
	inset-inline-end: -0.15rem;
	min-width: 1.35rem;
	height: 1.35rem;
	font-size: 0.75rem;
	padding: 0.2rem 0.35rem;
}

.cart-fab i {
	font-size: 1.5rem;
}

@keyframes cart-fab-pulse {
	0%,
	100% {
		box-shadow: 0 4px 16px rgba(166, 141, 68, 0.45);
		transform: scale(1);
	}
	50% {
		box-shadow: 0 6px 22px rgba(166, 141, 68, 0.55);
		transform: scale(1.04);
	}
}

@media (max-width: 480px) {
	.cart-fab {
		bottom: 1rem;
		inset-inline-start: 1rem;
	}
}

/* Floating action stack — cart + ERP login + social (same pattern as sergiwa_site) */
.floating-fab-stack {
	position: fixed;
	bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
	left: max(0.5rem, env(safe-area-inset-left, 0px));
	right: auto;
	inset-inline-start: auto;
	inset-inline-end: auto;
	z-index: 1200;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	pointer-events: none;
}

.floating-fab-commerce {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
}

.floating-fab-stack > * {
	pointer-events: auto;
}

body .floating-fab-stack a.cart-fab,
body .floating-fab-stack a.erp-fab {
	position: static !important;
	bottom: auto !important;
	inset-inline-start: auto !important;
	right: auto !important;
	left: auto !important;
	flex-shrink: 0;
	margin: 0;
}

body .floating-fab-stack a.cart-fab {
	width: 3.5rem;
	height: 3.5rem;
}

body .floating-fab-stack a.erp-fab {
	width: 4rem;
	height: 4rem;
}

body .floating-fab-stack > .social-fab {
	position: static !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	inset-inline-start: auto !important;
	width: 3.5rem;
	margin: 0;
	align-items: center;
}

.erp-fab {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	background: #1a1a1a;
	color: #fff;
	border: 3px solid var(--ss-primary);
	box-shadow:
		0 6px 22px rgba(0, 0, 0, 0.35),
		0 0 0 2px rgba(255, 255, 255, 0.15);
	text-decoration: none;
	transition:
		transform var(--transition-base),
		box-shadow var(--transition-base);
}

.erp-fab:hover {
	transform: scale(1.06);
	box-shadow:
		0 8px 26px rgba(166, 141, 68, 0.55),
		0 0 0 2px rgba(255, 255, 255, 0.25);
}

.erp-fab img,
.erp-fab__logo {
	width: 2.5rem;
	height: 2.5rem;
	display: block;
	object-fit: contain;
}

body > a.erp-fab {
	position: fixed;
	bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
	left: max(0.5rem, env(safe-area-inset-left, 0px));
	z-index: 1200;
}

.floating-fab-stack > .cart-fab {
	position: relative;
	bottom: auto;
	inset-inline-start: auto;
	z-index: auto;
	order: 2;
	flex: 0 0 auto;
}

.social-fab {
	position: fixed;
	right: 1rem;
	bottom: 18px;
	z-index: 1200;
	width: 3.5rem;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}

.social-fab__items {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	gap: 0.65rem;
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition:
		opacity var(--transition-base),
		transform var(--transition-base);
}

.social-fab.is-open .social-fab__items {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
	.social-fab:hover .social-fab__items {
		opacity: 1;
		transform: translateY(0);
		pointer-events: auto;
	}
}

.social-fab__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	text-decoration: none;
}

.social-fab__icon {
	width: 3.5rem;
	height: 3.5rem;
	border-radius: var(--radius-full);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 1.5rem;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.3);
}

.social-fab__label {
	display: none;
}

.social-fab__trigger {
	width: 3.5rem;
	height: 3.5rem;
	border: none;
	border-radius: var(--radius-full);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #fff;
	font-size: 1.35rem;
	background: var(--ss-primary);
	box-shadow: 0 4px 16px rgba(166, 141, 68, 0.45);
	touch-action: manipulation;
	transition:
		transform var(--transition-base),
		filter var(--transition-base),
		box-shadow var(--transition-base);
}

.social-fab__trigger:hover {
	transform: translateY(-2px);
	filter: brightness(1.06);
	box-shadow: 0 6px 22px rgba(166, 141, 68, 0.55);
}

.social-fab__item--wa .social-fab__icon {
	background: #22c55e;
}

.social-fab__item--fb .social-fab__icon {
	background: #1877f2;
}

.social-fab__item--ig .social-fab__icon {
	background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.social-fab__item--web .social-fab__icon {
	background: #4b5563;
}

.social-fab__icon.social-fab__icon--custom {
	background: #fff !important;
	color: var(--ss-text-muted);
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
}

.social-fab__icon-img {
	display: block;
	width: 1.65rem;
	height: 1.65rem;
	object-fit: contain;
}

body:has(.mobile-menu.open) .floating-fab-stack {
	display: none;
}

@media (max-width: 480px) {
	.floating-fab-stack {
		bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
		left: max(0.35rem, env(safe-area-inset-left, 0px));
		gap: 0.6rem;
	}

	body .floating-fab-stack a.cart-fab {
		width: 3.25rem;
		height: 3.25rem;
	}

	body .floating-fab-stack a.erp-fab,
	.erp-fab {
		width: 3.65rem;
		height: 3.65rem;
	}

	.social-fab {
		width: 3.25rem;
	}

	.social-fab__icon,
	.social-fab__trigger {
		width: 3.25rem;
		height: 3.25rem;
	}

	.social-fab__icon {
		font-size: 1.4rem;
	}

	.social-fab__trigger {
		font-size: 1.25rem;
	}
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideInRight {
	from {
		transform: translateX(-100%);
	}
	to {
		transform: translateX(0);
	}
}


/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
	.mobile-menu-toggle {
		display: none;
	}

	.header-nav {
		display: flex;
	}
}

@media (max-width: 767px) {
	:root {
		--header-height: var(--header-height-mobile);
		--container-padding: 1rem;
	}

	.header-container {
		position: relative;
		justify-content: center;
		gap: 0;
	}

	.header-logo {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		z-index: 2;
		display: flex;
		align-items: center;
		justify-content: center;
		max-width: 45vw;
	}

	.header-logo img {
		max-height: 2.75rem;
		max-width: 100%;
	}

	.header-actions {
		width: 100%;
		justify-content: space-between;
		direction: ltr;
		z-index: 3;
	}

	.cart-group {
		direction: rtl;
	}

	h1 {
		font-size: 2rem;
	}
	h2 {
		font-size: 1.75rem;
	}
	h3 {
		font-size: 1.5rem;
	}

	.product-grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
		gap: 1.5rem;
	}

	.section {
		padding: 3rem 0;
	}
}

/* ===== LOADING STATES ===== */
.loading-spinner {
	display: inline-block;
	width: 40px;
	height: 40px;
	border: 4px solid var(--ss-primary-lighter);
	border-top-color: var(--ss-primary);
	border-radius: 50%;
}

.skeleton {
	background: #f0f0f0;
	border-radius: var(--radius-md);
	overflow: hidden;
	position: relative;
}
.category-section .product-grid .product-card {
    display: none;
}
.category-section .product-grid .product-card:nth-child(-n+4) {
    display: block;
}

.category-section.show-all-products .product-grid .product-card {
    display: block !important;
}

.category-section.show-all-products .category-products-header .btn-outline {
    display: none;
}

.qty-group{
	background-color: #F5F0EB;
	border-radius: var(--radius-lg);
	padding: .2rem;
	font-size: .9rem;
}
.qty-group:first-child {
	width: 60%;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.qty-btn{
	background: var(--ss-primary-light);
	color: white;
	border: none;
	height: 25px;
	width: 25px;
	font-size: .9rem;
	border-radius: var(--radius-full);
	font-weight: 600;
	cursor: pointer;
	transition: background var(--transition-fast), transform var(--transition-fast);
}
.qty-btn.plus {
	background: #16a34a;
}
.qty-btn.plus:hover {
	background: #15803d;
}
.qty-btn.minus {
	background: var(--ss-primary);
}
.qty-btn.minus:hover {
	background: var(--ss-primary-dark);
}
.qty-btn.delete {
	background: #dc2626;
}
.qty-btn.delete:hover {
	background: #b91c1c;
}
.qty-number{
	padding: .1rem;
	font-size: 1.1rem;
}
.delete-group{
	display: flex;
	align-items: center;
	gap: .5rem;
}
