/*
Theme Name: Haridi Snacks (هريدي)
Theme URI: https://haridi-snacks.example
Author: Haridi
Description: ثيم ووردبريس عربي (RTL) لمنتج سناكس هريدي – قرمشة أسطورية من قلب الصعيد. يتضمن صفحة رئيسية، متجر منتجات، نكهات، أماكن البيع مع خريطة، وآراء العملاء، وبيانات تجريبية تتحمل تلقائياً عند تفعيل الثيم.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: haridi
Tags: rtl-language-support, custom-menu, custom-logo, featured-images, one-column, e-commerce
*/

:root {
  --purple-950: #14062a;
  --purple-900: #1d0b36;
  --purple-800: #2a1050;
  --purple-700: #3d1a73;
  --purple-500: #6a35b8;
  --yellow: #ffc82c;
  --yellow-soft: #ffe28a;
  --green: #2e8b3a;
  --red: #e53935;
  --white: #fff;
  --glass: rgba(255, 255, 255, .06);
  --glass-border: rgba(255, 255, 255, .22);
  --radius: 22px;
  --font-ar: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-en: 'Roboto Condensed', 'Cairo', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ar);
  color: #fff;
  background: var(--purple-900);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--yellow-soft); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
.container { width: min(1180px, 92%); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.en { font-family: var(--font-en); direction: ltr; unicode-bidi: isolate; }

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 50;
  padding: 18px 0;
}
.site-header.is-inner { position: relative; background: var(--purple-950); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav { display: flex; align-items: center; gap: 34px; flex: 1; }
.nav-left { justify-content: flex-end; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; align-items: center; }
.nav a {
  color: #fff; font-weight: 700; font-size: 1.15rem; padding: 6px 2px; position: relative; white-space: nowrap;
}
.nav a:hover { color: var(--yellow); }
.nav .current-menu-item > a,
.nav .current_page_item > a { color: #fff; }
.nav .current-menu-item > a::after,
.nav .current_page_item > a::after {
  content: ''; position: absolute; inset: auto 0 -4px 0; height: 3px; border-radius: 3px; background: var(--yellow);
}
.brand-tag { font-weight: 800; font-size: 1.4rem; white-space: nowrap; }
.brand-tag .en { color: #fff; }
.brand-tag .ar { color: var(--yellow); margin-inline-start: 6px; }
.site-logo { display: inline-block; text-align: center; transform: rotate(-4deg); }
.site-logo .logo-text {
  font-family: var(--font-ar); font-weight: 900; font-size: 2.6rem; color: var(--red);
  -webkit-text-stroke: 5px #fff; paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(0,0,0,.35); letter-spacing: -1px; line-height: 1;
}
.site-logo img { max-height: 64px; width: auto; }
.menu-toggle { display: none; background: none; border: 2px solid var(--yellow); color: var(--yellow); border-radius: 12px; padding: 6px 12px; font-size: 1.3rem; cursor: pointer; font-family: inherit; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 780px; padding: 150px 0 90px; overflow: hidden;
  background:
    radial-gradient(ellipse at 8% 8%, rgba(255, 200, 44, .55), transparent 32%),
    radial-gradient(ellipse at 90% 12%, rgba(255, 200, 44, .5), transparent 30%),
    radial-gradient(ellipse at 78% 55%, rgba(46, 139, 58, .75), transparent 38%),
    linear-gradient(180deg, #2a0f4d 0%, #1d0b36 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: .12;
  background-image: repeating-conic-gradient(from 0deg at 50% 45%, #fff 0 2deg, transparent 2deg 15deg);
  mask-image: radial-gradient(circle at 50% 45%, #000, transparent 60%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000, transparent 60%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 30px; }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual .bag {
  width: min(430px, 80%); position: relative; z-index: 2;
  transform: rotate(8deg); filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55)) drop-shadow(0 0 40px rgba(255, 200, 44, .45));
  animation: float 5s ease-in-out infinite;
}
.hero-visual::after {
  content: ''; position: absolute; bottom: -20px; width: 60%; height: 40px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(185, 120, 255, .55), transparent 70%);
}
@keyframes float { 0%,100% { transform: rotate(8deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-16px); } }
.cheese {
  position: absolute; width: 26px; height: 26px; background: linear-gradient(135deg, #ffe28a, #ffb300);
  border-radius: 5px; box-shadow: 0 0 16px rgba(255, 200, 44, .9); z-index: 3; animation: spin 7s linear infinite;
}
.cheese.c1 { top: 8%; right: 8%; } .cheese.c2 { top: 30%; left: 4%; width: 18px; height: 18px; animation-duration: 5s; }
.cheese.c3 { bottom: 25%; left: 10%; width: 34px; height: 34px; } .cheese.c4 { bottom: 10%; right: 14%; width: 20px; height: 20px; animation-duration: 9s; }
.cheese.c5 { top: 55%; right: 0; width: 14px; height: 14px; }
@keyframes spin { from { transform: rotate(0) translateY(0); } 50% { transform: rotate(180deg) translateY(-14px); } to { transform: rotate(360deg) translateY(0); } }
.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--yellow); font-weight: 900;
  text-shadow: 0 0 18px rgba(255, 170, 0, .75), 0 3px 0 rgba(0,0,0,.25);
}
.hero-text .sub { font-family: var(--font-en); direction: ltr; text-align: right; font-size: 1.5rem; font-weight: 500; max-width: 420px; line-height: 1.3; }
[dir="rtl"] .hero-text .sub { text-align: start; }
.btn-glow {
  display: inline-block; margin-top: 22px; padding: 12px 46px; border-radius: 999px; font-weight: 900; font-size: 1.9rem; color: var(--yellow);
  border: 3px solid var(--yellow); background: rgba(60, 20, 110, .6);
  box-shadow: 0 0 22px rgba(255, 200, 44, .75), inset 0 0 18px rgba(255, 200, 44, .35);
  transition: .25s; cursor: pointer; font-family: inherit;
}
.btn-glow:hover { background: var(--yellow); color: var(--purple-900); transform: translateY(-3px); }
.btn { display: inline-block; background: var(--yellow); color: var(--purple-900); font-weight: 800; padding: 10px 24px; border-radius: 999px; border: 0; cursor: pointer; font-family: inherit; font-size: 1rem; transition: .2s; }
.btn:hover { background: #fff; color: var(--purple-900); transform: translateY(-2px); }
.btn.outline { background: transparent; color: var(--yellow); border: 2px solid var(--yellow); }
.btn.outline:hover { background: var(--yellow); color: var(--purple-900); }

/* ---------- Sections ---------- */
.section { padding: 70px 0; position: relative; }
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 900; margin-bottom: 8px; }
.section-title .en { color: var(--yellow); font-size: .55em; display: block; font-weight: 500; letter-spacing: 1px; }
.section-head { margin-bottom: 34px; }
.section-head p { opacity: .8; max-width: 620px; }
.glass { background: var(--glass); border: 1.5px solid var(--glass-border); border-radius: var(--radius); backdrop-filter: blur(6px); }

/* Gallery + Specs */
.showcase { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: stretch; }
.slider-wrap { position: relative; padding: 0 56px; display: flex; align-items: center; }
.slider {
  direction: ltr; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  border-radius: var(--radius); background: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.03)); border: 1.5px solid var(--glass-border); width: 100%;
}
.slider::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 50%; scroll-snap-align: start; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 330px; }
.slide img { max-height: 260px; width: auto; filter: drop-shadow(0 14px 18px rgba(0,0,0,.5)); }
.slide span { margin-top: 8px; font-size: .9rem; opacity: .75; }
.arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1.5px solid var(--glass-border); color: #fff; font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.arrow:hover { background: var(--yellow); color: var(--purple-900); }
.arrow.prev { left: 0; } .arrow.next { right: 0; }

