/* ========================================
   ROSAMARKET — LIGHT & SOOTHING 2026
   ======================================== */

/* --- Base --- */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

@media (max-width: 640px) {
  html { font-size: 16px; }
}

#category-scroll {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  overscroll-behavior-x: contain !important;
  touch-action: pan-x pan-y !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding: 12px 0 16px !important;
  min-height: calc(var(--circle-size, 90px) + 60px);
}
#category-scroll::-webkit-scrollbar { display: none !important; }
#category-scroll > a {
  flex-shrink: 0 !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#category-scroll > a:hover {
  transform: scale(1.08) translateY(-4px);
}
#category-scroll > a:hover span:first-child {
  box-shadow: 0 8px 30px rgba(116, 139, 94, 0.25) !important;
  border-color: #94a87a !important;
}
#category-scroll > a:hover img {
  transform: scale(1.1);
}
#category-scroll > a img {
  transition: transform 0.4s ease;
}
#category-toggle-btn:hover {
  color: #5a6d44 !important;
}

/* --- Selection --- */
::selection {
  background: #d4e0c480;
  color: #1e2618;
}

/* --- Scrollbar discrète --- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4e0c4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b5c99a; }

/* --- Focus visible --- */
:focus-visible {
  outline: 2px solid #94a87a;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Hero Slider --- */
#hero-slider {
  scrollbar-width: none;
}
#hero-slider::-webkit-scrollbar { display: none; }

.hero-slide {
  height: var(--slider-h, 380px);
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
@media (max-width: 640px) {
  .hero-slide {
    height: min(var(--slider-h, 380px), 260px);
  }
}

/* --- Scrollbar hide utility --- */
.scrollbar-hide {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* --- Number input clean --- */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- WhatsApp float --- */
.wa-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
}
.wa-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}
@media (max-width: 640px) {
  .wa-float-btn { width: 48px; height: 48px; bottom: 16px; right: 16px; }
}

/* --- Toast --- */
.toast-stack {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9995;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast-item {
  background: #2f3b24;
  color: #fff;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast-item.toast-show {
  opacity: 1;
  transform: translateY(0);
}

/* --- Checkout animations --- */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
.checkout-step.slide-next { animation: slideInRight 0.35s ease; }
.checkout-step.slide-prev { animation: slideInLeft 0.35s ease; }

/* --- Carrousels produits --- */
.home-carousel-item {
  width: calc((100% - (var(--vc, 4) - 1) * 20px) / var(--vc, 4));
}
@media (max-width: 767px) {
  .home-carousel-item { width: 60%; }
}
@media (max-width: 480px) {
  .home-carousel-item { width: 75%; }
}

/* --- Marquee --- */
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation-name: marquee-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-item {
  white-space: nowrap;
  padding: 0 0.5rem;
}
.marquee-sep {
  opacity: 0.3;
  padding: 0 0.75rem;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- Fade in up --- */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeSlideUp 0.5s ease both;
  animation-delay: var(--delay, 0s);
}

/* --- Section separator --- */
.section-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8eeda, transparent);
  margin: 0 auto;
  max-width: 120px;
}

/* --- Skeleton loading --- */
.skeleton {
  background: linear-gradient(90deg, #f0f2ed 25%, #e6e9e0 50%, #f0f2ed 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s ease-in-out infinite;
  border-radius: 12px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Badge pop animation --- */
@keyframes badgePop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* ========================================
   INTERACTIVE ELEMENTS — 2026 TRENDS
   ======================================== */

/* --- Custom Select --- */
.custom-select {
  position: relative;
  cursor: pointer;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: #f6f8f0;
  border: 1.5px solid #e8eeda;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: #4a5240;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.custom-select-trigger:hover {
  border-color: #b5c99a;
  background: #eef3e6;
}
.custom-select.open .custom-select-trigger {
  border-color: #94a87a;
  box-shadow: 0 0 0 3px rgba(148, 168, 122, 0.15);
}
.custom-select-trigger .chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #94a87a;
  flex-shrink: 0;
}
.custom-select.open .custom-select-trigger .chevron {
  transform: rotate(180deg);
}
.custom-select-trigger .placeholder {
  color: #b8bfb0;
}

/* Dropdown panel */
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e8eeda;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(47, 59, 36, 0.08), 0 2px 8px rgba(47, 59, 36, 0.04);
  padding: 6px;
  z-index: 50;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 280px;
  overflow-y: auto;
}
.custom-select.open .custom-select-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Search inside dropdown */
.custom-select-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e8eeda;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  margin-bottom: 4px;
  background: #f6f8f0;
  color: #4a5240;
  transition: border-color 0.2s;
}
.custom-select-search:focus {
  border-color: #94a87a;
}
.custom-select-search::placeholder {
  color: #b8bfb0;
}

