/* ============================================
   Softness Theme - Global Styles
   ============================================ */

/* CSS Variables are defined dynamically in layout.njk — do NOT redeclare here */

/* ===== Toast Notifications ===== */
.toast {
  padding: 12px 24px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  pointer-events: auto;
  animation: toastIn 0.3s ease;
}
.toast-success { background-color: #10b981; }
.toast-error { background-color: #ef4444; }
.toast-warning { background-color: #f59e0b; color: #1f2937; }
.toast-info { background-color: var(--mainColor, #00badb); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Overlay ===== */
.kalles-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 40;
}

/* ===== Drawer ===== */
.kalles-drawer {
  position: fixed;
  top: 0;
  max-width: 400px;
  width: 85%;
  height: 100%;
  z-index: 50;
  transition: transform 0.3s ease;
}
[dir="ltr"] .kalles-drawer { right: 0; transform: translateX(100%); }
[dir="rtl"] .kalles-drawer { left: 0; transform: translateX(-100%); }
.kalles-drawer.is-open { transform: translateX(0); }

/* ===== Custom Scrollbar ===== */
.kalles-scrollbar::-webkit-scrollbar { width: 4px; }
.kalles-scrollbar::-webkit-scrollbar-track { background: transparent; }
.kalles-scrollbar::-webkit-scrollbar-thumb { background: var(--textMuted, #999); border-radius: 4px; }
.kalles-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--mainColor); }

/* ===== Removing animation (cart items) ===== */
.removing {
  animation: slideOut 0.3s ease forwards;
}
@keyframes slideOut {
  to { opacity: 0; transform: translateX(30px); height: 0; padding: 0; margin: 0; overflow: hidden; }
}

/* ===== Alpine Cloak — prevent modal flash before Alpine init ===== */
[x-cloak] {
  display: none !important;
}

/* ===== Filter Card Container ===== */
.kalles-filter-card {
  border: 1px solid #f0f0f0;
  border-radius: 14px;
  padding: 14px 16px;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 10px;
}
.kalles-filter-card:hover {
  border-color: #e0e0e0;
}

/* ===== Filter Header ===== */
.kalles-filter-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* ===== Filter Icon Badge ===== */
.kalles-filter-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bgLight, #f7f7f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mainColor);
  flex-shrink: 0;
}

/* ===== Active Count Badge ===== */
.kalles-filter-badge {
  background: var(--mainColor);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
}

/* ===== Active Filter Chips ===== */
.kalles-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bgLight, #f7f7f7);
  color: var(--accentColor);
  border: 1px solid #eee;
  cursor: pointer;
  transition: all 0.15s;
}
.kalles-filter-chip:hover {
  border-color: #e53e3e;
  color: #e53e3e;
  background: #fff5f5;
}

/* ===== Sort Radio Button ===== */
.kalles-sort-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--textMuted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-align: start;
}
.kalles-sort-option:hover {
  background: #fafafa;
}
.kalles-sort-option--active {
  background: var(--bgLight, #f7f7f7) !important;
  color: var(--mainColor) !important;
  font-weight: 600;
}

/* ===== Radio Indicator ===== */
.kalles-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.kalles-radio--checked {
  border-color: var(--mainColor);
}
.kalles-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mainColor);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.kalles-radio--checked .kalles-radio-dot {
  transform: scale(1);
}

/* ===== Custom Checkbox ===== */
.kalles-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.kalles-checkbox-item:hover {
  background: #fafafa;
}
.kalles-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  background: white;
}
.kalles-checkbox--checked {
  background: var(--mainColor);
  border-color: var(--mainColor);
}
.kalles-checkbox-icon {
  width: 12px;
  height: 12px;
  color: white;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.kalles-checkbox--checked .kalles-checkbox-icon {
  opacity: 1;
  transform: scale(1);
}

/* ===== Range Input Fields ===== */
.kalles-range-input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accentColor);
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
  tabular-nums: true;
}
.kalles-range-input::-webkit-inner-spin-button,
.kalles-range-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.kalles-range-input:focus {
  border-color: var(--mainColor);
  box-shadow: 0 0 0 3px rgba(var(--mainColor), 0.08);
  background: white;
}
.kalles-range-label {
  position: absolute;
  top: 4px;
  inset-inline-start: 12px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  pointer-events: none;
}

