/**
 * Pharmacy Child — DocMorris-inspired UI on Blocksy (banner panels + grey page bg).
 */

:root {
  --pharmacy-primary: #0a5c32;
  --pharmacy-primary-dark: #063d22;
  --pharmacy-primary-light: #e3efe8;
  --pharmacy-accent: #0a5c32;
  --pharmacy-nav-bg: #084428;
  --pharmacy-nav-hover: #0c6b3c;
  --pharmacy-page-bg: #d4d4d4;
  --pharmacy-surface: #b5dff5;
  --pharmacy-surface-muted: rgba(255, 255, 255, 0.5);
  --pharmacy-surface-text: #000000;
  --pharmacy-surface-text-muted: #000000;
  --pharmacy-border: #8ecae6;
  --pharmacy-gold: #d4af37;
  --pharmacy-panel-image: linear-gradient(
    180deg,
    #66b6e3 0%,
    #96cff0 40%,
    #c2e5f9 75%,
    #e0f2fc 100%
  );
  --pharmacy-text: #1a1a1a;
  --pharmacy-text-muted: #666666;
  --pharmacy-radius: 6px;
  --pharmacy-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.pharmacy-store {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--pharmacy-text);
  background-attachment: scroll;
  background-color: var(--pharmacy-page-bg);
  background-image: none;
}

body.pharmacy-store h1,
body.pharmacy-store h2,
body.pharmacy-store h3,
body.pharmacy-store h4 {
  font-family: "DM Sans", Inter, sans-serif;
  color: var(--pharmacy-text);
}

body.pharmacy-store .site-main,
body.pharmacy-store .ct-container,
body.pharmacy-store .ct-container-fluid {
  background-color: transparent;
}

body.pharmacy-store .site-header,
body.pharmacy-store header[data-id="type-1"] {
  background-color: transparent !important;
  box-shadow: 0 1px 0 var(--pharmacy-border);
  position: relative;
}

body.pharmacy-store header[data-id="type-1"] [data-row="middle"],
body.pharmacy-store .site-header [data-row="middle"] {
  align-items: center;
  background: transparent;
  display: flex !important;
  flex-wrap: nowrap;
  gap: 0;
  justify-content: center;
  min-height: 5.5rem;
  padding: 0.75rem 20px !important;
  position: relative;
}

/* Title + toolbar as one centered row; fixed gaps between items, no overlap */
body.pharmacy-store #header [data-row="middle"] > .ct-container {
  align-items: center;
  display: flex !important;
  flex-wrap: nowrap;
  gap: 1.5rem;
  justify-content: center;
  margin-inline: auto;
  max-width: min(100%, 1180px);
  width: fit-content !important;
}

body.pharmacy-store #header [data-column="start"] {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: none;
  min-width: 0;
  position: relative;
  width: auto !important;
  z-index: 1;
}

body.pharmacy-store #header [data-column="start"] [data-items="primary"] {
  justify-content: flex-start;
  width: auto !important;
}

body.pharmacy-store #header [data-column="start"] .site-title,
body.pharmacy-store #header [data-column="start"] .site-description {
  margin: 0;
  text-align: left;
  white-space: nowrap;
}

body.pharmacy-store #header [data-column="start"] .site-title {
  font-size: clamp(0.95rem, 1.35vw, 1.125rem);
  line-height: 1.2;
}

body.pharmacy-store #header [data-column="start"] .site-title a,
body.pharmacy-store #header [data-column="start"] .site-description a {
  display: inline-block;
  text-align: left;
  white-space: nowrap;
}

body.pharmacy-store #header [data-column="middle"],
body.pharmacy-store #header [data-column="end"],
body.pharmacy-store #header [data-id="menu"],
body.pharmacy-store #header .header-menu-1,
body.pharmacy-store #header nav[id*="header-menu"],
body.pharmacy-store #header .ct-header-search {
  display: none !important;
}

.pharmacy-header-toolbar {
  align-items: center;
  display: grid;
  flex: 0 1 auto;
  gap: 0.75rem;
  grid-template-columns: minmax(260px, 520px) auto auto;
  min-width: 0;
  position: relative;
  width: max-content;
  z-index: 1;
}

