:root {
  --swiper-navigation-color: #000;
  --swiper-pagination-color: #000;
}

html.apto-frame-scroll-stabilizing,
html.apto-frame-scroll-stabilizing body,
html.apto-frame-scroll-stabilizing .woo-single-gallery,
html.apto-frame-scroll-stabilizing .summary,
html.apto-frame-scroll-stabilizing .variations_form,
html.apto-frame-scroll-stabilizing .isw-swatches {
  overflow-anchor: none;
  scroll-behavior: auto;
}

.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;
  color: #fff;
}

.category-buttons-swiper .w-form-group-tabs-button:hover {
  border-color: #cfd4dc;
}

.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;
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.category-buttons-swiper .swiper-wrapper {
  height: 120px;
  align-items: stretch;
}

.category-buttons-swiper .swiper-slide {
  box-sizing: border-box;
  width: auto !important;
}

.category-buttons-swiper .w-form-group-tabs-button {
  box-sizing: content-box;
}

.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 {
  left: 10px;
  right: auto;
}

.category-buttons-swiper .swiper-button-next {
  left: auto;
  right: 10px;
}

.category-buttons-swiper .swiper-button-next,
.category-buttons-swiper .swiper-button-prev {
  top: 50%;
  width: 27px;
  height: 44px;
  margin-top: -22px;
  transform: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000;
  box-shadow: none;
  z-index: 8;
}

.category-buttons-swiper .swiper-button-next::after,
.category-buttons-swiper .swiper-button-prev::after {
  font-size: 22px;
  font-weight: 400;
}

.category-buttons-swiper .swiper-button-disabled {
  opacity: 0.4;
}

.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: 80px;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* 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 {
  display: block;
  top: 82px;
  bottom: 10px;
  height: 28px;
  line-height: 28px;
  text-align: center;
}

.category-buttons-swiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0 5px;
  background: #cfcfcf;
  opacity: 1;
}

.category-buttons-swiper .swiper-pagination-bullet-active {
  background: #111;
}

.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 {
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate3d(-50%, -50%, 0);
  transform-origin: center center;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
  filter:
    drop-shadow(24px 30px 26px rgba(0, 0, 0, 0.16))
    drop-shadow(0 24px 18px rgba(0, 0, 0, 0.12));
}

.apto-edge-wrap .frame-container {
  --border-height: 10px;
  --frame-width: 50px;
  --frame-height: 30px;
  --frame-seam-overlap: 0.75px;
  --frame-reveal-offset: min(8px, var(--border-height));

  position: relative;
  width: var(--frame-width);
  height: var(--frame-height);
  max-width: 100%;
  max-height: 100%;
  isolation: isolate;
}

.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;
  background-position: center;
  image-rendering: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.apto-edge-wrap .frame-container .frame-top {
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--border-height) + var(--frame-seam-overlap));
  z-index: 3;
  clip-path: polygon(
    0% 0%,
    100% 0%,
    calc(100% - var(--border-height) + var(--frame-seam-overlap)) 100%,
    calc(var(--border-height) - var(--frame-seam-overlap)) 100%
  );
}

.apto-edge-wrap .frame-container .frame-bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(var(--border-height) + var(--frame-seam-overlap));
  z-index: 3;
  clip-path: polygon(
    calc(var(--border-height) - var(--frame-seam-overlap)) 0%,
    calc(100% - var(--border-height) + var(--frame-seam-overlap)) 0%,
    100% 100%,
    0% 100%
  );
}

.apto-edge-wrap .frame-container .frame-left {
  top: 0;
  left: 0;
  width: calc(var(--border-height) + var(--frame-seam-overlap));
  height: 100%;
  z-index: 2;
  clip-path: polygon(
    100% calc(var(--border-height) - var(--frame-seam-overlap)),
    100% calc(100% - var(--border-height) + var(--frame-seam-overlap)),
    0% 100%,
    0% 0%
  );
}

