/*
Theme Name: RTPeptide WooCommerce
Theme URI: https://www.rtpeptide.com/
Author: RTPeptide
Description: WordPress/WooCommerce conversion of the RTPeptide Vite + React website, with branded WooCommerce payment pages and manual payment-link order creation.
Version: 1.4.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: rtpeptide
*/

:root {
  --rtp-bg-dark: #050e08;
  --rtp-bg-soft: #f7f9f8;
  --rtp-green: #059669;
  --rtp-green-bright: #10b981;
  --rtp-green-dark: #047857;
  --rtp-text: #111827;
  --rtp-muted: #6b7280;
  --rtp-border: #e5e7eb;
  --rtp-radius: 22px;
  --rtp-font: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rtp-bg-soft);
  color: var(--rtp-text);
  font-family: var(--rtp-font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* React homepage should remain visually controlled by the compiled Tailwind app. */
body.rtp-react-page { background: #fff; }
body.rtp-react-page #root { min-height: 100vh; }

/* PHP/WooCommerce shell */
.rtp-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 14, 8, .96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}
.rtp-site-header__inner,
.rtp-site-footer__inner,
.rtp-page-shell {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}
.rtp-site-header__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.rtp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .12em;
}
.rtp-brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #34d399;
  display: grid;
  place-items: center;
}
.rtp-brand__mark::after {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #34d399;
}
.rtp-brand__light { font-weight: 300; color: #34d399; }
.rtp-header-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 600;
}
.rtp-header-note i { color: #34d399; font-size: 17px; }

.rtp-page-wrap {
  min-height: calc(100vh - 150px);
  background:
    radial-gradient(circle at 18% 0%, rgba(16,185,129,.10), transparent 34%),
    linear-gradient(180deg, #f5faf7 0%, #f7f9f8 42%, #f7f9f8 100%);
  padding: 54px 0 72px;
}
.rtp-page-shell { max-width: 980px; }
.rtp-page-heading { margin: 0 0 22px; }
.rtp-page-heading__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--rtp-green-dark);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.rtp-page-heading h1 {
  margin: 14px 0 6px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.04;
  letter-spacing: -.04em;
}
.rtp-page-heading p { margin: 0; color: var(--rtp-muted); }
.rtp-content-card {
  background: rgba(255,255,255,.96);
  border: 1px solid var(--rtp-border);
  border-radius: var(--rtp-radius);
  padding: clamp(22px, 4vw, 40px);
  box-shadow: 0 18px 55px rgba(5,14,8,.08);
}

.rtp-site-footer {
  background: var(--rtp-bg-dark);
  color: rgba(255,255,255,.62);
  border-top: 1px solid rgba(255,255,255,.08);
}
.rtp-site-footer__inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}
.rtp-site-footer a { color: #6ee7b7; text-decoration: none; }

/* WooCommerce payment/order pages */
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message {
  border: 0;
  border-radius: 14px;
  padding: 16px 18px 16px 48px;
  background: #f0fdf4;
  color: #14532d;
}
.woocommerce .woocommerce-error::before,
.woocommerce .woocommerce-info::before,
.woocommerce .woocommerce-message::before { color: var(--rtp-green); }

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form select,
.woocommerce .select2-container .select2-selection--single {
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  padding: 10px 12px;
  font-family: var(--rtp-font);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form select:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
  background: #fff;
}

.woocommerce table.shop_table {
  border: 1px solid var(--rtp-border);
  border-radius: 16px;
  border-collapse: separate;
  overflow: hidden;
  margin: 0 0 22px;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 14px 16px;
  border-top-color: #eef0f2;
}
.woocommerce table.shop_table thead th {
  background: #f8faf9;
  color: #374151;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.woocommerce table.shop_table tfoot tr:last-child th,
.woocommerce table.shop_table tfoot tr:last-child td {
  color: #065f46;
  font-weight: 800;
  font-size: 17px;
}

.woocommerce #payment {
  background: #f8faf9;
  border: 1px solid var(--rtp-border);
  border-radius: 18px;
  overflow: hidden;
}
.woocommerce #payment ul.payment_methods {
  padding: 18px;
  border-bottom: 1px solid var(--rtp-border);
}
.woocommerce #payment ul.payment_methods li {
  margin: 0 0 10px;
  padding: 14px 15px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}
