/* Loaded on every page with a file-time version (styles-extra.css is an unversioned @import). */

/* New-tab marker on links that leave the site (Slab menu: Shop WZ Promo Slabs) */
.wz-external-icon {
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.6em;
  vertical-align: -0.05em;
}

/* Product cards: a small heart on the photo's top right corner. A white disc keeps it
   legible on dark and light stone; saved shows a filled heart, unsaved an outline. */
.product-catalog .yith-wcwl-add-button {
  top: 22px; /* the photo starts 10px into the card */
  right: 27px; /* the card's 15px gutter */
}

.product-catalog .yith-wcwl-add-button a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
  color: #000;
  font-size: 0;
  text-decoration: none;
  transition: background-color 0.15s ease-out, transform 0.15s ease-out;
}

.product-catalog .yith-wcwl-add-button a:hover {
  background: #fff;
  transform: scale(1.06);
}

.product-catalog .yith-wcwl-add-button a:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Both hearts: the placeholder script.js draws before YITH loads (no class), and YITH's
   own icon, which needs the longer selector to beat its 5px right margin */
.product-catalog .yith-wcwl-add-button svg,
.product-catalog .yith-wcwl-add-button a svg.yith-wcwl-icon-svg {
  width: 18px;
  height: 18px;
  margin: 0;
  color: #000;
}

.product-catalog .yith-wcwl-add-to-wishlist.exists .yith-wcwl-add-button svg {
  fill: currentColor;
}

/* Wishlist page: a toolbar, then one row per saved product */
#yith-wcwl-form {
  display: flex;
  flex-direction: column;
  max-width: 1110px;
  margin: 0 auto;
}

/* An empty list has no toolbar, so drop the bordered strip */
#yith-wcwl-form .yith_wcwl_wishlist_footer:not(:has(.wz-wishlist-toolbar, .yith-wcwl-share)) {
  display: none !important;
}

#yith-wcwl-form .yith_wcwl_wishlist_footer {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid #c7c7c7;
  border-bottom: 1px solid #c7c7c7;
}

.wz-wishlist-toolbar {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.wz-wishlist-count {
  margin: 0 auto 0 0;
  color: #353535;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wz-wishlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wz-wishlist-actions .btn {
  min-width: 170px;
  margin: 0;
}

/* YITH's share block: a quiet row of outline icons. Its URL field stays for copying but
   is hidden, and its email icon duplicates Email this list. */
#yith-wcwl-form .yith-wcwl-share {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
}

#yith-wcwl-form .yith-wcwl-share-title {
  margin: 0;
  color: #717171;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#yith-wcwl-form .yith-wcwl-share ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

#yith-wcwl-form .yith-wcwl-share li.share-button {
  padding: 0;
}

#yith-wcwl-form .yith-wcwl-share li.share-button:has(> a.email) {
  display: none;
}

#yith-wcwl-form .yith-wcwl-share li.share-button a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c7c7c7;
  border-radius: 50%;
  background: transparent !important;
  color: #000;
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out, color 0.15s ease-out;
}

#yith-wcwl-form .yith-wcwl-share li.share-button a:hover,
#yith-wcwl-form .yith-wcwl-share li.share-button a:focus-visible {
  border-color: #000;
  background: #000 !important;
  color: #fff;
}

#yith-wcwl-form .yith-wcwl-share li.share-button svg {
  width: 14px;
  height: 14px;
}

#yith-wcwl-form .yith-wcwl-share li.share-button svg path {
  fill: currentColor;
}

#yith-wcwl-form .yith-wcwl-after-share-section {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The list: YITH's table restyled, so its remove and refresh scripts keep working.
   Every rule starts with the same prefix so YITH's and the theme's table rules lose. */
.woocommerce #yith-wcwl-form table.wishlist_table {
  display: block;
  max-width: none;
  margin: 0 0 64px !important;
  border: 0 !important;
  background: transparent;
}

.woocommerce #yith-wcwl-form table.wishlist_table thead {
  display: none;
}

.woocommerce #yith-wcwl-form table.wishlist_table tbody {
  display: block;
}

.woocommerce #yith-wcwl-form table.wishlist_table tbody tr {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 40px;
  align-items: center;
  justify-items: stretch;
  column-gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid #e1e1e1;
  background: transparent;
}

.woocommerce #yith-wcwl-form table.wishlist_table td {
  display: block;
  justify-self: stretch;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

