/* Base Variables */
:root {
  --primary-purple: #7A1FA2;
  --primary-purple-dark: #61187F;
  --accent-light: #EEDCFF;
  --accent-mid: #D9B8F5;
  --white: #FFFFFF;
  --text-dark: #2F2F2F;
  --text-mid: #555555;
  --border: #E6E3EC;
  --radius-sm: 6px;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.06);
  --transition: .3s ease;
  --container: 1200px;
}

* { box-sizing: border-box; margin:0; padding:0; }
html { font-family: 'Heebo', sans-serif; scroll-behavior: smooth; }
body { background:#FFFFFF; color:var(--text-dark); line-height:1.5; }

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

.container { max-width:var(--container); margin:0 auto; padding:0 1.25rem; }

/* Header */
.site-header { position:sticky; top:0; background:#fff; box-shadow:0 1px 0 var(--border); z-index:50; }
.header-inner { display:grid; grid-template-columns:auto 1fr auto; column-gap:1.5rem; align-items:center; }
.logo { font-size:1.3rem; font-weight:600; letter-spacing:.5px; color:var(--primary-purple); }
.logo-img { height:94px; max-height:94px; width:auto; vertical-align:middle; margin-left:.4rem; }

.nav-wrapper { display:flex; justify-content:center; }
.main-nav { width:100%; }
.nav-list { margin:0 auto; justify-content:center; display:flex; align-items:center; line-height:1; }

.nav-toggle { display:none; background:none; border:1px solid var(--primary-purple); color:var(--primary-purple); padding:.4rem .7rem; border-radius:var(--radius-sm); font-size:1.1rem; cursor:pointer; }
.nav-list { list-style:none; display:flex; gap:2rem; }
.nav-list a { text-decoration:none; color:var(--text-dark); font-weight:500; position:relative; padding:.4rem .2rem; display:flex; align-items:center; }
.nav-list a::after { content:""; position:absolute; inset:auto 0 0 0; height:3px; background:var(--primary-purple); transform:scaleX(0); transform-origin:center; transition:var(--transition); border-radius:2px; }
.nav-list a:hover::after, .nav-list a:focus::after, .nav-list a.active::after { transform:scaleX(1); }

.header-actions { display:flex; gap:1rem; align-items:center; }

.cart-icon {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-purple);
  border: 2px solid var(--primary-purple);
  border-radius: 50%;
  color: #fff;
  transition: var(--transition);
  text-decoration: none;
}

.cart-icon:hover {
  background: var(--primary-purple-dark);
  border-color: var(--primary-purple-dark);
  transform: scale(1.05);
}

.cart-count {
  position: absolute;
  top: -5px;
  left: -5px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.header-social { display:flex; gap:.6rem; align-items:center; margin-inline-start:1rem; }
.header-social a { width:38px; height:38px; display:flex; align-items:center; justify-content:center; background:var(--accent-light); border:1px solid var(--accent-mid); border-radius:50%; transition:var(--transition); }
.header-social a:hover { background:var(--primary-purple); border-color:var(--primary-purple); }
.header-social img { width:22px; height:22px; display:block; }

/* Hero */
.hero, .instagram-hero { width:100%; padding:6rem 0 4rem; position:relative; }
.hero::after { display:none; }
.hero-overlay-content, .hero-text { display:contents; }
.hero.main-hero { background:url('../images/back2.jpeg') center 15%/cover no-repeat; /* shifted 15% down to reveal main character face */ padding-bottom:12rem; }
.hero-content-plain { max-width:var(--container); margin:0 auto; padding:0 1.25rem; color:#fff; text-align:center; }
.hero-inline-title { font-size:3rem; line-height:1.1; margin-bottom:1rem; text-shadow:0 4px 18px rgba(0,0,0,0.35); }
.hero-inline-sub { font-size:1.25rem; margin:0 0 2rem; color:#f5f5f5; text-shadow:0 2px 10px rgba(0,0,0,0.4); }
.hero-inline-btn { box-shadow:0 4px 18px rgba(0,0,0,0.35); }
.instagram-feed-section { background:#fff; padding:3.5rem 0 2.5rem; }
.instagram-feed-wrapper.standalone { margin:1rem auto 0; }
.instagram-feed-wrapper.standalone .elfsight-app-a230e2ce-ccd9-4ccb-8baf-a0e73d0e0b87 { direction:ltr; }
/* Instagram grid spacing */
.elfsight-app-a230e2ce-ccd9-4ccb-8baf-a0e73d0e0b87 .es-widget-item { 
  padding: 0.5rem !important; 
  margin: 0 !important;
}
.elfsight-app-a230e2ce-ccd9-4ccb-8baf-a0e73d0e0b87 .es-widget-grid { 
  gap: 1rem !important; 
  grid-gap: 1rem !important;
}
.elfsight-app-a230e2ce-ccd9-4ccb-8baf-a0e73d0e0b87 .es-widget-layout { 
  gap: 1rem !important; 
}
.elfsight-app-a230e2ce-ccd9-4ccb-8baf-a0e73d0e0b87 .eapps-instagram-feed-posts-grid {
  gap: 1rem !important;
  grid-gap: 1rem !important;
}
.elfsight-app-a230e2ce-ccd9-4ccb-8baf-a0e73d0e0b87 .eapps-instagram-feed-posts-item {
  padding: 0 !important;
}

.btn { display:inline-block; cursor:pointer; border:none; font-family:inherit; font-size:1rem; padding:.85rem 1.6rem; border-radius:var(--radius-sm); font-weight:500; text-decoration:none; transition:var(--transition); }
.btn.primary { background:var(--primary-purple); color:#fff; box-shadow:var(--shadow); }
.btn.primary:hover { background:var(--primary-purple-dark); }
.btn.secondary { background:var(--accent-light); color:var(--primary-purple-dark); }
.btn.secondary:hover { background:var(--accent-mid); }

/* Sections */
section { padding:4.5rem 0 3.5rem; position:relative; }
.section-title { font-size:2rem; margin-bottom:1rem; letter-spacing:.5px; }
.section-subtitle { color:var(--text-mid); margin-bottom:2.5rem; }

/* Shop Category Nav + File Grid */
.shop { background:#fff; }
.shop-category-nav { margin:0 0 2rem; overflow-x:auto; }
.shop-cat-list { list-style:none; display:flex; gap:.75rem; padding:0; margin:0; justify-content:center; flex-wrap:wrap; }
.shop-cat-btn { background:var(--accent-light); color:var(--primary-purple-dark); border:1px solid var(--accent-mid); padding:.65rem 1.2rem; border-radius:50px; font:inherit; cursor:pointer; transition:var(--transition); font-weight:500; }
.shop-cat-btn:hover { background:var(--accent-mid); }
.shop-cat-btn.active { background:var(--primary-purple); color:#fff; border-color:var(--primary-purple); }
.product-panels { position:relative; }
.product-panel { animation:fadeIn .4s ease; }
.product-panel.hidden { display:none; }
.purchase-action { margin-top:1.2rem; display:flex; justify-content:center; }
@keyframes fadeIn { from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }

/* Shop file grid: fixed 3 columns on desktop */
.file-grid { display:grid; gap:1.4rem; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:1.5rem; }
/* Tablet: 2 columns */
@media (max-width:900px) {
  .file-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
/* Mobile: single column */
@media (max-width:700px) {
  .file-grid { grid-template-columns:1fr; }
}
.file-card { background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:.9rem .9rem 1.2rem; display:flex; flex-direction:column; align-items:center; text-align:center; box-shadow:var(--shadow); transition:var(--transition); position:relative; }
.file-card:hover { transform:translateY(-4px); box-shadow:0 8px 24px rgba(122,31,162,0.15); }
.file-card.in-cart { border: 3px solid #27ae60; background: #f0fff4; }
.file-card.in-cart::after {
  content: '✓ בסל';
  position: absolute;
  top: 10px;
  left: 10px;
  background: #27ae60;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.file-card > a:first-of-type { text-decoration:none; color:inherit; flex-grow:1; display:flex; flex-direction:column; align-items:center; width:100%; }
.file-card img { width:100%; aspect-ratio:1/1; height:auto; object-fit:cover; border-radius:var(--radius-sm); margin-bottom:.6rem; background:#fff; border:1px solid var(--accent-light); }
.file-card h4 { font-size:.95rem; margin:.4rem 0 .5rem; color:var(--primary-purple-dark); line-height:1.3; }
.file-card .file-desc { font-size:.8rem; color:var(--text-mid); line-height:1.4; margin:0 0 .8rem; }
.file-card .btn { width:100%; padding:.6rem 0; margin-top:.5rem; }

/* (Carousel styles removed – using grid cards now) */

/* About */
.about { background:linear-gradient(135deg, #FFFFFF, var(--accent-light)); }
.about-layout { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:2.5rem; align-items:center; }
.about-image-wrapper { max-width:380px; }
.about-image { width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:24px; box-shadow:0 10px 28px rgba(0,0,0,0.08); border:4px solid var(--accent-light); }
.about-text-block p { margin-bottom:1rem; }
.about-text { max-width:820px; font-size:1.05rem; color:var(--text-mid); }

/* Contact */
.contact { background:var(--accent-light); }
.contact-form { max-width:520px; display:grid; gap:1.1rem; }
.form-row { display:flex; flex-direction:column; gap:.4rem; }
.form-row input, .form-row textarea { padding:.75rem .9rem; border:1px solid var(--border); border-radius:var(--radius-sm); font-family:inherit; font-size:1rem; background:#fff; }
.form-row input:focus, .form-row textarea:focus { outline:2px solid var(--accent-mid); }

/* FAQ */
.faq-list { max-width:820px; display:grid; gap:.9rem; }
.faq-list details { border:1px solid var(--border); padding:.9rem 1rem; border-radius:var(--radius-sm); background:#fff; }
.faq-list summary { cursor:pointer; font-weight:500; color:var(--primary-purple-dark); }
.faq-list summary::marker { color:var(--primary-purple); }
.faq-list p { margin-top:.6rem; color:var(--text-mid); line-height:1.45; }

/* Footer */
.site-footer { background:#FFFFFF; color:var(--text-dark); padding:2.2rem 0; box-shadow:0 -1px 0 var(--border); }
.footer-inner { display:flex; flex-direction:column; align-items:center; gap:1rem; }
.footer-inner.row-layout { flex-direction:row; justify-content:space-between; align-items:center; gap:2rem; }
.footer-col { display:flex; align-items:center; }
.footer-center { justify-content:center; flex:1; }
.footer-right { justify-content:flex-start; }
.footer-left { justify-content:flex-end; }
.site-footer .social-links { display:flex; flex-direction:row; flex-wrap:wrap; justify-content:center; align-items:center; gap:1rem; }
.site-footer .social-icon { width:72px; height:72px; }
.site-footer .social-icon img { width:40px; height:40px; }
.site-footer .social-links { margin-top:.4rem; text-align:center; }

/* Removed old hero overlay styles */

/* Developer Notes: Header uses grid for perfect centering: [logo][nav-flex][social]. */
/* ======================================= */

@media (max-width: 900px) {
  .carousel-btn.prev { right:10px; margin:0; }
  .carousel-btn.next { left:10px; margin:0; }
  .carousel-btn { top:auto; bottom:8px; transform:none; background:var(--primary-purple); color:#fff; opacity:.9; }
}

/* Product Detail Page */
.add-to-cart-btn.in-cart {
  background: #27ae60 !important;
}

.add-to-cart-btn.in-cart:hover {
  background: #229954 !important;
}

/* =============================
  הערות למפתחת/מפתח עתידי:
  1. הוספת קטגוריה בחנות:
    - שכפל בלוק div.product-category.
    - עדכן את הטקסט בכותרת h3 ואת התיאור.
    - שנה את data-cat לערך ייחודי (למשל data-cat="science").
    - הקרוסלה: שמור על מבנה .carousel > .carousel-track > .slide... ודאג שלשקופית אחת תהיה עם class="slide active".
    - הכפתור לרכישה מפנה ל purchase.html?cat=<value> – ניתן להרחיב מיפוי בדף הרכישה.
  2. החלק העליון (Hero):
    - רקע התמונה מוגדר ב .hero.main-hero (כרגע: images/back2.jpeg). להחלפה: החלף את הקובץ או כתוב background:url('../images/NEW.jpg').
    - האוברליי (שכבת לבן שקוף) נשלט על ידי ::before והאטימות background:rgba(255,255,255,0.35). ניתן לשנות שקיפות.
    - הקופסה הפנימית .hero-text משתמשת ב background:rgba(255,255,255,0.85). אפשר להעלות/להוריד לצמצום ערפל.
  3. קרוסלה:
    - כרגע כל השקופיות האחרות display:none ורק .active מוצגת. ההחלפה מתבצעת ב js/carousel.js.
    - להוספת שקופיות: הוסף div.slide עם <img>. אין צורך לעדכן את ה-JS.
  4. פוקוס על קטגוריה:
    - הקוד ב js/main.js מאזין ללחיצה על .product-category ומסתיר אחרות. כפתור #backToAll מחזיר תצוגה מלאה.
    - אם לא רוצים פוקוס, ניתן להסיר את מאזיני הלחיצה או למחוק את הקוד בתוך ה-IIFE של product search.
  5. חיפוש:
    - בזמן פוקוס על קטגוריה החיפוש מושבת (מתעלם מקלט) כדי לא לבלבל את המשתמש.
  ============================= */
