/*
 * Bridge between WooCommerce default markup and the MYBURKINI design.
 * styles.css holds the design system; this file maps Woo classes onto it.
 */

/* ---------- Utilities ---------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.myburkini-native-select {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ---------- Notices ---------- */
.woocommerce-notices-wrapper:empty {
  display: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
  list-style: none;
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf7f3;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
}

.woocommerce-error {
  background: #fdf2f0;
  border-color: #f0c7bf;
  color: #8a2e1f;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Prices ---------- */
.price del,
.price s,
.woocommerce-Price-amount del {
  opacity: 0.55;
  margin-right: 0.35rem;
  font-size: 0.9em;
}

.price ins {
  text-decoration: none;
}

.product-card .price del,
.product-card .price s {
  font-size: 0.85em;
}

/* ---------- Product card add-to-cart ---------- */
.product-card .added_to_cart {
  display: none;
}

/* The loop button is an <a> in WooCommerce, keep the button look. */
.product-card a.product-card-cart {
  display: block;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
}

.product-card-cart.loading {
  opacity: 0.65;
  pointer-events: none;
}

.product-card .badge.sale {
  background: #1c1c1a;
}

/* ---------- Variations ---------- */
.size-options button.is-unavailable,
.color-swatch.is-unavailable {
  opacity: 0.3;
  cursor: not-allowed;
}

.size-options button.is-unavailable:hover {
  background: #fff;
  color: #000;
  border-color: var(--line);
}

.myburkini-variations .reset_variations {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.65;
}

.myburkini-variations .reset_variations:not(.visible) {
  display: none;
}

.single_variation_wrap .woocommerce-variation-price {
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 500;
}

.single_variation_wrap .woocommerce-variation-availability p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #666;
}

.buybox .stock.out-of-stock {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: #8a2e1f;
}

.btn-add.disabled,
.btn-add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-add.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- Product tabs ---------- */
.tab-panel ul {
  margin: 0 0 18px;
  padding-left: 18px;
}

.tab-panel li {
  margin-bottom: 8px;
}

.woocommerce-Tabs-panel {
  padding: 0;
}

/* ---------- Cart page ---------- */
.cart-page-item .cart-page-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 24px 0 0;
}

.cart-page-actions .coupon {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}

.cart-page-actions .coupon input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
}

.cart-page-actions .btn {
  padding: 12px 20px;
  font-size: 12px;
}

.cart-update-btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.cart-summary-shipping ul,
.woocommerce-shipping-totals ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  text-align: right;
}

.woocommerce-shipping-totals .checkout-option {
  grid-template-columns: auto 1fr;
  padding: 10px 12px;
  text-align: left;
}

.woocommerce-shipping-destination {
  font-size: 12px;
  color: #666;
  font-weight: 400;
}

.shipping-calculator-button {
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Checkout ---------- */
.checkout-block .woocommerce-billing-fields h3,
.checkout-block .woocommerce-shipping-fields h3,
.checkout-block .woocommerce-additional-fields h3 {
  font-family: var(--font-luxury);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 22px;
}

.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.checkout p.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.checkout p.form-row-wide,
.checkout p.form-row.notes,
.checkout p.form-row.create-account,
.checkout p.form-row.woocommerce-validated.address-field,
.checkout #billing_address_1_field,
.checkout #billing_address_2_field,
.checkout #shipping_address_1_field,
.checkout #shipping_address_2_field {
  grid-column: 1 / -1;
}

.checkout p.form-row label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.checkout p.form-row .required {
  color: #905d2f;
  text-decoration: none;
}

.checkout p.form-row input.input-text,
.checkout p.form-row textarea,
.checkout p.form-row select,
.checkout .select2-container .select2-selection--single {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  color: #000;
  border-radius: 10px;
  outline: none;
  height: auto;
  transition: border-color 0.2s;
}

.checkout p.form-row input.input-text:focus,
.checkout p.form-row textarea:focus,
.checkout p.form-row select:focus {
  border-color: #000;
}

.checkout .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0;
  line-height: 1.4;
  color: #000;
}

.checkout .select2-container .select2-selection--single .select2-selection__arrow {
  top: 50%;
  transform: translateY(-50%);
  right: 8px;
}

