:root {
    --gold: #c9a227;
    --gold-light: #e8d48b;
    --green: #1a472a;
    --burgundy: #722f37;
    --sand: #e8e0d5;
    --cream: #f5f0e8;
}

* { box-sizing: border-box; }
body { font-family: 'Cairo', sans-serif; background: #fff; color: #333; margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.main-content { flex: 1; padding: 0; background: #fff; }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid rgba(201,162,39,0.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--green); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.logo:hover { color: var(--gold); }
.logo-wrap .logo-img { height: 2.25rem; width: auto; max-width: 3rem; object-fit: contain; vertical-align: middle; }
.site-footer .footer-logo-img { height: 1.75rem; width: auto; max-width: 2.5rem; object-fit: contain; vertical-align: middle; }
.site-footer .footer-logo { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.35rem; }
nav { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
nav a { text-decoration: none; color: #333; font-weight: 500; font-size: 0.9rem; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgba(201,162,39,0.2); }
nav a:hover, nav a.active { color: var(--gold); }
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; overflow: visible; }
    nav { gap: 0.5rem; position: relative; z-index: 2; }
    nav a { padding: 0.5rem 0.4rem; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
}
.cart-link { position: relative; }
.like-link { position: relative; }
.badge { position: absolute; top: -0.5rem; right: -0.75rem; background: var(--gold); color: var(--green); font-size: 0.7rem; font-weight: 700; border-radius: 9999px; width: 1.25rem; height: 1.25rem; display: inline-flex; align-items: center; justify-content: center; }

.site-footer { border-top: 1px solid rgba(201,162,39,0.3); background: var(--green); color: var(--gold-light); padding: 2rem; margin-top: auto; text-align: center; }
.footer-logo { font-size: 1.25rem; font-weight: 700; color: var(--gold); margin: 0; }
.footer-text { font-size: 0.875rem; margin: 0.5rem 0 0; opacity: 0.9; }

.btn { display: inline-block; padding: 0.75rem 1.5rem; font-weight: 600; text-decoration: none; border-radius: 0.5rem; border: none; cursor: pointer; font-family: inherit; font-size: 1rem; }
.btn-gold { background: var(--gold); color: var(--green); }
.btn-gold:hover { background: var(--gold-light); }
.btn-green { background: var(--green); color: var(--gold-light); }
.btn-green:hover { background: var(--burgundy); }

/* كاروسيل الصور — سويب أفقي + أزرار */
.hero-carousel-wrap { position: relative; width: 100%; overflow: hidden; background: #fff; height: 45vh; min-height: 260px; max-height: 400px; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 2.5rem; height: 2.5rem; border: none; border-radius: 50%; background: rgba(255,255,255,0.9); color: #333; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.carousel-arrow:hover { background: #fff; }
.carousel-prev { right: 0.75rem; }
.carousel-next { left: 0.75rem; }
.hero-carousel { display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; touch-action: pan-x; scrollbar-width: none; -ms-overflow-style: none; height: 100%; width: 100%; }
.hero-carousel::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; min-width: 100%; width: 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

.hero { text-align: center; padding: 4rem 0; }
.hero h1 { font-size: 3rem; color: var(--green); margin-bottom: 1rem; }
.hero p { font-size: 1.25rem; color: #555; max-width: 36rem; margin: 0 auto 2rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding: 3rem 0; border-top: 1px solid rgba(201,162,39,0.2); }
.feature { text-align: center; }
.feature-icon { width: 3rem; height: 3rem; border-radius: 50%; background: rgba(201,162,39,0.2); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.25rem; }
.feature h2 { font-size: 1.1rem; color: var(--green); margin-bottom: 0.5rem; }
.feature p { font-size: 0.875rem; color: #666; margin: 0; }

.page-title { font-size: 1.875rem; color: var(--green); margin-bottom: 2rem; font-weight: 700; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.product-card { background: #fff; border-radius: 0.75rem; overflow: hidden; border: 1px solid var(--sand); text-decoration: none; color: inherit; display: block; transition: box-shadow 0.2s, border-color 0.2s; }
.product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: rgba(201,162,39,0.4); }
.product-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.product-card .no-img { width: 100%; aspect-ratio: 4/5; background: var(--sand); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; }
.product-card .info { padding: 1rem; }
.product-card .category { font-size: 0.75rem; color: var(--gold); text-transform: uppercase; }
.product-card .name { font-size: 1.1rem; color: var(--green); margin: 0.25rem 0; font-weight: 700; }
.product-card .price { font-weight: 600; color: var(--green); }
.product-card { position: relative; }
.product-card-wrap { position: relative; }
.product-card-like { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 5; width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.9); border-radius: 50%; color: #b91c1c; text-decoration: none; font-size: 1.1rem; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.product-card-like:hover { background: #fff; color: #dc2626; }

/* سلايدر المنتجات — سكْرول أفقي + اعرض المزيد */
.page-title-main { font-size: 1.75rem; color: var(--green); margin: 1.5rem 0; font-weight: 700; text-align: center; }
.category-section { padding: 2rem 0; border-bottom: 1px solid rgba(201,162,39,0.2); background: #fff; }
.category-section:last-of-type { border-bottom: none; }
.category-section h2 { font-size: 1.35rem; color: var(--green); margin: 0 0 1rem 0; padding: 0 1rem; font-weight: 700; }
.product-carousel-wrap { position: relative; padding: 0 3rem; max-width: 100%; overflow: hidden; }
.product-carousel { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 1rem; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; touch-action: pan-x; scrollbar-width: none; -ms-overflow-style: none; padding: 0.5rem 0; min-height: 320px; }
.product-carousel::-webkit-scrollbar { display: none; }
.product-carousel .product-card-wrap { flex: 0 0 auto; width: 220px; min-width: 220px; max-width: 220px; scroll-snap-align: start; }
.product-carousel .product-card { flex: 0 0 auto; width: 100%; min-width: 0; display: block; overflow: hidden; border-radius: 0.5rem; scroll-snap-align: start; }
.product-carousel .product-card img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; display: block; }
.product-carousel .product-card .no-img { aspect-ratio: 4/5; min-height: 180px; }
.product-carousel .product-card .info { padding: 0.75rem 1rem; }
.product-carousel .product-card .name { margin: 0 0 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-carousel .product-card .price { margin: 0; }
.product-carousel-wrap .carousel-arrow { top: 40%; width: 2.25rem; height: 2.25rem; font-size: 1.25rem; background: #fff; border: 1px solid var(--sand); color: var(--green); }
.see-more-card { flex: 0 0 auto; min-width: 180px; max-width: 180px; height: auto; display: flex; align-items: center; justify-content: center; background: var(--cream); border: 2px dashed var(--gold); border-radius: 0.75rem; text-decoration: none; color: var(--green); font-weight: 700; font-size: 1rem; scroll-snap-align: start; transition: background 0.2s, border-color 0.2s; }
.see-more-card:hover { background: rgba(201,162,39,0.1); border-color: var(--green); }
@media (max-width: 768px) {
    .product-carousel-wrap { padding: 0 2.5rem; }
    .product-carousel .product-card-wrap { min-width: 180px; max-width: 180px; }
    .see-more-card { min-width: 150px; max-width: 150px; font-size: 0.9rem; }
}

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 56rem; margin: 0 auto; }
@media (max-width: 768px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail .img-wrap { aspect-ratio: 4/5; background: var(--sand); border-radius: 0.75rem; overflow: hidden; }
.product-detail .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-detail .category { font-size: 0.875rem; color: var(--gold); }
.product-detail h1 { font-size: 1.875rem; color: var(--green); margin: 0.5rem 0 1rem; }
.product-detail .price { font-size: 1.5rem; font-weight: 700; color: var(--green); margin-bottom: 1rem; }
.product-detail .desc { color: #555; margin-bottom: 1.5rem; }

.cart-list { max-width: 40rem; margin: 0 auto; }
.cart-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: #fff; border: 1px solid var(--sand); border-radius: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
@media (max-width: 600px) {
    .cart-item { flex-wrap: wrap; }
    .cart-item .details { flex: 1 1 100%; }
    .cart-item .price { order: 3; width: 100%; text-align: right !important; margin-top: 0.5rem; }
}
.cart-item .thumb { width: 4rem; height: 5rem; background: var(--sand); border-radius: 0.25rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; overflow: hidden; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .details { flex: 1; min-width: 0; }
.cart-item .name { font-weight: 600; color: var(--green); }
.cart-item .sub { font-size: 0.875rem; color: #666; }
.cart-summary { background: #fff; border: 2px solid var(--gold); border-radius: 0.75rem; padding: 1.5rem; margin-top: 1.5rem; }
.cart-total { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--sand); }
.cart-total .label { font-weight: 700; }
.cart-total .amount { font-size: 1.5rem; font-weight: 700; color: var(--green); }
.payment-info { text-align: center; padding: 0.75rem 0; margin-bottom: 1rem; background: rgba(201,162,39,0.08); border-radius: 0.5rem; }
.payment-info .payment-method { font-weight: 700; color: var(--green); margin: 0 0 0.25rem; font-size: 1rem; }
.payment-info .payment-desc { font-size: 0.875rem; color: #555; margin: 0; }
.btn-checkout { display: block; width: 100%; text-align: center; padding: 1rem 1.5rem; font-size: 1.1rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.25rem; color: #374151; }
.form-group input, .form-group textarea { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--sand); border-radius: 0.5rem; font-family: inherit; font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--gold); }
.form-error { background: #fef2f2; color: #b91c1c; padding: 0.75rem; border-radius: 0.5rem; margin-bottom: 1rem; font-size: 0.875rem; }
.form-success { background: #f0fdf4; color: #166534; padding: 0.75rem; border-radius: 0.5rem; margin-bottom: 1rem; }

.admin-card { background: #fff; border: 1px solid var(--sand); border-radius: 0.75rem; padding: 1.5rem; margin-bottom: 1.5rem; }
a.admin-card { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgba(201,162,39,0.15); }
a.admin-card * { pointer-events: none; }
@media (max-width: 768px) {
    .admin-mobile-links { display: flex !important; flex-direction: column; gap: 1rem; }
    .admin-mobile-btn { display: block; padding: 1.25rem 1.5rem; background: var(--green); color: var(--gold-light); text-decoration: none; font-weight: 700; font-size: 1.25rem; text-align: center; border-radius: 0.75rem; touch-action: manipulation; -webkit-tap-highlight-color: rgba(201,162,39,0.3); min-height: 56px; }
    .admin-mobile-btn:hover, .admin-mobile-btn:active { background: var(--burgundy); color: #fff; }
    a.admin-card { min-height: 120px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; position: relative; z-index: 1; }
}
.order-card { background: #fff; border: 1px solid var(--sand); border-radius: 0.75rem; padding: 1.5rem; margin-bottom: 1.5rem; }
.order-card .meta { font-size: 0.875rem; color: #666; margin-bottom: 1rem; }
.order-card .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.order-card .items { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--sand); font-size: 0.875rem; color: #555; }
.order-card select { padding: 0.25rem 0.5rem; border-radius: 0.25rem; border: 1px solid var(--sand); }

/* Admin pages — موبايل: أزرار وقوائم سهلة اللمس */
@media (max-width: 768px) {
    .admin-card .btn, .order-card .btn, .admin-card button[type="submit"], .order-card button[type="submit"] { min-height: 48px; padding: 0.75rem 1.25rem; font-size: 1rem; touch-action: manipulation; cursor: pointer; }
    .admin-card input, .admin-card textarea, .admin-card select, .order-card input, .order-card select { min-height: 48px; font-size: 16px; padding: 0.6rem 0.75rem; touch-action: manipulation; }
    .order-card form { flex-wrap: wrap; }
    .order-card select { min-width: 140px; }
}

.empty-state { text-align: center; padding: 3rem 1rem; color: #666; }
.empty-state h2 { color: var(--green); margin-bottom: 1rem; }
