/* =========================
   MODAL BASE
========================= */
.acr-editor-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* =========================
   MODAL CONTENT
========================= */
.acr-editor-content {
  background: #ffffff;
  width: 96vw;
  max-width: 1280px;
  min-height: 92vh;
  padding: 32px 36px;
  border-radius: 16px;
  position: relative;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.acr-editor-content h2 {
  margin-top: 12px;
  padding-right: 60px; /* space for close button */
}

.cycle-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease-in-out;
}


/* =========================
   CLOSE BUTTON
========================= */
.acr-close-editor {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f1f1f1;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
}

.acr-close-editor:hover {
  background: #e5e5e5;
}

@media (max-width: 600px) {
  .acr-editor-content h2 {
    margin-top: 36px;
    font-size: 20px;
  }

  .acr-close-editor {
    top: 10px;
    right: 12px;
  }
}

/* =========================
   CANVAS WRAPPER
========================= */
.acr-editor-canvas-wrap {
  margin: 20px auto;
  padding: 10px;
  background: #fafafa;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
.acr-editor-canvas-wrap .canvas-container {
  margin: 0 auto !important;
}

@media(max-width: 768px){
 .acr-editor-canvas-wrap .canvas-container {
  margin: 0 auto !important;
  height: 270px !important;
}
}
#acr-editorCanvas {
  border: none;
  background: transparent;
  display: block;
}

@media (max-width: 600px) {
  #acr-editorCanvas {
    max-height: 60vh;
  }
}

/* =========================
   CLICK TO UPLOAD OVERLAY
========================= */
.acr-editor-canvas-wrap::after {
  content: "Click to upload photo";
  position: absolute;
  inset: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  background: rgba(255,255,255,0.85);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

/* Show overlay ONLY before image upload */
.acr-editor-canvas-wrap:not(.acr-has-image):hover::after {
  opacity: 1;
}

/* Hide overlay after image upload */
.acr-editor-canvas-wrap.acr-has-image::after {
  display: none;
}

/* =========================
   EDITOR TOOLS
========================= */
.acr-editor-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.acr-editor-tools button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.acr-editor-tools button:hover {
  background: #f3f4f6;
}

.acr-editor-tools button:active,
.acr-primary-btn:active {
  transform: scale(0.97);
}

@media (max-width: 768px) {
  #acr-text-panel {
    left: 47px;
    top: 390px !important;
    width: auto;
    top: auto;
    bottom: 80px;
    height: 222px;
  }
}

/* =========================
   REDUCE BOTH PRIMARY BUTTONS
========================= */

/* Editor Save Button */
#acr-editorModal .acr-primary-btn {
  width: 220px;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 8px;
  align-self: center;
}

/* Buy Now Button */
#acr-sizeModal .acr-buy-btn {
  width: 240px;            /* remove full width */
  padding: 10px 22px;
  font-size: 14px;
  border-radius: 8px;
  margin: 25px auto 0;
  display: block;          /* center it */
}
/* =========================
   PRIMARY BUTTON
========================= */
.acr-primary-btn {
  margin-top: 20px;
  padding: 12px 26px;
  background: #d60000;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.acr-primary-btn:hover {
  background: #b50000;
}

/* =========================
   EDITOR ERROR
========================= */
.acr-editor-error {
  margin-top: 10px;
  color: #d60000;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

/* =========================
   SIZE & THICKNESS BUTTONS
========================= */
.acr-sizes,
.acr-thickness {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.acr-sizes button,
.acr-thickness button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}

.acr-sizes button:hover,
.acr-thickness button:hover {
  border-color: #d60000;
  color: #d60000;
}

.acr-sizes button.acr-active,
.acr-thickness button.acr-active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* =========================
   WALL PREVIEW MOCKUP
========================= */
.acr-wall-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.acr-wall-mockup {
  position: relative;
  width: 600px;
  height: 420px;
  margin: 0 auto 30px;
  background-image: url('https://crialicgifts.com/wp-content/uploads/2026/02/wall-08.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Frame */
.acr-wall-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.acr-wall-frame img {
  display: block;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transform-origin: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: transform 0.25s ease;
}

/* =========================
   DIMENSIONS
========================= */
.acr-dimension {
  position: absolute;
  font-size: 13px;
  color: #000;
  font-weight: 500;
  background: rgba(255,255,255,0.8);
  padding: 4px 8px;
  border-radius: 6px;
}

.acr-dimension-width {
  left: 10px;
  top: 50%;
  transform: rotate(-90deg) translateX(-50%);
  transform-origin: left;
}

.acr-dimension-height {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}
/* =========================
   FRAME GRID PAGE
========================= */
.acr-frame-page {
  padding: 20px 0;
}

.acr-frame-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.acr-frame-filters button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
}

.acr-frame-filters button.acr-active,
.acr-frame-filters button:hover {
  background: #d60000;
  color: #ffffff;
  border-color: #d60000;
}

.acr-frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.acr-frame-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.acr-frame-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.14);
}

