/* Watashi Sort Bar & Product List Buttons */
#watashi-sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: #fff;
  border-top: 3px solid #e91e8c;
  border-bottom: 3px solid #e91e8c;
  margin-bottom: 24px;
  font-family: inherit;
}
#watashi-sort-bar span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
  margin-right: 4px;
}
.w-sort-btn {
  background: #fff;
  border: 2px solid #e91e8c;
  color: #e91e8c;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.w-sort-btn:hover, .w-sort-btn.active {
  background: #e91e8c;
  color: #fff;
}
.w-add-btn {
  display: block;
  margin-top: 10px;
  background: #e91e8c;
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  font-family: inherit;
  transition: background .15s, transform .1s;
  width: 100%;
}
.w-add-btn:hover {
  background: #c0166f;
}
.w-add-btn:active {
  transform: scale(0.97);
}

/* Floating Action Button (FAB) */
#w-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #e91e8c;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(233, 30, 140, .4);
}
#w-fab.hidden {
  display: none;
}
#w-fab:hover {
  background: #c0166f;
}
#w-badge {
  background: #fff;
  color: #e91e8c;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  margin-left: 6px;
  vertical-align: middle;
}

/* Overlay & Drawer */
#w-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 10000;
  justify-content: flex-end;
}
#w-overlay.open {
  display: flex;
}
#w-drawer {
  background: #fff;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, .15);
}
#w-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 2px solid #e91e8c;
}
#w-head h2 {
  margin: 0;
  color: #e91e8c;
  font-size: 20px;
}
#w-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
#w-items {
  flex: 1;
  padding: 16px 24px;
  overflow-y: auto;
  position: relative;
}
#w-items.loading {
  opacity: 0.5;
  pointer-events: none;
}
#w-drawer.loading .w-option-item,
#w-drawer.loading button,
#w-drawer.loading .w-qty-btn {
  opacity: 0.6;
  pointer-events: none;
  filter: grayscale(40%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

#w-empty {
  color: #aaa;
  text-align: center;
  padding: 40px 0;
}

/* Cart Items */
.w-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.w-item-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}
.w-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.w-qty-btn {
  background: #e91e8c;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.w-qty-num {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
.w-item-price {
  font-weight: 700;
  color: #e91e8c;
  min-width: 60px;
  text-align: right;
}

/* Cart Footer & Form */
#w-foot {
  padding: 16px 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 2px solid #f0f0f0;
  flex-shrink: 0;
}
#w-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
#w-total-val {
  color: #e91e8c;
}
#w-delivery {
  font-size: 12px;
  color: #888;
  margin-bottom: 14px;
}
#w-order-btn {
  width: 100%;
  background: #e91e8c;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 12px;
}
#w-order-btn:hover {
  background: #c0166f;
}
#w-order-btn:disabled {
  background: #ccc;
  cursor: default;
}
#w-form {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
#w-form.open {
  display: flex;
}
.w-form-row {
  display: flex;
  gap: 10px;
  width: 100%;
}
.w-form-row .w-input-wrap {
  flex: 1;
  min-width: 0;
}

/* Input Wrapper & Validation Errors */
.w-input-wrap {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}
.w-field-error {
  color: #e91e8c;
  font-size: 11px;
  margin-top: 4px;
  text-align: left;
  font-weight: 600;
  animation: wFadeIn 0.2s ease-out;
}
#w-form-error {
  display: none;
  background: #fff5fa;
  border: 1px solid #e91e8c;
  color: #e91e8c;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  margin-bottom: 10px;
  animation: wFadeIn 0.2s ease-out;
}
.w-input-invalid {
  border-color: #e91e8c !important;
  background-color: #fffafc !important;
}
@keyframes wFadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Disabled Shipping / Payment options */
.w-option-item.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #fafafa;
  border-color: #eee;
  pointer-events: none;
}
.w-option-item.disabled:hover {
  border-color: #eee;
}
.w-option-item.disabled .w-option-icon {
  border-color: #ddd;
}
.w-option-item.disabled .w-option-icon::after {
  display: none;
}
.w-option-item.disabled .w-option-price {
  color: #aaa;
}
#w-form input, #w-form select, #w-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
}
#w-form input:focus, #w-form select:focus, #w-form textarea:focus {
  border-color: #e91e8c;
  outline: none;
}
#w-form textarea {
  height: 80px;
  resize: vertical;
}
#w-pay-btn {
  background: #e91e8c;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
}
#w-pay-btn:hover {
  background: #c0166f;
}
#w-pay-btn:disabled {
  background: #ccc;
  cursor: default;
}

/* Shipping & Payment Options */
.w-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 12px;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 4px;
  text-align: left;
}
.w-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
  transition: all 0.15s ease;
  font-size: 13px;
  margin-bottom: 6px;
  text-align: left;
}
.w-option-item:hover {
  border-color: #e91e8c;
}
.w-option-item.selected {
  border-color: #e91e8c;
  background: #fff5fa;
}
.w-option-icon {
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.w-option-item.selected .w-option-icon {
  border-color: #e91e8c;
}
.w-option-item.selected .w-option-icon::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #e91e8c;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.w-option-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.w-option-title {
  font-weight: 600;
  color: #222;
}
.w-option-price {
  font-weight: 700;
  color: #e91e8c;
  white-space: nowrap;
}
.w-option-desc {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

/* Oxygen Layout Helpers */
.offer {
  position: relative;
}
.ct-div-block.offer {
  display: flex !important;
  flex-direction: column !important;
}
.w-add-btn {
  margin-top: auto !important;
  margin-bottom: 0;
  display: block;
}
.w-btn-spacer {
  height: 3px;
}

/* Product Excerpt Margins */
.watashi-product-excerpt p {
  margin: 0 0 4px;
}

/* Scroll locking when cart is open */
body.w-no-scroll {
  overflow: hidden;
}

/* Align and format numbers in price lists */
.w-item-price,
#w-total-val,
.w-option-price {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums; /* Standard property goes second */
}

/* Terms and Conditions Checkbox */
.w-terms-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  font-size: 13px;
  text-align: left;
}
.w-terms-wrap input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 2px 0 0 0 !important;
  accent-color: #e91e8c;
  cursor: pointer;
  flex-shrink: 0;
}
.w-terms-wrap label {
  color: #333;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}
.w-terms-wrap label a {
  color: #e91e8c;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.15s ease;
}
.w-terms-wrap label a:hover {
  color: #c0166f;
}
