/**
 * YensBaby Theme — Phase 10.27 Responsive Breakpoints & Header/Footer System
 * Priority Breakpoints: 1440px, 1280px, 1024px, 991px, 768px, 600px, 480px, 430px, 390px, 375px, 360px
 */

/* Global Anti-Overflow Container Protection */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Base Responsive Container */
.yens-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* Navigation List Responsive Alignment */
.yens-nav-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.yens-nav-list::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1380px) {
  .yens-nav-list {
    gap: 0.65rem;
  }
  .yens-nav-link {
    font-size: 0.85rem;
    padding: 0.7rem 0.1rem;
  }
}

@media (max-width: 1280px) {
  .yens-container {
    max-width: 100%;
  }
  .yens-nav-list {
    gap: 0.5rem;
  }
  .yens-nav-link {
    font-size: 0.82rem;
  }
}

@media (max-width: 1120px) {
  .yens-nav-list {
    justify-content: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 1024px) {
  .yens-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .yens-category-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }

  .yens-product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .yens-trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 991px) {
  .yens-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .yens-header-main {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .yens-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .yens-section {
    padding: 24px 0;
  }

  .yens-section-title {
    font-size: 1.25rem;
  }

  .yens-banner-slider-container {
    aspect-ratio: 16 / 9;
    min-height: 180px;
    border-radius: 14px;
  }

  .yens-category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .yens-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

  .yens-curated-grid {
    grid-template-columns: 1fr;
  }

  .yens-newsletter-box {
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
  }

  .yens-news-form {
    max-width: 100%;
    flex-direction: column;
    width: 100%;
  }

  .yens-news-input,
  .yens-news-btn {
    width: 100%;
  }

  /* Header Layout Mobile */
  .yens-header-main {
    flex-wrap: wrap;
    gap: 10px;
  }

  .yens-header-search {
    order: 3;
    width: 100%;
    max-width: 100%;
  }

  /* Footer Layout Mobile */
  .yens-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .yens-footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .yens-copyright-text {
    text-align: center !important;
  }
}

@media (max-width: 600px) {
  .yens-category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .yens-container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .yens-category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .yens-cat-card {
    padding: 10px 6px;
  }

  .yens-cat-name {
    font-size: 0.76rem;
  }

  .yens-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .yens-card-body {
    padding: 10px 10px 12px 10px;
  }

  .yens-card-title {
    font-size: 0.82rem;
  }

  .yens-card-price {
    font-size: 0.92rem;
  }

  .yens-trust-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

@media (max-width: 390px) {
  .yens-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .yens-category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .yens-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .yens-card-add-btn {
    padding: 6px 8px;
    font-size: 0.76rem;
  }
}

@media (max-width: 360px) {
  .yens-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .yens-action-label {
    font-size: 0.75rem;
  }

  .yens-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}



/* ==========================================================================
   


/* ==========================================================================
   


/* ==========================================================================
   PHASE 10.42 — DETAIL TAGIHAN UNNESTING & LONG TEXT VISUAL FIX
   ========================================================================== */

/* 1. Master Ancestor Chain Width & Centering on Desktop */
html body.woocommerce-checkout #primary,
html body.woocommerce-checkout .site-main,
html body.woocommerce-checkout .entry-content,
html body.woocommerce-checkout .woocommerce,
.woocommerce-checkout #primary,
.woocommerce-checkout .site-main,
.woocommerce-checkout .entry-content,
.woocommerce-checkout .woocommerce,
.yens-checkout-page-wrap {
  width: calc(100% - 48px) !important;
  max-width: 1360px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 24px 0 60px !important;
  box-sizing: border-box !important;
  float: none !important;
  clear: both !important;
  position: relative !important;
}

/* 2. Heading Section Precise Left & Right Alignment */
.yens-checkout-page-header {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 28px 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.yens-checkout-page-title {
  font-size: 1.85rem !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  margin: 8px 0 4px 0 !important;
  line-height: 1.25 !important;
}

.yens-checkout-page-sub {
  font-size: 0.95rem !important;
  color: #64748B !important;
  margin: 4px 0 0 0 !important;
}

/* 3. Main Asymmetrical 2-Column Grid Layout (Desktop >= 1100px) */
.yens-checkout-form {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
  box-sizing: border-box !important;
}

.yens-checkout-layout-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
  gap: 32px !important;
  align-items: start !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  float: none !important;
  clear: both !important;
}

.yens-checkout-main-col {
  grid-column: 1 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.yens-checkout-sidebar-col {
  grid-column: 2 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* 4. Complete Neutralization & Unnesting of Legacy WooCommerce Cards & Floats */
.woocommerce-checkout #customer_details,
.woocommerce-checkout .col2-set,
.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2,
.yens-checkout-main-col #customer_details,
.yens-checkout-main-col .col2-set,
.yens-checkout-main-col .col-1,
.yens-checkout-main-col .col-2,
.yens-checkout-main-col .woocommerce-billing-fields,
.yens-checkout-main-col .woocommerce-billing-fields__field-wrapper,
.yens-checkout-main-col .woocommerce-shipping-fields,
.yens-checkout-main-col .woocommerce-shipping-fields__field-wrapper,
.yens-checkout-main-col .woocommerce-additional-fields,
.yens-checkout-main-col .woocommerce-additional-fields__field-wrapper {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  float: none !important;
  display: block !important;
  box-sizing: border-box !important;
  clear: both !important;
}

/* 5. Billing & Sidebar Card Containers (Top Baseline Alignment) */
.yens-checkout-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 16px !important;
  padding: 28px 32px !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.yens-checkout-card h3,
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3,
#order_review_heading {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  margin: 0 0 24px 0 !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid #F1F5F9 !important;
  width: 100% !important;
}

/* 6. Form Field Wrapper & Equal 2-Column Names Grid */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

.woocommerce-checkout .form-row {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 0 14px 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-first,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-last,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row-first,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row-last,
.yens-checkout-form .form-row-first,
.yens-checkout-form .form-row-last {
  width: calc(50% - 8px) !important;
  max-width: calc(50% - 8px) !important;
  flex: 0 0 calc(50% - 8px) !important;
  box-sizing: border-box !important;
  float: none !important;
  margin-right: 0 !important;
  min-width: 0 !important;
  display: block !important;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-wide,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row:not(.form-row-first):not(.form-row-last),
.yens-checkout-form .form-row-wide {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  box-sizing: border-box !important;
  float: none !important;
  clear: both !important;
}

.woocommerce-checkout .form-row label {
  display: block !important;
  width: 100% !important;
  margin-bottom: 6px !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
  color: #334155 !important;
  white-space: normal !important;
  word-break: normal !important;
}

.yens-checkout-form input.input-text,
.yens-checkout-form select,
.woocommerce-checkout input.input-text,
.woocommerce-checkout select {
  width: 100% !important;
  max-width: 100% !important;
  height: 46px !important;
  line-height: 46px !important;
  border-radius: 8px !important;
  border: 1px solid #CBD5E1 !important;
  padding: 0 14px !important;
  font-size: 0.95rem !important;
  color: #0F172A !important;
  background-color: #FFFFFF !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* 7. Checkboxes Horizontal Layout */
#ship-to-different-address,
.woocommerce-shipping-fields #ship-to-different-address {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 24px 0 16px 0 !important;
  padding: 0 !important;
  float: none !important;
  border: none !important;
}

#ship-to-different-address label,
#ship-to-different-address span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  white-space: normal !important;
  cursor: pointer !important;
  margin: 0 !important;
}

#ship-to-different-address input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}

.kiriminaja-insurance-option,
.kj-insurance-wrapper,
label[for="kiriminaja_insurance"] {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 12px 14px !important;
  background: #F7FBFF !important;
  border: 1px solid #EAF7FF !important;
  border-radius: 8px !important;
  margin-top: 12px !important;
  white-space: normal !important;
  box-sizing: border-box !important;
}

/* 8. Order Notes Section inside Left Column */
.woocommerce-additional-fields {
  margin-top: 24px !important;
  padding-top: 20px !important;
  border-top: 1px dashed #E2E8F0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#order_comments,
.woocommerce-additional-fields textarea {
  width: 100% !important;
  min-height: 110px !important;
  border-radius: 8px !important;
  border: 1px solid #CBD5E1 !important;
  padding: 12px 14px !important;
  font-size: 0.95rem !important;
  color: #0F172A !important;
  resize: vertical !important;
  box-sizing: border-box !important;
}

/* 9. Order Summary Table Visual Alignment inside Right Column */
.woocommerce-checkout-review-order-table,
table.shop_table.woocommerce-checkout-review-order-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-bottom: 24px !important;
  table-layout: fixed !important;
}

table.shop_table.woocommerce-checkout-review-order-table th,
table.shop_table.woocommerce-checkout-review-order-table td {
  padding: 14px 10px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #F1F5F9 !important;
}

table.shop_table.woocommerce-checkout-review-order-table th.product-name,
table.shop_table.woocommerce-checkout-review-order-table td.product-name {
  width: 72% !important;
  text-align: left !important;
  white-space: normal !important;
  word-wrap: normal !important;
  overflow-wrap: break-word !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  color: #1E293B !important;
}

table.shop_table.woocommerce-checkout-review-order-table th.product-total,
table.shop_table.woocommerce-checkout-review-order-table td.product-total,
table.shop_table.woocommerce-checkout-review-order-table td.cart-subtotal,
table.shop_table.woocommerce-checkout-review-order-table td.order-total {
  width: 28% !important;
  text-align: right !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  white-space: nowrap !important;
}

/* 10. Shipping Rate Cards */
#shipping_method,
ul#shipping_method {
  list-style: none !important;
  padding: 0 !important;
  margin: 12px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
}

#shipping_method li,
ul#shipping_method li {
  width: 100% !important;
  min-height: 58px !important;
  padding: 14px 16px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 10px !important;
  background: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

#shipping_method li:has(input:checked),
ul#shipping_method li.selected {
  background: #F7FBFF !important;
  border-color: #4AAFE8 !important;
}

/* 11. Payment Section & Cards */
.woocommerce-checkout-payment,
#payment {
  background: #FFFFFF !important;
  border-radius: 14px !important;
  margin-top: 24px !important;
  width: 100% !important;
}

#payment ul.payment_methods {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 20px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

#payment ul.payment_methods li {
  padding: 16px 20px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  box-sizing: border-box !important;
}