.tabs-card { position: relative; }
.tab-buttons { display: flex; gap: 6px; padding-inline-start: 10px; margin-bottom: -1.5px; position: relative; z-index: 2; flex-wrap: wrap; }
.tab-btn {
  font-family: inherit; font-weight: 800; font-size: 1rem; color: #fff; background: rgba(255,255,255,.07);
  border: 1.5px solid var(--glass-border); border-bottom: 0; padding: 8px 22px; border-radius: 16px 16px 0 0; cursor: pointer;
}
.tab-btn.active { background: var(--yellow); color: var(--purple-900); border-color: var(--yellow); }
.tab-panels { border: 1.5px solid var(--glass-border); border-radius: var(--radius); background: rgba(20, 6, 42, .55); padding: 22px; min-height: 290px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .3s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.spec-cols { display: grid; grid-template-columns: 210px 1fr; gap: 22px; }
.nutrition h4 { font-family: var(--font-en); font-size: 1.5rem; margin-bottom: 8px; direction: ltr; text-align: start; }
.barcode { background: #fff; border-radius: 6px; padding: 8px 8px 4px; color: #111; text-align: center; }
.barcode svg { width: 100%; height: 64px; display: block; }
.barcode small { display: flex; justify-content: space-between; font-family: var(--font-en); font-size: .75rem; direction: ltr; }
.nut-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .9rem; }
.nut-table td { padding: 3px 0; border-bottom: 1px dashed rgba(255,255,255,.2); }
.nut-table td:last-child { text-align: end; font-weight: 700; color: var(--yellow); }
.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li { padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.18); }
.spec-list li:last-child { border: 0; }
.spec-list strong { color: var(--yellow); }
.swatches { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid rgba(255,255,255,.7); }

