:root {
  --swiper-navigation-color: #000;
  --swiper-pagination-color: #000;
}

.apto-helper-line {
  position: absolute;
  background-color: red;
  width: 100%;
  height: 1px;
  top: -33%;
  transform: translateY(-50%);
}

.apto-show-more {
  display: flex;
  justify-content: center;
  text-align: center;
  margin-top: 10px;
  cursor: pointer;
  position: relative;
  transition: rotate 0.2s ease-in-out;
}

.apto-show-more .img-span {
  position: relative;
}

.apto-show-more img {
  width: 32px;
  height: 32px;
  animation: bounce-down 2s infinite ease-in-out;
}

.apto-show-more .apto-show-more-tooltip {
  background-color: black;
  color: #fff;
  text-align: center;
  padding: 5px;
  border-radius: 5px;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
}

.apto-show-more:not(.apto-expanded) .img-span:hover .apto-show-more-tooltip {
  visibility: visible;
  opacity: 1;
}

.apto-rotated {
  transform: rotate(180deg);
}

@keyframes bounce-down {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  70% {
    transform: translateY(15px);
    /* Move the arrow down further */
    opacity: 0.7;
  }

  100% {
    transform: translateY(0);
    /* Return to the starting position */
    opacity: 1;
  }
}

@keyframes bounce-up {
  0% {
    transform: rotate(180deg) translateY(0);
    /* Start position */
    opacity: 0.7;
    /* Full opacity */
  }

  50% {
    transform: rotate(180deg) translateY(-10px);
    /* Move the arrow up by 10px */
    opacity: 1;
    /* Optional: reduce opacity as it moves up */
  }

  100% {
    transform: rotate(180deg) translateY(0);
    /* Reset to the original position */
    opacity: 0.7;
    /* Full opacity again */
  }
}

.w-image-corner-container {
  position: relative;
  display: inline-block;
}

.w-image-corner-container img {
  border-radius: 8px;
}

.w-image-frame-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.apto-out-of-stock {
  /* pointer-events: none; */
  opacity: 0.65;
  cursor: not-allowed;
  transition: all 0.5s ease-in-out;
  filter: grayscale(1);
}

.apto-out-of-stock::before {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 200;
  cursor: not-allowed;
  /* Rising diagonal line */
  background: linear-gradient(
    to right bottom,
    transparent,
    transparent 49.5%,
    rgb(73, 73, 73) 50%,
    rgb(73, 73, 73) 50.5%,
    transparent 51%,
    transparent
  ) !important;
  /* Falling diagonal line */
  background: linear-gradient(
    to right top,
    transparent,
    transparent 49.5%,
    rgb(73, 73, 73) 50%,
    rgb(73, 73, 73) 50.5%,
    transparent 51%,
    transparent
  ) !important;
}

.apto-frame-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.w-form-group-tabs {
  display: flex;
  flex-wrap: wrap;
}

.w-form-group-tabs-content {
  order: 1;
  width: 100%;
  display: none;
}

.w-form-group-buttons-container {
  align-self: baseline;
  padding-left: 8px;
  display: flex;
  gap: 4px;
  width: 100%;
  flex-wrap: wrap;
}

.w-form-group-tabs-button {
  color: #000;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 0.5em 1em;
  box-shadow: none;
  background: #fff;
  transition: all 0.3s ease-in-out;
  font-size: 18px;
  display: inline-block;
  min-width: 120px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
}

.category-buttons-swiper .w-form-group-tabs-button.active {
  background: #000;
}

.category-buttons-swiper .w-form-group-tabs-button:hover {
  border-color: #000;
}

.category-buttons-swiper .w-form-group-tabs-button.active {
  color: #fff;
  /* font-weight: 600; */
  background: #000;
  box-shadow: none;
  /* flex-grow: 15; */
}

.w-button {
  background: #fff;
  transition: all 0.3s ease-in-out;
  transform: translateX(0%);
  transition: transform 1s ease-in-out;
}

.w-button .w-label {
  width: 100%;
  height: 100%;
}

#variationFrames .w-form-group-tabs-label {
  width: 4em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  padding: 4px 12px;
  font-size: 14px;
}

#variationFrames .w-form-group-buttons-container button {
  padding: 0 4px;
  font-size: 14px;
}

#variationFrames .w-form-group-tabs-content-inner {
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 6px;
}

#variationFrames .w-button label {
  border: 2px solid transparent;
}

