/* ==========================================================================
   Windmill Rental - Arkusz stylów i rozszerzeń wizualnych
   Wypożyczalnia Sprzętu Budowlanego w Rybniku
   ========================================================================== */

/* Płynne przewijanie do kotwic */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* Offset na przyklejony header */
}

body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f7f9fc;
  color: #191c1e;
}

/* Wygładzenie scrollbara */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #eceef1;
}

::-webkit-scrollbar-thumb {
  background: #cfc6ab;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #7d775f;
}

/* ==========================================================================
   Animacje Fade-In (Intersection Observer)
   Subtelne, eleganckie ujawnianie sekcji bez przesadzonych efektów
   ========================================================================== */
.fade-in-section {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Opcjonalne opóźnienia kaskadowe dla dzieci */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* ==========================================================================
   Header i Sticky Navigation
   ========================================================================== */
.header-sticky {
  transition: background-color 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.header-sticky.scrolled {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.12);
}

/* Menu mobilne */
#mobile-menu {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.hidden {
  display: none;
}

/* Toast Notification (Powiadomienia o dodaniu do koszyka/rezerwacji) */
.toast-alert {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background-color: #191c1e;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.toast-alert.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-alert .toast-icon {
  color: #F3A700;
}

/* Karty produktowe i filtry */
.product-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
}

.product-card.card-hidden {
  display: none !important;
}

/* Wskaźnik liczby w koszyku */
.cart-badge {
  font-size: 10px;
  line-height: 1;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 700;
}

/* ==========================================================================
   Modal rezerwacji sprzętu ("Zapytaj o termin")
   ========================================================================== */
body.modal-open {
  overflow: hidden;
}

#reservation-modal {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

#reservation-modal.open {
  display: flex;
  opacity: 1;
}

#reservation-modal .modal-content-box {
  transform: scale(0.95) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  max-height: 92vh;
  overflow-y: auto;
}

#reservation-modal.open .modal-content-box {
  transform: scale(1) translateY(0);
}

/* ==========================================================================
   Kalendarz zakresu dat (Date Range Picker)
   ========================================================================== */
.cal-cell {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
  position: relative;
}

.cal-cell:hover:not(.disabled):not(.range-start):not(.range-end) {
  background-color: rgba(109, 94, 0, 0.12);
  border-radius: 8px;
}

.cal-cell.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.cal-cell.blocked {
  background: repeating-linear-gradient(
    -45deg,
    rgba(239, 68, 68, 0.12),
    rgba(239, 68, 68, 0.12) 4px,
    rgba(239, 68, 68, 0.24) 4px,
    rgba(239, 68, 68, 0.24) 8px
  ) !important;
  color: #b91c1c !important;
  text-decoration: line-through;
  opacity: 0.75;
  cursor: not-allowed !important;
  position: relative;
  font-weight: 700;
  border-radius: 8px;
}

.cal-cell.blocked:hover {
  background: rgba(239, 68, 68, 0.35) !important;
}

/* Styl dla dnia, gdy wybrany sprzęt jest wynajęty lub zablokowany */
.cal-cell.equipment-rented {
  background: repeating-linear-gradient(
    -45deg,
    rgba(249, 115, 22, 0.14),
    rgba(249, 115, 22, 0.14) 4px,
    rgba(249, 115, 22, 0.28) 4px,
    rgba(249, 115, 22, 0.28) 8px
  ) !important;
  color: #c2410c !important;
  text-decoration: line-through;
  opacity: 0.85;
  cursor: not-allowed !important;
  position: relative;
  font-weight: 700;
  border-radius: 8px;
}

.cal-cell.equipment-rented:hover {
  background: rgba(249, 115, 22, 0.4) !important;
}

.cal-cell.equipment-rented::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ea580c;
  box-shadow: 0 0 0 1px #fff;
}

.cal-cell.has-hours {
  position: relative;
}

.cal-cell.has-hours::before {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #d97706;
  box-shadow: 0 0 0 1px #fff;
}

.cal-cell.other-month {
  opacity: 0.35;
}

.cal-cell.today-marker::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: currentColor;
}

.cal-cell.range-single {
  background-color: #22252A !important;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 10px !important;
}

.cal-cell.range-start {
  background-color: #22252A !important;
  color: #ffffff !important;
  font-weight: 700;
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.cal-cell.range-end {
  background-color: #22252A !important;
  color: #ffffff !important;
  font-weight: 700;
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.cal-cell.range-between {
  background-color: rgba(243, 167, 0, 0.28) !important;
  color: #22252A !important;
  font-weight: 600;
  border-radius: 0 !important;
}

/* Animacja wyróżnienia karty sprzętu po przejściu z kategorii */
@keyframes cardPulseHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 37, 42, 0.4);
    transform: scale(1);
  }
  35% {
    box-shadow: 0 0 0 10px rgba(243, 167, 0, 0.6);
    transform: scale(1.025);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(34, 37, 42, 0.2);
    transform: scale(1.01);
  }
  100% {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.12);
    transform: scale(1);
  }
}

.highlight-pulse {
  animation: cardPulseHighlight 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  border-color: #F3A700 !important;
}

/* ==========================================================================
   Hero Showcase Carousel (Karta prezentacji sprzętu)
   ========================================================================== */
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #cfc6ab;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  padding: 0;
}

.hero-dot:hover {
  background-color: #F3A700;
}

.hero-dot.active {
  width: 24px;
  background-color: #22252A;
}

.showcase-fade-enter {
  animation: showcaseFadeIn 0.3s ease-out;
}

/* Wymuszenie wysokiego kontrastu nazwy sprzętu w hero showcase (zapobieganie blademu/białemu tekstowi na mobile) */
#hero-showcase-name,
#hero-showcase-link {
  color: #22252A !important;
  text-decoration: none !important;
}

#hero-showcase-link:hover {
  color: #d99500 !important;
}

/* Zabezpieczenie paska bocznego spisu treści na ekranach mobilnych (poniżej 1024px) */
@media (max-width: 1023.98px) {
  #toc-sidebar {
    position: static !important;
    top: auto !important;
  }
}

@keyframes showcaseFadeIn {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================================================
   Akordeony FAQ
   ========================================================================== */
details.faq-item > summary {
  list-style: none;
}
details.faq-item > summary::-webkit-details-marker {
  display: none;
}
details.faq-item[open] summary .faq-chevron {
  transform: rotate(180deg);
}
.faq-item {
  transition: all 0.2s ease-in-out;
}
.faq-item:hover {
  border-color: rgba(243, 167, 0, 0.45);
}
details[open].faq-item {
  border-color: #F3A700;
  box-shadow: 0 4px 20px -2px rgba(243, 167, 0, 0.15);
}


