:root {
  --primary-color: #74C7F0;
  --secondary-color: #AC94F0;
  --accent-gradient: linear-gradient(135deg, #74C7F0 0%, #AC94F0 100%);
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --border-light: #e9ecef;
  --shadow-soft: 0 2px 8px rgba(116, 199, 240, 0.1);
  --shadow-hover: 0 4px 16px rgba(172, 148, 240, 0.15);
  --radius-card: 12px;
  --radius-button: 8px;
  --transition-smooth: all 0.25s ease;
}

.custom-slide .p,
.custom-slide .product {
  background: var(--white) !important;
  border-radius: var(--radius-card) !important;
  overflow: hidden !important;
  transition: var(--transition-smooth) !important;
  box-shadow: var(--shadow-soft) !important;
  border: 1px solid var(--border-light) !important;
  margin: 0 !important;
  padding: 2 0 0 0 !important;
  position: relative !important;

  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

.custom-slide .p:hover,
.custom-slide .product:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-hover) !important;
  border-color: var(--primary-color) !important;
}

.custom-slide .image {
  position: relative !important;
  overflow: hidden !important;
  border-radius: var(--radius-card) var(--radius-card) 0 0 !important;
  background: var(--light-gray) !important;
  height: 120px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.custom-slide .image img {
  width: auto !important;
  height: auto !important;
border-radius: var(--radius-card);
  max-width: 95% !important;
  max-height: 95% !important;
  object-fit: contain !important;
  transition: var(--transition-smooth) !important;
}

.custom-slide .p:hover .image img,
.custom-slide .product:hover .image img {
  transform: scale(1.03) !important;
}

.custom-slide .flags {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  z-index: 3 !important;
}

.custom-slide .flag {
  background: var(--accent-gradient) !important; /* Default */
  color: var(--white) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 3px 6px !important;
  border-radius: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  box-shadow: var(--shadow-soft) !important;
}

/* Different colors for different flag types */
.custom-slide .flag:contains("TEST Z NOSU"),
.custom-slide .flag[title*="nosu"],
.custom-slide .flag[data-flag*="nosu"] {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%) !important; /* Red for nose tests */
}

.custom-slide .flag:contains("TEST Z KRVE"),
.custom-slide .flag[title*="krve"],
.custom-slide .flag[data-flag*="krve"] {
  background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%) !important; /* Teal for blood tests */
}

