/* Karate theme — ported from storenest-webshop/app/templates/karate/styles/globals.css */
.sn-theme-karate {
  --sn-theme-code: 'karate';
  --karate-primary: #dc2626;
  --karate-primary-dark: #b91c1c;
  --karate-primary-light: #fef2f2;
  --karate-secondary: #f59e0b;
  --karate-accent: #1f2937;
}

html, body.sn-theme-karate {
  overflow-x: hidden;
  width: 100%;
}

.sn-theme-karate ::selection {
  background: var(--karate-primary);
  color: #fff;
}

.sn-theme-karate ::-webkit-scrollbar { width: 8px; }
.sn-theme-karate ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.sn-theme-karate ::-webkit-scrollbar-thumb { background: var(--karate-primary); border-radius: 4px; }
.sn-theme-karate ::-webkit-scrollbar-thumb:hover { background: var(--karate-primary-dark); }

/* Map legacy blue accents to karate red (Tailwind CDN) */
.sn-theme-karate .text-blue-600 { color: var(--karate-primary) !important; }
.sn-theme-karate .hover\:text-blue-600:hover { color: var(--karate-primary) !important; }
.sn-theme-karate .text-blue-500 { color: #ef4444 !important; }
.sn-theme-karate .hover\:text-blue-500:hover { color: #ef4444 !important; }
.sn-theme-karate .bg-blue-600 { background-color: var(--karate-primary) !important; }
.sn-theme-karate .hover\:bg-blue-600:hover { background-color: var(--karate-primary) !important; }
.sn-theme-karate .bg-blue-700 { background-color: var(--karate-primary-dark) !important; }
.sn-theme-karate .hover\:bg-blue-700:hover { background-color: var(--karate-primary-dark) !important; }
.sn-theme-karate .bg-blue-500 { background-color: #ef4444 !important; }
.sn-theme-karate .hover\:bg-blue-500:hover { background-color: #ef4444 !important; }
.sn-theme-karate .ring-blue-500 { --tw-ring-color: #ef4444 !important; }
.sn-theme-karate .focus\:ring-blue-500:focus { --tw-ring-color: #ef4444 !important; }
.sn-theme-karate .border-blue-600 { border-color: var(--karate-primary) !important; }
.sn-theme-karate .border-blue-500 { border-color: #ef4444 !important; }
.sn-theme-karate .focus\:border-blue-500:focus { border-color: #ef4444 !important; }
.sn-theme-karate .text-blue-700 { color: var(--karate-primary-dark) !important; }
.sn-theme-karate .hover\:text-blue-700:hover { color: var(--karate-primary-dark) !important; }
.sn-theme-karate .text-blue-800 { color: #991b1b !important; }
.sn-theme-karate .hover\:text-blue-800:hover { color: #991b1b !important; }
.sn-theme-karate .bg-blue-800 { background-color: #991b1b !important; }
.sn-theme-karate .hover\:bg-blue-800:hover { background-color: #991b1b !important; }
.sn-theme-karate .bg-indigo-400 { background-color: #f87171 !important; }
.sn-theme-karate .hover\:bg-indigo-600:hover { background-color: var(--karate-primary-dark) !important; }

.sn-theme-karate .karate-hero-slider { min-height: 520px; }
@media (min-width: 1024px) {
  .sn-theme-karate .karate-hero-slider { min-height: calc(100vh - 140px); max-height: 800px; }
}

.sn-theme-karate .swiper-pagination-bullet-active-custom,
.sn-theme-karate .swiper-pagination-bullet-active {
  background: #fff !important;
}

/* Cart page */
.sn-theme-karate .sn-cart-page details summary::-webkit-details-marker {
  display: none;
}
.sn-theme-karate .sn-cart-page details summary::marker {
  content: '';
}
.sn-theme-karate .sn-cart-qty-btn {
  touch-action: manipulation;
}

/* Header cart badge — only visible when cart has items */
.sn-theme-karate #header-cart-count {
  display: none;
}
.sn-theme-karate #header-cart-count:has(.sn-cart-badge),
.sn-theme-karate #header-cart-count:not(.hidden):has(.sn-cart-badge) {
  display: block;
}

/* Cart quantity — hide native spinners; use +/- buttons */
.sn-theme-karate .sn-cart-qty-input {
  -moz-appearance: textfield;
  appearance: textfield;
}
.sn-theme-karate .sn-cart-qty-input::-webkit-outer-spin-button,
.sn-theme-karate .sn-cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Product detail — gallery & zoom */
.sn-theme-karate #product-gallery-main:focus-visible {
  outline: 2px solid var(--karate-primary);
  outline-offset: 2px;
}

.sn-theme-karate body.karate-zoom-open {
  overflow: hidden;
}

.sn-theme-karate .karate-zoom-modal.flex {
  display: flex;
}
