/*
Theme Name: TabDr Pharmacy
Theme URI: https://tabdr.com/
Author: Codex
Author URI: https://openai.com/
Description: A responsive online pharmacy WordPress theme with search header, orange hero, category cards, healthcare service blocks, and ecommerce-ready sections.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tabdr-pharmacy
*/

:root {
  --orange: #ff4b08;
  --orange-dark: #ec3500;
  --orange-soft: #fff0e8;
  --ink: #171717;
  --muted: #676767;
  --line: #e8e8e8;
  --panel: #ffffff;
  --green: #17a64a;
  --violet: #5c35b1;
  --shadow: 0 14px 38px rgba(24, 24, 24, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header,
.tabdr-main {
  width: min(1760px, calc(100% - 48px));
  margin: 0 auto;
}

.promo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid #f1e3d6;
}

.promo-bar p {
  margin: 0;
  flex: 1;
  text-align: center;
  font-weight: 600;
}

.promo-bar span,
.hot-link,
.section-head a,
.card-title a {
  color: var(--orange);
}

.promo-bar nav {
  display: flex;
  gap: 24px;
  color: #333;
  font-size: 12px;
  white-space: nowrap;
}

.header-main {
  display: grid;
  grid-template-columns: 230px minmax(320px, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 24px 0 20px;
}

.site-logo {
  display: inline-grid;
  color: #1e1e1e;
  font-size: 38px;
  font-weight: 800;
  line-height: 0.95;
}

.site-logo span {
  color: var(--orange);
}

.site-logo small {
  margin-top: 8px;
  color: #555;
  font-size: 14px;
  font-weight: 500;
}

.search-panel {
  display: grid;
  grid-template-columns: 190px 1fr 72px;
  min-height: 56px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.search-panel select,
.search-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  font: inherit;
  color: #333;
  background: #fff;
}

.search-panel select {
  height: 100%;
  padding: 0 22px;
  border-right: 1px solid #e6e6e6;
}

.search-panel input {
  padding: 0 24px;
}

.search-panel button {
  border: 0;
  color: #fff;
  background: var(--orange);
  font-size: 28px;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 13px;
}

.header-actions a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  line-height: 1.25;
}

.header-actions span {
  grid-row: span 2;
  align-self: center;
  font-size: 24px;
}

.header-actions strong {
  display: block;
  font-size: 13px;
}

.cart-link {
  position: relative;
}

.cart-link em {
  position: absolute;
  top: -9px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 11px;
  font-style: normal;
}

.category-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}

.category-nav .menu {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-nav li {
  list-style: none;
}

.all-categories {
  min-width: 180px;
  padding: 14px 20px;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-weight: 700;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.94fr;
  min-height: 540px;
  padding: 78px 86px;
  overflow: hidden;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #ff7200 0%, #ff5200 45%, #f53c00 100%);
  box-shadow: 0 20px 54px rgba(255, 87, 10, 0.24);
}

.hero::before,
.hero::after {
  content: "+";
  position: absolute;
  color: rgba(255, 255, 255, 0.12);
  font-size: 98px;
  font-weight: 800;
}

.hero::before {
  right: 78px;
  bottom: 132px;
}

.hero::after {
  left: 48%;
  top: 46%;
}

.hero-copy {
  max-width: 760px;
  z-index: 1;
}

.pill {
  display: inline-block;
  margin: 0 0 22px;
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(190, 40, 0, 0.35);
  font-weight: 800;
}

.hero h1 {
  max-width: 720px;
  margin: 0 0 16px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.04;
}

.subtitle {
  max-width: 680px;
  margin: 0 0 30px;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 700;
  line-height: 1.4;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}

.hero-features span {
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  padding: 12px 20px;
  border-radius: 8px;
  background: rgba(226, 55, 0, 0.32);
  font-weight: 800;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 256px;
  min-height: 62px;
  padding: 0 28px;
  border-radius: 8px;
  font-weight: 800;
}

.btn-light {
  color: #1e1e1e;
  background: #fff;
}

.btn-outline {
  border: 2px solid #fff;
}

.hero-art {
  position: relative;
  min-height: 380px;
}

.phone {
  position: absolute;
  left: 2%;
  top: 40px;
  z-index: 2;
  width: 190px;
  height: 330px;
  padding: 72px 28px 28px;
  border: 9px solid #161616;
  border-radius: 28px;
  color: #101010;
  background: linear-gradient(#fff, #f6f6f6);
  box-shadow: 0 20px 26px rgba(0, 0, 0, 0.26);
}

.phone::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 90px;
  height: 18px;
  border-radius: 0 0 12px 12px;
  background: #111;
  transform: translateX(-50%);
}

.phone span {
  display: block;
  color: var(--orange);
  font-size: 28px;
  font-weight: 800;
}

.phone strong {
  display: block;
  margin-top: 54px;
  font-size: 17px;
  line-height: 1.45;
}

.phone i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 28px auto 0;
  border: 4px solid var(--orange);
  border-radius: 999px;
  color: var(--orange);
  font-style: normal;
}

