/* === JNP Site Polish v1.0.0 — additive only (404 / UX / breakpoints) === */

/* —— Custom 404 —— */
.jnp-404 {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 20px 96px;
  background: #050505;
  color: #e8e8e8;
  box-sizing: border-box;
}

.jnp-404__inner {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.jnp-404__eyebrow {
  margin: 0 0 12px;
  color: #d4af37;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.jnp-404__title {
  margin: 0 0 14px;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  line-height: 1.2;
}

.jnp-404__text {
  margin: 0 auto 28px;
  max-width: 420px;
  color: #b3b3b3;
  font-family: Inter, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.jnp-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
}

.jnp-404__btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.2;
}

.jnp-404__btn--primary {
  background: #d4af37;
  color: #050505 !important;
}

.jnp-404__btn--ghost {
  background: transparent;
  color: #ffffff !important;
  border: 1px solid #d4af37;
}

.jnp-404__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
}

.jnp-404__links a {
  color: #d4af37 !important;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* —— Loading states —— */
.jnp-is-loading,
button.jnp-is-loading,
.woocommerce button.button.jnp-is-loading,
.jnp-contact-form button[type="submit"].jnp-is-loading {
  position: relative !important;
  pointer-events: none !important;
  opacity: 0.72 !important;
}

.jnp-is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: jnp-spin 0.7s linear infinite;
}

@keyframes jnp-spin {
  to {
    transform: rotate(360deg);
  }
}

.jnp-page-loading {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  z-index: 1000002;
  pointer-events: none;
  background: transparent;
}

.jnp-page-loading__bar {
  height: 100%;
  width: 0;
  background: #d4af37;
  transition: width 0.35s ease;
}

.jnp-page-loading.is-active .jnp-page-loading__bar {
  width: 70%;
}

.jnp-page-loading.is-done .jnp-page-loading__bar {
  width: 100%;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.4s ease 0.15s;
}

/* —— Form error / success states —— */
.jnp-field-error,
.woocommerce form .form-row.woocommerce-invalid .input-text,
.woocommerce form .form-row.woocommerce-invalid select,
.woocommerce form .form-row.woocommerce-invalid textarea,
.jnp-contact-form .jnp-invalid,
.jnp-contact-form input.jnp-invalid,
.jnp-contact-form textarea.jnp-invalid {
  border-color: #e05a5a !important;
  box-shadow: 0 0 0 1px rgba(224, 90, 90, 0.35) !important;
}

/*
 * Product variation <select> options — Additional CSS forced color:#1a1a1a
 * on dark dropdowns (Design Style / Quality invisible except hover).
 */
body.single-product .variations select,
body.single-product .c-product__summary select,
body.single-product select#design-style,
body.single-product select#quality,
body.single-product select[name^="attribute_"] {
  background-color: #141414 !important;
  color: #ededed !important;
  -webkit-text-fill-color: #ededed !important;
}

html body.single-product .variations select option,
html body.single-product .c-product__summary select option,
html body.single-product select#design-style option,
html body.single-product select#quality option,
html body.single-product select[name^="attribute_"] option,
html body.single-product .variations select option:not(:checked),
html body.single-product select[name="attribute_design-style"] option {
  background-color: #141414 !important;
  color: #ededed !important;
  -webkit-text-fill-color: #ededed !important;
}

html body.single-product .variations select option:checked,
html body.single-product .variations select option:hover,
html body.single-product select[name^="attribute_"] option:checked,
html body.single-product select[name^="attribute_"] option:hover,
html body.single-product select#design-style option:checked,
html body.single-product select#design-style option:hover {
  background-color: #2a2a2a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.jnp-field-msg {
  display: block;
  margin: 6px 0 0;
  font-family: Inter, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.jnp-field-msg--error {
  color: #f88 !important;
}

.jnp-field-msg--ok {
  color: #8f8 !important;
}

.jnp-form-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 4px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.jnp-form-banner--error {
  background: rgba(224, 90, 90, 0.12);
  border: 1px solid rgba(224, 90, 90, 0.45);
  color: #f88;
}

.jnp-form-banner--ok {
  background: rgba(80, 180, 100, 0.12);
  border: 1px solid rgba(80, 180, 100, 0.4);
  color: #8f8;
}

body.page-id-51 .jnp-contact-form .jnp-field-msg--error,
body.page-id-51 .jnp-contact-form .jnp-form-banner--error {
  color: #f88 !important;
}

/* —— Mobile breakpoints (additive safety) —— */
@media (max-width: 1024px) {
  .jnp-404 {
    padding-top: 56px;
    padding-bottom: 80px;
  }
}

@media (max-width: 767px) {
  .jnp-404__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .jnp-404__btn {
    text-align: center;
  }

  /* Keep product grids readable on phones without touching desktop cards */
  .c-product-grid__list {
    gap: 16px !important;
  }

  .woocommerce-checkout .col2-set,
  .woocommerce-checkout #customer_details,
  .woocommerce-checkout #order_review_heading,
  .woocommerce-checkout #order_review {
    width: 100% !important;
    max-width: 100% !important;
  }

  input,
  select,
  textarea,
  button,
  .button,
  .elementor-button {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .jnp-404__title {
    font-size: 26px;
  }

  .jnp-404__text {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jnp-is-loading::after,
  .jnp-page-loading__bar {
    animation: none !important;
    transition: none !important;
  }
}