/* ===== Dual Range Slider ===== */
.kalles-range-slider {
  position: relative;
  height: 6px;
  margin: 12px 0 4px;
}
.kalles-range-track {
  position: absolute;
  inset: 0;
  background: #e5e7eb;
  border-radius: 999px;
}
.kalles-range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--mainColor);
  border-radius: 999px;
  transition: left 0.05s, right 0.05s;
}
.kalles-range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  top: -6px;
  height: 18px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  margin: 0;
}
.kalles-range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid var(--mainColor);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: transform 0.15s, box-shadow 0.15s;
}
.kalles-range-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
}
.kalles-range-slider input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.25);
  box-shadow: 0 0 0 6px rgba(var(--mainColor), 0.1), 0 3px 10px rgba(0,0,0,.15);
}
.kalles-range-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid var(--mainColor);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: transform 0.15s, box-shadow 0.15s;
}
.kalles-range-slider input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
}

/* ===== Mobile Filter Section ===== */
.kalles-mobile-section {
  padding: 4px 0;
}
.kalles-mobile-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px 0;
}

/* ===== Filter Scrollbar ===== */
.kalles-filter-scroll::-webkit-scrollbar {
  width: 3px;
}
.kalles-filter-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.kalles-filter-scroll::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 999px;
}
.kalles-filter-scroll::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

/* Legacy alias — keep backward compat for old slider class names */
.price-slider { position: relative; height: 6px; margin: 8px 0 4px; }
.price-slider .slider-track { position: absolute; inset: 0; background: #e5e7eb; border-radius: 999px; }
.price-slider .slider-range { position: absolute; top: 0; bottom: 0; background: var(--mainColor); border-radius: 999px; }
.price-slider input[type="range"] { position: absolute; width: 100%; top: -4px; height: 14px; -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; margin: 0; }
.price-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: white; border: 2px solid var(--mainColor); cursor: pointer; pointer-events: auto; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.price-slider input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: white; border: 2px solid var(--mainColor); cursor: pointer; pointer-events: auto; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* ===== Collection Tabs ===== */
.kalles-collection-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border: 1.5px solid #e5e7eb;
  color: var(--textMuted);
  background: white;
  transition: all 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}
.kalles-collection-tab:hover {
  border-color: var(--mainColor);
  color: var(--mainColor);
  background: white;
}
.kalles-collection-tab--active {
  background: var(--accentColor) !important;
  border-color: var(--accentColor) !important;
  color: white !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* ===== Hide Scrollbar ===== */
.kalles-hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.kalles-hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ===== Color Swatch Filter ===== */
.kalles-color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 2px;
}
.kalles-color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: inset 0 0 0 2px white;
}
.kalles-color-swatch:hover .kalles-color-dot {
  border-color: #999;
  transform: scale(1.1);
}
.kalles-color-swatch--active,
.kalles-color-dot.kalles-color-swatch--active {
  border-color: var(--accentColor) !important;
  box-shadow: inset 0 0 0 2px white, 0 0 0 2px var(--accentColor);
  transform: scale(1.1);
}
.kalles-color-check {
  width: 14px;
  height: 14px;
  color: white;
  opacity: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
  transition: opacity 0.15s;
}
.kalles-color-swatch--active .kalles-color-check,
.kalles-color-dot.kalles-color-swatch--active .kalles-color-check {
  opacity: 1;
}

/* ===== Size Chip Filter ===== */
.kalles-size-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid #e5e7eb;
  font-size: 13px;
  font-weight: 500;
  color: var(--textMuted);
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.kalles-size-chip:hover {
  border-color: var(--mainColor);
  color: var(--mainColor);
}
.kalles-size-chip--active {
  background: var(--accentColor) !important;
  border-color: var(--accentColor) !important;
  color: white !important;
  font-weight: 600;
}

/* ===== Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--bodyTextColor);
}

.special-text {
  font-family: "Dancing Script", cursive;
}


/* ===== Buttons ===== */
.kalles-btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  z-index: 1;
}

.kalles-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  transition: transform 0.35s ease-in-out;
}

.kalles-btn--primary {
  background-color: var(--buttonColor);
  color: var(--buttonTextColor);
}

.kalles-btn--primary::before {
  background-color: var(--mainColor);
  transform: translateY(100%);
}

.kalles-btn--primary:hover::before {
  transform: translateY(0);
}

.kalles-btn--outline {
  border: 2px solid var(--accentColor);
  color: var(--accentColor);
  border-radius: 9999px;
}

.kalles-btn--outline:hover {
  background-color: var(--accentColor);
  color: #fff;
}