.medicine-bag {
  position: absolute;
  right: 110px;
  bottom: 10px;
  width: 330px;
  height: 275px;
}

.bag-front {
  position: absolute;
  inset: 100px 0 0;
  display: grid;
  place-items: center;
  border-radius: 4px 4px 0 0;
  color: #fff;
  background: linear-gradient(155deg, #ff7a18, #fa3c00);
  font-size: 46px;
  font-weight: 800;
}

.bag-front::before,
.bag-front::after {
  content: "";
  position: absolute;
  top: -36px;
  width: 66px;
  height: 78px;
  border: 4px solid #d7470b;
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.bag-front::before {
  left: 78px;
}

.bag-front::after {
  right: 78px;
}

.bottle,
.strip {
  position: absolute;
  border-radius: 8px;
  box-shadow: 0 12px 18px rgba(55, 10, 0, 0.2);
}

.bottle {
  bottom: 178px;
  width: 58px;
  height: 110px;
  background: linear-gradient(#f8f8f8 0 20%, #fff 20% 43%, #b95d31 43%);
}

.bottle::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 12px;
  width: 34px;
  height: 26px;
  border-radius: 6px 6px 0 0;
  background: #fff;
}

.bottle.tall {
  left: 62px;
}

.bottle.amber {
  right: 88px;
  height: 132px;
  background: linear-gradient(#fff 0 18%, #f3f3f3 18% 39%, #7a2b15 39%);
  transform: rotate(8deg);
}

.strip {
  width: 108px;
  height: 64px;
  background: radial-gradient(circle, #fff 0 11px, transparent 12px), linear-gradient(135deg, #cfcfcf, #fafafa);
  background-size: 38px 38px, auto;
}

.strip-one {
  left: 0;
  bottom: 172px;
  transform: rotate(-14deg);
}

.strip-two {
  right: 0;
  bottom: 182px;
  transform: rotate(17deg);
}

.discount-badge {
  position: absolute;
  top: 36px;
  right: 20px;
  width: 140px;
  padding: 18px 20px;
  border-radius: 14px;
  color: var(--orange);
  background: #fff;
  font-size: 16px;
  font-weight: 800;
}

.discount-badge strong {
  display: block;
  font-size: 44px;
  line-height: 0.95;
}

.discount-badge small {
  display: block;
  margin-top: 4px;
  color: #111;
  font-size: 12px;
}

.plant {
  position: absolute;
  right: 82px;
  bottom: 4px;
  width: 110px;
  height: 126px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(#f5fff5 42%, #e4eadf 42%);
}

.plant::before {
  content: "";
  position: absolute;
  left: -10px;
  bottom: 70px;
  width: 130px;
  height: 86px;
  background: radial-gradient(ellipse at 55% 95%, transparent 0 38%, #159341 39% 68%, transparent 69%), radial-gradient(ellipse at 45% 95%, transparent 0 42%, #64b931 43% 70%, transparent 71%), radial-gradient(ellipse at 65% 95%, transparent 0 48%, #279d42 49% 70%, transparent 71%);
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px auto 22px;
  padding: 22px 40px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.service-strip article {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 84px;
  padding: 0 36px;
  border-right: 1px solid #dcdcdc;
}

.service-strip article:last-child {
  border-right: 0;
}

.service-strip span,
.category-grid span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--orange-soft);
  font-size: 34px;
}

.service-strip h3,
.service-strip p {
  margin: 0;
}

.service-strip p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
}

.category-grid a {
  display: grid;
  gap: 12px;
  place-items: center;
  min-height: 128px;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  text-align: center;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.1fr 2fr 1.2fr 1.1fr;
  gap: 16px;
  margin-top: 16px;
}

.content-grid article {
  min-height: 184px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.deal-card {
  position: relative;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, #ff4b08, #ff9a4d) !important;
}

.deal-card h3,
.deal-card p {
  margin: 0;
}

.deal-card p {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 700;
}

.deal-card strong {
  display: block;
  font-size: 32px;
}

.deal-card a,
.doctor-card a,
.lab-card a,
.ambulance-card a,
.package-card a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 16px;
  padding: 0 18px;
  border-radius: 6px;
  color: #fff;
  background: var(--orange);
  font-weight: 800;
}

.products-card,
.hospital-card {
  padding: 18px;
  border: 1px solid var(--line);
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.card-title h3 {
  margin: 0;
}

.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.products div {
  display: grid;
  gap: 8px;
  min-height: 134px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.products span {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 6px;
  background: #f9f9f9;
  font-size: 32px;
}

.products small {
  color: var(--orange);
  font-weight: 800;
}

.doctor-card {
  display: grid;
  grid-template-columns: 1fr 150px;
  padding: 24px;
  color: #2d126f;
  background: linear-gradient(135deg, #f0e6ff, #fff) !important;
}

.doctor-card h3,
.lab-card h3,
.ambulance-card h3,
.package-card h3 {
  margin: 0;
  font-size: 22px;
}

.doctor-card p {
  color: #381e7c;
  font-weight: 600;
}

.doctor-card a {
  background: var(--violet);
}

.doctor-portrait {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  align-self: end;
  border-radius: 999px;
  background: #fff;
  font-size: 74px;
  box-shadow: 0 12px 28px rgba(92, 53, 177, 0.18);
}

.lab-card {
  padding: 24px;
  background: linear-gradient(135deg, #e3f8e5, #f8fff8) !important;
}

.lab-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: #1f6d38;
  font-weight: 600;
}

.lab-card li {
  margin-bottom: 8px;
}

.lab-card li::before {
  content: "✓ ";
}

.lab-card a {
  background: var(--green);
}

.ambulance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  color: #103d73;
  background: linear-gradient(135deg, #e7f6ff, #fff) !important;
}

.ambulance-card span {
  font-size: 88px;
}

.hospital-card {
  grid-column: span 2;
}

.hospital-services {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.hospital-services span {
  display: grid;
  gap: 8px;
  place-items: center;
  color: var(--orange);
  font-size: 26px;
  font-weight: 800;
  text-align: center;
}

.hospital-services small {
  color: #222;
  font-size: 12px;
}

.package-card {
  padding: 24px;
  background: linear-gradient(135deg, #fff2d6, #fff) !important;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 20px 0 26px;
}

.trust-row span {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  color: var(--orange);
  font-size: 24px;
}

.trust-row strong,
.trust-row small {
  color: #222;
  font-size: 13px;
}

.trust-row small {
  grid-column: 2;
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 44px;
  width: 100%;
  padding: 34px max(24px, calc((100% - min(1760px, calc(100% - 48px))) / 2)) 26px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-footer h4,
.site-footer p {
  margin: 0 0 10px;
}

.site-footer a {
  display: block;
  margin: 7px 0;
  color: #333;
  font-size: 13px;
}

.footer-brand .site-logo {
  margin-bottom: 12px;
  font-size: 36px;
}

.footer-brand p {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.5;
}

.app-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

.app-buttons span {
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
  background: #111;
  font-size: 12px;
  font-weight: 700;
}

.whatsapp {
  position: fixed;
  right: 26px;
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #fff;
  background: #20c663;
  box-shadow: 0 14px 24px rgba(32, 198, 99, 0.34);
  font-size: 28px;
  z-index: 30;
}

.page-content,
.post-content,
.archive-content {
  width: min(1120px, calc(100% - 48px));
  margin: 48px auto;
  line-height: 1.7;
}

@media (max-width: 1200px) {
  .header-main,
  .hero {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .category-nav {
    flex-wrap: wrap;
  }

  .hero {
    padding: 56px;
  }

  .hero-art {
    min-height: 450px;
  }

  .service-strip,
  .category-grid,
  .trust-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-strip article {
    border-right: 0;
    border-bottom: 1px solid #eee;
  }

  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hospital-card {
    grid-column: span 2;
  }

  .site-footer {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header,
  .tabdr-main,
  .page-content,
  .post-content,
  .archive-content {
    width: min(100% - 28px, 1760px);
  }

  .promo-bar {
    display: block;
  }

  .promo-bar p {
    text-align: left;
  }

  .promo-bar nav {
    margin-top: 8px;
    gap: 12px;
    overflow-x: auto;
  }

  .search-panel {
    grid-template-columns: 1fr 56px;
  }

  .search-panel label {
    display: none;
  }

  .category-nav {
    align-items: stretch;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .category-nav a,
  .all-categories {
    white-space: nowrap;
  }

  .hero {
    min-height: auto;
    padding: 34px 24px 24px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-features span,
  .btn {
    width: 100%;
  }

  .phone {
    left: 0;
    transform: scale(0.82);
    transform-origin: top left;
  }

  .medicine-bag {
    right: -52px;
    transform: scale(0.78);
    transform-origin: bottom right;
  }

  .discount-badge {
    right: 0;
    transform: scale(0.86);
    transform-origin: top right;
  }

  .plant {
    display: none;
  }

  .service-strip,
  .category-grid,
  .content-grid,
  .trust-row,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .service-strip {
    padding: 10px 18px;
  }

  .service-strip article {
    padding: 16px 0;
  }

  .products,
  .hospital-services {
    grid-template-columns: repeat(2, 1fr);
  }

  .hospital-card {
    grid-column: auto;
  }

  .doctor-card {
    grid-template-columns: 1fr;
  }
}