#variationFrames .w-button input[type="radio"]:checked + label {
  border: 2px solid rgb(237, 17, 101);
}

#variationFrames .w-button:hover .w-label {
  border: 2px solid rgb(237, 17, 101, 0.2);
}

.w-image {
  margin-top: 0.5em;
}

.swiper {
  width: 100%;
  height: 100%;
}

.category-buttons-swiper .swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.category-buttons-swiper .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  /* object-fit: cover; */
}

.category-buttons-swiper {
  position: relative;
  height: 120px;
}

.category-buttons-swiper .swiper-slide {
  width: auto;
}

.category-buttons-swiper--guide .swiper-slide {
  width: auto;
}

.category-buttons-swiper--guide .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.category-buttons-swiper--guide .swiper-slide .w-form-group-tabs-button {
  text-align: center;
}

.w-form-group-tabs-button:not(.active) .open-category-popup {
  display: none;
}

.category-buttons-swiper .swiper-button-prev {
  right: 0;
}

.category-buttons-swiper {
  width: 100%;
}

.w-image-frame-overlay {
  z-index: 1;
}

.variation-hide {
  display: none;
}

.category-hide {
  display: none;
}

.category-buttons-swiper::before,
.category-buttons-swiper::after {
  content: "";
  position: absolute;
  top: 0;
  width: 5em;
  /* Width of the fade area */
  height: 100%;
  z-index: 5;
  /* Should be below the arrows */
  pointer-events: none;
  /* Ensure they don't interfere with interactions */
}

/* Left side fade effect */
.category-buttons-swiper::before {
  left: -10px;
  background: linear-gradient(to right, #fff 0%, #fff 35%, transparent 100%);
}

/* Right side fade effect */
.category-buttons-swiper::after {
  right: -10px;
  background: linear-gradient(to left, #fff 0%, #fff 35%, transparent 100%);
}

#variationFrames .w-form-group {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  grid-auto-flow: dense;
  gap: 0;
}

#variationFrames .w-form-group label {
  font-size: 12px;
}

.category-buttons-swiper--guide {
  width: 225px;
}

.category-buttons-swiper--guide .w-form-group-tabs-button {
  border: none;
  font-size: 14px;
  font-weight: 600;
}

.category-buttons-swiper--guide button {
  border: none;
  background: none;
}

.category-buttons-swiper--guide .swiper-button-next::after,
.category-buttons-swiper--guide .swiper-button-prev::after {
  font-size: 22px;
}

.category-buttons-swiper .swiper-pagination {
  text-align: center;
  bottom: 10px;
  width: 100%;
}

.category-buttons-swiper .swiper-pagination-bullet {
  margin: 0 4px;
}

.apto-pick-frame-label {
  margin-top: 2rem;
  display: block !important;
  margin-top: 1rem;
}

.w-label {
  display: flex;
  flex-direction: column;
}

.w-label-frame-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#variationFrames .w-button {
  width: 64px;
  height: fit-content;
}

.open-category-popup::after {
  font-size: 24px;
  position: absolute;
  padding-left: 10px;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  content: "\f05a";
  font-family: "Font Awesome 5 Pro";
  font-weight: 600;
  color: #fff;
}

.modal-fcc-image-container-outer {
  padding: 0 2rem;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  justify-items: center;
}

.modal-fcc-content {
  width: 90% !important;
  max-width: 600px !important;
  display: grid;
  grid-template-rows: auto;
  gap: 15px;
  position: relative;
}

.modal-fcc-wrap {
  height: 100%;
}

.modal-fcc-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  align-items: center;
  gap: 2rem;
  padding: 0 !important;
}

.modal-fcc-title {
  font-size: 32px;
  padding: 2rem;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.05);
  text-align: center;
  border-bottom: 1px solid #e5e5e5;
}

.modal-fcc-description {
  font-size: 15px;
  padding: 2rem;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.05);
  text-align: left;
  border-top: 1px solid #e5e5e5;
}

.modal-fcc-image-container {
  position: relative;
  width: 100%;
}

.modal-fcc-image-container img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.modal-fcc-wrap {
  max-height: 75vh !important;
}