.pharmacy-header-toolbar__search-wrap {
  grid-column: 1;
  justify-self: stretch;
  max-width: none;
  min-width: 0;
  position: static;
  transform: none;
  width: 100%;
}

.pharmacy-header-toolbar__phone {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(10, 92, 50, 0.18);
  border-radius: var(--pharmacy-radius);
  box-shadow: var(--pharmacy-shadow);
  color: var(--pharmacy-text);
  font-size: 0.88rem;
  grid-column: 2;
  line-height: 1.35;
  padding: 0.45rem 0.85rem;
  text-align: right;
  white-space: nowrap;
}

.pharmacy-header-toolbar__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.35rem;
  grid-column: 3;
}

.pharmacy-product-search {
  align-items: stretch;
  display: flex;
  width: 100%;
}

.pharmacy-product-search__input {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--pharmacy-border);
  border-radius: var(--pharmacy-radius) 0 0 var(--pharmacy-radius);
  border-right: 0;
  color: var(--pharmacy-text);
  flex: 1;
  font-size: 0.92rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
}

.pharmacy-product-search__input:focus {
  border-color: var(--pharmacy-primary);
  outline: none;
}

.pharmacy-product-search__button {
  align-items: center;
  background: var(--pharmacy-primary);
  border: 1px solid var(--pharmacy-primary);
  border-radius: 0 var(--pharmacy-radius) var(--pharmacy-radius) 0;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0 0.75rem;
}

.pharmacy-product-search__button:hover,
.pharmacy-product-search__button:focus-visible {
  background: var(--pharmacy-primary-dark);
  border-color: var(--pharmacy-primary-dark);
}

.pharmacy-product-search__button svg {
  fill: currentColor;
  height: 1.1rem;
  width: 1.1rem;
}

.pharmacy-header-toolbar__phone-label {
  color: var(--pharmacy-text);
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
}

