/* ===== J's Joints — Global Styles ===== */

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

:root {
  --bg: #000000;
  --bg-card: #111111;
  --border: #333333;
  --text: #ffffff;
  --text-muted: #aaaaaa;
  --text-dim: #888888;
  --accent: #ffffff;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
  --nav-height: 200px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text);
  text-decoration: none;
}

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

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  height: var(--nav-height);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: flex-start;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--text);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  height: 180px;
  width: auto;
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.nav-right a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-right a:hover {
  color: var(--text);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  touch-action: manipulation;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 999;
  padding: 40px 24px;
}

.mobile-nav.open {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav a {
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.mobile-nav a.active {
  color: var(--text);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
}

/* ===== HOMEPAGE PILLARS ===== */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 80px 0;
}

.pillar {
  text-align: center;
}

.pillar h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  font-weight: 500;
}

.pillar p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== VIP / SUBSCRIBE SECTION ===== */
.subscribe-section {
  text-align: center;
  padding: 80px 24px;
  max-width: 600px;
  margin: 0 auto;
}

.subscribe-section h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.subscribe-section p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.subscribe-form {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px; /* 16px prevents iOS Safari zoom */
  outline: none;
}

.subscribe-form input::placeholder {
  color: var(--text-dim);
}

.subscribe-form button {
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s;
  touch-action: manipulation;
}

.subscribe-form button:hover {
  background: rgba(255,255,255,0.1);
}

/* ===== PAGE TITLE ===== */
.page-title {
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 20px;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

/* ===== ABOUT PAGE ===== */
.about-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.8;
  max-width: 700px;
}

/* ===== CONTACT PAGE ===== */
.contact-info {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

.contact-info a {
  color: var(--text-muted);
  text-decoration: underline;
}

.contact-form {
  max-width: 700px;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.contact-form .form-group {
  margin-bottom: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  font-size: 16px; /* 16px prevents iOS Safari zoom */
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--text-muted);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-dim);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
  border-radius: 16px;
}

.btn-send {
  padding: 12px 32px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 24px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--font-body);
  touch-action: manipulation;
}

.btn-send:hover {
  opacity: 0.85;
}

/* ===== WHOLESALE / PRODUCTS PAGE ===== */
.wholesale-title {
  font-size: 2.8rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 40px;
}

.notice-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 48px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.notice-box strong {
  color: var(--text);
}

.notice-box span {
  color: var(--text-muted);
}

.products-heading {
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 24px;
}

/* Product Cards */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 20px;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.product-name {
  font-size: 1.4rem;
  font-weight: 600;
}

.product-type {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.product-details {
  display: flex;
  gap: 40px;
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.product-detail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.product-detail-value {
  font-size: 1.4rem;
  font-weight: 600;
}

.product-strain {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.quantity-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.quantity-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
}

.quantity-control button {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  touch-action: manipulation; /* prevents double-tap zoom on iOS */
  -webkit-user-select: none;
  user-select: none;
}

.quantity-control button:hover {
  background: rgba(255,255,255,0.08);
}

.quantity-control input {
  width: 50px;
  height: 44px;
  text-align: center;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--text);
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom */
  font-family: var(--font-body);
  outline: none;
  -moz-appearance: textfield;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* Dispensary Form */
.dispensary-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px;
  margin-top: 48px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.dispensary-section h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 28px;
}

.dispensary-section label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dispensary-section label .required {
  color: var(--text-muted);
}

.dispensary-section input,
.dispensary-section textarea {
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom */
  font-family: var(--font-body);
  outline: none;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.dispensary-section input:focus,
.dispensary-section textarea:focus {
  border-color: var(--text-muted);
}

.dispensary-section input::placeholder,
.dispensary-section textarea::placeholder {
  color: var(--text-dim);
}

.dispensary-section textarea {
  min-height: 100px;
  resize: vertical;
}

.btn-order {
  display: block;
  margin: 40px auto 0;
  padding: 16px 48px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--font-body);
  touch-action: manipulation;
}

.btn-order:hover {
  opacity: 0.85;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.social-links a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--text);
}

.social-links svg {
  width: 22px;
  height: 22px;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ===== FORM SUCCESS MESSAGE ===== */
.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.form-success.show {
  display: block;
}

.form-success h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.form-success p {
  color: var(--text-muted);
}

/* ===== AGE GATE ===== */
.age-gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.age-gate.hidden {
  display: none;
}

.age-gate-box {
  background: var(--text);
  color: var(--bg);
  padding: 48px 60px;
  border-radius: 12px;
  text-align: center;
}

.age-gate-box h2 {
  font-size: 1.6rem;
  margin-bottom: 24px;
  font-weight: 600;
}

.age-gate-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.age-gate-buttons button {
  padding: 12px 32px;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-body);
  transition: opacity 0.2s;
  touch-action: manipulation;
}

.btn-age-yes {
  background: var(--bg);
  color: var(--text);
}

.btn-age-no {
  background: var(--bg);
  color: var(--text);
}

.age-gate-buttons button:hover {
  opacity: 0.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root {
    --nav-height: 180px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-right {
    gap: 12px;
  }

  .logo img {
    height: 160px;
  }

  .pillars {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 0;
  }

  .pillar {
    text-align: left;
    padding-left: 0;
  }

  .main-content {
    padding: 40px 20px;
  }

  .wholesale-title {
    font-size: 2rem;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .contact-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .subscribe-section {
    padding: 40px 20px;
  }

  .subscribe-section h2 {
    font-size: 1.4rem;
  }

  .product-card {
    padding: 20px;
  }

  .product-name {
    font-size: 1.2rem;
  }

  .dispensary-section {
    padding: 24px 20px;
  }

  .age-gate-box {
    padding: 36px 32px;
    margin: 0 20px;
  }

  .age-gate-box h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-height: 160px;
  }

  .nav-container {
    padding: 0 16px;
  }

  .logo img {
    height: 140px;
  }

  .main-content {
    padding: 32px 16px;
  }

  .product-details {
    gap: 24px;
  }

  .quantity-control button {
    width: 40px;
    height: 40px;
  }

  .quantity-control input {
    width: 44px;
    height: 40px;
  }

  .btn-order {
    width: 100%;
    padding: 16px 24px;
  }
}
