.popup_overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 40;
  transition: opacity 0.3s;
}

.popup_content {
  position: fixed;
  background-color: white;
  z-index: 9999;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.3);
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutToBottom {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.popup_body {
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.popup_body_scrollable {
  flex-shrink: 0;
}

.popup_body_fixed {
  flex-shrink: 0;
}

.close_btn_absolute {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background-color 0.2s;
  border-radius: 50%;
  z-index: 10;
  color: #000000;
}

.close_btn_absolute:hover {
  background-color: #f3f4f6;
}

.product_header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
}

.product_image_wrapper {
  width: 200px;
  height: 200px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.product_info {
  width: 100%;
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.product_title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.attributes_section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
}

.attribute_group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attribute_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0px;
}

.attribute_label_wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000000;
}

.attribute_label {
  font-size: 14px;
  font-weight: 500;
  text-transform: capitalize;
  color: #000000;
}

.attribute_selected_value {
  font-size: 12px;
  color: #704e80;
  font-weight: 500;
  border: 1px solid #565758;
  padding: 2px 4px;
  border-radius: 4px;
}

.size_guide_link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #704e80;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.size_guide_link:hover {
  color: #5a3e66;
  text-decoration: underline;
}

.attribute_values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: black;
}

.color_option {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  cursor: pointer;
  transition: all 0.2s;
}

.color_option.selected {
  outline: 1px solid #222222;
  outline-offset: 3.5px;
}

.image_option {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.image_option:hover {
  border-color: #9ca3af;
}

.image_option.selected {
  border-color: #704e80;
}

.label_option {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: all 0.2s;
  background-color: white;
  color: black;
}

.label_option:hover {
  border-color: #c7b0d14d;
  background-color: #c7b0d14d;
}

.label_option.selected {
  border-color: #c7b0d14d;
  background-color: #c7b0d14d;
  color: black;
}

.quantity_section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 5px 0;
  border-top: 1px solid #e5e7eb;
}

.quantity_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quantity_counter {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quantity_btn {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
  color: black;
}

.quantity_btn:hover:not(:disabled) {
  border-color: #704e80;
  background-color: #704e80;
  color: white;
}

.quantity_btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.quantity_value {
  width: 32px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.stock_info {
  font-size: 12px;
  text-align: right;
  color: #6b7280;
}

.stock_available {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.stock_low {
  font-size: 14px;
  color: var(--red_color);
  font-family: var(--neuzeit-reg-font);
}

.stock_out {
  font-weight: 600;
  color: #ef4444;
}

.add_to_bag_section {
  padding-top: 16px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.add_to_bag_actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
}

.shortcut_offer_card {
  width: 100%;
}

.plus_wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.add_to_bag_btn {
  width: 20%;
  padding: 4px;
  border-radius: 4px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  background-color: #ffffff;
  color: black;
  text-transform: uppercase;
  border: 1px solid #e1c9e0;
}

.plus {
  font-size: 18px;
  font-weight: 400;
  margin-top: 4px;
}

.is_success_added {
  background-color: #ffffff;
  color: white;
  cursor: not-allowed;
  width: 20%;
  padding: 2px;
  border-radius: 4px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: not-allowed;
  transition: all 0.2s;
  text-transform: uppercase;
  border: 1px solid #e1c9e0;
}

.is_success_added:hover {
  cursor: not-allowed;
}

.add_to_bag_text {
  padding: 7px;
}

.checkout_btn {
  flex: 1;
  padding: 4px 12px;
  border-radius: 4px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-transform: uppercase;
  background-color: #e1c9e0;
  color: black;
}

.checkout_btn:hover:not(:disabled) {
  background-color: #b486c7cb;
}

.checkout_btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.add_to_bag_btn:hover:not(:disabled) {
  background-color: #e2d3e6;
}

.add_to_bag_btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Desktop Animation - dari kanan */
@media only screen and (min-width: 768px) {
  .popup_content {
    bottom: 0;
    right: 0;
    width: 350px;
    max-height: 90vh;
    height: auto;
    border-radius: 12px 0px 0 0;
    display: flex;
    flex-direction: column;
    animation: slideInFromRight 0.3s ease-out forwards;
  }

  .popup_content.closing {
    animation: slideOutToRight 0.3s ease-in forwards;
  }

  .product_image_wrapper {
    width: 160px;
    height: 160px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
  }
}

/* Mobile Animation - dari bawah */

@media only screen and (max-width: 767px) {
  .popup_content {
    bottom: -10px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 90vh;
    height: auto;
    border-radius: 16px 16px 0 0;
    animation: slideInFromBottom 0.3s ease-out forwards;
  }

  .popup_body {
    margin-bottom: 10px;
  }

  .popup_content.closing {
    animation: slideOutToBottom 0.3s ease-in forwards;
  }

  .add_to_bag_btn {
    width: 20%;
  }

  .attribute_label {
    font-size: 16px;
    font-weight: 600;
  }

  .color_option {
    width: 23px;
    height: 23px;
  }

  .color_option.selected {
    outline: 1px solid #222222;
    outline-offset: 3.5px;
  }

  .label_option {
    font-size: 16px;
  }
  .add_to_bag_text {
    padding: 4px;
  }

  .product_image_wrapper {
    width: 140px;
    height: 140px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
  }
}
