/*
 * Eduman shop
 * Modern design for the WooCommerce shop / product archive page.
 * Everything is scoped to .shop-wrapper so no other page is affected.
 */

.shop-wrapper {
  --shop-primary: #2467ec;
  --shop-primary-soft: #eef4ff;
  --shop-heading: #141517;
  --shop-text: #575757;
  --shop-muted: #9aa0ac;
  --shop-border: #edeef2;
  --shop-surface: #f7f8fb;
  --shop-star: #ffb013;
  --shop-radius: 14px;
  --shop-radius-sm: 10px;
  --shop-shadow: 0 1px 2px rgba(20, 21, 23, 0.04);
  --shop-shadow-hover: 0 18px 40px rgba(20, 21, 23, 0.1);
}

/*----------
  1. Sidebar widgets
----------*/
.shop-wrapper .product-sidebar .course-sidebar-widget {
  padding: 24px;
  margin-bottom: 20px;
  background: #ffffff;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.shop-wrapper .product-sidebar .course-sidebar-widget:hover {
  border-color: #e1e5ee;
  box-shadow: 0 10px 30px rgba(20, 21, 23, 0.06);
}

.shop-wrapper .product-sidebar .course-sidebar-widget h3,
.shop-wrapper .product-sidebar .course-sidebar-widget h2.wp-block-heading {
  position: relative;
  margin: 0 0 14px;
  padding-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--shop-heading);
  text-transform: capitalize;
  border-bottom: 1px solid var(--shop-border);
}
.shop-wrapper .product-sidebar .course-sidebar-widget h3::after,
.shop-wrapper .product-sidebar .course-sidebar-widget h2.wp-block-heading::after {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 36px;
  height: 2px;
  content: "";
  background: var(--shop-primary);
  border-radius: 2px;
}

/* Link lists (categories, archives) */
.shop-wrapper .product-sidebar .course-sidebar-widget ul {
  margin: 0;
  padding: 0;
}
.shop-wrapper .product-sidebar .course-sidebar-widget ul li {
  margin: 0;
  list-style: none;
}
.shop-wrapper .product-sidebar .course-sidebar-widget ul li ul {
  padding: 0 0 0 12px;
}
.shop-wrapper .product-sidebar .course-sidebar-widget ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 -12px;
  padding: 8px 12px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--shop-text);
  border-radius: 8px;
  transition: color 0.25s, background-color 0.25s, padding 0.25s;
}
.shop-wrapper .product-sidebar .course-sidebar-widget ul li a::after {
  content: "\f105";
  font-family: "Font Awesome 5 Pro";
  font-size: 14px;
  font-weight: 400;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.25s;
}
.shop-wrapper .product-sidebar .course-sidebar-widget ul li a:hover,
.shop-wrapper .product-sidebar .course-sidebar-widget ul li.current-cat > a {
  color: var(--shop-primary);
  background: var(--shop-primary-soft);
}
.shop-wrapper .product-sidebar .course-sidebar-widget ul li.current-cat > a {
  font-weight: 600;
}
.shop-wrapper .product-sidebar .course-sidebar-widget ul li a:hover::after,
.shop-wrapper .product-sidebar .course-sidebar-widget ul li.current-cat > a::after {
  opacity: 1;
  transform: translateX(0);
}

/* Product search */
.shop-wrapper .product-sidebar .course-sidebar-widget.widget_product_search {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.shop-wrapper .product-sidebar .woocommerce-product-search input.search-field {
  height: 54px;
  line-height: 52px;
  padding: 0 54px 0 20px;
  font-size: 15px;
  color: var(--shop-heading);
  background: #ffffff;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.shop-wrapper .product-sidebar .woocommerce-product-search input.search-field::placeholder {
  color: var(--shop-muted);
}
.shop-wrapper .product-sidebar .woocommerce-product-search input.search-field:focus {
  border-color: var(--shop-primary);
  box-shadow: 0 0 0 4px rgba(36, 103, 236, 0.12);
}
.shop-wrapper .product-sidebar .woocommerce-product-search button {
  width: 54px;
  background: transparent;
  border-radius: 0 var(--shop-radius) var(--shop-radius) 0;
}
.shop-wrapper .product-sidebar .woocommerce-product-search button::before {
  color: var(--shop-muted);
  transition: color 0.25s;
}
.shop-wrapper .product-sidebar .woocommerce-product-search button:hover::before,
.shop-wrapper .product-sidebar .woocommerce-product-search input.search-field:focus + button::before {
  color: var(--shop-primary);
}

/* Tag cloud */
.shop-wrapper .product-sidebar div.tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}
.shop-wrapper .product-sidebar div.tagcloud a {
  height: 34px !important;
  margin: 0;
  padding: 0 14px;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 32px;
  color: var(--shop-text);
  background: var(--shop-surface);
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  transition: color 0.25s, background-color 0.25s, border-color 0.25s, transform 0.25s;
}
.shop-wrapper .product-sidebar div.tagcloud a:hover {
  color: #ffffff !important;
  background: var(--shop-primary);
  border-color: var(--shop-primary);
  transform: translateY(-2px);
}