.modal-fcc-image,
.modal-fcc-image-corner,
.modal-fcc-image-dimension {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Edge-wrap frame renderer for regular products */
.apto-edge-wrap {
  --apto-frame-preview-scale: 0.94;

  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate3d(-50%, -50%, 0) scale(var(--apto-frame-preview-scale));
  transform-origin: center center;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}

.apto-edge-wrap .frame-container {
  --border-height: 10px;
  --frame-width: 50px;
  --frame-height: 30px;

  position: relative;
  width: var(--frame-width);
  height: var(--frame-height);
  max-width: 100%;
  max-height: 100%;
}

.apto-edge-wrap .frame-container .frame-top,
.apto-edge-wrap .frame-container .frame-bottom,
.apto-edge-wrap .frame-container .frame-left,
.apto-edge-wrap .frame-container .frame-right {
  position: absolute;
  background-repeat: no-repeat;
  background-size: cover;
}

.apto-edge-wrap .frame-container .frame-top {
  top: 0;
  left: 0;
  width: 100%;
  height: var(--border-height);
  clip-path: polygon(
    0% 0%,
    100% 0%,
    calc(100% - var(--border-height)) 100%,
    var(--border-height) 100%
  );
}

.apto-edge-wrap .frame-container .frame-bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--border-height);
  clip-path: polygon(
    var(--border-height) 0%,
    calc(100% - var(--border-height)) 0%,
    100% 100%,
    0% 100%
  );
}

.apto-edge-wrap .frame-container .frame-left {
  top: 0;
  left: 0;
  width: var(--border-height);
  height: 100%;
  clip-path: polygon(
    100% var(--border-height),
    100% calc(100% - var(--border-height)),
    0% 100%,
    0% 0%
  );
}

.apto-edge-wrap .frame-container .frame-right {
  top: 0;
  right: 0;
  width: var(--border-height);
  height: 100%;
  clip-path: polygon(
    0% var(--border-height),
    100% 0%,
    100% 100%,
    0% calc(100% - var(--border-height))
  );
}

.apto-edge-wrap .frame-container .frame-top::after,
.apto-edge-wrap .frame-container .frame-bottom::after,
.apto-edge-wrap .frame-container .frame-left::after,
.apto-edge-wrap .frame-container .frame-right::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.apto-edge-wrap .frame-container .frame-top::after {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.22),
    transparent 60%
  );
}

.apto-edge-wrap .frame-container .frame-bottom::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.18), transparent 60%);
}

.apto-edge-wrap .frame-container .frame-left::after {
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.18),
    transparent 60%
  );
}

.apto-edge-wrap .frame-container .frame-right::after {
  background: linear-gradient(to left, rgba(0, 0, 0, 0.14), transparent 60%);
}

.apto-edge-wrap .frame-container .content-area {
  position: absolute;
  top: var(--border-height);
  left: var(--border-height);
  right: var(--border-height);
  bottom: var(--border-height);
}

.apto-edge-wrap .frame-container .content-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.modal-fcc-image {
  z-index: 2;
}

.modal-fcc-image-corner {
  z-index: 1;
}

.isw-term.apto-most-popular::before {
  content: "Πιο Δημοφιλές";
  position: absolute;
  left: 50%;
  top: -5%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 500;
  background-color: #ff0066;
  color: #fff;
  white-space: nowrap;
  line-height: normal;
  padding: 4px;
}

.isw-term.apto-most-popular {
  overflow: visible !important;
}

.summary .variations .isw-swatch {
  row-gap: 6px;
}

/* =========================================================
   APTO framed product image: centering, scaling and shadow
   ========================================================= */

/* Make the active gallery slide the positioning reference for the frame */
.swiper:has(.apto-edge-wrap) > .swiper-wrapper > .swiper-slide,
.swiper-slide:has(.apto-edge-wrap),
.woocommerce-product-gallery__image:has(.apto-edge-wrap) {
  position: relative !important;
}

/* Let only the main Swiper that contains the custom frame show overflow.
   This avoids breaking the thumbnail slider. */
.swiper:has(.apto-edge-wrap) {
  overflow: visible !important;
}

/* Because overflow is visible, hide inactive side slides manually */
.swiper:has(.apto-edge-wrap)
  > .swiper-wrapper
  > .swiper-slide:not(.swiper-slide-active) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Keep the custom frame centered in the displayed gallery image */
.apto-edge-wrap {
  --apto-frame-preview-scale: 0.88;

  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate3d(-50%, -50%, 0) scale(var(--apto-frame-preview-scale)) !important;
  transform-origin: center center !important;

  z-index: 2;
  overflow: visible !important;
  pointer-events: none;
}

.apto-edge-wrap .frame-container {
  box-shadow: none !important;
  overflow: visible !important;
  transform-origin: center center;
}

