/* =========================================================
   Global resets & layout
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  height: 100%;
  flex-direction: column;
  background-color: #ffffff;
  overflow-x: hidden;        /* prevent sideways scroll on mobile */
  -webkit-text-size-adjust: 100%;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

a { -webkit-tap-highlight-color: transparent; }

main { flex: 1; }

header {
  background-color: rgb(241, 91, 48);
  color: white;
  width: 100%;
  position: relative;
  z-index: 1000;
}

/* =========================================================
   Header (logo row)
   ========================================================= */
.header-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  position: relative;
}
.logo { width: 200px; height: auto; cursor: pointer; }

/* =========================================================
   NAV BAR (fixed height, flags clickable, centered buttons)
   ========================================================= */
.top-links {
  position: relative;
  background: rgb(241, 91, 48);
  width: 100%;
  height: 60px;                 /* fixed bar height */
  display: flex;
  align-items: center;          /* vertical centering */
  justify-content: center;      /* center the buttons */
  overflow: hidden;
  padding-left: 64px;           /* visual space so flags don’t overlap buttons */
}

/* Flags pinned left */
.nav-flags {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 2;
}

/* Hover + selection states for language flags */
.nav-flags .flag-icon {
  opacity: 0.9;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease, outline-color 0.18s ease;
}

.nav-flags .flag-icon:hover,
.nav-flags .flag-icon:focus-visible {
  transform: scale(1.12);
  box-shadow: 0 0 8px rgba(0,0,0,.25);
  outline: 2px solid rgba(255,255,255,.6);
  outline-offset: 2px;
  opacity: 1;
}

/* Active/selected language */
.nav-flags .flag-icon.is-active {
  outline: 3px solid #fff;          /* visible ring on orange bar */
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.10);
  filter: none;
  opacity: 1;
}

/* Subtle deemphasis for the non-selected one */
.nav-flags .flag-icon.is-inactive {
  filter: grayscale(25%);
  opacity: 0.75;
}

/* Buttons centered relative to full page */
.nav-buttons {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Buttons themselves */
.top-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px 2px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease,
              color .18s ease, border-color .18s ease, background .18s ease;
}

/* Hover/active → white pill (also apply on :active for phones) */
.top-links a:hover,
.top-links a.is-active,
.top-links a:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  color: rgb(241, 91, 48);
  background: #fff;
  border-color: #fff;
}

/* white underline accent on hover/active */
.top-links a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s ease;
  opacity: .9;
}
.top-links a:hover::after,
.top-links a.is-active::after,
.top-links a:active::after {
  transform: scaleX(1);
}

/* Smaller phones – shrink gaps a bit, let things wrap safely */
@media (max-width: 440px) {
  .top-links { padding-left: 56px; height: 56px; }
  .nav-buttons { gap: 12px; }
  .top-links a { height: 34px; padding: 0 14px 2px; }
  .nav-flags .flag-icon { width: 26px; height: 18px; }
}

/* Prevent background scroll when modals/lightbox are open */
body.modal-open,
body.lightbox-open { overflow: hidden; }

/* =========================================================
   Footer
   ========================================================= */
footer {
  background-color: #444752;
  color: white;
  text-align: center;
  padding: 10px 0;
}

/* =========================================================
   Carousel
   ========================================================= */
.carousel-wrapper {
  position: relative;
  overflow: hidden;      /* ensure slides/animations never overflow */
  max-width: 100%;
  margin: auto;
  height: 500px;
}
.carousel {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}
.carousel-item {
  flex: 0 0 100%;        /* strict slide width → prevents overflow on iOS */
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
}
.carousel-item img,
.carousel-item video {
  max-height: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Carousel arrows */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(241, 91, 48, 0.8);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 0 10px;
  cursor: pointer;
  z-index: 10;
}
.carousel-control.prev { left: 10px; }
.carousel-control.next { right: 10px; }

/* Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.carousel-indicators span {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.carousel-indicators span.active {
  opacity: 1;
  background-color: rgb(241, 91, 48);
}

/* =========================================================
   Category & Products
   ========================================================= */
.category-section { text-align: center; padding: 40px 20px; }

