/* ===========================
   H Store — style.css
   Global Styles & Variables
   =========================== */

/* ---------- CSS Variables ---------- */
:root {
  /* Brand Colors */
  --yellow: #F5C518;
  --yellow-dark: #D4A80F;
  --yellow-light: #FFD633;
  --yellow-glow: rgba(245, 197, 24, 0.15);

  --black: #000000;
  --dark: #0D0D0D;
  --dark-2: #1A1A1A;
  --dark-3: #242424;
  --dark-4: #2E2E2E;

  --gray-dark: #3A3A3A;
  --gray: #6B6B6B;
  --gray-light: #E8E8E8;
  --gray-bg: #F5F5F5;

  --white: #FFFFFF;
  --green-whatsapp: #25D366;
  --green-whatsapp-dark: #1DA851;

  /* Typography */
  --font-ar: 'Cairo', 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
  --font-en: 'Cairo', sans-serif;

  /* Sizing */
  --container: 1200px;
  --header-h: 72px;

  /* Effects */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.18s ease;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.18);
  --shadow-yellow: 0 4px 20px rgba(245, 197, 24, 0.3);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ar);
  background: var(--white);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  direction: rtl;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.3;
}

h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.7rem); }

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title h2 {
  display: inline-block;
  position: relative;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 4px;
  background: var(--yellow);
  border-radius: 2px;
}

.section-title p {
  margin-top: 1rem;
  color: var(--gray);
  font-size: 1.05rem;
}

.section-title.light h2 { color: var(--white); }
.section-title.light p { color: rgba(255,255,255,0.6); }

/* ---------- Layout Helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--dark);
  color: var(--white);
}

.section-gray {
  background: var(--gray-bg);
}

.section-yellow {
  background: var(--yellow);
  color: var(--black);
}

.text-center { text-align: center; }
.text-yellow { color: var(--yellow); }
.text-white { color: var(--white); }

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
}

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}

.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb span { color: rgba(255,255,255,0.3); }

/* ---------- Page Header (Category Pages) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
  color: var(--white);
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at top right, var(--yellow-glow), transparent 60%);
}

.page-header > .container { position: relative; z-index: 1; }

.page-header h1 {
  margin-bottom: 0.75rem;
}

.page-header h1 span {
  color: var(--yellow);
}

.page-header p {
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  padding: 1rem 1.5rem;
  background: var(--gray-bg);
  border-radius: var(--radius);
}

.filter-bar .search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.filter-bar .search-box input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.95rem;
  transition: var(--transition);
}

.filter-bar .search-box input:focus {
  outline: none;
  border-color: var(--yellow);
}

.filter-bar .search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gray);
  pointer-events: none;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--white);
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--yellow); }
.filter-chip.active {
  background: var(--yellow);
  color: var(--black);
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  opacity: 0.3;
}

/* ---------- Loading Shimmer ---------- */
.shimmer {
  background: linear-gradient(90deg, var(--gray-bg) 25%, var(--gray-light) 50%, var(--gray-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Accessibility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

*:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--yellow); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--yellow-dark); }

/* ---------- Selection ---------- */
::selection { background: var(--yellow); color: var(--black); }
