/* ------- COLOR PALETTE ------- */
:root {
  --primary: #0A0B23; /* Primary color for backgrounds, headings, and accents */
  --accent: #06c371; /* Accent color for buttons, highlights, and hover states */
  --bg: #FFFFFF;     /* Default background color */
  --text: #0A0B23;   /* Default text color */
  --card: #FFFFFF;   /* Background color for cards or containers */
  --border: #E5E5E5; /* Default border color */
}

/* ------- RESET ------- */
* {
  box-sizing: border-box; /* Include padding and border in element width/height */
  margin: 0;              /* Remove default margin */
  padding: 0;             /* Remove default padding */
  direction: rtl;         /* Right-to-left text direction */
  font-family: Open Sans, Heebo, Alef; /* Default font stack */
}

/* ------- GLOBAL ------- */
html, body {
  height: 100%; /* Full height for layout */
  margin: 0;
}

body {
  background: var(--primary); /* Main background color */
  color: var(--text);         /* Default text color */
  line-height: 1.6;           /* Default line spacing */
  display: flex;              /* Flex container for layout */
  flex-direction: column;     /* Stack children vertically */
  min-height: 100vh;          /* Ensure body takes full viewport height */
  padding-top: 65px;          /* Reserve space for fixed header height */
}

/* ------- GALLERY TITLE ------- */
.gallery-title {
  color: white;        /* Title text color */
  text-align: center;  /* Center text horizontally */
  margin-bottom: 30px; /* Space below title */
  font-size: 48px;     /* Large heading size */
}

/* ------- GALLERY CONTAINER ------- */
main.gallery-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;               /* הכי חשוב: דוחף את ה-footer למטה */
  margin-top: 10px;
  padding-bottom: 30px;
}

/* ------- IMAGE CAROUSEL ------- */
.carousel {
  width: 95%;
  max-width: 1500px;

  /* גובה/מקום לקרוסלה */
  height: 70vh;          /* אפשר לשחק עם זה */
  max-height: 90vh;

  overflow: hidden;
  border-radius: 12px;

  position: relative;    /* חובה בשביל התמונות absolute */
  display: flex;
  justify-content: center;
  align-items: center;

  margin-bottom: 30px;
}

/* כל התמונות יושבות אחת על השנייה */
.carousel img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;   /* לא חותך */
  border-radius: 12px;

  opacity: 0;
  transform: scale(1.02);
  transition: opacity 350ms ease, transform 350ms ease;

  pointer-events: none;
  display: block;        /* לא להשתמש ב display:none */
}

/* Active image */
.carousel img.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ------- CAROUSEL NAVIGATION BUTTONS ------- */
.carousel-nav {
  margin-top: 0px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.carousel-btn {
  font-size: 30px;
  padding: 10px 20px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-btn:hover {
  background-color: var(--bg);
  color: var(--accent);
  transform: translateY(-2px); /* קטן ואלגנטי */
}

/* ------- HIGH CONTRAST MODE ------- */
body.high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

body.high-contrast header,
body.high-contrast footer,
body.high-contrast .product-card {
  background-color: #000 !important;
  border: 2px solid #fff !important;
  color: #fff !important;
}

body.high-contrast a,
body.high-contrast button {
  color: #ffff00 !important;
}

/* ------- RESPONSIVE DESIGN ------- */

/* Small screens (mobile) */
@media screen and (max-width: 600px) {
  .gallery-title {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .carousel {
    width: 95%;
    height: 45vh;        /* קטן יותר למובייל */
    margin-bottom: 20px;
  }

  .carousel-nav {
    width: 95%;
    gap: 10px;
    margin-bottom: 30px;
  }

  .carousel-btn {
    font-size: 24px;
    padding: 8px 16px;
  }
}

/* Medium screens (tablet) */
@media screen and (max-width: 900px) {
  .gallery-title {
    font-size: 40px;
  }

  .carousel {
    width: 90%;
    height: 55vh;
  }

  .carousel-nav {
    width: 90%;
  }

  .carousel-btn {
    font-size: 28px;
    padding: 10px 18px;
  }
}

/* Large screens (desktop/HD) */
@media screen and (min-width: 1200px) {
  .carousel {
    max-width: 1500px;
    height: 70vh; /* אפשר גם 75vh אם בא לך יותר גדול */
  }

  .carousel-nav {
    max-width: 1500px;
  }
}