/* Price filter */
.shop-wrapper .product-sidebar .woocommerce.widget_price_filter .price_slider_wrapper {
  padding-top: 10px;
}
.shop-wrapper .product-sidebar .woocommerce.widget_price_filter .price_slider_amount .button {
  height: 38px;
  padding: 0 22px;
  font-size: 14px;
  line-height: 36px;
  border-radius: var(--shop-radius-sm);
}

/*----------
  2. Toolbar (result count + sorting)
----------*/
.shop-wrapper .shop-count-ordering-wrap {
  margin: 0 0 28px 40px;
  padding: 10px 8px;
  background: var(--shop-surface);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
}
.shop-wrapper .shop-count-ordering-wrap .woocommerce-notices-wrapper:empty {
  display: none;
}
.shop-wrapper .shop-count-ordering-wrap .product-showing {
  margin-left: 0;
}
.shop-wrapper .shop-count-ordering-wrap .product-showing p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--shop-heading);
}
.shop-wrapper .shop-count-ordering-wrap .pro-filter {
  margin-bottom: 0;
}
.shop-wrapper .shop-count-ordering-wrap .nice-select {
  width: 220px;
  height: 44px;
  margin-bottom: 0;
  padding: 0 40px 0 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 42px;
  color: var(--shop-heading);
  background: #ffffff;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius-sm);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.shop-wrapper .shop-count-ordering-wrap .nice-select:hover,
.shop-wrapper .shop-count-ordering-wrap .nice-select.open {
  border-color: var(--shop-primary);
  box-shadow: 0 0 0 4px rgba(36, 103, 236, 0.12);
}
.shop-wrapper .shop-count-ordering-wrap .nice-select::after {
  right: 18px;
}
.shop-wrapper .shop-count-ordering-wrap .nice-select .list {
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius-sm);
  box-shadow: 0 18px 40px rgba(20, 21, 23, 0.12);
}
.shop-wrapper .shop-count-ordering-wrap .nice-select .option {
  min-height: 38px;
  padding: 0 12px;
  line-height: 38px;
  border-radius: 6px;
}
.shop-wrapper .shop-count-ordering-wrap .nice-select .option:hover,
.shop-wrapper .shop-count-ordering-wrap .nice-select .option.focus,
.shop-wrapper .shop-count-ordering-wrap .nice-select .option.selected.focus {
  color: var(--shop-primary);
  background: var(--shop-primary-soft);
}

/*----------
  3. Product grid
----------*/
.shop-wrapper .products-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 24px;
}
.shop-wrapper .products-wrapper > .product-items {
  width: auto;
}