.pharmacy-header-toolbar__phone-number {
  color: var(--pharmacy-primary);
  display: block;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.pharmacy-header-toolbar__phone-number:hover,
.pharmacy-header-toolbar__phone-number:focus-visible {
  color: var(--pharmacy-primary-dark);
  text-decoration: underline;
}

.pharmacy-header-icon {
  align-items: center;
  color: var(--pharmacy-primary);
  display: inline-flex;
  height: 2.5rem;
  justify-content: center;
  position: relative;
  text-decoration: none;
  width: 2.5rem;
}

.pharmacy-header-icon:hover,
.pharmacy-header-icon:focus-visible {
  color: var(--pharmacy-primary-dark);
}

.pharmacy-header-icon__svg {
  display: block;
  fill: currentColor;
  height: 1.45rem;
  width: 1.45rem;
}

.pharmacy-header-icon__badge {
  align-items: center;
  background: var(--pharmacy-primary);
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  height: 1.15rem;
  justify-content: center;
  line-height: 1;
  min-width: 1.15rem;
  padding: 0 0.2rem;
  position: absolute;
  right: 0.1rem;
  top: 0.1rem;
}

.pharmacy-header-icon__badge:not(.has-items) {
  opacity: 0.85;
}

.pharmacy-header-icon[data-tooltip]::after,
.pharmacy-category-nav__link[data-tooltip]::after {
  background: var(--pharmacy-primary-dark);
  border-radius: 4px;
  color: #fff;
  content: attr(data-tooltip);
  font-size: 0.72rem;
  font-weight: 600;
  left: 50%;
  line-height: 1.2;
  opacity: 0;
  padding: 0.3rem 0.55rem;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  transform: translateX(-50%);
  transition: opacity 0.15s ease, visibility 0.15s ease;
  visibility: hidden;
  white-space: nowrap;
  z-index: 100;
}

.pharmacy-header-icon[data-tooltip]:hover::after,
.pharmacy-header-icon[data-tooltip]:focus-visible::after,
.pharmacy-category-nav__link[data-tooltip]:hover::after,
.pharmacy-category-nav__link[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

body.pharmacy-store .site-footer {
  border-top: 1px solid var(--pharmacy-border);
  color: var(--pharmacy-surface-text);
}

.pharmacy-promo-bar {
  background: var(--pharmacy-nav-bg);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 0.55rem 1rem;
  text-align: center;
}

.pharmacy-promo-bar strong {
  font-weight: 700;
}

/* DocMorris-style category bar with hover mega menu */
.pharmacy-category-nav {
  background: var(--pharmacy-nav-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 60;
}

.pharmacy-category-nav__inner {
  max-width: 100%;
}

.pharmacy-category-nav__toggle {
  display: none;
}

.pharmacy-category-nav__toggle-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.pharmacy-category-nav__toggle-icon {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  display: inline-block;
  height: 0.55rem;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  width: 0.55rem;
}

.pharmacy-category-nav.is-menu-open .pharmacy-category-nav__toggle-icon {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.pharmacy-category-nav__list {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pharmacy-category-nav__item--home .pharmacy-category-nav__link--home {
  min-width: 3rem;
  padding-left: 0.85rem;
  padding-right: 0.65rem;
  position: relative;
}

.pharmacy-category-nav__home-svg {
  display: block;
  fill: currentColor;
  height: 1.2rem;
  width: 1.2rem;
}

.pharmacy-category-nav__item {
  position: static;
}

.pharmacy-category-nav__link {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 600;
  gap: 0.35rem;
  padding: 0.85rem 1.15rem;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.pharmacy-category-nav__link:hover,
.pharmacy-category-nav__item.is-open > .pharmacy-category-nav__link,
.pharmacy-category-nav__item.has-mega-menu:hover > .pharmacy-category-nav__link {
  background: var(--pharmacy-nav-hover);
  color: #fff;
}

.pharmacy-category-nav__caret {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  display: inline-block;
  margin-top: 2px;
}

.pharmacy-mega-menu {
  background: #ffffff;
  border-top: 3px solid var(--pharmacy-primary);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.14);
  display: none;
  left: 0;
  position: absolute;
  right: 0;
  top: 100%;
  width: 100%;
}

.pharmacy-category-nav__item.has-mega-menu:hover .pharmacy-mega-menu,
.pharmacy-category-nav__item.has-mega-menu:focus-within .pharmacy-mega-menu,
.pharmacy-category-nav__item.has-mega-menu.is-open .pharmacy-mega-menu {
  display: block;
}

.pharmacy-mega-menu__panel {
  padding: 1.25rem 1.5rem 1.5rem;
}

.pharmacy-mega-menu__title {
  color: #000;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.pharmacy-mega-menu__grid {
  display: grid;
  gap: 0.35rem 1.25rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.pharmacy-mega-menu__list {
  display: grid;
  gap: 0.35rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  max-width: 520px;
  padding: 0;
}

.pharmacy-mega-menu__grid a,
.pharmacy-mega-menu__list a {
  color: #000;
  display: block;
  font-size: 0.92rem;
  padding: 0.35rem 0;
  text-decoration: none;
}

.pharmacy-mega-menu__grid a:hover,
.pharmacy-mega-menu__list a:hover {
  color: #000;
  text-decoration: underline;
}

.pharmacy-mega-menu__all {
  color: #000;
  display: inline-block;
  font-weight: 700;
  margin-top: 1rem;
  text-decoration: none;
}

.pharmacy-mega-menu__all:hover {
  text-decoration: underline;
}

.pharmacy-hero,
.pharmacy-categories .wp-block-column,
.pharmacy-trust,
.pharmacy-category-intro,
.tax-product_cat.term-drugs .woocommerce ul.products li.product-category,
.tax-product_cat.term-drugs .products .product-category,
.woocommerce ul.products li.product,
.wc-block-grid__product,
.wc-block-product-new .wc-block-grid__product,
body.pharmacy-store .site-footer {
  background-color: var(--pharmacy-surface);
  background-image: var(--pharmacy-panel-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.pharmacy-hero {
  border: 1px solid var(--pharmacy-border);
  border-radius: var(--pharmacy-radius);
  box-shadow: var(--pharmacy-shadow);
  color: var(--pharmacy-surface-text);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
}

.pharmacy-hero p {
  color: var(--pharmacy-surface-text-muted);
}

.pharmacy-hero h1 {
  color: #000;
  margin-bottom: 0.75rem;
}

.pharmacy-section-title {
  margin-bottom: 1.25rem;
}

.pharmacy-categories.wp-block-columns {
  align-items: stretch !important;
  display: grid !important;
  flex-wrap: unset !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 2.5rem;
  gap: 1rem !important;
}

.pharmacy-categories .wp-block-column {
  align-self: stretch;
  border: 1px solid var(--pharmacy-border);
  border-radius: var(--pharmacy-radius);
  box-shadow: var(--pharmacy-shadow);
  box-sizing: border-box;
  color: var(--pharmacy-surface-text);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 17.5rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.pharmacy-categories .wp-block-column h3 {
  color: #000;
  margin-bottom: 0.5rem;
}

.pharmacy-categories .wp-block-column h3 + p {
  flex: 1 1 auto;
  margin-bottom: 0;
  min-height: 3.25rem;
}

.pharmacy-categories .wp-block-column .wp-block-buttons {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding-top: 1rem;
  width: 100%;
}

.pharmacy-categories .wp-block-column .wp-block-button {
  margin: 0;
  width: 100%;
}

.pharmacy-categories .wp-block-column p {
  color: var(--pharmacy-surface-text-muted);
}

.pharmacy-categories .wp-block-column:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.pharmacy-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--pharmacy-gold);
  color: #000;
  font-size: 1.35rem;
  font-weight: 700;
}

.pharmacy-trust {
  border: 1px solid var(--pharmacy-border);
  border-radius: var(--pharmacy-radius);
  box-shadow: var(--pharmacy-shadow);
  color: var(--pharmacy-surface-text);
  padding: 1.5rem;
  margin-top: 2rem;
}

.pharmacy-trust strong {
  color: #000;
}

.pharmacy-category-intro {
  border: 1px solid var(--pharmacy-border);
  border-radius: var(--pharmacy-radius);
  box-shadow: var(--pharmacy-shadow);
  color: var(--pharmacy-surface-text);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.pharmacy-category-intro p {
  color: var(--pharmacy-surface-text-muted);
}

.pharmacy-category-intro h2 {
  color: #000;
  margin-top: 0;
}

.tax-product_cat.term-drugs .woocommerce ul.products li.product-category,
.tax-product_cat.term-drugs .products .product-category {
  border: 1px solid var(--pharmacy-border);
  border-radius: var(--pharmacy-radius);
  box-shadow: var(--pharmacy-shadow);
  color: var(--pharmacy-surface-text);
  padding: 1.25rem;
  text-align: center;
}

.tax-product_cat.term-drugs .woocommerce ul.products li.product-category h2,
.tax-product_cat.term-drugs .products .product-category .woocommerce-loop-category__title {
  color: #000;
  font-size: 1rem;
  margin: 0.75rem 0 0;
}

.tax-product_cat.term-drugs .woocommerce ul.products li.product-category a:hover,
.tax-product_cat.term-drugs .products .product-category a:hover {
  text-decoration: none;
}

.tax-product_cat.term-drugs .woocommerce ul.products li.product-category:hover,
.tax-product_cat.term-drugs .products .product-category:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.pharmacy-product-info h2,
.pharmacy-product-info h3 {
  color: var(--pharmacy-primary);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.pharmacy-product-info h2:first-child,
.pharmacy-product-info h3:first-child {
  margin-top: 0;
}

.pharmacy-product-info table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
}

.pharmacy-product-info th,
.pharmacy-product-info td {
  border: 1px solid var(--pharmacy-border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.pharmacy-product-info th {
  background: var(--pharmacy-surface-muted);
  color: var(--pharmacy-text);
  font-weight: 600;
}

.pharmacy-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.pharmacy-product-meta span {
  color: var(--pharmacy-text-muted);
}

.pharmacy-product-meta strong {
  color: var(--pharmacy-text);
}

.woocommerce ul.products li.product {
  border: 1px solid var(--pharmacy-border);
  border-radius: var(--pharmacy-radius);
  box-shadow: var(--pharmacy-shadow);
  color: var(--pharmacy-surface-text);
  padding: 1rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title a,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price span {
  color: #000;
}

.wc-block-grid__product,
.wc-block-product-new .wc-block-grid__product {
  border: 1px solid var(--pharmacy-border);
  border-radius: var(--pharmacy-radius);
  box-shadow: var(--pharmacy-shadow);
  color: var(--pharmacy-surface-text);
  padding: 1rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wc-block-grid__product:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.wc-block-grid__product-title,
.wc-block-grid__product-link,
.wc-block-grid__product-price,
.wc-block-grid__product-price span {
  color: #000;
  text-decoration: none;
}

.wc-block-grid__product-price {
  font-weight: 600;
}

.woocommerce ul.products li.product:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wc-block-components-button,
.wp-block-button__link {
  border-radius: var(--pharmacy-radius) !important;
  font-weight: 600 !important;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color: var(--pharmacy-primary) !important;
  border-color: var(--pharmacy-primary) !important;
  color: #fff !important;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--pharmacy-primary-dark) !important;
  border-color: var(--pharmacy-primary-dark) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  border-color: var(--pharmacy-primary) !important;
  color: var(--pharmacy-primary) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--pharmacy-primary) !important;
  color: #fff !important;
}

.pharmacy-categories .wp-block-button.is-style-outline .wp-block-button__link {
  align-items: center;
  background-color: var(--pharmacy-primary) !important;
  border-color: var(--pharmacy-primary) !important;
  box-sizing: border-box;
  color: #fff !important;
  display: flex;
  height: 2.75rem;
  justify-content: center;
  line-height: 1.2;
  padding: 0 1rem !important;
  width: 100%;
}

.pharmacy-categories .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--pharmacy-primary-dark) !important;
  border-color: var(--pharmacy-primary-dark) !important;
  color: #fff !important;
}

@media (max-width: 1200px) {
  .pharmacy-categories.wp-block-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  .pharmacy-categories.wp-block-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .pharmacy-categories.wp-block-columns {
    grid-template-columns: 1fr;
  }

  .pharmacy-categories .wp-block-column {
    min-height: 0;
  }
}

.single-product .price {
  color: var(--pharmacy-primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.woocommerce-breadcrumb a {
  color: var(--pharmacy-primary);
}

body.pharmacy-store .entry-content a:not(.wp-block-button__link):not(.button) {
  color: var(--pharmacy-primary);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-radius: var(--pharmacy-radius);
  margin-bottom: 1rem;
  border-top-color: var(--pharmacy-primary);
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--pharmacy-primary);
}

.woocommerce span.onsale {
  background-color: var(--pharmacy-primary);
}

@media (max-width: 1100px) {
  .pharmacy-header-toolbar__search-wrap {
    max-width: 520px;
  }
}

@media (max-width: 992px) {
  body.pharmacy-store header[data-id="type-1"] [data-row="middle"],
  body.pharmacy-store .site-header [data-row="middle"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body.pharmacy-store #header [data-row="middle"] > .ct-container {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 100%;
    width: 100% !important;
  }

  body.pharmacy-store #header [data-column="start"] {
    max-width: none;
    text-align: center;
  }

  body.pharmacy-store #header [data-column="start"] .site-title,
  body.pharmacy-store #header [data-column="start"] .site-title a {
    text-align: center;
  }

  .pharmacy-header-toolbar {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .pharmacy-header-toolbar__search-wrap {
    grid-column: 1;
    max-width: none;
    width: 100%;
  }

  .pharmacy-header-toolbar__phone {
    grid-column: 1;
    justify-self: start;
  }

  .pharmacy-header-toolbar__actions {
    grid-column: 1;
    justify-self: end;
  }
}

@media (max-width: 768px) {
  body.pharmacy-store {
    background-attachment: scroll;
  }

  .pharmacy-hero {
    padding: 1.75rem 1rem;
  }

  .pharmacy-categories .wp-block-column {
    min-height: 0;
  }

  .pharmacy-header-toolbar__search-wrap {
    max-width: none;
    position: static;
    top: auto;
    transform: none;
    width: 100%;
  }

  .pharmacy-header-toolbar {
    gap: 0.75rem;
    margin-top: 0;
    padding: 0;
    position: relative;
    width: 100%;
  }

  .pharmacy-header-toolbar__phone {
    flex: 1 1 auto;
    text-align: left;
  }

  .pharmacy-header-toolbar__actions {
    margin-left: 0;
  }

  body.pharmacy-store header[data-id="type-1"] [data-row="middle"],
  body.pharmacy-store .site-header [data-row="middle"] {
    flex-direction: column;
    align-items: stretch;
    padding-right: var(--theme-container-edge-spacing, 20px);
  }

  .pharmacy-category-nav__toggle {
    align-items: center;
    background: var(--pharmacy-nav-hover);
    border: 0;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    min-height: 2.75rem;
    padding: 0.85rem 1.15rem;
    width: 100%;
  }

  .pharmacy-category-nav__toggle:hover,
  .pharmacy-category-nav__toggle:focus-visible {
    background: #0d7542;
    outline: none;
  }

  .pharmacy-category-nav__list {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .pharmacy-category-nav.is-menu-open .pharmacy-category-nav__list {
    display: flex;
  }

  .pharmacy-mega-menu__list {
    grid-template-columns: 1fr;
  }

  .pharmacy-header-icon {
    height: 2.75rem;
    width: 2.75rem;
  }

  .pharmacy-category-nav__item {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .pharmacy-category-nav__link {
    justify-content: space-between;
    width: 100%;
  }

  .pharmacy-mega-menu {
    box-shadow: none;
    position: static;
  }

  .pharmacy-mega-menu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .pharmacy-mega-menu__grid {
    grid-template-columns: 1fr;
  }
}

/* Product images — shop grid thumbnails */
.woocommerce ul.products li.product .woocommerce-loop-product__link img,
.woocommerce ul.products li.product a img {
  display: block;
  height: auto;
  margin-inline: auto;
  max-width: 50%;
  width: auto;
}

/* Single product page — P2H-style compact image (~280px) on tablet/desktop */
@media (min-width: 769px) {
  body.single-product .product-entry-wrapper {
    align-items: flex-start;
    gap: 1.75rem;
  }

  body.single-product .product-entry-wrapper .woocommerce-product-gallery {
    flex: 0 0 auto;
    max-width: 280px;
    width: 280px;
  }

  body.single-product .product-entry-wrapper .summary.entry-summary {
    flex: 1 1 auto;
    max-width: none;
    width: auto;
  }

  body.single-product .woocommerce-product-gallery .ct-product-gallery-container,
  body.single-product .woocommerce-product-gallery .ct-media-container {
    max-width: 280px;
    width: 100%;
  }

  body.single-product .woocommerce-product-gallery .ct-media-container img,
  body.single-product .woocommerce-product-gallery img {
    display: block;
    height: auto !important;
    margin-inline: auto;
    max-height: 280px;
    max-width: 280px !important;
    object-fit: contain;
    width: auto !important;
  }

  body.single-product div.product div.images,
  body.single-product div.product div.images .woocommerce-product-gallery,
  body.single-product div.product div.images .flex-viewport {
    max-width: 280px;
  }

  body.single-product div.product div.images img,
  body.single-product div.product div.images .woocommerce-product-gallery__image img {
    height: auto !important;
    max-width: 280px !important;
    width: auto !important;
  }
}

/* Single product page — full-width stack on phones */
@media (max-width: 768px) {
  body.single-product .product-entry-wrapper {
    align-items: stretch;
    flex-direction: column;
    gap: 1.25rem;
  }

  body.single-product .product-entry-wrapper .woocommerce-product-gallery,
  body.single-product div.product div.images,
  body.single-product div.product div.images .woocommerce-product-gallery,
  body.single-product div.product div.images .flex-viewport {
    max-width: 100%;
    width: 100%;
  }

  body.single-product .product-entry-wrapper .summary.entry-summary {
    max-width: none;
    width: 100%;
  }

  body.single-product .woocommerce-product-gallery .ct-product-gallery-container,
  body.single-product .woocommerce-product-gallery .ct-media-container {
    margin-inline: auto;
    max-width: min(280px, 100%);
    width: 100%;
  }

  body.single-product .woocommerce-product-gallery .ct-media-container img,
  body.single-product .woocommerce-product-gallery img,
  body.single-product div.product div.images img,
  body.single-product div.product div.images .woocommerce-product-gallery__image img {
    max-height: none;
    max-width: min(280px, 100%) !important;
  }
}

.woocommerce-cart table.cart td.product-thumbnail img,
.woocommerce-checkout-review-order-table td.product-thumbnail img {
  max-width: 50%;
  width: auto;
}

.woocommerce-cart form.woocommerce-cart-form button[name="update_cart"] {
  display: none !important;
}

/* P2H-style product pricing tables — grey palette */
body.single-product .pharmacy-p2h-pricing {
  margin: 1.25rem 0 1.5rem;
  width: 100%;
}

body.single-product .pharmacy-p2h-option + .pharmacy-p2h-option {
  margin-top: 1.5rem;
}

body.single-product .pharmacy-p2h-pricing .option_heading h2 {
  color: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
}

body.single-product .pharmacy-p2h-pricing .option_table {
  border: 1px solid #c5c5c5;
  display: table;
  width: 100%;
}

body.single-product .pharmacy-p2h-pricing .table_heading_row,
body.single-product .pharmacy-p2h-pricing .table_row {
  display: table-row;
}

body.single-product .pharmacy-p2h-pricing .table_heading_row > *,
body.single-product .pharmacy-p2h-pricing .table_row > * {
  border-bottom: 1px solid #d0d0d0;
  border-right: 1px solid #d0d0d0;
  color: #333;
  display: table-cell;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
}

body.single-product .pharmacy-p2h-pricing .table_heading_row > *:last-child,
body.single-product .pharmacy-p2h-pricing .table_row > *:last-child {
  border-right: none;
}

body.single-product .pharmacy-p2h-pricing .table_heading_row {
  background: #b8b8b8;
  color: #222;
  font-weight: 700;
  text-align: center;
}

body.single-product .pharmacy-p2h-pricing .table_heading_row > * {
  border-right-color: #d8d8d8;
  color: #222 !important;
}

body.single-product .pharmacy-p2h-pricing .table_row.odd {
  background: #ececec;
}

body.single-product .pharmacy-p2h-pricing .table_row.even {
  background: #f5f5f5;
}

body.single-product .pharmacy-p2h-pricing .table_row .price_per_product {
  text-align: right;
}

body.single-product .pharmacy-p2h-pricing .table_row .cart_button {
  text-align: center;
  white-space: nowrap;
}

body.single-product .pharmacy-p2h-pricing .pharmacy-p2h-add-to-cart {
  background: var(--pharmacy-primary, #2d6a4f);
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
}

body.single-product .pharmacy-p2h-pricing .pharmacy-p2h-add-to-cart:hover,
body.single-product .pharmacy-p2h-pricing .pharmacy-p2h-add-to-cart:focus {
  filter: brightness(1.05);
}

body.single-product .pharmacy-p2h-pricing .pharmacy-p2h-add-to-cart:disabled {
  cursor: wait;
  opacity: 0.75;
}

@media (max-width: 768px) {
  body.single-product .pharmacy-p2h-pricing .table_heading_row,
  body.single-product .pharmacy-p2h-pricing .table_row,
  body.single-product .pharmacy-p2h-pricing .table_heading_row > *,
  body.single-product .pharmacy-p2h-pricing .table_row > * {
    display: block;
    width: 100%;
  }

  body.single-product .pharmacy-p2h-pricing .table_heading_row {
    display: none;
  }

  body.single-product .pharmacy-p2h-pricing .table_row {
    border-bottom: 2px solid #c5c5c5;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
  }

  body.single-product .pharmacy-p2h-pricing .table_row > * {
    border: none;
    padding: 0.35rem 0;
  }

  body.single-product .pharmacy-p2h-pricing .table_row .cart_button {
    margin-top: 0.5rem;
  }
}