/* Flavors */
.flavors { background: linear-gradient(180deg, var(--purple-900), var(--purple-800)); }
.flavor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.flavor-card { text-align: center; padding: 26px 16px; transition: .25s; position: relative; overflow: hidden; }
.flavor-card:hover { transform: translateY(-6px); border-color: var(--yellow); }
.flavor-dot { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 14px; border: 4px solid rgba(255,255,255,.85); box-shadow: 0 8px 22px rgba(0,0,0,.4), 0 0 30px var(--c, #fc3); background: var(--c, #fc3); }
.flavor-card h3 { font-size: 1.2rem; margin-bottom: 2px; }
.flavor-card .en { color: var(--yellow); font-size: .9rem; display: block; margin-bottom: 8px; }
.flavor-card p { font-size: .9rem; opacity: .8; margin: 0; }

/* Products */
.products { background: var(--purple-800); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.product-card { padding: 18px; display: flex; flex-direction: column; position: relative; transition: .25s; }
.product-card:hover { transform: translateY(-6px); border-color: var(--yellow); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.product-card .thumb { height: 220px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: radial-gradient(circle, rgba(255,200,44,.28), transparent 70%); margin-bottom: 14px; }
.product-card .thumb img { max-height: 200px; width: auto; filter: drop-shadow(0 12px 14px rgba(0,0,0,.5)); transition: .3s; }
.product-card:hover .thumb img { transform: scale(1.06) rotate(-3deg); }
.badge { position: absolute; top: 14px; inset-inline-start: 14px; background: var(--red); color: #fff; padding: 2px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; z-index: 2; }
.product-card h3 { font-size: 1.15rem; }
.product-card h3 a { color: #fff; }
.product-card .meta { font-size: .85rem; opacity: .75; margin-bottom: 8px; }
.price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 10px; flex-wrap: wrap; }
.price { font-size: 1.4rem; font-weight: 900; color: var(--yellow); }
.price del { font-size: .9rem; color: #fff; opacity: .55; margin-inline-start: 6px; font-weight: 500; }

/* Find a store + testimonial */
.stores { position: relative; background: linear-gradient(180deg, var(--purple-800), var(--purple-950)); overflow: hidden; }
.stores-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
.map-box { border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--glass-border); background: #fff; }
.map-box iframe { width: 100%; height: 340px; border: 0; display: block; }
.store-list { list-style: none; margin: 0; padding: 14px; display: grid; gap: 8px; background: rgba(20,6,42,.8); }
.store-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; cursor: pointer; border: 1.5px solid transparent; }
.store-item:hover, .store-item.active { background: rgba(255,200,44,.12); border-color: var(--yellow); }
.store-item .pin { font-size: 1.4rem; }
.store-item b { display: block; }
.store-item small { opacity: .75; }
.testi-wrap { position: relative; }
.testi { padding: 28px 28px 22px; margin-bottom: 18px; position: relative; }
.testi::before { content: '\201D'; position: absolute; top: -6px; inset-inline-start: 18px; font-size: 5rem; color: var(--yellow); font-family: Georgia, serif; line-height: 1; }
.testi p { margin-top: 26px; font-size: 1.1rem; }
.testi .who { color: var(--yellow); font-weight: 800; }
.testi .who small { display: block; color: #fff; opacity: .65; font-weight: 400; direction: ltr; text-align: start; }
.stars { color: var(--yellow); letter-spacing: 3px; }
.testi-slide { display: none; } .testi-slide.active { display: block; animation: fade .4s; }
.dots { display: flex; gap: 8px; } .dots button { width: 12px; height: 12px; border-radius: 50%; border: 0; background: rgba(255,255,255,.3); cursor: pointer; padding: 0; } .dots button.active { background: var(--yellow); }
.mascot { position: absolute; bottom: -70px; inset-inline-end: 0; width: min(270px, 28vw); z-index: 3; pointer-events: none; filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); }
.stores .container { position: relative; }
.stores-pad { height: 150px; }

/* About / content */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-img img { margin: auto; max-height: 420px; width: auto; filter: drop-shadow(0 20px 30px rgba(0,0,0,.5)); }
.stat-row { display: flex; gap: 20px; margin-top: 18px; flex-wrap: wrap; }
.stat { padding: 14px 22px; text-align: center; min-width: 110px; } .stat b { display: block; font-size: 1.8rem; color: var(--yellow); }

/* Inner pages */
.page-hero { padding: 60px 0 30px; text-align: center; background: radial-gradient(ellipse at 50% 0, rgba(255,200,44,.3), transparent 60%), var(--purple-900); }
.page-hero h1 { font-size: 2.6rem; color: var(--yellow); margin: 0; }
.entry { padding: 40px 0 80px; max-width: 820px; margin: auto; font-size: 1.1rem; }
.entry h2, .entry h3 { color: var(--yellow); }
.single-product-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: center; padding: 60px 0; }
.single-product-grid .big { padding: 30px; text-align: center; background: radial-gradient(circle, rgba(255,200,44,.3), transparent 70%); border-radius: var(--radius); }
.single-product-grid .big img { margin: auto; max-height: 460px; width: auto; filter: drop-shadow(0 20px 26px rgba(0,0,0,.5)); }
.single-product-grid h1 { font-size: 2.3rem; color: var(--yellow); }
.single-product-grid .price { font-size: 2.1rem; }
.pagination, .nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }
.page-numbers { padding: 6px 14px; border-radius: 10px; background: var(--glass); border: 1px solid var(--glass-border); color: #fff; }
.page-numbers.current { background: var(--yellow); color: var(--purple-900); }

/* Footer */
.site-footer { background: var(--purple-950); padding: 50px 0 24px; border-top: 3px solid var(--yellow); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: var(--yellow); }
.site-footer ul { list-style: none; margin: 0; padding: 0; } .site-footer li { margin-bottom: 6px; }
.site-footer a { color: #fff; opacity: .85; } .site-footer a:hover { color: var(--yellow); opacity: 1; }
.socials { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.socials a { padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--glass-border); }
.copyright { text-align: center; opacity: .6; font-size: .9rem; margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.wa-float { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 80; background: #25d366; color: #fff; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; box-shadow: 0 8px 22px rgba(0,0,0,.4); }
.wa-float:hover { color: #fff; transform: scale(1.08); }

/* WordPress core alignment */
.alignleft { float: left; margin: 0 1em 1em 0; } .alignright { float: right; margin: 0 0 1em 1em; } .aligncenter { margin-inline: auto; display: block; }
.wp-caption-text, .gallery-caption { font-size: .85rem; opacity: .75; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .showcase, .stores-grid, .about-grid, .single-product-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 130px; min-height: 0; }
  .hero-visual { order: -1; }
  .hero-text { text-align: center; } .hero-text .sub { margin-inline: auto; text-align: center; }
  .menu-toggle { display: block; order: 3; }
  .header-inner { flex-wrap: wrap; }
  .nav { display: none; flex-basis: 100%; order: 5; background: rgba(20,6,42,.96); border-radius: 18px; padding: 14px 20px; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav-left .brand-tag { margin-top: 10px; display: block; }
  .site-logo { order: 2; margin-inline: auto; }
  .slide { flex-basis: 100%; }
  .spec-cols { grid-template-columns: 1fr; }
  .mascot { position: relative; width: 200px; margin: 20px auto 0; display: block; inset: auto; }
  .stores-pad { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