.woocommerce #payment ul.payment_methods li:last-child { margin-bottom: 0; }
.woocommerce #payment ul.payment_methods li label { font-weight: 700; color: #1f2937; }
.woocommerce #payment div.payment_box {
  margin: 12px 0 0;
  background: #ecfdf5;
  color: #374151;
  border-radius: 10px;
  font-size: 13px;
}
.woocommerce #payment div.payment_box::before { border-bottom-color: #ecfdf5; }
.woocommerce #payment .form-row { padding: 18px; }

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #payment #place_order {
  border: 0;
  border-radius: 999px;
  background: var(--rtp-green);
  color: #fff;
  padding: 13px 22px;
  min-height: 46px;
  font-family: var(--rtp-font);
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce #payment #place_order:hover {
  background: var(--rtp-green-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(5,150,105,.2);
}
.woocommerce #payment #place_order { float: none; width: 100%; font-size: 15px; }

.rtp-payment-intro {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 15px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: #f0fdf4;
}
.rtp-payment-lock {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #d1fae5;
  color: #047857;
  font-size: 18px;
}
.rtp-payment-intro strong { display: block; color: #065f46; margin: 1px 0 4px; }
.rtp-payment-intro p { margin: 0; color: #4b5563; font-size: 13px; line-height: 1.55; }

/* Current WooCommerce block components, if the checkout page uses blocks. */
.wc-block-components-button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
  border-radius: 999px !important;
  background: var(--rtp-green) !important;
  color: #fff !important;
  font-weight: 800 !important;
}
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
  border-radius: 12px !important;
}

@media (max-width: 720px) {
  .rtp-site-header__inner,
  .rtp-site-footer__inner,
  .rtp-page-shell { width: min(100% - 24px, 1180px); }
  .rtp-header-note span { display: none; }
  .rtp-page-wrap { padding: 34px 0 48px; }
  .rtp-content-card { border-radius: 18px; }
  .rtp-site-footer__inner { flex-direction: column; justify-content: center; text-align: center; padding: 18px 0; }
  .woocommerce table.shop_table th,
  .woocommerce table.shop_table td { padding: 12px 10px; }
}

.rtp-gateway-unavailable {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
}
.rtp-gateway-unavailable strong,
.rtp-gateway-unavailable span { display: block; }
.rtp-gateway-unavailable span { margin-top: 4px; font-size: 13px; line-height: 1.5; }
.woocommerce #payment #place_order:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
  box-shadow: none;
}

/* v1.4.0 — read-only customer/order confirmation before payment */
.rtp-payment-review {
  margin: 0 0 22px;
  padding: 20px;
  border: 1px solid var(--rtp-border);
  border-radius: 18px;
  background: #f8faf9;
}
.rtp-payment-review__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 16px;
}
.rtp-payment-review__heading h2 {
  margin: 6px 0 0;
  color: #111827;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -.015em;
}
.rtp-payment-review__heading p {
  max-width: 470px;
  margin: 0;
  color: #6b7280;
  font-size: 12.5px;
  line-height: 1.55;
  text-align: right;
}
.rtp-payment-review__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #047857;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rtp-payment-review__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.rtp-review-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  background: #fff;
}
.rtp-review-card__title {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 13px;
  border-bottom: 1px solid #eef0f2;
}
.rtp-review-card__icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #ecfdf5;
  color: #047857;
  font-size: 19px;
}
.rtp-review-card__title h3 {
  margin: 0 0 2px;
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
}
.rtp-review-card__title span {
  color: #6b7280;
  font-size: 11.5px;
}
.rtp-review-list {
  margin: 12px 0 0;
}
.rtp-review-list > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
}
.rtp-review-list dt,
.rtp-review-list dd {
  margin: 0;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.55;
}
.rtp-review-list dt {
  color: #6b7280;
  font-weight: 600;
}
.rtp-review-list dd {
  color: #1f2937;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.rtp-review-list__address dd,
.rtp-review-list__description dd {
  font-weight: 500;
}
.rtp-review-list__total {
  margin-top: 3px;
  padding-top: 11px !important;
  border-top: 1px solid #eef0f2;
}
.rtp-review-list__total dd {
  color: #047857;
  font-size: 15px;
  font-weight: 800;
}
.rtp-payment-review__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #ecfdf5;
  color: #476055;
  font-size: 11.5px;
  line-height: 1.5;
}
.rtp-payment-review__note i {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #059669;
  font-size: 15px;
}
@media (max-width: 720px) {
  .rtp-payment-review { padding: 15px; }
  .rtp-payment-review__heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .rtp-payment-review__heading p { max-width: none; text-align: left; }
  .rtp-payment-review__grid { grid-template-columns: 1fr; }
  .rtp-review-list > div { grid-template-columns: 82px minmax(0, 1fr); }
}