.checkout p.form-row.woocommerce-invalid input.input-text,
.checkout p.form-row.woocommerce-invalid select {
  border-color: #d98b7d;
}

.checkout p.form-row-checkbox,
.checkout .woocommerce-form__label-for-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkout .woocommerce-form__label-for-checkbox span {
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.woocommerce-shipping-fields__field-wrapper:empty {
  display: none;
}

#ship-to-different-address {
  font-family: var(--font-luxury);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 18px;
}

#ship-to-different-address label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

/* Payment methods reuse the checkout-option look. */
.wc_payment_methods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wc_payment_methods > li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s, background 0.2s;
}

.wc_payment_methods > li:has(input:checked) {
  border-color: #000;
  background: #faf7f3;
}

.wc_payment_methods > li > label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.wc_payment_methods > li input[type="radio"] {
  accent-color: #000;
  width: 16px;
  height: 16px;
}

.wc_payment_methods .payment_box {
  margin: 12px 0 0;
  font-size: 12.5px;
  font-weight: 400;
  color: #666;
  line-height: 1.5;
}

.wc_payment_methods .payment_box p:last-child {
  margin-bottom: 0;
}

.checkout .place-order {
  margin: 20px 0 0;
}

.checkout .place-order .btn {
  width: 100%;
}

.checkout .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 14px;
  font-size: 12.5px;
}

.checkout-summary .cart-summary-row .woocommerce-Price-amount {
  white-space: nowrap;
}

.checkout-summary-item img {
  border-radius: 6px;
}

.blockUI.blockOverlay {
  opacity: 0.5 !important;
  background: #fff !important;
}

/* ---------- My account ---------- */
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.woocommerce-MyAccount-navigation li a {
  display: inline-flex;
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  color: #666;
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
  color: #000;
  border-bottom-color: #905d2f;
}

.woocommerce-MyAccount-content table,
.woocommerce-orders-table,
.shop_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.woocommerce-MyAccount-content th,
.woocommerce-MyAccount-content td,
.shop_table th,
.shop_table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.woocommerce-MyAccount-content th,
.shop_table th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.woocommerce-form-login,
.woocommerce-form-register,
.woocommerce-EditAccountForm,
.woocommerce-address-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 720px;
}

.woocommerce-form-login p,
.woocommerce-form-register p,
.woocommerce-EditAccountForm p,
.woocommerce-address-fields p {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  grid-column: 1 / -1;
}

.woocommerce-form-login label,
.woocommerce-form-register label,
.woocommerce-EditAccountForm label,
.woocommerce-address-fields label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.woocommerce-form-login input.input-text,
.woocommerce-form-register input.input-text,
.woocommerce-EditAccountForm input.input-text,
.woocommerce-address-fields input.input-text,
.woocommerce-address-fields select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 14px;
  font-family: inherit;
}

.woocommerce-form-login .woocommerce-form-login__rememberme,
.woocommerce-form-register .woocommerce-form__label-for-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.woocommerce-Button,
.woocommerce-form-login .button,
.woocommerce-form-register .button,
.woocommerce-EditAccountForm .button,
.woocommerce-address-fields + p .button,
.woocommerce-MyAccount-content .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: 0.25s;
}

.woocommerce-Button:hover,
.woocommerce-MyAccount-content .button:hover {
  background: #222;
}

.u-columns.addresses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ---------- Pagination ---------- */
.woocommerce-pagination ul.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.woocommerce-pagination .page-numbers,
.page-links a,
.page-links > span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
}

.woocommerce-pagination .page-numbers.current,
.page-links > span {
  background: #000;
  color: #fff;
  border-color: #000;
}

.woocommerce-pagination a.page-numbers:hover {
  border-color: #000;
}

/* ---------- Post list (blog) ---------- */
.post-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.post-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 14px;
}

.post-card h2 {
  font-size: 16px;
  margin: 0 0 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper,
  .woocommerce-additional-fields__field-wrapper,
  .woocommerce-form-login,
  .woocommerce-form-register,
  .woocommerce-EditAccountForm,
  .woocommerce-address-fields,
  .u-columns.addresses {
    grid-template-columns: 1fr;
  }

  .post-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .post-list {
    grid-template-columns: 1fr;
  }

  .cart-page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-page-actions .coupon {
    min-width: 0;
  }
}