/* Force the title above product grid to center regardless of wrappers */
main > .category-title,
.category-title {
  display: block;
  width: 100%;
  text-align: center !important;
  font-size: 2rem;
  font-weight: 700;
  margin: 30px 0 25px;
  line-height: 1.2;
  color: #444752;
}

.category-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}

.category-card { text-align: center; }

.category-img {
  width: 250px;
  height: 250px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.category-img:hover { transform: scale(1.05); }

.category-label {
  margin-top: 10px;
  font-size: 18px;
  color: rgb(68, 71, 82);
  font-weight: bold;
}

.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 20px;
}
.product-card { width: 250px; text-align: center; }
.product-card img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.product-card img:hover { transform: scale(1.05); }
.product-card p {
  margin-top: 10px;
  font-size: 18px;
  color: rgb(68, 71, 82);
  font-weight: bold;
}

/* =========================================================
   Breadcrumb
   ========================================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  margin: 20px;
  padding: 10px 15px;
  background-color: #f3f3f3;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  color: #444752;
}
.breadcrumb a {
  color: rgb(241, 91, 48);
  text-decoration: none;
  font-weight: bold;
  margin-right: 5px;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 5px; color: #888; }

/* =========================================================
   Modal
   ========================================================= */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  width: calc(100% - 40px);
  height: calc(100% - 70px);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}
.modal-content h3 { margin-top: 0; }
.modal-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}
.modal-gallery img {
  width: calc(100% / 3.4);
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  cursor: zoom-in;
}
.close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  cursor: pointer;
}

/* =========================================================
   Simple Lightbox
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  border-radius: 10px;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

/* =========================================================
   Buttons
   ========================================================= */
.buy-button {
  display: inline-block;
  background-color: rgb(241, 91, 48);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
}
.buy-button:hover { background-color: rgb(200, 70, 40); }

.modal-title {
  text-align: center;
  color: #444752;
  margin-bottom: 10px;
}
.modal-description {
  text-align: center;
  color: #444752;
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Modal: 3-button row + content ===== */
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0 6px;
}

/* shared pill */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

/* variants */
.btn-buy {
  background: rgb(241, 91, 48);
  color: #fff;
  border-color: rgb(241, 91, 48);
}
.btn-buy:hover { background: #fff; color: rgb(241, 91, 48); }

.btn-setup {
  background: #fff;
  color: rgb(68,71,82);
  border-color: rgba(68,71,82,.25);
}
.btn-setup:hover { border-color: rgb(241, 91, 48); color: rgb(241, 91, 48); }

.btn-video {
  background: rgba(241,91,48,.1);
  color: rgb(241,91,48);
  border-color: rgba(241,91,48,.25);
}
.btn-video:hover { background: rgba(241,91,48,.18); }

/* features */
.modal-subtitle {
  margin: 12px 0 6px;
  text-align: center;
  color: #444752;
  font-size: 15px;
}
.modal-features {
  margin: 0 auto 10px;
  padding-left: 20px;
  max-width: 46ch;
  color: #444752;
}
.modal-description {
  text-align: center;
  color: #444752;
  font-size: 15px;
  max-width: 56ch;
  margin: 6px auto 8px;
}

/* ===== Modal slideshow (bigger images) ===== */
.modal-slider {
  position: relative;
  margin: 8px auto 10px;
  width: 100%;
  max-width: 900px;            /* allow larger images on desktop */
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform 0.4s ease-in-out;
  will-change: transform;
}

.slide {
  min-width: 100%;
  display: grid;
  place-items: center;
  background: #f7f7f7;
  border-radius: 10px;
}

/* Larger images while staying inside the modal */
.slide img {
  width: 100%;
  height: auto;
  max-height: 64vh;            /* bigger than before */
  object-fit: contain;
  cursor: zoom-in;
  border-radius: 8px;
}

/* arrows */
.slide-control {
  position: absolute;
  top: 50%;
  transform: translateY(0%);
  border: none;
  background: rgba(255,255,255,0.9);
  color: #000000;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 0px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.slide-control.prev { left: 10px; }
.slide-control.next { right: 10px; }
.slide-control:hover { filter: brightness(1.05); }

/* dots */
.slide-dots {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.slide-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: #ddd;
  cursor: pointer;
}
.slide-dots .dot.active { background: rgb(241,91,48); }