/*----------
  4. Product card
----------*/
.shop-wrapper .products-wrapper .product-items {
  display: flex;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow);
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}
.shop-wrapper .products-wrapper .product-items:hover {
  border-color: transparent;
  box-shadow: var(--shop-shadow-hover);
  transform: translateY(-6px);
}
.shop-wrapper .products-wrapper .product-wrapper,
.shop-wrapper .products-wrapper .product__box {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

/* Image */
.shop-wrapper .products-wrapper .product-img {
  margin-bottom: 0;
  background: var(--shop-surface);
}
.shop-wrapper .products-wrapper .product-img > a {
  display: block;
}
.shop-wrapper .products-wrapper .product-img img.attachment-woocommerce_thumbnail {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 10 / 13;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}
.shop-wrapper .products-wrapper .product-items:hover .product-img img.attachment-woocommerce_thumbnail {
  transform: scale(1.06);
}
.shop-wrapper .products-wrapper .product-img::after {
  position: absolute;
  inset: 40% 0 0 0;
  content: "";
  background: linear-gradient(to top, rgba(20, 21, 23, 0.4), rgba(20, 21, 23, 0));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.shop-wrapper .products-wrapper .product-items:hover .product-img::after,
.shop-wrapper .products-wrapper .product-items:focus-within .product-img::after {
  opacity: 1;
}

/* Sale badge */
.shop-wrapper .products-wrapper .product-items span.onsale {
  top: 12px;
  left: 12px;
  right: auto;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 24px;
  margin: 0;
  padding: 0 12px !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--shop-primary);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(36, 103, 236, 0.3);
}

/* Hover actions (add to cart, quick view, wishlist) */
.shop-wrapper .products-wrapper .shop-quick-view {
  z-index: 2;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateY(10px);
  transition: opacity 0.35s, visibility 0.35s, transform 0.35s;
}
.shop-wrapper .products-wrapper .product-items:hover .shop-quick-view,
.shop-wrapper .products-wrapper .product-items:focus-within .shop-quick-view {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.shop-wrapper .products-wrapper .product-items .shop-quick-view .act {
  width: 40px;
  height: 40px;
  margin: 0;
  line-height: 40px;
  color: var(--shop-heading);
  box-shadow: 0 6px 16px rgba(20, 21, 23, 0.16);
  transition: color 0.25s, background-color 0.25s, transform 0.25s;
}
.shop-wrapper .products-wrapper .product-items .shop-quick-view .act i {
  font-size: 15px;
}
.shop-wrapper .products-wrapper .product-items .shop-quick-view .act:hover {
  color: #ffffff;
  background: var(--shop-primary);
  transform: translateY(-3px);
}
.shop-wrapper .products-wrapper .product-items .shop-quick-view .yith-wcwl-add-to-wishlist {
  margin: 0;
}

/* Content */
.shop-wrapper .products-wrapper .product-content {
  display: flex;
  flex: 1;
  padding: 14px 16px 16px;
  text-align: left;
}
.shop-wrapper .products-wrapper .product-content .pro-title {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.shop-wrapper .products-wrapper .product-content .course-icon {
  order: -1;
  margin-bottom: 8px;
  line-height: 1;
}
.shop-wrapper .products-wrapper .product-items .course-icon i {
  margin-right: 2px;
  font-size: 12px;
  color: var(--shop-star);
}
.shop-wrapper .products-wrapper .product-content h4 {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.shop-wrapper .products-wrapper .product-content h4 a {
  color: var(--shop-heading);
  transition: color 0.25s;
}
.shop-wrapper .products-wrapper .product-content h4 a:hover {
  color: var(--shop-primary);
}

/* Price */
.shop-wrapper .products-wrapper .product-items .product-content .pro-title .pro-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin: auto 0 0;
  line-height: 1.2;
}
.shop-wrapper .products-wrapper .product-content .pro-price span {
  margin-bottom: 0;
}
.shop-wrapper .products-wrapper .product-content .pro-price .amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--shop-primary);
}
.shop-wrapper .products-wrapper .product-content .pro-price .amount bdi,
.shop-wrapper .products-wrapper .product-content .pro-price .amount span {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.shop-wrapper .products-wrapper .product-content .pro-price ins {
  order: 1;
  text-decoration: none;
}
.shop-wrapper .products-wrapper .product-content .pro-price del {
  order: 2;
  opacity: 1;
  color: var(--shop-muted);
}
.shop-wrapper .products-wrapper .product-items .product-content .pro-title .pro-price del .amount {
  font-size: 13px;
  font-weight: 500;
  color: var(--shop-muted);
}

/*----------
  5. Pagination
----------*/
.shop-wrapper .shop-pagination.basic-pagination ul.pagination {
  gap: 8px;
  margin-bottom: 0;
}
.shop-wrapper .shop-pagination.basic-pagination.edu-pagination li a,
.shop-wrapper .shop-pagination.basic-pagination.edu-pagination li span {
  width: 44px;
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  line-height: 42px;
  color: var(--shop-heading);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius-sm);
}
.shop-wrapper .shop-pagination.basic-pagination.edu-pagination li a:hover {
  color: var(--shop-primary) !important;
  background: var(--shop-primary-soft);
  border-color: var(--shop-primary);
}
.shop-wrapper .shop-pagination.basic-pagination.edu-pagination li span.current {
  width: 44px;
  height: 44px;
  line-height: 42px;
  background: var(--shop-primary);
  border-color: var(--shop-primary);
  box-shadow: 0 8px 18px rgba(36, 103, 236, 0.28);
}

/*----------
  6. Responsive
----------*/
@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .shop-wrapper .shop-count-ordering-wrap {
    margin-left: 30px;
  }
  .shop-wrapper .product-sidebar .course-sidebar-widget {
    padding: 20px;
  }
  .shop-wrapper .products-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 1199px) {
  .shop-wrapper .shop-count-ordering-wrap {
    margin-left: 0;
  }
  .shop-wrapper .shop-pagination.basic-pagination {
    margin-left: 0;
  }
}

@media (max-width: 575px) {
  .shop-wrapper .shop-count-ordering-wrap {
    row-gap: 10px;
    padding: 14px 8px;
  }
  .shop-wrapper .shop-count-ordering-wrap .pro-filter,
  .shop-wrapper .shop-count-ordering-wrap .woocommerce-ordering,
  .shop-wrapper .shop-count-ordering-wrap .nice-select {
    float: none;
    width: 100%;
  }
  .shop-wrapper .products-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
  }
  .shop-wrapper .products-wrapper .product-content {
    padding: 12px;
  }
}

/* Touch screens have no hover, so keep the actions visible */
@media (hover: none) {
  .shop-wrapper .products-wrapper .shop-quick-view {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .shop-wrapper .products-wrapper .product-items .shop-quick-view .act {
    width: 36px;
    height: 36px;
    line-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-wrapper .products-wrapper .product-items,
  .shop-wrapper .products-wrapper .product-img img.attachment-woocommerce_thumbnail,
  .shop-wrapper .products-wrapper .shop-quick-view,
  .shop-wrapper .products-wrapper .product-items .shop-quick-view .act,
  .shop-wrapper .product-sidebar div.tagcloud a {
    transition: none;
    transform: none !important;
  }
}
