/*
Theme Name: Pharmex De Memon
Theme URI: https://pharmexdm.com
Author: Pharmex De Memon
Author URI: https://pharmexdm.com
Description: Custom WooCommerce theme for Pharmex De Memon — pharmaceutical distributor and pharmacy store serving both trade (B2B) and retail (B2C) customers in Karachi, Pakistan.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: pharmexdm
Tags: e-commerce, woocommerce, custom
*/

/* ==========================================================================
   DESIGN TOKENS
   Palette is built from the two brand colors (leaf green #62B848,
   clinical teal #08A8B8) plus a green-tinted ink and paper so the whole
   site reads as one family rather than "brand color + generic gray."
   ========================================================================== */

:root {
  /* Brand */
  --pdm-green:        #62B848;
  --pdm-green-dark:    #4C9438;
  --pdm-green-light:   #7FCB63;
  --pdm-teal:          #08A8B8;
  --pdm-teal-dark:     #078494;
  --pdm-teal-light:    #3EC0CD;

  /* Neutrals — tinted, not pure gray/black */
  --pdm-ink:           #12271F;   /* primary text */
  --pdm-ink-soft:      #3E544C;   /* secondary text */
  --pdm-paper:         #F6FAF7;   /* page background */
  --pdm-card:          #FFFFFF;
  --pdm-mint:          #EAF6E7;   /* green-tinted section bg */
  --pdm-sky:           #E3F6F8;   /* teal-tinted section bg */
  --pdm-line:          #D9E7DD;   /* hairline borders */

  /* Signal */
  --pdm-alert:         #D9483B;   /* Rx required / low stock */
  --pdm-alert-tint:    #FBEAE8;
  --pdm-gold:          #C89A2C;   /* ratings, featured */

  /* Type */
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* Scale */
  --step-0:  0.9375rem;   /* 15px body */
  --step-1:  1.125rem;
  --step-2:  1.375rem;
  --step-3:  1.75rem;
  --step-4:  2.25rem;
  --step-5:  3rem;

  /* Rhythm */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --container: 1240px;
}

/* ==========================================================================
   RESET / BASE
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--pdm-ink);
  background: var(--pdm-paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--pdm-teal-dark);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--pdm-green-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--pdm-ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: var(--step-5); letter-spacing: -0.02em; }
h2 { font-size: var(--step-4); letter-spacing: -0.01em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link.screen-reader-text:focus {
  position: fixed !important;
  top: 0.5rem; left: 0.5rem;
  width: auto; height: auto;
  clip: auto;
  background: var(--pdm-ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 100;
}

/* Visible keyboard focus everywhere — accessibility floor */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--pdm-teal);
  outline-offset: 2px;
}

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

/* ==========================================================================
   SIGNATURE ELEMENT — the "blister strip" divider
   A perforated line echoing a medicine blister pack, used once per major
   section break instead of a plain <hr>. Sparingly applied by design.
   ========================================================================== */

.blister-divider {
  --dot: 10px;
  height: var(--dot);
  margin: 0;
  border: none;
  background-image: radial-gradient(circle, var(--pdm-line) 2px, transparent 2.5px);
  background-size: 22px var(--dot);
  background-repeat: repeat-x;
  background-position: center;
}
.blister-divider.on-mint { background-image: radial-gradient(circle, #C9E4C1 2px, transparent 2.5px); }
.blister-divider.on-sky  { background-image: radial-gradient(circle, #B9E4E8 2px, transparent 2.5px); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85em 1.7em;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--pdm-green);
  color: #fff;
}
.btn-primary:hover { background: var(--pdm-green-dark); color: #fff; }

.btn-secondary {
  background: transparent;
  border-color: var(--pdm-teal);
  color: var(--pdm-teal-dark);
}
.btn-secondary:hover { background: var(--pdm-teal); color: #fff; }

/* Badges — pill-shaped, echoing tablets */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3em 0.85em;
  border-radius: 999px;
  background: var(--pdm-mint);
  color: var(--pdm-green-dark);
}
.badge.rx { background: var(--pdm-alert-tint); color: var(--pdm-alert); }
.badge.wholesale { background: var(--pdm-sky); color: var(--pdm-teal-dark); }

/* Price / SKU data uses the mono face — a small nod to prescription labels */
.price-tag { font-family: var(--font-mono); font-weight: 600; }
