/*
 Theme Name:   Blocksy Child
 Description:  Child theme for Blocksy
 Author:       Creative Themes
 Template:     blocksy
 Version:      1.0.0
*/

/* Slight zoom on product image hover */
.woocommerce ul.products li.product img {
  transition: transform 0.3s ease, opacity 0.6s ease;
  will-change: transform;
}

/* Hover zoom IN effect */
.woocommerce ul.products li.product:hover img {
  transform: scale(1.08);
}

/* Zoom into focus upon first load (product pages) */
.woocommerce ul.products li.product {
  opacity: 0;
  transform: translateY(20px) scale(1.1);
  transition: all 0.6s ease;
  will-change: transform, opacity;
}

/* When visible */
.woocommerce ul.products li.product.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── Category cards ─────────────────────── */
.category-slider .woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.woocommerce ul.products li.product-category {
  list-style: none;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: transform .2s ease, box-shadow 0.25s ease;
}

.woocommerce ul.products li.product-category .ct-media-container {
  border-radius: 0px;
}

.woocommerce ul.products li.product-category:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.woocommerce ul.products li.product-category img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.woocommerce-loop-category__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0px 0px 10px;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Remove category count "(x)" */
.woocommerce-loop-category__title .count {
  display: none !important;
}

/* Remove link styling */
.woocommerce ul.products li.product-category a {
  text-decoration: none;
  color: inherit;
  display: block;
}

@media (max-width: 768px) {
  .category-slider .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .category-slider .woocommerce ul.products {
    gap: 14px;
  }
}

/* ── Section heading ─────────────────────── */
.section-wrapper {
  padding-top: 30px;
  padding-bottom: 20px;
}

.section-wrapper .wp-element-button {
  border-radius: 20px;
  margin-top: 20px;
}

.section-heading {
  padding-bottom: 30px;
}

.section-heading>p {
  padding-top: 20px;
}

.section-title {
  display: inline !important;
  width: fit-content;
  max-width: 100%;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
  margin-bottom: 12px !important;
}

.section-title::before {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: 4px;
  height: 30%;
  background: #9fc184;
  opacity: 30%;
  z-index: -1;
  border-radius: 3px;
}

.icon-text {
  display: flex;
  justify-content: center;
}

.icon-text svg {
  width: 38px;
  height: 38px;
  fill: currentcolor;
}

/* ── Age Gate ─────────────────────── */
.age-gate {
  border-radius: 12px;
}

.age-gate__subheadline {
  display: none;
}

.age-gate__challenge {
  font-size: 12px;
}

.age-gate__content {
  border-radius: 16px;
  overflow: hidden;
  padding: 40px;
}

.age-gate__buttons button {
  border-radius: 10px;
  padding: 12px 18px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 500;
}

.age-gate__submit--yes {
  background: linear-gradient(135deg, #d4af37, #f5d76e);
  color: #111;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Hover animation (gold glow + lift) */
.age-gate__submit--yes:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.5);
}

.age-gate__submit--no {
  background: #e5e5e5;
  color: #333;
}

.age-gate__submit--no:hover {
  background: #d0d0d0;
  transform: translateY(-2px);
}

/* ── Taxonomies (strains) ─────────────────────── */
.woocommerce-loop-product__title {
  font-weight: 700;
}

.product-strain {
  min-height: 20px;
  padding: 2px 10px;
  border-radius: 4px;
  color: white;
  font-size: 12px;
}

.indica {
  background-color: #91C2B2;
}

.ct-woo-card-actions>a,
.ct-woo-card-actions>.price:not(:only-child):after {
  display: none !important;
}

.ct-woo-card-actions {
  border-block: none !important;
}

/* ── Flickity Product Carousel ─────────────────────── */
.woo-carousel-section {
  margin: 48px 0;
}

.woo-carousel-section ul.products {
  display: block !important;
  /* Offset padding */
  margin-left: -20px !important;
  margin-right: -20px !important;
}

.woo-carousel-section ul.products li.product {
  width: 25% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 40px !important;
  box-sizing: border-box !important;
}

.woo-carousel-section ul.products li.product .ct-media-container {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 8px;
  overflow: hidden;
}

.woo-carousel-section ul.products li.product .ct-media-container img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 !important;
}

.woo-carousel-section .flickity-button {
  opacity: 0;
  transition: opacity .4s ease;
  width: 40px;
  height: 40px;
  top: 130px;
  transition: opacity 0.4s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  background-color: unset !important;
}

.woo-carousel-section:hover .flickity-button {
  opacity: 1;
}

.woo-carousel-section .flickity-prev-next-button.previous {
  left: -44px;
}

.woo-carousel-section .flickity-prev-next-button.next {
  right: -44px;
}

.woo-carousel-section ul.products li.product {
  transition: none !important;
}

.flickity-slider,
.product {
  background: inherit !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .woo-carousel-section ul.products li.product {
    width: 33.333% !important;
  }
}

@media (max-width: 768px) {
  .woo-carousel-section ul.products li.product {
    width: 50% !important;
  }

  .woo-carousel-section .flickity-prev-next-button.previous {
    left: 0px;
  }

  .woo-carousel-section .flickity-prev-next-button.next {
    right: 0px;
  }
}


/*
Change sale price color to red
.sale-price ins .amount {
  color: red;
} 
*/

/* Unused but can add this class to hide sale badge */
.no-sale-badge .onsale {
  display: none;
}

/* Animate "Shop Now" button on hover */
.wp-block-button__link.wp-element-button:hover {
  animation: pulse 0.3s ease;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(5);
  }

  100% {
    transform: scale(1);
  }
}

.promo-slider {
  margin-top: calc(var(--theme-content-vertical-spacing) * -1) !important;
}