/* Main contact shadow: bottom-heavy */
.apto-edge-wrap .frame-container::before {
  content: "";
  position: absolute;
  left: 8%;
  right: -2%;
  bottom: -30px;
  height: 66px;
  z-index: -1;
  pointer-events: none;

  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.36) 0%,
    rgba(0, 0, 0, 0.24) 36%,
    rgba(0, 0, 0, 0.1) 68%,
    transparent 100%
  );

  filter: blur(18px);
  transform: scaleY(0.52);
  opacity: 0.9;
}

/* Cast shadow: stronger to bottom-right */
.apto-edge-wrap .frame-container::after {
  content: "";
  position: absolute;
  top: 18px;
  right: -34px;
  bottom: -34px;
  left: 22px;
  z-index: -2;
  pointer-events: none;

  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(0, 0, 0, 0.06) 32%,
    rgba(0, 0, 0, 0.18) 72%,
    rgba(0, 0, 0, 0.24) 100%
  );

  filter: blur(26px);
  opacity: 0.72;
}

@media screen and (max-width: 768px) {
  .form-wrapper .w-form-group {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .category-buttons-swiper .w-form-group-tabs-button {
    font-size: 13px;
    padding: 0.5em 0.4em;
  }

  .category-buttons-swiper {
    height: 120px;
  }

  .modal-fcc-image-container-outer {
    max-width: 75%;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .modal-fcc-image-container-outer img {
    max-width: 250px;
  }

  .modal-fcc-title {
    font-size: 24px;
  }

  .isw-term.apto-most-popular::before {
    font-size: 11px;
  }
}

/* =========================================================
   Dev sidebar — edge-wrap live controls (admin only)
   ========================================================= */

.apto-dev-sidebar {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 2147483647;
  display: flex;
  align-items: flex-start;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apto-dev-sidebar__toggle {
  width: 36px;
  height: 72px;
  border: none;
  border-radius: 0 8px 8px 0;
  background: rgba(15, 15, 20, 0.88);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s, color 0.2s, border-radius 0.3s;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.25);
}

.apto-dev-sidebar__toggle:hover {
  background: rgba(25, 25, 35, 0.92);
  color: #fff;
}

.apto-dev-sidebar__toggle svg,
.apto-dev-sidebar__close svg {
  pointer-events: none;
}

.apto-dev-sidebar__icon {
  width: 18px;
  height: 18px;
  transition: opacity 0.25s;
}

.apto-dev-sidebar__content {
  width: 0;
  overflow: hidden;
  background: rgba(15, 15, 20, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 0 12px 12px 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
  padding: 0;
  color: #e0e0e0;
}

.apto-dev-sidebar--open .apto-dev-sidebar__content {
  width: 240px;
  padding: 18px 16px 14px;
}

.apto-dev-sidebar--open .apto-dev-sidebar__toggle {
  border-radius: 0 8px 8px 0;
}

.apto-dev-sidebar--open .apto-dev-sidebar__icon {
  opacity: 0.4;
}

.apto-dev-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.apto-dev-sidebar__close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.apto-dev-sidebar__close:hover {
  color: #fff;
}

.apto-dev-sidebar__control {
  margin-bottom: 14px;
  white-space: nowrap;
}

.apto-dev-sidebar__label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}

.apto-dev-sidebar__value {
  font-variant-numeric: tabular-nums;
  color: #fff;
  font-weight: 600;
  min-width: 28px;
  text-align: right;
}

.apto-dev-sidebar input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
}

.apto-dev-sidebar input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s;
}

.apto-dev-sidebar input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.apto-dev-sidebar input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.apto-dev-sidebar__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  white-space: nowrap;
}

.apto-dev-sidebar__save,
.apto-dev-sidebar__reset,
.apto-dev-sidebar__reload {
  width: 100%;
  padding: 7px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.apto-dev-sidebar__save:hover,
.apto-dev-sidebar__reset:hover,
.apto-dev-sidebar__reload:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.apto-dev-sidebar__save {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.apto-dev-sidebar__save:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
}

@media screen and (max-width: 768px) {
  .apto-dev-sidebar--open .apto-dev-sidebar__content {
    width: 200px;
    padding: 14px 12px 10px;
  }

  .apto-dev-sidebar__toggle {
    width: 30px;
    height: 56px;
  }

  .apto-dev-sidebar__icon {
    width: 15px;
    height: 15px;
  }
}