.apto-edge-wrap .frame-container .frame-right {
  top: 0;
  right: 0;
  width: calc(var(--border-height) + var(--frame-seam-overlap));
  height: 100%;
  z-index: 2;
  clip-path: polygon(
    0% calc(var(--border-height) - var(--frame-seam-overlap)),
    100% 0%,
    100% 100%,
    0% calc(100% - var(--border-height) + var(--frame-seam-overlap))
  );
}

.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);
  z-index: 4;
  overflow: hidden;
}

.apto-edge-wrap .frame-container .content-area img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}

.apto-edge-wrap--revealing .frame-container {
  animation: apto-frame-reveal-outward 520ms cubic-bezier(0.18, 0.82, 0.22, 1) both;
  will-change: clip-path;
}

.frame-container.apto-canvas-set-frame.apto-frame-grow {
  animation: apto-frame-reveal-outward 520ms cubic-bezier(0.18, 0.82, 0.22, 1) both;
  will-change: clip-path;
}

.apto-edge-wrap--resizing .frame-container,
.frame-container.apto-edge-wrap--resizing {
  will-change: width, height;
}

@keyframes apto-frame-reveal-outward {
  from {
    clip-path: inset(var(--border-height));
  }
  to {
    clip-path: inset(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .apto-edge-wrap--revealing .frame-container,
  .frame-container.apto-canvas-set-frame.apto-frame-grow,
  .apto-edge-wrap--resizing .frame-container,
  .frame-container.apto-edge-wrap--resizing {
    animation: none;
    will-change: auto;
  }
}

.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 {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate3d(-50%, -50%, 0) !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: hidden !important;
  transform-origin: center center;
}

/* Main contact shadow: bottom-heavy */
.apto-edge-wrap .frame-container::before {
  content: "";
  display: none;
  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: "";
  display: none;
  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;
}

/* V2 Canvas Frame sets use real frame dimensions; legacy sets keep set-frames.css geometry. */
.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame {
  --frame-seam-overlap: 0.75px;

  width: var(--frame-width) !important;
  height: var(--frame-height) !important;
  aspect-ratio: auto;
  overflow: hidden;
  isolation: isolate;
}

.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .frame-top,
.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .frame-bottom,
.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .frame-left,
.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .frame-right {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .frame-top {
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--border-height) + var(--frame-seam-overlap)) !important;
  transform: translateZ(0);
  clip-path: polygon(
    0% 0%,
    100% 0%,
    calc(100% - var(--border-height) + var(--frame-seam-overlap)) 100%,
    calc(var(--border-height) - var(--frame-seam-overlap)) 100%
  );
}

.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .frame-bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(var(--border-height) + var(--frame-seam-overlap)) !important;
  transform: translateZ(0);
  clip-path: polygon(
    calc(var(--border-height) - var(--frame-seam-overlap)) 0%,
    calc(100% - var(--border-height) + var(--frame-seam-overlap)) 0%,
    100% 100%,
    0% 100%
  );
}

.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .frame-left {
  top: 0;
  left: 0;
  width: calc(var(--border-height) + var(--frame-seam-overlap));
  height: 100% !important;
  transform: translateZ(0);
  clip-path: polygon(
    100% calc(var(--border-height) - var(--frame-seam-overlap)),
    100% calc(100% - var(--border-height) + var(--frame-seam-overlap)),
    0% 100%,
    0% 0%
  );
}

.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .frame-right {
  top: 0;
  right: 0;
  width: calc(var(--border-height) + var(--frame-seam-overlap));
  height: 100% !important;
  transform: translateZ(0);
  clip-path: polygon(
    0% calc(var(--border-height) - var(--frame-seam-overlap)),
    100% 0%,
    100% 100%,
    0% calc(100% - var(--border-height) + var(--frame-seam-overlap))
  );
}

.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .content-area {
  top: var(--border-height);
  right: var(--border-height);
  bottom: var(--border-height);
  left: var(--border-height);
  width: auto !important;
  height: auto !important;
  transform: none;
  overflow: hidden;
}

.woo-single-gallery .set-canvases .frame-container.apto-canvas-set-frame .content-area img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}

@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;
  }

  .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;
  }
}