/* Options */
.custom-select-options {
  max-height: 220px;
  overflow-y: auto;
}
.custom-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #4a5240;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.custom-select-option:hover {
  background: #f6f8f0;
}
.custom-select-option.selected {
  background: #e8eeda;
  font-weight: 600;
  color: #2f3b24;
}
.custom-select-option .check-icon {
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.custom-select-option.selected .check-icon {
  opacity: 1;
  transform: scale(1);
}

/* --- Input Fields --- */
.input-field {
  width: 100%;
  padding: 14px 18px;
  background: white;
  border: 1.5px solid #e8eeda;
  border-radius: 9999px;
  font-size: 14px;
  color: #4a5240;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.input-field::placeholder {
  color: #b8bfb0;
}
.input-field:hover {
  border-color: #d4e0c4;
}
.input-field:focus {
  border-color: #94a87a;
  box-shadow: 0 0 0 4px rgba(148, 168, 122, 0.1);
  background: #fdfefe;
}
.input-field-light {
  background: #f6f8f0;
  border-color: transparent;
}
.input-field-light:focus {
  background: white;
  border-color: #94a87a;
  box-shadow: 0 0 0 4px rgba(148, 168, 122, 0.1);
}
textarea.input-field {
  border-radius: 20px;
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: #5a6d44;
  color: white;
  border: none;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.btn-primary:hover {
  background: #455434;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(90, 109, 68, 0.25);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: #4a5240;
  border: 1.5px solid #e8eeda;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn-secondary:hover {
  background: #f6f8f0;
  border-color: #d4e0c4;
}

/* --- City Grid Tags --- */
.city-grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border: 1.5px solid #e8eeda;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #8a9180;
  background: white;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.city-grid-item:hover {
  border-color: #b5c99a;
  color: #4a5240;
  background: #f6f8f0;
}
.city-grid-item.selected {
  border-color: #5a6d44;
  background: #e8eeda;
  color: #2f3b24;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(90, 109, 68, 0.1);
  transform: scale(1.02);
}

/* --- Quantity Stepper --- */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #e8eeda;
  border-radius: 9999px;
  overflow: hidden;
  background: #f6f8f0;
}
.qty-stepper button {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a9180;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}
.qty-stepper button:hover {
  background: #e8eeda;
  color: #4a5240;
}
.qty-stepper button:active {
  transform: scale(0.9);
}
.qty-stepper .qty-value {
  width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #2f3b24;
  border-left: 1px solid #e8eeda;
  border-right: 1px solid #e8eeda;
  padding: 8px 0;
}

/* --- Tags / Pills --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.tag-outline {
  border: 1.5px solid #e8eeda;
  color: #8a9180;
  background: transparent;
}
.tag-outline:hover {
  border-color: #b5c99a;
  color: #4a5240;
}
.tag-outline.active {
  border-color: #5a6d44;
  background: #e8eeda;
  color: #2f3b24;
}
.tag-filled {
  border: none;
  background: #f6f8f0;
  color: #5a6d44;
}
.tag-filled:hover {
  background: #e8eeda;
}

/* --- Floating Label Input --- */
.floating-label-group {
  position: relative;
}
.floating-label-group input,
.floating-label-group textarea {
  width: 100%;
  padding: 18px 18px 8px;
  background: #f6f8f0;
  border: 1.5px solid transparent;
  border-radius: 16px;
  font-size: 14px;
  color: #4a5240;
  outline: none;
  transition: all 0.3s ease;
}
.floating-label-group textarea {
  border-radius: 20px;
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
  padding-top: 24px;
  padding-bottom: 8px;
}
.floating-label-group input:focus,
.floating-label-group textarea:focus {
  background: white;
  border-color: #94a87a;
  box-shadow: 0 0 0 3px rgba(148, 168, 122, 0.1);
}
.floating-label-group label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #b8bfb0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.floating-label-group textarea ~ label {
  top: 20px;
}
.floating-label-group input:focus + label,
.floating-label-group input:not(:placeholder-shown) + label,
.floating-label-group textarea:focus + label,
.floating-label-group textarea:not(:placeholder-shown) + label {
  top: 10px;
  transform: translateY(0);
  font-size: 10px;
  font-weight: 600;
  color: #94a87a;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Pagination Dots --- */
.pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8eeda;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
.pagination-dot.active {
  width: 24px;
  border-radius: 9999px;
  background: #5a6d44;
}

/* --- Step Indicators --- */
.step-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.step-indicator.pending {
  background: #f6f8f0;
  color: #b8bfb0;
  border: 1.5px solid #e8eeda;
}
.step-indicator.active {
  background: #5a6d44;
  color: white;
  box-shadow: 0 0 0 4px rgba(90, 109, 68, 0.15);
  transform: scale(1.1);
}
.step-indicator.done {
  background: #b5c99a;
  color: white;
}

/* --- Accordion --- */
.accordion-item {
  border-bottom: 1px solid #e8eeda;
}
.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #4a5240;
  transition: color 0.2s;
}
.accordion-trigger:hover {
  color: #5a6d44;
}
.accordion-trigger .accordion-chevron {
  width: 18px;
  height: 18px;
  color: #b5c99a;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-item.open .accordion-trigger .accordion-chevron {
  transform: rotate(180deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}
.accordion-item.open .accordion-content {
  max-height: 500px;
  padding-bottom: 16px;
}

/* --- Notification Badge --- */
.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #5a6d44;
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Page transitions --- */
.page-enter {
  animation: pageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Nav dropdown hover transitions (parent categories) --- */
.nav-cat-panel {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-cat-panel.hidden {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}
.nav-cat-panel:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

/* Chevron rotation on open */
.nav-cat-chevron,
.nav-subcat-chevron {
  transition: transform 0.2s ease;
}
.rotate-180 {
  transform: rotate(180deg);
}