.custom-slide .flag:contains("RYCHLOTEST"),
.custom-slide .flag[title*="rychlo"],
.custom-slide .flag[data-flag*="rychlo"] {
  background: linear-gradient(135deg, #45B7D1 0%, #96C93D 100%) !important; /* Blue-green for rapid tests */
}

.custom-slide .flag:contains("ANTIGEN"),
.custom-slide .flag[title*="antigen"],
.custom-slide .flag[data-flag*="antigen"] {
  background: linear-gradient(135deg, #F093FB 0%, #F5576C 100%) !important; /* Pink for antigen tests */
}

.custom-slide .flag:contains("PCR"),
.custom-slide .flag[title*="pcr"],
.custom-slide .flag[data-flag*="pcr"] {
  background: linear-gradient(135deg, #4481EB 0%, #04BEFE 100%) !important; /* Blue for PCR tests */
}

.custom-slide .flag:contains("PROFESIONÁLNÍ"),
.custom-slide .flag[title*="profesion"],
.custom-slide .flag[data-flag*="profesion"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; /* Purple for professional */
}

.custom-slide .p-in {
  padding: 12px !important; /* Increased padding */
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  /* Removed justify-content: space-between to stop bottom alignment */
}

/* Wrapper for all content below the image */
.custom-slide .p-content-wrapper {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; /* This will push the button to the bottom */
}

/* Product name - UNIFORM FOR ALL - BIGGER */
.custom-slide .name {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: var(--text-primary) !important;
  text-decoration: none !important;
  transition: var(--transition-smooth) !important;
  margin-bottom: 8px !important;
  height: 42px; /* Fixed height for 2 lines */
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-all !important;
}

.custom-slide .name a {
    color: inherit !important;
    text-decoration: none !important;
}

.custom-slide .name:hover,
.custom-slide .name a:hover {
  color: var(--primary-color) !important;
}

/* Price styling - UNIFORM FOR ALL - EVEN BIGGER */
.custom-slide .price {
  font-size: 20px !important; /* Made even bigger from 16px */
  font-weight: 700 !important;
  color: var(--primary-color) !important;
  margin-bottom: 8px !important;
  text-align: left !important;
  min-height: 24px !important; /* Ensure consistent positioning */
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

.custom-slide .price-standard,
.custom-slide .price .price-standard,
.custom-slide .price-additional,
.custom-slide .price .price-additional {
  font-size: 8px !important; /* Made really small from 10px */
  font-weight: 400 !important;
  color: var(--text-secondary) !important;
  margin-top: 2px !important;
}

/* Hide product code "Kód:" */
.custom-slide .p-code,
.custom-slide .code,
.custom-slide .product-code {
  display: none !important;
}

/* Hide specific elements but SHOW availability */
.custom-slide .p-desc,
.custom-slide .description,
.custom-slide .quantity,
.custom-slide .p-tools .btn:not(.btn-cart) {
  display: none !important;
}

.custom-slide .availability {
  display: block !important;
  font-size: 8px !important; /* Made smaller to match bez DPH */
  color: var(--text-secondary) !important;
  margin: 4px 0 !important;
  text-align: left !important;
}

/* Hide numbers in availability text */
.custom-slide .availability .availability-value,
.custom-slide .availability .stock-count {
  display: none !important;
}

/* Force uniform tools layout */
.custom-slide .p-tools {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  align-items: stretch !important;
  margin-top: 8px !important; /* Added margin-top */
  min-height: 28px !important; /* Reserve space for button */
}

.custom-slide .btn-cart,
.custom-slide .p-tools .btn,
.custom-slide .p-tools button,
.custom-slide .p-tools a {
  background: var(--accent-gradient) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--radius-button) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  cursor: pointer !important;
  transition: var(--transition-smooth) !important;
  box-shadow: var(--shadow-soft) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 8px 10px !important;
  text-decoration: none !important;
  position: relative !important;
  overflow: hidden !important;
  height: 28px !important;
  margin: 0 !important;
}

.custom-slide .btn-cart:hover,
.custom-slide .p-tools .btn:hover,
.custom-slide .p-tools button:hover,
.custom-slide .p-tools a:hover {
  transform: translateY(-1px) !important;
  box-shadow: var(--shadow-hover) !important;
}

/* Force same text for all buttons */
.custom-slide .btn-cart::before,
.custom-slide .p-tools .btn::before,
.custom-slide .p-tools button::before,
.custom-slide .p-tools a::before {
  content: '🛒 Do košíku' !important;
  font-size: 11px !important;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Hide original button text */
.custom-slide .btn-cart *,
.custom-slide .p-tools .btn *,
.custom-slide .p-tools button *,
.custom-slide .p-tools a * {
  display: none !important;
}

/* Hide original slider elements */
.products-wrapper.product-slider-holder .slick-arrow,
.products-wrapper.product-slider-holder .slick-dots,
.products.product-slider .slick-arrow,
.products.product-slider .slick-dots {
  display: none !important;
}

/* Ensure clean layout */
.custom-slide * {
  box-sizing: border-box !important;
}

/* Slide base styling - width controlled by JavaScript */
.custom-slide {
  flex: 0 0 20%; /* Default: will be overridden by JavaScript */
  padding: 0 8px;
  box-sizing: border-box;
}

/* Main slider container */
.custom-slider {
  position: relative;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0;
  outline: none; /* Remove default outline */
}

.custom-slider:focus {
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
  border-radius: 8px; /* Optional: to match the shadow shape */
}

/* Responsive navigation and spacing */
@media (max-width: 768px) {
  .custom-slider {
    margin: 0 40px; /* Reduce arrow space on tablets */
  }
}

@media (max-width: 480px) {
  .custom-slider {
    margin: 0 30px; /* Further reduce arrow space on mobile */
  }
  
  .custom-slider-prev,
  .custom-slider-next {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
