/* Joy Research Supply — hovers, transitions, responsive. Layout lives inline in render.php. */

.joy-body { margin: 0; background: #fbf7f2; font-family: 'Karla', sans-serif; color: #453b33; }
.joy-body * { box-sizing: border-box; }

/* hovers */
.joy-hover-dark { transition: background .15s ease; }
.joy-hover-dark:hover { background: #2f2822 !important; }
.joy-hover-peach { transition: background .15s ease; }
.joy-hover-peach:hover { background: #f2d9c4 !important; }
.joy-hover-cream { transition: background .15s ease; }
.joy-hover-cream:hover { background: #f6efe6 !important; }

.joy-navlink { transition: background .15s ease; }
.joy-navlink:hover { background: #fff; }
.joy-login-chip:hover, .joy-logout:hover { color: #a06a35 !important; }
.joy-cart-open { transition: background .15s ease; }
.joy-cart-open:hover { background: #eccdb0 !important; }

.joy-card { transition: transform .18s ease, box-shadow .18s ease; }
.joy-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(69, 59, 51, .09); }
.joy-tile { transition: transform .18s ease; }
.joy-tile:hover { transform: translateY(-3px); }
.joy-chip { transition: background .15s ease, color .15s ease; }
.joy-chip.is-on { background: #453b33 !important; color: #fff !important; }
.joy-coa-row { transition: background .12s ease; }
.joy-coa-row:hover { background: #fbf7f2; }
.joy-packitem { transition: border-color .15s ease; }
.joy-packitem.is-on { border-color: #453b33 !important; }
.joy-packitem.is-on .joy-packcheck { background: #453b33; color: #fff; }
.joy-pack-add.is-ready { background: #fff; color: #453b33; cursor: pointer; }
.joy-pack-add.is-ready:hover { background: #f2d9c4; }

/* drawer + modals */
.joy-drawer { animation: joySlideIn .25s ease; }
.joy-drawer-scrim, .joy-modal-scrim { animation: joyFade .2s ease; }
@keyframes joySlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes joyFade { from { opacity: 0; } to { opacity: 1; } }

.joy-qty-btn { width: 24px; height: 24px; border-radius: 99px; background: #f0e8dd; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 800; font-size: 13px; user-select: none; }

/* floating vials (home pack promo) */
.joy-vial-float { animation: joyFloat 4s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(0,0,0,.35)); }
@keyframes joyFloat {
	0%, 100% { transform: translateY(0) rotate(-1.5deg); }
	50% { transform: translateY(-9px) rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) { .joy-vial-float { animation: none; } }
.joy-qty-btn:hover { background: #e2d5c2; }
.joy-line-remove { font-size: 11.5px; font-weight: 700; color: #c4938a; cursor: pointer; margin-left: auto; }

/* checkout inputs */
.joy-input { border: 1.5px solid #eee2d2; border-radius: 12px; padding: 13px 16px; font-size: 14px; outline: none; background: #fff; font-family: 'Karla', sans-serif; width: 100%; }
.joy-input:focus { border-color: #453b33; }

/* redeem toggle */
.joy-redeem { display: flex; justify-content: space-between; align-items: center; border-radius: 14px; padding: 13px 16px; margin-bottom: 16px; cursor: pointer; background: rgba(255,255,255,.1); color: #f2d9c4; transition: background .15s ease; }
.joy-redeem.is-on { background: #f2d9c4; color: #453b33; }

/* responsive */
.joy-coa-scroll { scrollbar-width: thin; scrollbar-color: #d9cdbd transparent; }
.joy-coa-scroll::-webkit-scrollbar { height: 8px; }
.joy-coa-scroll::-webkit-scrollbar-thumb { background: #e4d9c8; border-radius: 99px; }
@media (max-width: 1100px) {
  .joy-prod-grid { grid-template-columns: 1fr !important; }
  .joy-pd-info { grid-template-columns: 1fr !important; }
  .joy-grid4 { grid-template-columns: repeat(2, 1fr) !important; }
  .joy-hero-grid { grid-template-columns: 1fr 1fr !important; grid-template-rows: auto !important; }
  .joy-hero-grid > div:first-child, .joy-hero-grid > a, .joy-hero-grid > div { grid-row: auto !important; }
  .joy-rw-cards, .joy-values { grid-template-columns: 1fr !important; }
  .joy-pack-layout { grid-template-columns: 1fr !important; }
  .joy-pack-summary { position: static !important; }
  .joy-about-hero, .joy-contact, .joy-checkout-body { grid-template-columns: 1fr !important; }
  .joy-packpromo { grid-template-columns: 1fr !important; }
  .joy-coa-head, .joy-coa-row { grid-template-columns: 1.5fr 1fr 1fr 1fr !important; }
  .joy-coa-head span:nth-child(5), .joy-coa-head span:nth-child(6),
  .joy-coa-row span:nth-child(5), .joy-coa-row span:nth-child(6) { display: none; }
}

/* ============ MOBILE (≤700px) ============ */
@media (max-width: 700px) {
  /* header: logo + actions on row 1, nav scrolls full-width below */
  .joy-header { flex-wrap: wrap !important; padding: 12px 16px !important; gap: 8px !important; }
  .joy-nav {
    order: 3;
    width: 100%;
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 2px -16px -6px;
    padding: 0 16px 6px;
  }
  .joy-nav::-webkit-scrollbar { display: none; }
  .joy-navlink { white-space: nowrap; flex: none; padding: 8px 13px !important; font-size: 13.5px !important; }
  .joy-header > div:last-child { margin-left: auto; }
  .joy-cart-open { padding: 9px 14px !important; }

  /* announcement bar */
  .joy-body > div:first-child[style*="background:#453b33"] { font-size: 11px !important; padding: 7px 10px !important; }

  /* page gutters */
  .joy-page, .joy-home > div { padding-left: 16px !important; padding-right: 16px !important; }
  .joy-page h1 { font-size: 30px !important; }

  /* hero */
  .joy-hero-grid { grid-template-columns: 1fr !important; padding: 12px 16px 24px !important; gap: 10px !important; }
  .joy-hero-grid > div:first-child { padding: 28px 22px !important; min-height: 0 !important; }
  .joy-hero-grid h1 { font-size: 32px !important; }
  .joy-hero-grid > div, .joy-hero-grid > a { min-height: 150px; }

  /* product grids: 2-up on phones */
  .joy-grid4 { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .joy-grid4 .joy-card { padding: 10px !important; }
  .joy-grid4 .joy-card > div:first-child { height: 120px !important; }

  /* pack promo: stack + center vials */
  .joy-packpromo { padding: 26px 22px !important; gap: 22px !important; text-align: center; }
  .joy-packpromo h3 { font-size: 22px !important; }
  .joy-packpromo p { margin: 0 auto !important; }
  .joy-vial-trio { justify-content: center; }
  .joy-packpromo > a { justify-self: center; }

  /* build a pack */
  .joy-pack-grid { grid-template-columns: 1fr !important; }
  .joy-pack-summary { padding: 22px !important; }

  /* COA table: product / purity / link only */
  .joy-coa-head, .joy-coa-row { grid-template-columns: 1.6fr 0.9fr 1fr !important; padding: 13px 16px !important; }
  .joy-coa-head span:nth-child(2), .joy-coa-row span:nth-child(2),
  .joy-coa-head span:nth-child(3), .joy-coa-row span:nth-child(3) { display: none; }

  /* contact + checkout modal grids */
  .joy-contact { gap: 24px !important; }
  .joy-contact-form > div:first-child { grid-template-columns: 1fr !important; }
  .joy-checkout-body div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .joy-checkout-body [style*="grid-column:span 2"] { grid-column: auto !important; }

  /* overlays: full-screen sheets on phones */
  .joy-drawer { width: 100vw !important; max-width: 100vw !important; }
  .joy-detail, .joy-checkout-wrap > div[data-screen-label] {
    inset: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    max-height: none !important;
    height: auto !important;
    border-radius: 0 !important;
    padding: 20px 16px 40px !important;
  }
  .joy-detail-grid { grid-template-columns: 1fr !important; }

  /* rewards */
  .joy-rw-cards > div { padding: 22px !important; }

  /* footer */
  .joy-footer, footer { padding-left: 16px !important; padding-right: 16px !important; }

  /* product page */
  .joy-prod-grid > div:last-child { padding: 22px 18px !important; }
  .joy-prod-grid h1 { font-size: 30px !important; }
  .joy-coa-scroll > div { width: 270px !important; }

  /* comfortable tap targets */
  .joy-add, .joy-notify-open { padding: 9px 16px !important; }
  .joy-qty-btn { width: 30px; height: 30px; }
  .joy-chip, .joy-schip { padding: 9px 15px !important; }
}

@media (max-width: 400px) {
  .joy-grid4 { grid-template-columns: 1fr !important; }
}
