@import url(general.css);

* {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--background-color);
}

main {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-top: 10px;
  gap: 20px;
}

.about {
  width: 40%;
  min-width: 300px;
  /* max-width: 500px; */
  padding: 0 20px;
  overflow-y: auto;
  height: 100vh;
}

.pic {
  max-width: 600px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.name h2 {
  margin-bottom: 18px;
}

.price h3 {
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 18px;
}

.price s {
  color: #000000b5;
}

.price span {
  color: green;
}

.color span,
.size span {
  color: #000000b5;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

.real-color {
  display: inline-block;
  margin-left: 5px;
  color: #000;
}

.available-size {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.available-size button {
  width: 60px;
  height: 38px;
  border-radius: 20px;
  border: 1px solid var(--main-text-color);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 14px;
  background-color: var(--background-color);
  transition: background-color 0.3s, transform 0.2s;
  cursor: pointer;
}

.available-size button:hover,
.available-size button:focus {
  background-color: var(--third-color);
  color: var(--background-color);
  transform: scale(1.05);
  outline: none;
  border: none;
}

.the-main-btns {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.share,
.add-to-cart,
.whatsapp,
.phone {
  width: 200px;
  height: 40px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 15px;
  border: 2px solid #333;
  transition: all 0.3s;
  cursor: pointer;
  flex-grow: 1;
  flex-shrink: 1;
}

.share,
.phone {
  background-color: #000;
  color: var(--background-color);
}

.share:hover,
.share:focus,
.phone:hover,
.add-to-cart:hover,
.add-to-cart:focus,
.whatsapp:hover {
  background-color: var(--third-color);
  color: var(--background-color);
  outline: none;
  border: none;
}

.add-to-cart,
.whatsapp {
  background-color: var(--background-color);
  color: #000;
}

.phone,
.whatsapp {
  text-decoration: none;
  text-align: center;
  align-content: center;
  white-space: nowrap;
  padding: 0 10px;
}

.description span {
  text-transform: capitalize;
  font-size: 17px;
  line-height: 40px;
  display: block;
}

.description p {
  color: #00000063;
  font-size: 15px;
}

/* Swiper Styles */
.mySwiper2 {
  width: 100%;
  max-width: 510px;
  height: 75vh;
  border-radius: 5px;
}

.mySwiper2 img,
.mySwiper2 video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.mySwiper {
  width: 100%;
  max-width: 510px;
  height: 120px;
  padding: 10px 0;
}

.swiper-wrapper {
  height: 90vh;
}

.swiper-slide-active {
  cursor: pointer;
}

.mySwiper .swiper-slide {
  width: 25%;
  height: 16%;
  opacity: 0.4;
  cursor: pointer;
}

.mySwiper .swiper-slide-thumb-active {
  opacity: 1;
}

.mySwiper img,
.mySwiper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--background-color);
}

.color span {
  color: #000000b5;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

.color-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-button {
  width: 40px;
  height: 40px;
  border-radius: 100%;
  cursor: pointer;
  position: relative;
  /* Needed for pseudo-element positioning */
  border: none;
  /* Remove default border */
  transition: transform 0.2s;
  /* For scale effect on hover/active */
  margin: 0 5px;
}

.color-button::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -4px;
  width: 44px;
  /* Slightly larger to account for border */
  height: 44px;
  border: 2px solid #3333339e;
  border-radius: 50%;
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0 50%);
  /* Top half */
  transition: transform 0.3s ease;
  /* Smooth rotation */
}

.color-button:hover::before,
.color-button:focus::before,
.color-button.active::before {
  transform: rotate(180deg);
  /* Rotate to bottom half */
  border-color: #000;
  /* Darker border on hover/active */
}

.color-button:hover,
.color-button:focus,
.color-button.active {
  transform: scale(1.2);
  outline: none;
}

.store {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store_image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 100%;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9) !important;
  z-index: 9999999 !important;
  justify-content: center;
  align-items: center;
}

.overlay-content {
  width: 75%;
  height: 90%;
  position: relative;
}

.overlay .close-overlay {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 40px;
  background: none;
  border: none;
  color: var(--background-color);
  cursor: pointer;
  z-index: 10000;
}

/* Overlay General */
.overlay1 {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8) !important;
  justify-content: center;
  align-items: center;
  z-index: 9999999 !important;
}

.overlay-content1 {
  background: var(--background-color);
  padding: 20px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  position: relative;
  text-align: center;
}

.overlay-content1 h2 {
  margin-bottom: 20px;
}

.close-overlay1 {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
}

.share-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-size: 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--background-color);
  cursor: pointer;
}

.share-btn i {
  margin-right: 8px;
}

.share-btn.fb {
  background: #3b5998;
}

.share-btn.tw {
  background: var(--main-text-color);
}

.share-btn.wa {
  background: #25d366;
}

.share-btn.copy {
  background: #555;
}

.swiper-zoom-container {
  max-width: 40%;
}

.swiper-zoom-container video {
  max-width: 100%;
  max-height: 100%;
}


/* Active state for size buttons */
.size-button.active {
  background-color: #000;
  color: #fff;
}

/* Active state for color buttons (already has animation) */
.color-button.active::before {
  border-color: #000;
}

/* Overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999999;
}

/* Box */
.popup-box {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 300px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  animation: popupFade 0.3s ease;
}

.popup-box span {
  display: block;
  font-size: 16px;
  margin-bottom: 15px;
}

.popup-box button {
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.popup-box button:hover {
  background: #333;
}

@keyframes popupFade {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Quantity wrapper */
.quantity {
  display: flex;
  align-items: center;
  margin: 20px 0;
  text-align: center;
  border: 1px solid black;
  width: fit-content;
  padding: 5px;
}

.quantity button {
  width: 36px;
  height: 36px;
  /* font-size: 20px; */
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.quantity button:hover {
  background: none;
}

.quantity input {
  width: 60px;
  height: 36px;
  text-align: center;
  font-size: 16px;
  border: none;
  background: none;
  outline: none;
}

.quantity input::-webkit-outer-spin-button,
.quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 913px) {
  .quantity {
    margin: 20px auto;
  }

  main {
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 0;
    margin-bottom: 30px;
    overflow-x: hidden;
  }

  .color-buttons {
    justify-content: center;
  }

  .mySwiper2 img,
  .mySwiper2 video,
  .mySwiper2 {
    border-radius: 0;
  }

  .about,
  .pic {
    width: 100%;
    max-width: 600px;
    min-width: unset;
    /* margin: 20px 0;
    padding: 0 15px; */
    text-align: center;
  }

  .description p {
    max-width: 90%;
    margin: 0 auto 20px;
    text-align: left;
  }

  .available-size {
    justify-content: center;
  }

  .the-main-btns {
    justify-content: center;
  }

  .share,
  .add-to-cart {
    width: 45%;
    max-width: 340px;
    min-width: 180px;
  }

  .mySwiper2 {
    height: unset;
    /* Adjusted for smaller screens */
  }

  .mySwiper {
    height: 100px;
  }

  .store {
    justify-content: center;
  }

  .about {
    overflow-y: unset;
    height: unset;
  }

  .swiper-zoom-container {
    max-width: 100%;
  }
}

@media (min-width: 1320px) {
  main {
    max-width: 1400px;
    /* Prevent excessive stretching */
    margin-left: auto;
    margin-right: auto;
  }

  .pic {
    max-width: 600px;
  }

  .about {
    margin-left: 30px;
  }

  .description p {
    max-width: 100%;
  }
}