/*
Theme Name: MedOne Academy Catalogue
Theme URI: https://www.medone.academy/
Author: MedOne Academy
Description: Lightweight WooCommerce theme for the MedOne A-Z compounding formulary.
Version: 1.0.0
Text Domain: medone-academy
*/

:root {
  --ink: #001a3c;
  --muted: #64748b;
  --brand: #1152f2;
  --brand-dark: #07306e;
  --brand-soft: #edf3ff;
  --accent: #1fddcb;
  --surface: #fff;
  --canvas: #f5f8fc;
  --line: #dce5f0;
  --shadow: 0 14px 40px rgba(27, 65, 56, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Tajawal", Arial, sans-serif;
}
button, input { font: inherit; }
a { color: var(--brand); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 78px;
  padding: 10px 0;
  background: #fff;
  box-shadow: 0 2px 14px rgba(0, 26, 60, .06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1170px, 90vw);
  min-height: 58px;
  margin: 0 auto;
}
.brand-logo {
  display: block;
  width: 210px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}
.primary-nav { display: flex; align-items: center; gap: 34px; }
.primary-nav a {
  color: var(--brand);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}
.primary-nav a:hover { color: var(--brand-dark); }
.primary-nav .sign-in {
  min-width: 96px;
  padding: 11px 19px;
  color: #fff;
  background: var(--brand);
  text-align: center;
  box-shadow: 0 5px 13px rgba(17, 82, 242, .22);
}
.primary-nav .sign-in:hover { color: #fff; background: #0b43cb; transform: translateY(-1px); }
.menu-toggle {
  display: none;
  gap: 6px;
  width: 46px;
  height: 46px;
  padding: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span { display: block; height: 3px; border-radius: 2px; background: #999; }

.hero {
  padding: 76px 5vw 56px;
  text-align: center;
  background:
    radial-gradient(circle at 18% 5%, rgba(31, 221, 203, .22), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(17, 82, 242, .10), transparent 34%),
    #f1f8ff;
}
.eyebrow {
  margin: 0 0 13px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 880px;
  margin: 0 auto 20px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.03;
  letter-spacing: -.045em;
}
.hero-copy {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}
.secure-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 10px 14px;
  border: 1px solid #cbdcff;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 700;
}
.secure-note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(31, 221, 203, .14);
}

.catalogue-main { width: min(1180px, 90vw); margin: 0 auto; padding: 48px 0 72px; }
.toolbar {
  position: sticky;
  top: 92px;
  z-index: 20;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.search-wrap { position: relative; }
.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  stroke: #7587a1;
  pointer-events: none;
}
#medone-search {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px 12px 46px;
  border: 1px solid #cad6e6;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #fff;
}
#medone-search:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(17, 82, 242, .12); }
.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.letter {
  min-width: 40px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #c7d4e6;
  border-radius: 10px;
  color: #284466;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease;
}
.letter:hover, .letter:focus-visible { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.letter.active { border-color: var(--brand); color: #fff; background: var(--brand); box-shadow: 0 6px 18px rgba(17, 82, 242, .22); }
.catalogue-meta { margin: 28px 2px 16px; color: var(--muted); font-size: 14px; }
#medone-count { color: var(--ink); font-weight: 800; }
.catalogue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catalogue-card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(27, 65, 56, .06);
  animation: reveal .22s ease both;
}
.catalogue-card[hidden] { display: none; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.initial { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: var(--brand); background: var(--brand-soft); font-size: 18px; font-weight: 800; }
.status { padding: 6px 9px; border-radius: 999px; color: #9a6b08; background: #fff4d8; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.price { color: var(--brand-dark); font-weight: 800; }
.catalogue-card h2 { margin: 0 0 9px; font-size: 18px; line-height: 1.35; }
.catalogue-card p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: auto;
  padding: 9px 12px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.card-action:hover { color: #fff; background: var(--brand-dark); }
.empty { display: none; padding: 46px 20px; border: 1px dashed #b8cec7; border-radius: var(--radius); color: var(--muted); background: #fff; text-align: center; }
.catalogue-empty { padding: 46px 20px; border: 1px dashed #b8cec7; border-radius: var(--radius); color: var(--muted); background: #fff; text-align: center; }
.disclaimer { margin-top: 40px; padding: 22px; border-left: 4px solid var(--brand); border-radius: 0 14px 14px 0; color: #5f706a; background: #eef6ff; line-height: 1.6; }
.disclaimer strong { color: var(--ink); }

.content-shell { width: min(1120px, 90vw); margin: 42px auto 72px; padding: 30px; border-radius: 16px; background: #fff; }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button { color: #fff; background: var(--brand); border-radius: 8px; }
.woocommerce .button:hover, .woocommerce button.button:hover, .woocommerce a.button:hover { color: #fff; background: var(--brand-dark); }

.site-footer { padding: 60px 0; color: #fff; background: #07306e; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 38px; width: min(1170px, 90vw); margin: 0 auto; }
.footer-logo-wrap { display: inline-flex; padding: 7px 10px; border-radius: 4px; background: #fff; }
.footer-logo { width: 180px; height: 44px; object-fit: contain; }
.social-links { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0; }
.social-links a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #07306e; background: var(--accent); font-size: 13px; font-weight: 800; text-decoration: none; }
.site-footer h2 { margin: 0 0 18px; color: #fff; font-size: 23px; line-height: 1.3; }
.site-footer p, .site-footer li, .site-footer a { color: rgba(255,255,255,.9); font-size: 15px; line-height: 1.7; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.copyright { margin: 0; color: rgba(255,255,255,.78); }
.member-button { display: inline-block; margin-top: 12px; padding: 12px 20px; border-radius: 4px; color: #07306e !important; background: var(--accent); font-weight: 700; }

@media (max-width: 900px) {
  .catalogue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-nav { gap: 19px; }
  .primary-nav a { font-size: 15px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-header { min-height: 74px; padding: 8px 0; }
  .brand-logo { width: 150px; height: 48px; }
  .menu-toggle { display: grid; }
  .primary-nav { position: absolute; left: 0; right: 0; top: 74px; display: none; align-items: stretch; flex-direction: column; gap: 0; padding: 12px 5vw 18px; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 12px 24px rgba(0,26,60,.12); }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 11px 4px; }
  .hero { padding: 54px 5vw 40px; }
  .catalogue-main { width: min(92vw, 1180px); padding-top: 28px; }
  .toolbar { position: static; padding: 14px; }
  .letter { min-width: 37px; height: 37px; }
  .catalogue-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 46px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
}
