/*
Theme Name: BasketFlow
Theme URI: https://example.local/basketflow
Author: Codex
Description: Product storefront for LETHANG handwoven water hyacinth storage baskets.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: basketflow
*/

:root {
  --ink: #1d2521;
  --muted: #637068;
  --line: #d9ded7;
  --paper: #f8faf6;
  --soft: #edf3ee;
  --leaf: #2f624f;
  --leaf-dark: #21483a;
  --clay: #a75f3f;
  --sun: #f2c15d;
  --white: #ffffff;
  --shadow: 0 14px 36px rgba(29, 37, 33, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 246, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.amazon-bar-active .site-header {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.nav-wrap,
.section-inner,
.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 134px;
  height: 54px;
  place-items: center;
  border-radius: 7px;
  color: var(--ink);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
}

.button.mobile-cta {
  display: none;
  width: 44px;
  padding: 0;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  background: var(--leaf);
  color: var(--white);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(47, 98, 79, 0.18);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.wp-block-button__link:hover {
  background: var(--leaf-dark);
  box-shadow: 0 14px 26px rgba(47, 98, 79, 0.22);
  transform: translateY(-1px);
}

.button.secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero {
  position: relative;
  min-height: clamp(620px, 88vh, 800px);
  display: flex;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transform: translateZ(0);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-image);
  background-position: center calc(50% + var(--hero-shift, 0px));
  background-size: cover;
  opacity: 1;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(248, 250, 246, 0.98) 0%, rgba(248, 250, 246, 0.88) 34%, rgba(248, 250, 246, 0.18) 70%, rgba(248, 250, 246, 0.06) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 72px;
}

.hero-copy {
  position: relative;
  max-width: 650px;
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--clay);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 22px 0 0;
  color: #3e4b43;
  font-size: clamp(18px, 2.2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-pill {
  padding: 8px 11px;
  border: 1px solid rgba(47, 98, 79, 0.24);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
  color: #2c4338;
  font-size: 13px;
  font-weight: 700;
}

.section {
  padding: 74px 0;
}

.section.alt {
  background: var(--white);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-title h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-title p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
}

.product-photos .section-title,
.brand-story-section .section-title,
.fit-section .section-title {
  display: block;
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.product-photos .section-title h2,
.product-photos .section-title p,
.brand-story-section .section-title h2,
.brand-story-section .section-title p,
.fit-section .section-title h2,
.fit-section .section-title p {
  max-width: none;
}

.product-photos .section-title p,
.brand-story-section .section-title p,
.fit-section .section-title p {
  margin-top: 14px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.buy-panel,
.article-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(29, 37, 33, 0.06);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.feature-card:hover,
.buy-panel:hover {
  border-color: rgba(47, 98, 79, 0.28);
  box-shadow: 0 18px 36px rgba(29, 37, 33, 0.12);
  transform: translateY(-4px);
}

.feature-card {
  padding: 22px;
}

.feature-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 7px;
  background: var(--soft);
  color: var(--leaf);
  font-weight: 900;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3,
.buy-panel h2 {
  margin: 0 0 10px;
  font-size: 19px;
}

.feature-card p,
.buy-panel p,
.article-card p {
  margin: 0;
  color: var(--muted);
}

.product-band {
  background: #1f2d26;
  color: var(--white);
}

.product-detail {
  background: var(--white);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
}

.product-detail-image {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff 0%, #f5f7f1 100%);
  box-shadow: var(--shadow);
  transition: box-shadow 260ms ease, transform 260ms ease;
}

.product-detail-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  transition: transform 360ms ease;
}

.product-detail-image:hover {
  box-shadow: 0 22px 44px rgba(29, 37, 33, 0.16);
  transform: translateY(-3px);
}

.product-detail-image:hover img {
  transform: scale(1.025);
}

.product-detail-copy h2 {
  max-width: 620px;
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.product-detail-copy p:not(.eyebrow) {
  max-width: 560px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
}

.product-band .section-title p,
.product-band .muted {
  color: #c9d3cc;
}

.buy-layout {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 26px;
  align-items: stretch;
}

.buy-copy {
  padding: 42px 0;
}

.buy-copy h2 {
  max-width: 620px;
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.03;
}

.buy-copy p {
  max-width: 540px;
  margin: 0 0 24px;
  color: #d7e0da;
  font-size: 18px;
}

.buy-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.buy-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #edf4ef;
}

.buy-list a {
  color: #fff4bf;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.buy-list a:hover {
  color: var(--white);
}

.buy-list li::before {
  content: "✓";
  color: var(--sun);
  font-weight: 900;
}

.buy-panel {
  align-self: center;
  padding: 28px;
  color: var(--ink);
  text-align: center;
}

.contact-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.contact-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.contact-form label span {
  color: #b74d2c;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.contact-form .iti {
  width: 100%;
  text-align: left;
}

.contact-form .iti__country-list {
  max-width: min(360px, calc(100vw - 40px));
  color: var(--ink);
  text-align: left;
  white-space: normal;
  z-index: 20;
}

.contact-form .iti__country-name,
.contact-form .iti__dial-code {
  font-size: 13px;
}

.contact-form input {
  min-height: 42px;
  padding: 0 12px;
}

.contact-form textarea {
  min-height: 112px;
  padding: 10px 12px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(47, 98, 79, 0.58);
  box-shadow: 0 0 0 3px rgba(47, 98, 79, 0.12);
  outline: none;
}

.contact-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-notice {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 750;
}

.form-notice.success {
  background: #e7f5ed;
  color: #23533f;
}

.form-notice.error {
  background: #faece7;
  color: #8a3c24;
}

.disclosure {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.brand-story-section {
  background: #edf1eb;
}

.brand-story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.brand-story-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(47, 98, 79, 0.18);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(29, 37, 33, 0.06);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.brand-story-card img {
  width: 100%;
  aspect-ratio: 926 / 1250;
  object-fit: cover;
  transition: transform 420ms ease;
}

.photo-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(29, 37, 33, 0.06);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  transition: transform 360ms ease;
}

.photo-card:hover,
.brand-story-card:hover {
  border-color: rgba(47, 98, 79, 0.28);
  box-shadow: 0 18px 36px rgba(29, 37, 33, 0.12);
  transform: translateY(-4px);
}

.photo-card:hover img,
.brand-story-card:hover img {
  transform: scale(1.035);
}

.has-motion .hero-copy {
  animation: hero-copy-in 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.reveal-item {
  opacity: 1;
}

.has-motion .reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.has-motion .reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.has-motion .feature-card:nth-child(2),
.has-motion .photo-card:nth-child(2),
.has-motion .brand-story-card:nth-child(2) {
  transition-delay: 80ms;
}

.has-motion .feature-card:nth-child(3),
.has-motion .photo-card:nth-child(3),
.has-motion .brand-story-card:nth-child(3) {
  transition-delay: 150ms;
}

.has-motion .feature-card:nth-child(4),
.has-motion .photo-card:nth-child(4),
.has-motion .brand-story-card:nth-child(4) {
  transition-delay: 220ms;
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-wrap {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.article-card {
  padding: clamp(24px, 4vw, 44px);
}

.article-card h1 {
  margin-top: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
}

.article-card h2 {
  margin-top: 34px;
}

.article-card li {
  margin: 8px 0;
}

.site-footer {
  padding: 34px 0;
  background: #17211c;
  color: #d8e0dc;
}

.footer-inner {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 640px;
  margin: 8px 0 0;
  color: #aebbb4;
  font-size: 13px;
}

.footer-inner a {
  color: #ffffff;
  font-weight: 750;
  text-decoration: none;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-contact-link {
  white-space: nowrap;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 180ms ease, transform 180ms ease;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.footer-socials img {
  width: 14px;
  height: 14px;
}

.amazon-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) minmax(280px, 1.3fr) auto;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  width: 100%;
  margin: 0;
  padding: 7px max(16px, calc((100vw - 1120px) / 2));
  border: 0;
  border-bottom: 1px solid rgba(47, 98, 79, 0.2);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(29, 37, 33, 0.18);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}

.amazon-sticky-bar.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.amazon-sticky-bar:hover {
  box-shadow: 0 22px 52px rgba(29, 37, 33, 0.24);
}

.amazon-sticky-amazon {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.amazon-sticky-media {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  text-decoration: none;
}

.amazon-sticky-media img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.amazon-sticky-copy {
  min-width: 0;
}

.amazon-sticky-copy strong,
.amazon-sticky-copy span,
.bulk-sticky-copy strong,
.bulk-sticky-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amazon-sticky-copy strong,
.bulk-sticky-copy strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.amazon-sticky-copy span,
.bulk-sticky-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.bulk-sticky-copy {
  min-width: 0;
  padding: 10px 18px;
  border: 1px solid rgba(47, 98, 79, 0.18);
  border-radius: 8px;
  background: rgba(47, 98, 79, 0.08);
  text-align: center;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.bulk-sticky-copy strong {
  color: var(--leaf);
}

.bulk-sticky-copy:hover,
.bulk-sticky-copy:focus-visible {
  background: rgba(47, 98, 79, 0.13);
  border-color: rgba(47, 98, 79, 0.32);
  transform: translateY(-1px);
}

.bulk-sticky-copy:hover strong,
.bulk-sticky-copy:focus-visible strong {
  color: var(--leaf-dark);
}

.bulk-sticky-copy:focus-visible {
  border-radius: 7px;
  outline: 3px solid rgba(47, 98, 79, 0.18);
  outline-offset: 3px;
}

.amazon-sticky-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.social-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.social-contact-button svg,
.social-contact-button img {
  width: 20px;
  height: 20px;
}

.social-contact-button:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.social-contact-button.facebook {
  background: #1877f2;
  box-shadow: 0 10px 20px rgba(24, 119, 242, 0.2);
}

.social-contact-button.tiktok {
  background: #111111;
  box-shadow: 0 10px 20px rgba(17, 17, 17, 0.18);
}

.social-contact-button.instagram {
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 48%, #8134af 100%);
  box-shadow: 0 10px 20px rgba(221, 42, 123, 0.2);
}

.amazon-sticky-button {
  white-space: nowrap;
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .button.mobile-cta {
    display: inline-flex;
  }

  .hero {
    min-height: clamp(620px, 92vh, 760px);
    align-items: start;
  }

  .hero::before {
    background-position: 68% calc(58% + var(--hero-shift, 0px));
    background-size: auto 100%;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(248, 250, 246, 0.99) 0%, rgba(248, 250, 246, 0.94) 42%, rgba(248, 250, 246, 0.26) 74%, rgba(248, 250, 246, 0.06) 100%),
      linear-gradient(90deg, rgba(248, 250, 246, 0.98) 0%, rgba(248, 250, 246, 0.78) 58%, rgba(248, 250, 246, 0.12) 100%);
  }

  .hero-content {
    padding: 72px 0 0;
  }

  .hero-copy {
    max-width: 560px;
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 54px);
    line-height: 1;
  }

  .hero p {
    max-width: 500px;
    font-size: 18px;
  }

  .section-title,
  .footer-inner {
    display: block;
  }

  .footer-actions {
    margin-top: 18px;
  }

  .feature-grid,
  .photo-grid,
  .brand-story-grid,
  .product-detail-layout,
  .buy-layout {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 54px 0;
  }

  .amazon-sticky-bar {
    grid-template-columns: minmax(180px, 1fr) auto;
  }

  .bulk-sticky-copy {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 9px 12px;
    text-align: left;
  }

  .bulk-sticky-copy strong,
  .bulk-sticky-copy span {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 700px;
  }

  .hero::before {
    background-position: 70% calc(60% + var(--hero-shift, 0px));
  }

  .hero-content {
    width: min(100% - 28px, 1120px);
    padding-top: 56px;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 22px;
  }

  .hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .trust-row {
    gap: 8px;
    margin-top: 18px;
  }

  .trust-pill {
    font-size: 12px;
    padding: 9px 10px;
  }

  .brand-mark {
    width: 108px;
    height: 46px;
  }

  .brand {
    gap: 10px;
  }

  .amazon-sticky-bar {
    left: 0;
    right: 0;
    top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
  }

  .amazon-sticky-amazon {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 9px;
  }

  .amazon-sticky-media img {
    width: 48px;
    height: 48px;
  }

  .amazon-sticky-copy strong,
  .bulk-sticky-copy strong {
    font-size: 15px;
  }

  .bulk-sticky-copy span {
    white-space: normal;
  }

  .amazon-sticky-button {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .amazon-sticky-actions {
    gap: 6px;
  }

  .social-contact-button {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 420px) {
  .amazon-sticky-bar {
    grid-template-columns: 1fr;
  }

  .amazon-sticky-amazon {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .amazon-sticky-media img {
    width: 44px;
    height: 44px;
  }

  .amazon-sticky-actions {
    justify-content: stretch;
  }

  .social-contact-button {
    flex: 0 0 42px;
  }

  .amazon-sticky-button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