.acr-frame-thumb {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f6f6;
  border-radius: 12px;
  overflow: hidden;
}

/* Background slideshow image */
.acr-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease-in-out;
  z-index: 1;
  margin-top: 16px;
}

/* Frame overlay always on top */
.acr-frame-overlay {
  position: relative;
  z-index: -2;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  pointer-events: none;
}

.acr-frame-base {
  position: relative;
  z-index: 2;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.25);
}

.acr-frame-slideshow {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.acr-frame-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: acrFade 9s infinite;
  transform: scale(1.05);
}

.acr-frame-slideshow img:nth-child(1) { animation-delay: 0s; }
.acr-frame-slideshow img:nth-child(2) { animation-delay: 3s; }
.acr-frame-slideshow img:nth-child(3) { animation-delay: 6s; }

@keyframes acrFade {
  0%   { opacity: 0; }
  10%  { opacity: 0.35; }
  30%  { opacity: 0.35; }
  40%  { opacity: 0; }
  100% { opacity: 0; }
}

.acr-frame-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.35),
    rgba(255,255,255,0.05) 40%,
    rgba(0,0,0,0.05)
  );
  pointer-events: none;
}

@media (max-width: 600px) {
  .acr-frame-slideshow img {
    animation-duration: 12s;
  }
}

.acr-frame-thumb img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  border-radius: 6px;
}

.acr-frame-card img {
  width: 100%;
  border-radius: 10px;
}

.acr-frame-body {
  text-align: center;
  padding-top: 16px;
}

.acr-frame-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 44px;
  margin-bottom: 14px;
}


.acr-customise-btn {
  background: #d60000;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s ease, transform 0.15s ease;
}

.acr-customise-btn:hover {
  background: #b50000;
}

.acr-customise-btn:active {
  transform: scale(0.97);
}

@media (max-width: 600px) {
  .acr-frame-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .acr-frame-thumb {
    height: 200px;
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 600px) {

  .acr-editor-content {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    padding: 20px;
  }

  .acr-editor-tools button {
    font-size: 13px;
    padding: 6px 10px;
  }

  .acr-wall-mockup {
    width: 100%;
    height: 300px;
  }
}

@media (max-width: 600px) {

  .acr-wall-mockup {
    max-width: 90vw;
    aspect-ratio: 3 / 4; /* portrait-friendly */
  }

  .acr-wall-frame img {
    max-width: 70%;
    max-height: 70%;
    margin-left: 25px;
    margin-top: -30px;
  }

  .acr-editor-content {
    padding: 16px;
  }

}

/* =========================
   SIZE MODAL LAYOUT (OMGS STYLE)
========================= */
.acr-editor-size-layout {
  max-width: 1380px;
}

.acr-size-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  margin-top: 20px;
}

/* LEFT PREVIEW */
.acr-size-preview {
  display: flex;
  justify-content: center;
  width:100%;
}

.acr-wall-mockup {
  position: relative;
  width: 100%;
  max-width: 575px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


.acr-wall-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.acr-wall-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* DIMENSIONS */
.acr-dimension {
  position: absolute;
  font-size: 13px;
  font-weight: 600;
  color: #000;
}

.acr-dimension-thickness {
  right: -15px;
  top: 30%;
}

@media (max-width: 768px) {

  .acr-size-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .acr-size-preview {
    justify-content: center;
  }

}

/* RIGHT PANEL */
.acr-size-options {
  text-align: left;
}

.acr-price-wrap {
  margin-bottom: 24px;
}

.acr-price-current {
  font-size: 34px;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.5px;
}

.acr-price-old {
  font-size: 16px;
  color: #9b9b9b;
  margin-top: 6px;
  text-decoration: line-through;
}

.acr-buy-btn {
  width: 100%;
  margin-top: 30px;
}

/* ACTIVE BUTTON */
.acr-sizes button.acr-active,
.acr-thickness button.acr-active {
  background: #000;
  color: #fff;
  border-color: #000;
}

@media(max-width: 786px){.acr-notext{display: none;}}