/* ===== Product Card Styles ===== */
.kalles-product-img {
  aspect-ratio: 3/4;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* ===== Selection ===== */
::selection {
  background-color: var(--mainColor);
  color: #fff;
}

/* ===== Swiper Customization ===== */
.hero-swiper .swiper-pagination-bullet {
  background: var(--accentColor);
  opacity: 0.4;
  width: 10px;
  height: 10px;
}

.hero-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--mainColor);
}

/* ===== Product Slider Navigation ===== */
.product-swiper {
  position: relative;
}

.product-swiper .swiper-button-next,
.product-swiper .swiper-button-prev {
  --swiper-navigation-size: 16px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  color: var(--accentColor, #222);
  transition: background-color 0.2s, transform 0.2s;
}

.product-swiper .swiper-button-next:hover,
.product-swiper .swiper-button-prev:hover {
  background: #fff;
  transform: scale(1.1);
}

.product-swiper .swiper-button-next.swiper-button-disabled,
.product-swiper .swiper-button-prev.swiper-button-disabled {
  opacity: 0;
  pointer-events: none;
}

/* ===== Details/Summary (Footer Accordion) ===== */
details summary::-webkit-details-marker,
details summary::marker {
  display: none;
  content: '';
}

details[open] summary .fi-rr-plus {
  transform: rotate(45deg);
}

/* ===== RTL Adjustments ===== */
[dir="rtl"] .swiper-pagination {
  direction: ltr;
}


/* ===== Line Clamp ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Featured Product (Single Highlight) ===== */
.kalles-featured-product {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #f0f0f0;
  transition: box-shadow 0.3s;
}
.kalles-featured-product:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
}
@media (min-width: 640px) {
  .kalles-featured-product {
    flex-direction: row;
    align-items: stretch;
  }
}

.kalles-featured-product__image {
  position: relative;
  overflow: hidden;
  background: var(--bgLight, #f7f7f7);
  aspect-ratio: 1;
}
@media (min-width: 640px) {
  .kalles-featured-product__image {
    width: 45%;
    min-width: 45%;
    aspect-ratio: auto;
    min-height: 320px;
  }
}
.kalles-featured-product__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.kalles-featured-product:hover .kalles-featured-product__image img {
  transform: scale(1.05);
}

.kalles-featured-product__body {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 640px) {
  .kalles-featured-product__body {
    padding: 28px 32px;
    gap: 12px;
  }
}

/* ===== Collections Grid ===== */
.collections-section {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px;
}

.collections-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.collections-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--accentColor, #111827);
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.collection-card {
  background: var(--bgLight, #ffffff);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .12);
}

.collection-image {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: #f3f4f6;
}

.collection-body {
  padding: 14px 14px 16px;
}

.collection-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accentColor, #111827);
  margin-bottom: 6px;
}

.collection-description {
  font-size: 13px;
  color: var(--textMuted, #6b7280);
  min-height: 32px;
  margin-bottom: 10px;
}

.collection-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collection-count {
  font-size: 12px;
  color: #374151;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 999px;
}

.collection-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--mainColor, #111827);
}

/* ===== Article Content Typography ===== */
.article-body-content {
  font-size: 16px;
  line-height: 1.9;
  color: #1f2937;
}

.article-body-content p {
  margin-bottom: 18px;
}

.article-body-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 28px 0 14px;
  color: #111827;
}

.article-body-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: #111827;
}

.article-body-content h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: #111827;
}

.article-body-content ul,
.article-body-content ol {
  padding-inline-start: 24px;
  margin-bottom: 18px;
}

.article-body-content ul {
  list-style: disc;
}

.article-body-content ol {
  list-style: decimal;
}

.article-body-content li {
  margin-bottom: 6px;
}

.article-body-content blockquote {
  border-inline-start: 4px solid var(--mainColor);
  padding: 12px 20px;
  margin: 20px 0;
  background: #f9fafb;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #374151;
}

.article-body-content a {
  color: #2563eb;
  text-decoration: underline;
}

.article-body-content a:hover {
  color: #1d4ed8;
}

.article-body-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 18px 0;
}

.article-body-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.article-body-content th,
.article-body-content td {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  text-align: start;
}

.article-body-content th {
  background: #f3f4f6;
  font-weight: 600;
}

.article-body-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 18px 0;
  font-size: 14px;
}

.article-body-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.article-body-content pre code {
  background: none;
  padding: 0;
}

.article-body-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 28px 0;
}

