@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

.shake {
  animation: shake 0.5s;
}

#product {
  margin-top: 24px;
  margin-bottom: 64px;
  width: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

#product__inner {
  width: var(--inner-width);
  display: flex;
  gap: 48px;
}

#product__gallery,
#product__main {
  width: calc((100% - 48px) / 2);
}

#product__main {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

#product__gallery-inner {
  width: 100%;
  display: flex;
  gap: 16px;
}

#product__gallery-thumbs {
  width: 64px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.product__gallery-thumb {
  width: 100%;
  height: 64px;
  object-fit: cover;
  object-position: center;
  opacity: 0.6;
  flex-shrink: 0;
  cursor: pointer;
  transition: var(--transition);
}

.product__gallery-thumb.active {
  opacity: 1;
}

#product__gallery-main {
  position: relative;
  width: calc(100% - 64px - 16px);
  aspect-ratio: 1/1;
}

#product__gallery-main > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product__main-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#product__title {
  font-size: 36px;
  font-weight: 500;
}

.product__main-section-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product__main-section-block-label {
  font-size: 14px;
  font-weight: 400;
}

.product__main-section-block-error {
  display: none;
  font-size: 14px;
  font-weight: 400;
  color: #ff0000;
}

.product__main-section-block-error.active {
  display: block;
}

.product__main-section-block-variations {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.product__main-section-block-variation {
  padding: 16px;
  border: 1px solid var(--border-1);
  font-size: 14px;
  font-weight: 400;
  color: var(--font-2);
  cursor: pointer;
}

.product__main-section-block-variation.disabled {
  pointer-events: none;
}

.product__main-section-block-variation.selected {
  border: 2px solid var(--font-1);
  font-weight: 700;
  color: var(--font-1);
}

.product__main-section-block-price {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 36px;
  font-weight: 700;
}

.product__main-section-block-price ins {
  order: 1;
  text-decoration: none;
  color: var(--accent-2);
}

.product__main-section-block-price del {
  order: 2;
  font-size: 24px;
  font-weight: 400;
  color: var(--font-2);
}

#product__free-shipping {
  padding: 8px 16px;
  width: 100%;
  display: flex;
  gap: 8px;
  background-color: var(--bg-2);
  border-radius: 8px;
}

#product__free-shipping > img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  object-position: center;
}

#product__free-shipping-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#product__free-shipping-content > span:nth-child(1) {
  font-size: 14px;
  font-weight: 700;
}

#product__free-shipping-content > span:nth-child(2) {
  font-size: 14px;
  font-weight: 400;
}

#product__add-to-cart {
  width: 100%;
  display: flex;
  gap: 16px;
}

#product__quantity {
  width: 119px;
  height: 48px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border: 1px solid var(--border-1);
  border-radius: 2px;
}

.product__quantity-button {
  width: 24px;
  height: 24px;
}

.product__quantity-button > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

#product__quantity-value {
  font-size: 14px;
  font-weight: 600;
}

#product__add-to-cart-button {
  flex-grow: 1;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background-color: var(--accent-1);
  border-radius: 2px;
  box-shadow: var(--button-shadow);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--font-3);
}

#product__add-to-cart-button > img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  object-position: center;
}

.product__description {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product__description * {
  max-width: 100%;
}

@media screen and (max-width: 1023px) {
  #product {
    margin-top: 16px;
  }

  #product__inner {
    flex-direction: column;
    gap: 32px;
  }

  #product__gallery,
  #product__main {
    width: 100%;
  }

  #product__gallery-inner {
    flex-direction: column-reverse;
  }

  #product__gallery-thumbs {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
  }

  .product__gallery-thumb {
    width: 64px;
  }

  #product__gallery-main {
    width: 100%;
    height: 400px;
  }
}

/* upsells section under the button section */

.wl-upsells-under-cart{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,.08);
}

.wl-upsells-under-cart__title{
  margin-top: 14px;
  font-size: 18px;
  font-weight: 750;
  margin-bottom: 10px;
}

.wl-upsell-mini{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.wl-upsell-mini__img img{
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.wl-upsell-mini__meta{
  flex: 1;
  min-width: 0;
}

.wl-upsell-mini__name{
  display: block;
  line-height: 1.2;
  text-decoration: none;
}

.wl-upsell-mini__price{
  margin-top: 2px;
  opacity: .85;
  font-weight: 900;
}

.wl-upsell-mini__btn{
  white-space: nowrap;
}

:root{
  --wl-thumbs-col: 64px;  /* matches #product__gallery-thumbs width */
  --wl-thumbs-gap: 16px;  /* matches #product__gallery-inner gap */
}


#product__gallery-video{
  margin-top: 24px;
  /* start where the main image starts */
  margin-left: calc(var(--wl-thumbs-col) + var(--wl-thumbs-gap));
  width: calc(100% - (var(--wl-thumbs-col) + var(--wl-thumbs-gap)));
  box-sizing: border-box;
  isolation: isolate;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  display: flex;
  justify-content: center;
  position: relative;
}

#product__gallery-video .product__promo-video{
  width: min(360px, 100%);
  max-width: 360px;
  height: auto;
  display: block;
  border-radius: 12px;
  clip-path: inset(2px 2px);
  background-color: transparent !important;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  border: 0;
  outline: 0;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

#product__gallery-video::before{
  content: "VIDEO";
  position: absolute;
  z-index: 10;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  pointer-events: none;
}

@media screen and (max-width: 1023px){
  #product__gallery-video{
    margin-left: 0;
    width: 100%;
  }
  #product__gallery-video::before{
    top: 12px;
    left: 12px;
    font-size: 12px;
    padding: 7px 11px;
  }
  #product__gallery-video .product__promo-video{
    width: min(420px, 100%);
  }
}

/* Accordion for full product description */
.wl-acc {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.02);
  margin-top: 12px;
}

.wl-acc__summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Remove default marker */
.wl-acc__summary::-webkit-details-marker { display: none; }

.wl-acc__summary::after {
  content: "▾";
  transition: transform .2s ease;
}

.wl-acc[open] .wl-acc__summary::after {
  transform: rotate(180deg);
}

.wl-acc__content {
  padding: 0 16px 16px;
}