/*
 * OKTO Product Slider (Splide) Styles
 *
 * These styles are scoped to the slider generated by the OKTO plugin. They
 * enhance the product cards with a modern look, hide the native scroll bar,
 * and customise the Splide navigation arrows to harmonise with your theme. If
 * your theme defines colour presets in theme.json, those will be used for
 * buttons and highlights. Feel free to adjust the values to better match
 * your design system.
 */

/* Ensure the slider is fully visible once Splide has initialised */
.okto-product-slider.splide.is-initialized {
  visibility: visible;
}

/* Basic container spacing; Splide handles the sliding behaviour */
.okto-product-slider .splide__track {
  overflow: hidden;
}

/* Provide horizontal spacing between slides */
.okto-product-slider .splide__slide {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  height: auto;
}

/* Product card wrapper */
/* Product card container. We remove rounded corners to align with the
   requested aesthetic and provide a subtle border and shadow. */
.okto-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Subtle lift on hover */
/* On hover, gently lift the card and deepen the shadow. Keep the lift
   subtle for a refined effect. */
.okto-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

/* Image wrapper ensures image covers full width */
/* Ensure the image fills the width of the card and maintains a consistent
   aspect ratio. Using aspect-ratio keeps all cards aligned regardless of
   image dimensions. */
.okto-card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.featured-categories {
    gap: 2rem !important;
}

.okto-card-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product title */
/* Title inherits the theme’s heading styles by default. We only set
   margin to create spacing. */
.okto-card-title {
  margin: 0.75rem 1rem 0;
}
.okto-card-title a {
  text-decoration: none;
  color: inherit;
}

/* Description */
.okto-card-desc {
  margin: 0.5rem 1rem 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--wp--preset--color--foreground, #333);
}

/* Price */
/* Price styling: use theme colour for emphasis. */
.okto-card-price {
  margin: 0.5rem 1rem 0;
  font-weight: 500;
  color: var(--wp--preset--color--primary, #7858a6);
}

/* CTA button */
/* Add-to-cart button. Inherits WooCommerce classes for AJAX functionality.
   We remove rounded corners to match the card and provide theme colours. */
.okto-card-button {
  display: block;
  text-align: center;
  padding: 0.5rem 0;
  background: var(--wp--preset--color--primary, #7858a6);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s ease;
  border-radius: 50px;
  width: 10rem;
  margin: 1rem auto;
}
.okto-card-button:hover {
  background: black;
  color: white;
}

/* Customise Splide arrows to match the theme. Hide SVG icons and insert our own glyphs */
.okto-product-slider .splide__arrow {
  background: var(--wp--preset--color--primary, rgba(0, 0, 0, 0.4));
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  transition: background 0.2s ease;
}
.okto-product-slider .splide__arrow:hover {
  background: var(--wp--preset--color--primary-hover, rgba(0, 0, 0, 0.6));
}
/* Hide the default SVG inside Splide arrows */
.okto-product-slider .splide__arrow svg {
  display: none;
}
/* Insert left arrow glyph */
.okto-product-slider .splide__arrow--prev::before {
  content: '\2039';
  font-size: 1.5rem;
  line-height: 1;
}
/* Insert right arrow glyph */
.okto-product-slider .splide__arrow--next::before {
  content: '\203A';
  font-size: 1.5rem;
  line-height: 1;
}

/* Hide pagination bullets by default. Remove this rule if you want bullets below the slider */
.okto-product-slider .splide__pagination {
  display: none;
}