#payment ul.payment_methods li.payment_method_xendit_gateway {
  border-color: #BFE7FF !important;
  background: #F7FBFF !important;
}

#payment ul.payment_methods li label {
  font-weight: 700 !important;
  color: #0F172A !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#payment div.payment_box {
  margin-top: 10px !important;
  padding: 12px 14px !important;
  background: #EAF7FF !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  color: #1E293B !important;
  line-height: 1.5 !important;
}

/* 12. Place Order Button */
#place_order,
.woocommerce-checkout #place_order {
  width: 100% !important;
  height: 50px !important;
  background: linear-gradient(135deg, #0984E3, #0069D9) !important;
  color: #FFFFFF !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(9, 132, 227, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

#place_order:hover {
  background: linear-gradient(135deg, #0069D9, #0056B3) !important;
  box-shadow: 0 6px 18px rgba(9, 132, 227, 0.4) !important;
}

/* 13. Responsive Breakpoints (Mobile <= 991px 100% UNCHANGED) */
@media (max-width: 1100px) {
  .yens-checkout-layout-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
    gap: 24px !important;
  }
}

@media (max-width: 991px) {
  .yens-checkout-layout-grid {
    grid-template-columns: 1fr !important;
  }

  .yens-checkout-main-col,
  .yens-checkout-sidebar-col {
    grid-column: 1 !important;
    max-width: 100% !important;
  }

  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-first,
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-last,
  .yens-checkout-form .form-row-first,
  .yens-checkout-form .form-row-last {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
}

@media (max-width: 767px) {
  html body.woocommerce-checkout #primary,
  html body.woocommerce-checkout .site-main,
  html body.woocommerce-checkout .entry-content,
  .woocommerce-checkout #primary,
  .woocommerce-checkout .site-main,
  .yens-checkout-page-wrap {
    width: calc(100% - 24px) !important;
    padding: 16px 0 40px !important;
  }

  .yens-checkout-card {
    padding: 20px 16px !important;
  }
}

/* ==========================================================================
   PHASE 10.49 — MOBILE FORM ZOOM (P2) + TAP TARGET / LEGIBILITY FLOOR (P3)
   Last block in the last-enqueued stylesheet, so it wins on source order.
   Phone breakpoint 768px is the one this file already uses for mobile layout;
   it covers the measured 360 / 375 / 390 / 412 / 430px viewports.
   ========================================================================== */

@media (max-width: 768px) {
  /* (A) iOS Safari zooms the page on focus for ANY control under 16px.
     !important is REQUIRED here for two reasons:
       1. several sizes come from inline style="font-size:0.95rem" attributes in
          PHP templates (page-login.php, header.php, ...) owned by other agents —
          an author !important beats a non-important inline style;
       2. the id/class rules re-stated below already carry !important elsewhere,
          so they are repeated verbatim to win the cascade on equal specificity.
     The !important stays scoped to font-size only. Covers .yens-search-input,
     .yens-news-input, .yens-input-number, .woocommerce-Input--text, checkboxes
     and the product/cart quantity field via the bare element selectors. */
  input,
  select,
  textarea,
  #customer_login form input.input-text,
  .col2-set form input.input-text,
  body.logged-in.woocommerce-account .woocommerce-MyAccount-content form input.input-text,
  .yens-checkout-form input.input-text,
  .woocommerce-checkout input.input-text,
  .woocommerce-checkout select,
  #order_comments,
  .woocommerce-additional-fields textarea {
    font-size: 16px !important;
  }

  /* JUDGE: the blanket floor above is !important, so it would SHRINK the OTP boxes
     (modal-auth.css sets 1.2rem = 19.2px, non-important). Re-assert them — they are
     already well above the 16px iOS-zoom threshold. */
  .yens-otp-digit {
    font-size: 1.2rem !important;
  }

  /* (B) 44px minimum touch target. Hitbox only — no background, border or font
     change, so the visual weight of these links stays as designed. */
  .yens-btn-apply-filter,
  .yens-btn-reset-filter,
  .yens-btn.yens-btn-primary,
  .yens-footer-wa-link,
  .yens-link-more,
  .yens-rating-count-link,
  .lost_password a,
  .yens-auth-options a,
  .woocommerce-breadcrumb a,
  .yens-breadcrumb a,
  .yens-product-breadcrumb a,
  .yens-mobile-filter-trigger,
  .yens-card-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  /* (C) 12px legibility floor (was 0.72rem / 11.52px in homepage.css). Kept inside the
     phone breakpoint — desktop styling of this badge is not in scope for this fix. */
  .yens-curated-badge {
    font-size: 12px;
  }

  /* (D) Post-deploy sweep: the sub-44px controls the first pass missed. These are list
     links whose hitbox is just the 17-38px text line-height. Padding (not min-height)
     on the list items, so the rows stay evenly spaced instead of each link growing a
     centred 44px box inside a tight list. */
  .yens-footer-links a,
  .yens-auth-switch a,
  .yens-filter-cat-list a,
  .yens-action-item,
  .woocommerce-pagination a,
  .woocommerce-pagination .page-numbers,
  .product_meta a,
  .posted_in a,
  .tagged_as a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  /* Pagination items sit in a row — keep them centred and square-ish, not stretched. */
  .woocommerce-pagination a,
  .woocommerce-pagination .page-numbers {
    justify-content: center;
    min-width: 44px;
  }

  /* The category pill on the product summary card is a 27px badge with its own
     background — growing it to 44px would make it a chunky block. Keep the pill,
     expand the touch area with a transparent pad (same trick as the hero arrows). */
  .yens-product-category-tag a {
    position: relative;
  }

  .yens-product-category-tag a::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 44px;
    transform: translateY(-50%);
  }

  /* NOT touched on purpose: .yens-card-title a measures 37px, but it is a 2-line title
     block inside a product card whose image link above it is the primary tap target.
     Forcing 44px there re-flows the whole grid for no real gain. */
}
