/* WooCommerce Custom Shortcodes Styles */

/* Products Grid */
.wc-products-grid {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.wc-products-grid.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.wc-products-grid.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.wc-products-grid.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.wc-products-grid.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.wc-products-grid.columns-5 {
  grid-template-columns: repeat(5, 1fr);
}

.wc-products-grid.columns-6 {
  grid-template-columns: repeat(6, 1fr);
}

/* Responsive grid */
@media (max-width: 768px) {
  .wc-products-grid.columns-4,
  .wc-products-grid.columns-5,
  .wc-products-grid.columns-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .wc-products-grid.wc-products-grid.wc-products-grid {
    grid-template-columns: 1fr;
  }
}

/* Product Items */
.wc-product-item {
  text-align: center;
  padding: 15px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

.wc-product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wc-product-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.wc-product-item img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 10px;
}

.wc-product-item h3 {
  font-size: 16px;
  margin: 10px 0 5px;
  color: #333;
  line-height: 1.4;
}

.wc-product-item .price {
  font-weight: bold;
  color: #82362e;
  font-size: 14px;
}

/* Category Items - Modern Design with IMG tags */
.wc-category-item {
  position: relative;
  aspect-ratio: 3/4;
  min-height: 200px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.wc-category-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
  position: relative;
}

/* Image Wrapper */
.wc-category-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.wc-category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.wc-category-item:hover .wc-category-image {
  transform: scale(1.05);
}

.wc-category-no-image {
  width: 100%;
  height: 100%;
  background-color: #e4e4e4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
}

/* Overlay */
.wc-category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.05) 60%,
    rgba(0, 0, 0, 0.3) 100%
  );
  transition: background 0.4s ease;
  z-index: 2;
}

.wc-category-item:hover .wc-category-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.wc-category-bar {
  display: grid;
  grid-template-columns: 1fr auto;
}

/* Arrow Icon - Always Visible */
.wc-category-arrow {
  position: absolute;
  right: 20px;
  bottom: 30px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  z-index: 4;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wc-category-item:hover .wc-category-arrow {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.wc-category-arrow svg {
  width: 16px;
  height: 16px;
}

/* Content */
.wc-category-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 60px 10px 20px;
  z-index: 3;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wc-category-item:hover .wc-category-content {
  transform: translateY(-10px);
}

.wc-category-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.3;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.wc-category-count {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
  margin-bottom: 0;
}

.wc-category-item:hover .wc-category-count {
  opacity: 1;
  transform: translateY(0);
}

/* Slider specific styles */
.wc-products-slider,
.wc-categories-slider {
  margin: 20px 0;
}

/* Splide customizations */

/* Splide arrow SVG styling handled by theme */

.splide__pagination {
  bottom: -30px;
}

.splide__pagination__page {
  background: #ccc;
  transition: all 0.3s ease;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 3px;
}

.splide__pagination__page.is-active {
  background-color: #82362e;
  transform: scale(1.2);
}

/* Responsive adjustments for categories */
@media (max-width: 1024px) {
  .wc-category-item {
    min-height: 180px;
  }

  .wc-category-title {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .wc-category-item {
    min-height: 160px;
  }

  .wc-category-content {
    padding: 20px 16px 16px;
  }

  .wc-category-title {
    font-size: 18px;
  }

  .wc-category-count {
    font-size: 14px;
    opacity: 1;
    transform: translateY(0);
  }

  .wc-category-arrow {
    width: 36px;
    height: 36px;
  }

  .wc-category-arrow svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .wc-category-item {
    min-height: 140px;
  }

  .wc-category-content {
    padding: 16px 14px 14px;
  }

  /* Category title font size handled by theme */
}

/* Admin styles */
.wc-shortcode-generator {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ccd0d4;
  border-radius: 4px;
  margin-top: 20px;
}

.wc-shortcode-generator .form-table th {
  width: 200px;
}

#generated_shortcode {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 10px;
  font-size: 12px;
}

#copy_shortcode {
  margin-top: 10px;
}

/* Custom Wishlist Icon Styles */
.custom-wishlist-icon-wrapper {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-family: inherit;
}

.custom-wishlist-icon-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.custom-wishlist-icon-link:hover {
  color: #e74c3c;
  text-decoration: none;
}

.custom-wishlist-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.custom-wishlist-icon-svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.custom-wishlist-icon-wrapper:hover .custom-wishlist-icon-svg {
  transform: scale(1.1);
}

.custom-wishlist-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background-color: #000;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 50%;
  margin-left: 4px;
  padding: 0 4px;
  line-height: 1;
  transition: all 0.3s ease;

  position: absolute;
  top: -8px;
  right: -10px;
}

.custom-wishlist-count[data-count="0"] {
  display: none;
}

.custom-wishlist-icon-wrapper.has-items .custom-wishlist-count {
  display: inline-flex;
}

.custom-wishlist-icon-wrapper.has-items .custom-wishlist-icon-svg {
  color: currentColor;
}

/* Menu specific styles */
.menu-wishlist-icon {
  /* margin-left: 8px; */
}

.menu-item .custom-wishlist-icon-wrapper {
  vertical-align: middle;
}

/* Different icon styles */
.custom-wishlist-icon-wrapper.style-badge {
  position: relative;
}

.custom-wishlist-icon-wrapper.style-badge .custom-wishlist-count {
  position: absolute;
  top: -8px;
  right: -8px;
  margin-left: 0;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
}

.custom-wishlist-icon-wrapper.style-inline .custom-wishlist-count {
  position: static;
  background: transparent;
  color: inherit;
  border-radius: 0;
  margin-left: 4px;
  font-weight: normal;
}

.custom-wishlist-icon-wrapper.style-inline .custom-wishlist-count:before {
  content: "(";
}

.custom-wishlist-icon-wrapper.style-inline .custom-wishlist-count:after {
  content: ")";
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .custom-wishlist-icon-svg {
    width: 18px;
    height: 18px;
  }

  .custom-wishlist-count {
    min-width: 16px;
    height: 16px;
    font-size: 10px;
  }

  .custom-wishlist-icon-wrapper.style-badge .custom-wishlist-count {
    min-width: 14px;
    height: 14px;
    font-size: 9px;
  }
}

/* Animation for count changes */
@keyframes wishlistCountPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.custom-wishlist-count.updated {
  animation: wishlistCountPulse 0.3s ease-in-out;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .custom-wishlist-icon-wrapper:hover .custom-wishlist-icon-svg {
    color: #ff6b6b;
  }

  .custom-wishlist-icon-wrapper.has-items .custom-wishlist-icon-svg {
    color: #ff6b6b;
  }

  .custom-wishlist-count {
    background: #ff6b6b;
  }
}