/* Photo: the catalog's portrait crop */
.woocommerce #yith-wcwl-form table.wishlist_table td.product-thumbnail {
  grid-column: 1;
  grid-row: 1;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-thumbnail a {
  display: block;
  max-width: none;
  overflow: hidden;
  background: #efefef;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-thumbnail img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 255 / 350;
  object-fit: cover;
}

/* Name, details, SKU */
.woocommerce #yith-wcwl-form table.wishlist_table td.product-name {
  grid-column: 2;
  grid-row: 1;
  width: 100%; /* a td shrinks to its text in a grid row without it */
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-name > a {
  color: #000;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-decoration: none;
  text-transform: uppercase;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-name > a:hover,
.woocommerce #yith-wcwl-form table.wishlist_table td.product-name > a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.woocommerce #yith-wcwl-form table.wishlist_table .wz-wishlist-desc {
  margin: 8px 0 0;
}

.wz-wishlist-sku {
  display: block;
  margin-top: 10px;
  color: #717171;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

/* YITH's date column: not needed in the list */
.woocommerce #yith-wcwl-form table.wishlist_table td.product-add-to-cart {
  display: none;
}

/* Heart on the right: filled while saved, outline on hover (the state it goes to) */
.woocommerce #yith-wcwl-form table.wishlist_table td.product-remove {
  grid-column: 3;
  grid-row: 1;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-remove {
  align-self: center;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-remove > div {
  display: block;
  margin: 0;
  padding: 0;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-remove a.remove {
  display: flex;
  align-items: center;
  justify-content: center;
  position: static; /* YITH's phone styles place it absolutely */
  flex: none;
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin: 0;
  border: 1px solid #c7c7c7;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 0;
  text-decoration: none;
  transition: border-color 0.15s ease-out;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-remove a.remove:hover {
  border-color: #000;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-remove a.remove:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-remove a.remove::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.product-remove a.remove:hover::before,
.woocommerce #yith-wcwl-form table.wishlist_table td.product-remove a.remove:focus-visible::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z'/%3E%3C/svg%3E");
}

/* Page links (24 per page) */
.woocommerce #yith-wcwl-form table.wishlist_table tbody tr.pagination-row {
  display: block;
  padding: 40px 0 0;
  border-bottom: 0;
}

.woocommerce #yith-wcwl-form table.wishlist_table tr.pagination-row td {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.woocommerce #yith-wcwl-form .wishlist-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 0.15s ease-out;
}

.woocommerce #yith-wcwl-form .wishlist-pagination a.page-numbers:hover,
.woocommerce #yith-wcwl-form .wishlist-pagination a.page-numbers:focus-visible {
  border-color: #c7c7c7;
}

.woocommerce #yith-wcwl-form .wishlist-pagination .page-numbers.current {
  border-color: #000;
  background: #000;
  color: #fff;
}

/* Empty list */
.woocommerce #yith-wcwl-form table.wishlist_table:has(td.wishlist-empty) {
  margin-bottom: 28px !important;
}

.woocommerce #yith-wcwl-form table.wishlist_table tbody tr:has(td.wishlist-empty) {
  display: block;
  padding: 0;
  border-bottom: 0;
}

.woocommerce #yith-wcwl-form table.wishlist_table td.wishlist-empty {
  margin: 0;
  padding: 72px 16px 0;
  color: #353535;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
}

.wz-wishlist-browse {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 0 0 72px;
}

.wz-wishlist-browse a {
  color: #000;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.125em;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-transform: uppercase;
}

/* YITH's "Product added" notice: a small black bar at the bottom instead of a centered box
   (its script sets a negative left margin inline, hence the !important) */
#yith-wcwl-popup-message {
  top: auto;
  bottom: 24px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-left: 0 !important;
  padding: 0;
  transform: translateX(-50%);
  background: #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

#yith-wcwl-popup-message #yith-wcwl-message {
  padding: 14px 22px;
}

@media (max-width: 767.98px) {
  .wz-wishlist-count {
    flex-basis: 100%;
  }

  .wz-wishlist-actions {
    flex: 1 1 100%;
  }

  .wz-wishlist-actions .btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .woocommerce #yith-wcwl-form table.wishlist_table tbody tr {
    grid-template-columns: 72px minmax(0, 1fr) 36px;
    column-gap: 16px;
    padding: 18px 0;
  }

  .woocommerce #yith-wcwl-form table.wishlist_table td.product-name > a {
    font-size: 12px;
  }

  .woocommerce #yith-wcwl-form table.wishlist_table td.product-remove a.remove {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }
}
