/*
Theme Name: DoctorOnCall
Description: Custom high-performance theme with Vertical Gallery and Zoom Engine.
Architecture: Mobile-First, Component-Based
*/

/* ==========================================
   1. FONT INITIALIZATION
   ========================================== */
/* Pre-defining weights to prevent layout shift */
@font-face {
  font-family: "Ubuntu";
  src: url("fonts/ubuntu-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-900.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

/* ==========================================
   2. BRAND VARIABLES & BASE RESET
   ========================================== */
:root {
  /* Layout */
  --sidebar-width-mobile: initial;
  --sidebar-width-tablet: 15.625rem;
  --product-header-media-mobile-width: 100%;
  --product-header-media-small-desktop-width: 28rem;
  --product-header-media-big-desktop-width: 37.5rem;
  --thumb-column-width: 5rem;
  --side-header-container: 4.375rem;
  --site-header-nav-container: 2.5rem;

  /* Borders & Radius */
  --doc-radius: 0.5rem;
  --doc-radius-s: 0.375rem;
  --doc-border: #e5e5e5;

  /* Colors */
  --doc-blue-1: #243271;
  --doc-blue-2: #4f9dd4;
  --doc-blue-3: #edf7ff;
  --doc-red-1: #ad2831;
  --doc-red-2: #ffdee1;
  --doc-red-3: #cd5086;
  --doc-yellow-1: #b19100;
  --doc-yellow-2: #fffbeb;
  --doc-orange-1: #d97706;
  --doc-orange-2: #fff8ec;
  --doc-bg: #ffffff;
  --doc-gray-1: #231c07;
  --doc-gray-2: #64748b;
  --doc-gray-3: #aebcc7;
  --doc-gray-4: #e5e7eb;
  --doc-gray-5: #f8fafc;
  --doc-green-1: #059669;
  --doc-green-2: #f0fdf4;
  --doc-violet-1: #7f57a2;
  --whatsapp-green: #25d366;

  /* Typography Variables */
  --font-ubuntu: "Ubuntu", sans-serif;
  --font-inter:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --font-weight-ubuntu: 500;
  --font-weight-inter-regular: 400;
  --font-weight-inter-semibold: 600;
  --font-weight-inter-black: 900;

  --font-size-s: 0.9rem;
  --font-size-xs: 0.8rem;
  --font-size-xxs: 0.7rem;
  --font-size-xxxs: 0.6rem;
  --font-size-l: 1.125rem;
  --font-size-xl: 1.6rem;
  --font-size-xxl: 1.8rem;

  /* Shadows */
  --box-shadow-1: inset 0 0 0 1px var(--doc-border);
  --box-shadow-2: inset 0 4px 6px rgba(0, 0, 0, 0.05);
  --box-shadow-3:
    inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 6px rgba(0, 0, 0, 0.2);
  --box-shadow-3-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 15px rgba(0, 0, 0, 0.3);
  --box-shadow-4: 0 2px 4px rgba(0, 0, 0, 0.05);
  --box-shadow-4-selected: 0 4px 12px rgba(36, 50, 113, 0.15);
  --box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);

  /* Helpers */
  --scroll-margin-top-mobile: calc(var(--side-header-container) + 5rem);
  --scroll-margin-top: calc(var(--side-header-container) + 2rem);
}

@media (min-width: 768px) {
  :root {
    /* Since we added the 48px (3rem) horizontal menu line, the header height has increased on desktop/tablet */
    --scroll-margin-top: calc(var(--side-header-container) + 3rem + 2rem);
  }
}

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

html {
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-inter);
  font-weight: var(--font-weight-inter-regular);
  color: var(--doc-gray-1);
  line-height: 1.6;
  background-color: var(--doc-bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   3. TYPOGRAPHY
   ========================================== */
h1,
h2,
.product-title {
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  color: var(--doc-blue-1);
  line-height: 1.2;
}

h2 {
  font-size: 1.45rem;
}

h3,
.h3 {
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  font-size: 1.125rem;
  line-height: 1.6;
}

h4,
.h4 {
  font-family: var(--font-inter);
  font-size: 0.75rem;
  font-weight: var(--font-weight-inter-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--doc-gray-2);
}

.breadcrumb.h4 {
  font-size: var(--font-size-xxxs);
}

strong {
  font-weight: var(--font-weight-inter-semibold);
}

p,
li {
  color: var(--doc-gray-2);
  font-size: var(--font-size-s);
  line-height: 1.6;
}

/* ==========================================
   4. GLOBAL UTILITIES & HELPERS
   ========================================== */
.color-green-1 {
  color: var(--doc-green-1) !important;
}

.color-red {
  color: var(--doc-red-1) !important;
}

.bg-blue-3 {
  background-color: var(--doc-blue-3);
}

.hidden {
  display: none !important;
}

.show-desktop,
.show-tablet {
  display: none !important;
}

/* Accessibility Helper */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Generic Links */
.link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.link-with-icon::after {
  content: "→";
  transition: transform 0.2s ease;
}

.link-with-icon:hover {
  color: var(--doc-blue-2);
}

.link-with-icon:hover::after {
  transform: translateX(3px);
}

.notice {
  font-family: var(--font-ubuntu);
  font-size: var(--font-size-xs);
  font-weight: var(--font-ubuntu);
}

/* ==========================================
   5. BUTTONS & UI COMPONENTS
   ========================================== */
.main-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  font-family: var(--font-ubuntu);
  font-weight: 600;
  font-size: var(--font-size-s);
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 25px;
  color: #fff;
  border-radius: var(--doc-radius);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--box-shadow-3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.main-button.small {
  font-size: var(--font-size-xxs);
  height: 30px;
  padding: 0 15px;
}

.main-button.navy-blue {
  background: linear-gradient(180deg, #4760ab 0%, #1d2d5f 100%) !important;
  border: 1px solid #141e41 !important;
}

.main-button.navy-blue:hover {
  background: linear-gradient(180deg, #4b66b0 0%, #253975 100%) !important;
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-3-hover);
}

.main-button.black {
  background: linear-gradient(180deg, #575757 0%, #000000 100%) !important;
  border: 1px solid #000 !important;
}

.main-button.black:hover {
  background: linear-gradient(180deg, #676767 0%, #353535 100%) !important;
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-3-hover);
}

.main-button.red,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  background: linear-gradient(180deg, #cb3b45 0%, #8f1e26 100%) !important;
  border: 1px solid #6b151b !important;
}

.main-button.red:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background: linear-gradient(180deg, #db4a54 0%, #ad2831 100%) !important;
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-3-hover);
}

/* Global Toast Notification */
#doc-global-toast {
  width: calc(100% - 2rem);
  max-width: 420px;
  border: 1px solid var(--doc-gray-3);
  background: linear-gradient(to bottom,
      var(--doc-gray-5) 0%,
      var(--doc-gray-4) 100%);
  color: #fff;
  text-align: center;
  border-radius: var(--doc-radius);
  padding: 0.6rem 0.9rem;
  position: fixed;
  z-index: 150;
  left: 1rem;
  box-sizing: border-box;
  line-height: 1.3;
  /*
  left: 50%;
  transform: translateX(-50%);
  */
  bottom: -1rem;
  opacity: 0;
  transition:
    opacity 0.4s ease,
    bottom 0.4s ease;
  font-weight: 600;
  box-shadow: var(--box-shadow-3);
  pointer-events: none;
  color: var(--doc-blue-1);
}

#doc-global-toast.show {
  bottom: 1rem;
  opacity: 1;
  pointer-events: auto;
}

#doc-global-toast.show.border-bottom-active {
  bottom: calc(50px + 3rem);
}

@media (min-width: 768px) {
  #doc-global-toast {
    left: 2rem;
    bottom: 1rem;
  }

  #doc-global-toast.show {
    left: 2rem;
    bottom: 2rem;
  }

  #doc-global-toast.show.border-bottom-active {
    bottom: calc(50px + 4rem);
  }

  #doc-global-toast {
    width: 360px;
    max-width: 360px;
  }
}

.toast-img {
  flex: 0 0 60px;
  height: 60px;
  border-radius: var(--doc-border-s);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--doc-gray-3);
}

.toast-msg {
  font-size: 0.85rem;
  line-height: 1.3;
  align-self: center;
}

.toast-link {
  color: var(--doc-blue-2);
  font-weight: 600;
  display: inline-block;
  font-size: 0.75rem;
}

/* ==========================================
   6. TOP ANNOUNCEMENT BAR
   ========================================== */
.top-announcement-bar {
  display: flex;
  background-color: var(--doc-blue-1);
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  font-size: var(--font-size-s);
  line-height: 1;
  color: #fff;
  padding: 0.75rem 2rem 0.75rem 0;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  align-items: center;
  justify-content: flex-start;
  z-index: 100;
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker 25s linear infinite;
}

.ticker-content:active,
.ticker-content:hover {
  animation-play-state: paused;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-101%);
  }
}

.close-top-bar {
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #ffffff;
  opacity: 0.7;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.close-top-bar:hover {
  opacity: 1;
}

.top-bar-btn {
  display: inline-flex;
  vertical-align: 0.05rem;
  align-items: center;
  background-color: #ffffff;
  color: var(--doc-blue-1);
  padding: 0.3rem 0.8rem;
  margin-left: 0.5rem;
  border-radius: 20px;
  text-decoration: none !important;
  font-family: var(--font-inter);
  font-weight: var(--font-weight-inter-semibold);
  font-size: 0.7rem;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.top-bar-btn:hover {
  opacity: 0.8;
}

@media (min-width: 768px) {
  .top-announcement-bar {
    justify-content: center;
    padding-left: 2rem;
  }

  .ticker-content {
    padding-left: 0;
    animation: none;
  }
}

/* ==========================================
   7. HEADER, SEARCH & NAVIGATION
   ========================================== */
.sticky {
  top: var(--scroll-margin-top);
  z-index: 100;
}

.site-header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 200;
  border-bottom: 1px solid var(--doc-border);
}

.site-header .container {
  display: flex;
  align-items: center;

  gap: var(--gap-05);
}

.site-header .main.container {
  height: var(--side-header-container);
}

.site-branding {
  flex: 0 0 80px;
}

@media (min-width: 768px) {
  .site-header .container {
    gap: var(--gap-1);
  }
}

@media (min-width: 1024px) {
  .center-header {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

/* Search Form */
.doc-search-form {
  position: relative;
  flex-grow: 1;
  max-width: 600px;
}

.search-field {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 3rem 0.6rem 1.25rem;
  background: var(--doc-gray-5);
  border: 1px solid var(--doc-border);
  border-radius: 30px;
  font-family: var(--font-inter);
  font-size: var(--font-size-xs);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-field:focus {
  background: #fff;
  border-color: var(--doc-blue-2);
  box-shadow: 0 0 0 4px rgba(79, 157, 212, 0.15);
  outline: none;
}

.search-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--doc-blue-1);
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Mobile Search Overlay */
.doc-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.doc-search-overlay.is-open {
  transform: translateY(0);
  opacity: 1;
}

/* Desktop Suggestions Dropdown */
.doc-search-desktop-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--doc-blue-2);
  border-radius: var(--doc-radius);
  box-shadow: 0 10px 30px rgba(36, 50, 113, 0.08), 0 0 0 4px rgba(79, 157, 212, 0.15);
  z-index: 999;
  max-height: 480px;
  overflow-y: auto;
  padding: 1.25rem 1.25rem;
  margin-top: 0.5rem;
  box-sizing: border-box;
}

/* Custom Scrollbar for Dropdown & Overlay */
.no-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.no-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.no-scrollbar::-webkit-scrollbar-thumb {
  background: var(--doc-gray-4);
  border-radius: 3px;
}

.no-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--doc-gray-3);
}

.doc-search-overlay-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  border-bottom: 1px solid var(--doc-border);
  height: var(--side-header-container);
  box-sizing: border-box;
}

.search-overlay-back-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--doc-blue-1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-overlay-back-btn:active {
  background-color: var(--doc-gray-5);
}

.doc-search-overlay-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem 1rem;
}

.doc-search-section {
  margin-bottom: 2rem;
}

.doc-search-section-title {
  font-family: var(--font-inter);
  font-size: var(--font-size-xxs);
  font-weight: var(--font-weight-inter-semibold);
  color: var(--doc-gray-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Suggested Tags */
.doc-search-tags {
  margin-top: 0.5rem;
}

.doc-search-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--doc-gray-5);
  border: 1px solid var(--doc-border);
  border-radius: 20px;
  color: var(--doc-blue-1);
  font-family: var(--font-inter);
  font-size: var(--font-size-xs);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.doc-search-tag:active {
  background-color: var(--doc-blue-3);
  border-color: var(--doc-blue-2);
  transform: scale(0.96);
}

/* List Items (Popular / Recent) */
.doc-search-list {
  margin-top: 0.5rem;
}

.doc-search-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--doc-gray-1);
  font-family: var(--font-inter);
  font-size: var(--font-size-s);
  text-decoration: none;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--doc-gray-5);
  transition: background-color 0.2s;
  border-radius: 6px;
  white-space: nowrap;
}

.doc-search-list-item:active {
  background-color: var(--doc-gray-5);
}

.doc-search-list-item svg {
  color: var(--doc-gray-3);
  flex-shrink: 0;
}

.doc-search-clear-btn {
  background: none;
  border: none;
  color: var(--doc-red-1);
  font-family: var(--font-inter);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-inter-semibold);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.doc-search-clear-btn:active {
  background-color: var(--doc-red-2);
}

.doc-search-remove-single {
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--doc-gray-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  cursor: pointer;
}

.doc-search-remove-single:active {
  color: var(--doc-red-1);
  background-color: var(--doc-gray-5);
}

/* Live Search Cards */
.doc-search-live-results {
  margin-top: 0.5rem;
}

.doc-search-result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
}

.doc-search-result-card:hover {
  border-color: transparent;
  text-decoration: none;
}

.doc-search-result-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.doc-search-result-image-wrap {
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  min-height: 60px !important;
  border-radius: var(--doc-radius-s) !important;
  overflow: hidden !important;
  border: 1px solid var(--doc-border) !important;
  background-color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.doc-search-result-image-wrap img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

.doc-search-result-title {
  font-family: var(--font-ubuntu);
  font-size: var(--font-size-s);
  font-weight: var(--font-weight-ubuntu);
  line-height: 1.3;
  color: var(--doc-blue-1);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-search-result-price {
  font-weight: var(--font-weight-inter-regular);
  color: var(--doc-blue-2);
  font-size: var(--font-size-xs);
  margin-top: 0.25rem;
  line-height: 1.2;
}

/* Ensure WooCommerce standard price HTML elements inside search results look clean */
.doc-search-result-price .woocommerce-Price-amount {
  font-weight: 600;
}

.doc-search-result-price ins {
  text-decoration: none;
  color: var(--doc-blue-2);
}

.doc-search-result-price del {
  color: var(--doc-gray-3);
  font-size: var(--font-size-xxs);
  margin-left: 0.5rem;
  font-weight: normal;
}

/* Spinner Loader */
.doc-search-loader {
  padding: 3rem 0;
}

.doc-search-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--doc-gray-4);
  border-top-color: var(--doc-blue-1);
  border-radius: 50%;
  animation: docSearchSpin 0.8s linear infinite;
}

@keyframes docSearchSpin {
  to {
    transform: rotate(360deg);
  }
}

.doc-search-no-results {
  padding: 4rem 1.5rem;
  text-align: center;
}

/* Breadcrumbs */
.breadcrumbs-wrapper {
  border-bottom: 1px solid var(--doc-border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gap-025);
  list-style: none;
  padding: 0;
}

.breadcrumb a {
  color: var(--doc-gray-2);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--doc-blue-2);
  text-decoration: underline;
}

.breadcrumb>a:last-child {
  color: var(--doc-blue-2);
}

/* Language Switcher */
.language-switcher {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.language-switcher .lang-item a {
  color: var(--doc-blue-1);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: var(--font-weight-inter-semibold);
  text-transform: uppercase;
}

.language-switcher .current-lang a {
  color: var(--doc-blue-1);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Header Icons (Cart, Account, WhatsApp) */
.header-icon-link {
  position: relative;
  color: var(--doc-blue-1);
  text-decoration: none;
  font-size: var(--font-size-s);
  font-weight: var(--font-weight-inter-semibold);
}

.whatsapp .header-icon-link {
  color: var(--whatsapp-green);
}

.whatsapp .whatsapp-text {
  color: var(--doc-gray-1);
}

.whatsapp .whatsapp-title {
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
}

.whatsapp .whatsapp-number {
  font-family: var(--font-inter);
  font-weight: var(--font-weight-inter-black);
  font-size: 1.1rem;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--doc-red-1);
  color: #fff;
  font-size: 0.7rem;
  font-weight: var(--font-weight-inter-semibold);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.site-main {
  min-height: calc(100vh - 280px);
}

/* ==========================================
   8. FOOTER STYLES
   ========================================== */
.doc-main-footer {
  background-color: var(--doc-blue-1);
  color: #fff;
  font-family: var(--font-inter);
  border-top: 1px solid #9397b3;
}

.doc-main-footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.doc-main-footer a:hover {
  color: #fff;
}

.doc-main-footer p {
  color: rgba(255, 255, 255, 0.9);
}

.doc-main-footer .whatsapp {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.doc-main-footer .whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: fit-content;
}

.doc-main-footer .whatsapp-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  text-decoration: none !important;
}

.doc-main-footer .whatsapp-link svg {
  color: #ffffff;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.doc-main-footer .whatsapp-link:hover svg {
  transform: scale(1.08);
}

.doc-main-footer .whatsapp-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-main-footer .whatsapp-title {
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1;
}

.doc-main-footer .whatsapp-number {
  font-family: var(--font-inter);
  font-weight: var(--font-weight-inter-bold, 700);
  font-size: 0.95rem;
  color: #ffffff;
  line-height: 1.1;
}

.footer-top-grid,
.footer-action-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  padding: 1rem;
}

.footer-desc {
  font-size: var(--font-size-s);
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: center;
}

.footer-nav-group {
  display: contents;
}

.col-doctoroncall {
  order: 1;
}

.col-pharmacy {
  order: 2;
}

.col-services {
  order: 3;
}

.col-resources {
  order: 4;
}

.col-account {
  order: 5;
}

.footer-socials a {
  color: #fff;
  opacity: 0.8;
  display: inline-flex;
}

.footer-socials a:hover {
  opacity: 1;
}

.footer-heading {
  color: #fff;
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  font-size: var(--font-size-s);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

ul.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

ul.footer-menu li a {
  font-size: var(--font-size-s);
}

ul.footer-menu li.current-menu-item a {
  color: #fff;
}

.footer-action-banner {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--doc-radius);
}

.footer-action-banner .action-block {
  width: 100%;
}

.footer-link-underline {
  color: #fff !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
  opacity: 0.9;
}

.footer-link-underline:hover {
  opacity: 1;
}

.doc-main-footer .border-top {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.doc-main-footer .copyright {
  font-size: var(--font-size-s);
  font-family: var(--font-ubuntu);
}

.doc-main-footer .language-switcher .lang-item a {
  color: rgba(255, 255, 255, 0.5);
}

.doc-main-footer .language-switcher .current-lang a {
  color: rgba(255, 255, 255, 1);
}

.doc-main-footer .action-text-title {
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
}

.action-text-title {
  margin-bottom: 0.25rem;
}

.download-app {
  width: 150px;
}

.action-text .link-with-icon {
  font-size: var(--font-size-s);
}

@media (min-width: 768px) {
  .footer-desc {
    text-align: justify;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-action-banner {
    padding: 2rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .footer-group-a {
    order: 1;
  }

  .col-pharmacy {
    order: 2;
  }

  .footer-group-c {
    order: 3;
  }
}

@media (min-width: 1024px) {
  .footer-nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .footer-nav-group {
    display: contents;
  }

  .footer-top-grid {
    justify-content: space-between;
  }

  .footer-action-banner {
    flex-direction: row;
  }

  .footer-action-banner .action-block {
    width: auto;
  }

  .action-text-title {
    margin-bottom: 1rem;
  }

  .doc-main-footer .border-left {
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0;
    padding-left: 2rem;
  }

}

/* ==========================================
   9. GLOBAL DEVICE TARGETING & BREAKPOINTS
   ========================================== */

/* --- 9.1 Base Styles (Mobile First: 0px to 767px) --- */
/* (All default styles are written above following the Mobile-First architecture) */

/* --- 9.2 Tablets (Portrait & General: 768px+) --- */
@media (min-width: 768px) {
  .show-tablet {
    display: inherit !important;
  }

  .hide-tablet {
    display: none !important;
  }
}

/* --- 9.3 Small Desktops & Landscape Tablets (1024px+) --- */
@media (min-width: 1024px) {
  .show-desktop {
    display: inherit !important;
  }

  .hide-desktop {
    display: none !important;
  }
}

/* --- 9.4 Large Touch Devices (1024px+ with Touch) --- */
@media (min-width: 1024px) and (pointer: coarse) {
  /* Specific overrides for large touch devices.
     Examples: Keep tap targets large, hide complex hover menus, use swipe sliders. */
}

/* --- 9.5 Laptops & Desktops (1024px+ with Mouse) --- */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  /* Specific overrides for traditional computers.
     Examples: Enable CSS hover effects, show desktop mega-menus, smaller buttons. */
}

/* --- 9.6 Large Desktops (1280px+) --- */
@media (min-width: 1280px) {
  /* Adjustments for wide monitors.
     Examples: Cap the max-width of your main container, increase base font size slightly. */
}

.rx-badge {
  display: inline-flex;
  align-items: center;
  height: fit-content;
  background: var(--doc-blue-1);
  color: #fff;
  vertical-align: super;
  flex-shrink: 0;
}

.badge {
  font-family: var(--font-ubuntu);
  font-size: var(--font-size-s);
  font-weight: var(--font-weight-ubuntu);
  padding: 0.35rem 0.55rem;
  border-radius: var(--doc-radius-s);
  line-height: 1;
}

.doc-sale-badge {
  background: var(--doc-red-1);
  color: #fff;
}

.doc-preorder-badge {
  background: var(--doc-orange-1);
  color: var(--doc-yellow-2) !important;
}

.badge-solid {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  color: #fff;
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  pointer-events: none;
}

.badge.small {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  display: inline-flex;
  vertical-align: super;
}

/* Product Card Stock Badges (Top Right) */
.doc-card-stock-badge {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  font-size: var(--font-size-xxs);
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  z-index: 2;
  line-height: 1.2;
  white-space: nowrap;
}

.doc-card-stock-badge.is-in-stock {
  display: none;
}

.doc-card-stock-badge.is-out {
  display: none;
  background: #fce8e6;
  color: #c5221f;
}

.doc-card-stock-badge.is-preorder {
  display: block;
  background: #fff8e1;
  color: #b45d00;
}

.doc-card-stock-badge.is-discontinued {
  display: block;
  background: #fef9c3;
  color: #854d0e;
}

.doc-card-stock-badge.is-long-oos {
  display: block;
  background: #f1f5f9;
  color: #475569;
}

.doc-card-stock-badge.is-temp-oos {
  display: block;
  background: #fce8e6;
  color: #b91c1c;
}

/* Product Card Rx Badge */
.doc-card-rx-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 3px;
}

.badge.address-label {
  background: var(--doc-gray-4);
  color: var(--doc-gray-1);
}

.address-name {
  font-size: var(--font-size-l);
  color: var(--doc-blue-1);
}

.address-contact {
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  font-size: var(--font-size-s);
  color: var(--doc-gray-1);
}

.address-address {
  font-size: var(--font-size-s);
  color: var(--doc-gray-2);
}

.doc-address-list .address-address {
  font-size: var(--font-size-xs);
}

/* Quantity Box */
.number-button input::-webkit-outer-spin-button,
.number-button input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.number-button input[type="number"] {
  -moz-appearance: textfield;
}

.number-button {
  display: inline-flex;
  align-items: center;
  background: var(--doc-gray-4);
  border-radius: var(--doc-radius);
  height: 50px;
  box-shadow: var(--box-shadow-4);
  border: 1px solid var(--doc-gray-3);
}

.number-button input[type="button"] {
  flex-basis: 20px;
  height: 50px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--doc-gray-1);
  flex-shrink: 0;
  flex-grow: 0;
}

@media (min-width: 340px) {
  .number-button input[type="button"] {
    flex-basis: 40px;
  }
}

.number-button .quantity {
  padding: 0;
  flex-basis: 45px;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
}

.number-button input.qty {
  width: 45px !important;
  flex-grow: 0;
  flex-shrink: 0;
  height: 50px !important;
  border: none !important;
  background: transparent !important;
  text-align: center;
  font-family: var(--font-inter);
  font-weight: var(--font-weight-inter-black);
  font-size: 16px;
}

.number-button.small {
  height: 30px;
  border-radius: var(--doc-radius-s);
}

.number-button.small input.qty {
  height: 30px !important;
  font-size: 12px;
}

.number-button.small input[type="button"] {
  height: 30px;
  flex-basis: 20px;
  font-size: 15px;
}

.number-button.disabled {
  font-weight: var(--font-weight-inter-black);
  justify-content: center;
  font-family: var(--font-inter);
  background: var(--doc-gray-5);
}

.number-button.small.disabled {
  width: 87px;
  font-size: 12px;
}

.disabled {
  color: var(--doc-gray-3) !important;
  cursor: not-allowed;
}

.action-icon {
  color: var(--doc-gray-1);
}

.action-icon:hover svg {
  transition: all 0.2s ease;
}

.remove-item:hover {
  color: var(--doc-red-1);
}

/* Vouchers / Tickets */

.doc-vouchers-wrapper {
  background: #fff;
  border-radius: var(--doc-radius);
  overflow: hidden;
  border: 2px solid var(--doc-gray-4);
}

.vouchers-header {
  cursor: pointer;
  list-style: none;
  outline: none;
  background-color: var(--doc-gray-4);
}

/* Hide the default browser triangle on summary tags */
details.doc-vouchers-wrapper summary::-webkit-details-marker {
  display: none;
}

/* Flip our custom SVG chevron when the accordion is open */
details.doc-vouchers-wrapper[open] .doc-accordion-chevron {
  transform: rotate(180deg);
}

.doc-voucher-card {
  display: inline-flex;
  position: relative;
  /* REQUIRED: So the cutouts position themselves against the card edges */
  /* Premium Navy Gradient 
  background: linear-gradient(180deg, #4760ab 0%, #1d2d5f 100%);*/
  background: var(--doc-gray-3);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  color: #fff;
  box-shadow: 0px 9px 14px -10px rgba(0, 0, 0, 0.3);
}

@media (hover: hover) and (pointer: fine) {
  .doc-voucher-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.4) !important;
  }
}

.doc-voucher-left {
  background: transparent;
  border-right: 2px dashed #fff;
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--doc-gray-2);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 0.5rem 0.75rem 1rem;
  display: flex;
  align-items: center;
  line-height: 1;
}

.doc-voucher-right {
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  position: relative;
  color: var(--doc-gray-1);
  background: var(--doc-gray-4);
  font-weight: var(--font-weight-ubuntu);
  font-family: var(--font-ubuntu);
  line-height: 1.2;
  text-align: center;
}

/* Updated Scissors Icon (Sleeker, partially closed angle) */
.doc-voucher-right::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -11px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%) rotate(90deg);

  /* * NEW CUSTOM SVG:
   * - Handles moved closer together (cy=8 and cy=16)
   * - Blades angled closer together (50-degree opening instead of 90-degree)
   * - Stroke thickness optimized to 2.5 for the tighter space
   */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d2d5f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='4' cy='8' r='3'/%3E%3Ccircle cx='4' cy='16' r='3'/%3E%3Cline x1='6.7' y1='9.3' x2='21' y2='16.5'/%3E%3Cline x1='6.7' y1='14.7' x2='21' y2='7.5'/%3E%3C/svg%3E");

  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 10;
}

/* * THE TICKET CUTOUTS 
 * Moved to the far left and far right edges of the ticket 
 */
.doc-voucher-card::before,
.doc-voucher-card::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  /* Perfectly centers them vertically */
  width: 16px;
  height: 16px;
  background-color: #fff;
  /* Matches the white background behind the card to look like a hole */
  border-radius: 50%;
  z-index: 2;
}

/* Left Cutout */
.doc-voucher-card::before {
  left: -9px;
}

/* Right Cutout */
.doc-voucher-card::after {
  right: -9px;
}

/* Consultation Block */
.doc-consultation-wrapper {
  background-color: #fff;
  padding: 1rem;
  border-radius: var(--doc-radius);
  margin-bottom: 1.25rem;
  border: 2px solid var(--doc-gray-4);
}

.consultation-hours {
  border: 2px solid var(--doc-gray-4);
  border-radius: var(--doc-radius-s);
  padding: 1rem;
}

.consultation-hours .time {
  font-size: var(--font-size-s);
  font-weight: var(--font-weight-inter-semibold);
}

.doc-consultation-wrapper.online {
  border-color: var(--doc-green-1);
}

.doc-consultation-wrapper.online .consultation-hours {
  background-color: var(--doc-green-2);
}

.doc-consultation-wrapper.online .time {
  color: var(--doc-green-1);
}

.doc-consultation-wrapper.offline {
  border-color: var(--doc-red-1);
}

.doc-consultation-wrapper.offline .consultation-hours {
  background-color: var(--doc-red-2);
}

.doc-consultation-wrapper.offline .time {
  color: var(--doc-red-1);
}

.doc-consultation-wrapper .consultation-message {
  font-size: var(--font-size-s);
}

.variations .label,
.fields-label,
h3.fields-label,
.cart-totals .totals-label {
  display: flex;
  /* was block */
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  color: var(--doc-blue-1);
  line-height: 1;
  font-size: 1rem;
}

.bottom-cart {
  position: sticky;
  bottom: 0;
  background: var(--doc-blue-1);
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  /* Ensure it sits above iOS safe areas 
  padding-bottom: calc(12px + env(safe-area-inset-bottom)); */
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.bottom-cart.active {
  transform: translateY(0);
}

.bottom-cart-inner {
  display: flex;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 2rem;
}

/* Make buttons fill space evenly on mobile */
.bottom-cart-inner>button {
  flex: 1;
  white-space: nowrap;
}

/* ==========================================
   GENERIC SIDEBAR NAVIGATION (Moved from product.css)
   ========================================== 
.doc-sidebar-nav {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--side-header-container);
  overflow: scroll;
  margin-left: -1em;
  margin-right: -1em;
  background: #fff;
  z-index: 1;
}

.doc-sidebar-nav-list {
  display: flex;
}

.doc-sidebar-nav-list a {
  display: flex;
  align-items: center;
  height: 3rem;
}

.doc-sidebar-nav .nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--doc-blue-1);
  text-decoration: none;
  font-size: var(--font-size-s);
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  border-left: 3px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .doc-sidebar-nav .nav-link:hover {
    color: var(--doc-blue-2);
    background-color: var(--doc-blue-3);
  }
}

.doc-sidebar-nav .nav-link.active {
  color: var(--doc-red-1) !important;
  border-left-color: var(--doc-red-1) !important;
  background: rgba(173, 40, 49, 0.05) !important;
}

@media (min-width: 768px) {
  .doc-sidebar-nav {
    overflow: initial !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    top: var(--scroll-margin-top) !important;
  }
  .doc-sidebar-nav-list {
    display: initial !important;
  }
  .doc-sidebar-nav-list > li {
    margin-bottom: 0.5rem;
  }
  .doc-sidebar-nav-list a {
    display: block !important;
    height: initial;
  }
  .doc-sidebar-nav .nav-link {
    white-space: initial !important;
  }
}
  */

.doc-form-style .acf-input-wrap {
  overflow: initial;
}

.doc-form-style label {
  font-family: var(--font-ubuntu) !important;
  font-size: var(--font-size-s) !important;
  font-weight: var(--font-weight-ubuntu) !important;
  margin-bottom: 0.25rem !important;
  display: block !important;
  color: var(--doc-gray-1) !important;
}

.doc-form-style input[type="text"],
.doc-form-style input[type="email"],
.doc-form-style input[type="tel"],
.doc-form-style input[type="password"],
.doc-form-style select,
.doc-form-style .select2,
.doc-form-style textarea {
  min-height: 44px !important;
  padding: 0.6rem 1.2rem !important;
  background: var(--doc-gray-5);
  border: 1px solid var(--doc-border) !important;
  border-radius: var(--doc-radius);
  font-family: var(--font-inter);
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.doc-form-style input[type="text"][readonly],
.doc-form-style input[type="email"][readonly],
.doc-form-style select[disabled] {
  color: var(--doc-gray-3);
}

.doc-form-style textarea {
  min-height: 83px !important;
}

/* 1. Hide the default Select2 arrow container completely */
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none !important;
}

/* 2. Inject our custom SVG chevron into the main Select2 box */
.woocommerce-checkout .select2-container--default .select2-selection--single {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 100% center !important;
  background-size: 16px !important;
  flex-grow: 1;
}

.doc-form-style .acf-field select,
select {
  /* 1. Hide the native browser arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* 2. Inject a custom SVG chevron (matches your screenshot style) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;

  /* 3. Position the new arrow on the left (15px from the left edge) */
  background-position: calc(100% - 1.2rem) center !important;
  background-size: 16px !important;
  /* Size of the arrow */
}

/* Optional: Fix for IE/Edge to remove native dropdown arrow */
.doc-form-style .acf-field select::-ms-expand {
  display: none;
}

.doc-form-style .select2-container--default .select2-selection--single {
  border: 0;
  background-color: transparent;
  border-radius: 0;
}

.doc-form-style .select2-container .select2-selection--single .select2-selection__rendered {
  padding-left: 0;
  padding-right: 0;
  line-height: 1.4;
  color: initial;
}

.doc-form-style .select2-container .select2-selection--single {
  height: initial;
}

.doc-form-style .select2-container .selection {
  display: inline-flex;
  width: 100%;
}

.doc-form-style input[type="email"],
.doc-form-style select {
  padding-right: 45px !important;
}

.doc-form-style input[type="text"]:focus,
.doc-form-style input[type="email"]:focus,
.doc-form-style input[type="password"]:focus,
.doc-form-style select:focus,
.doc-form-style textarea:focus {
  background: #fff;
  border-color: var(--doc-blue-2) !important;
  box-shadow: 0 0 0 4px rgba(79, 157, 212, 0.15) !important;
  outline: none;
}

.doc-form-style input[type="text"][readonly]:focus,
.doc-form-style input[type="email"][readonly]:focus,
.doc-form-style select[disabled]:focus {
  border: 1px solid var(--doc-border) !important;
  box-shadow: none !important;
  background: var(--doc-gray-5) !important;
}

.doc-form-style ::placeholder {
  color: var(--doc-gray-3);
}

.doc-form-style .acf-field-true-false {
  align-items: center;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.doc-form-style .acf-field-true-false label {
  margin-bottom: 0 !important;
}

.doc-form-style .acf-field-true-false label input {
  display: flex;
}

.doc-form-style .doc-save-billing-wrapper label,
.doc-form-style .doc-save-shipping-wrapper label,
.doc-form-style .acf-field-true-false,
.doc-form-style.doc-address-footer label {
  margin-bottom: 0 !important;
  display: flex !important;
  gap: 0.5rem;
  align-items: center;
}

.doc-form-style .acf-fields>div[data-name="address_label"],
.doc-form-style .acf-fields>div[data-name="address_street"],
.doc-form-style .acf-fields>div[data-name="is_default_billing"],
.doc-form-style .acf-fields>div[data-name="is_default_shipping"],
.doc-form-style .acf-fields>div[data-name="address_full_name"],
.doc-form-style .acf-fields>div[data-name="relationship"],
.doc-form-style .acf-fields>div[data-name="full_name"],
.doc-form-style .acf-fields>div[data-name="phone"],
.fb-100,
.doc-form-style .fb-33,
.doc-form-style .acf-fields>div[data-name="id_number"],
.doc-form-style .acf-fields>div[data-name="dob"],
.doc-form-style .acf-fields>div[data-name="gender"] {
  flex-basis: 100%;
}

.doc-form-style .acf-fields>div[data-name="is_default_shipping"] {
  margin-top: -1rem;
}

@media (min-width: 768px) {

  .doc-form-style .fb-33,
  .doc-form-style .acf-fields>div[data-name="id_number"],
  .doc-form-style .acf-fields>div[data-name="dob"],
  .doc-form-style .acf-fields>div[data-name="gender"] {
    flex-basis: calc((100% / 3) - (1rem * 2 / 3));
  }
}

.doc-form-style .acf-fields>div[data-name="address_postcode"],
.doc-form-style .acf-fields>div[data-name="address_city"],
.doc-form-style .acf-fields>div[data-name="address_state"],
.doc-form-style .acf-fields>div[data-name="address_country"],
.doc-form-style .acf-fields>div[data-name="address_phone"],
.doc-form-style .acf-fields>div[data-name="address_email"],
.doc-form-style .fb-50 {
  flex-basis: 100%;
}

@media (min-width: 768px) {

  .doc-form-style .acf-fields>div[data-name="address_postcode"],
  .doc-form-style .acf-fields>div[data-name="address_city"],
  .doc-form-style .acf-fields>div[data-name="address_state"],
  .doc-form-style .acf-fields>div[data-name="address_country"],
  .doc-form-style .acf-fields>div[data-name="address_phone"],
  .doc-form-style .acf-fields>div[data-name="address_email"],
  .doc-form-style .fb-50 {
    flex-basis: calc((100% / 2) - (1rem * 1 / 2));
  }
}

.doc-form-style .acf-fields>div[data-name="address_country"],
.doc-form-style .acf-fields>div[data-name="address_postcode"] {
  flex-grow: 1;
}

.doc-form-style .acf-field .acf-label {
  margin-bottom: 0;
}

.doc-form-style .acf-fields {
  padding: 1.5rem;
  border: 1px solid var(--doc-border);
  border-radius: var(--doc-radius);
}

.doc-form-style td.acf-fields {
  padding: 0;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.doc-form-style .acf-fields:after {
  display: none;
}

.doc-form-style .acf-fields>.acf-field {
  border: 0;
  padding: 0;
  width: initial !important;
  min-height: initial;
}

.doc-form-style .acf-field[data-width]+.acf-field[data-width] {
  border-left: 0;
}

.doc-form-style .acf-table {
  border: 0;
  margin: 0;
  background: transparent;
}

.doc-form-style .required,
.doc-form-style .acf-required {
  color: var(--doc-red-3);
}

.doc-form-style .optional {
  display: none;
}

.sidebar {
  flex-basis: var(--sidebar-width-mobile);
}

@media (min-width: 768px) {
  .sidebar {
    flex-basis: var(--sidebar-width-tablet);
  }

  .with-sidebar {
    flex-basis: calc(100% - var(--sidebar-width-tablet) - 2rem);
  }
}

.doc-acf .acf-repeater .acf-row-handle {
  display: none !important;
}

.doc-acf .acf-repeater.-empty table thead {
  display: none;
}

.doc-acf .acf-repeater.-empty table {
  border: none;
}

/* Forcefully remove ACF's hardcoded inline width and min-height */
.doc-acf .acf-fields>.acf-field {
  width: 100% !important;
  min-height: 0 !important;
}

.doc-acf .acf-field .description {
  font-size: var(--font-size-xs);
  color: var(--doc-gray-3);
}

.doc-address-footer {
  border-top: 1px solid var(--doc-gray-4);
  row-gap: 0;
}

@media (min-width: 768px) {
  .aside-nav {
    overflow: initial !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    top: var(--scroll-margin-top) !important;
    border-bottom: initial !important;
  }

  .doc-archive-content .aside-nav {
    top: 0 !important;
  }

  .aside-nav-list {
    display: initial !important;
  }

  .aside-nav-list>li {
    margin-bottom: 0.5rem;
  }

  .aside-nav .nav-link {
    white-space: initial !important;
  }
}

/* Sidebar Layout Responsiveness */
.product-content-wrapper :where(.is-layout-flex) {
  gap: 0;
}

.product-content-wrapper {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .product-content-wrapper {
    flex-direction: row;
    gap: 2rem;
    padding-top: 1rem;
  }

  .product-content-wrapper.doc-archive-layout {
    padding-top: 0;
  }
}

/* Category Archive Page Layout Override (Breakpoint Shift to 900px for Filters Drawer) */
@media (max-width: 900px) {
  .doc-archive-page .product-content-wrapper {
    flex-direction: column;
  }
}

@media (min-width: 901px) {
  .doc-archive-page .product-content-wrapper {
    flex-direction: row;
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .product-content-wrapper {
    padding-top: 2rem;
  }
}

.product-content.with-sidebar h2 {
  scroll-margin-top: calc(var(--side-header-container) + 4.5rem);
}

@media (max-width: 767px) {
  .product-content.with-sidebar h2 {
    scroll-margin-top: calc(var(--side-header-container) + 3.5rem);
  }
}

.medical-info-wrapper>.medical-section:last-child {
  margin-bottom: 0;
}

.medical-info-wrapper>.medical-section:first-child {
  margin-top: 2rem;
}

.medical-section {
  scroll-margin-top: var(--scroll-margin-top-mobile);
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .medical-section {
    scroll-margin-top: var(--scroll-margin-top);
  }
}

.doc-archive-content .aside-nav>form {
  border-left: 1px solid var(--doc-gray-4);
  border-right: 1px solid var(--doc-gray-4);
  border-bottom: 1px solid var(--doc-gray-4);
  border-bottom-left-radius: var(--doc-radius);
  border-bottom-right-radius: var(--doc-radius);
}

/* Scrollspy Navigation */
.aside-nav {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--side-header-container);
  overflow: scroll;
  margin-left: -1em;
  margin-right: -1em;
  background: #fff;
  z-index: 1;
  border-bottom: 1px solid var(--doc-border);
}

.aside-nav-list {
  display: flex;
}

/* xxx
.aside-nav-list a {
  display: flex;
  align-items: center;
  height: 3rem;
}
*/

.aside-nav .nav-link {
  display: flex;
  /* xxx block */
  padding: 0.375rem 1rem;
  color: var(--doc-blue-1);
  text-decoration: none;
  font-size: var(--font-size-s);
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  border-left: 3px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  /* xxx added */
  align-items: center;
  height: 3rem;
}

@media (min-width: 768px) {
  .aside-nav .nav-link {
    display: block;
    height: initial;
  }
}

@media (hover: hover) and (pointer: fine) {
  .aside-nav .nav-link:hover {
    color: var(--doc-blue-2);
    background-color: var(--doc-blue-3);
  }
}

.aside-nav .nav-link.active {
  color: var(--doc-red-1) !important;
  border-left-color: var(--doc-red-1) !important;
  background: rgba(173, 40, 49, 0.05) !important;
}

.notice-wrapper {
  background: var(--doc-gray-5);
  border-left: 3px solid var(--doc-gray-2);
  padding: 0.75rem 1rem;
}

.notice-wrapper.take-note {
  background: var(--doc-red-2);
  border-left: 3px solid var(--doc-red-1);
}

.card {
  border: 1px solid var(--doc-border);
  border-radius: var(--doc-radius);
  background: var(--doc-gray-5);
  cursor: pointer;
  transition: all 0.2s;
  font-size: var(--font-size-s);
}

.card.active {
  background: #fff;
  border-color: var(--doc-blue-2) !important;
  box-shadow: 0 0 0 4px rgba(79, 157, 212, 0.15) !important;
  outline: none;
}

.doc-carousel,
.wp-block-group,
.doc-gutenberg-wrapper {
  background-image: var(--bg-image);
}

.doc-carousel__view-all {
  white-space: nowrap;
  font-size: var(--font-size-xs);
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
}

/* Mobile (<768px): hide View All from header, show footer link below cards */
@media (max-width: 767px) {
  .doc-carousel__actions .doc-carousel__view-all {
    display: none;
  }

  .doc-carousel__mobile-footer {
    display: flex;
    justify-content: center;
    padding: 1rem 1rem 0;
  }
}

/* Desktop (>=768px): show View All in header, hide footer */
@media (min-width: 768px) {
  .doc-carousel__mobile-footer {
    display: none;
  }
}

.doc-gutenberg-wrapper.boxed>.doc-carousel>.container {
  padding: 0 0;
}

@media (min-width: 1200px) {
  .doc-gutenberg-wrapper.boxed>.doc-carousel>.container {
    padding: 0 var(--gap-1);
  }
}

@media (min-width: 768px) {

  .doc-carousel,
  .wp-block-group,
  .doc-gutenberg-wrapper {
    background-image: var(--bg-image-768, var(--bg-image));
  }
}

@media (min-width: 1024px) {

  .doc-carousel,
  .wp-block-group,
  .doc-gutenberg-wrapper {
    background-image: var(--bg-image-1024, var(--bg-image-768, var(--bg-image)));
  }
}



/* ==========================================
   DOC ROW — AUTO GRID LAYOUT
   ========================================== */

/**
 * Base grid container. display:grid is also injected as inline style by PHP/JS
 * to ensure it wins over Gutenberg's generated flex layout CSS.
 */
.doc-row-grid {
  display: grid !important;
}

/**
 * Suppress Gutenberg's automatic flex layout classes when our grid is active.
 * WordPress generates .is-layout-flex { display:flex } and
 * .wp-block-group-is-layout-flex { display:flex } via block support CSS.
 * Our inline style display:grid already wins, but these rules prevent
 * flex-specific properties (flex-wrap, flex-direction) from leaking in.
 */
.doc-row-grid.is-layout-flex,
.doc-row-grid.wp-block-group-is-layout-flex {
  flex-wrap: unset;
  flex-direction: unset;
  align-items: unset;
  justify-content: unset;
}

/**
 * Mode 2 (optional responsive wrapping): Used as a semantic class marker.
 * The actual grid-template-columns value is injected as an inline style.
 */
.doc-row-grid.doc-row-grid-wrap {
  /* grid-template-columns applied via inline style */
}

/**
 * CRITICAL: Reset intrinsic minimum width on all grid children.
 * Without this, items with wide content (e.g. a 1200px banner image) force
 * each grid track to be at least as wide as the content, preventing auto-fit
 * from creating more columns than the content minimum allows.
 * min-width: 0 lets the track size (not the content size) be authoritative.
 */
.doc-row-grid>* {
  min-width: 0;
  overflow: hidden;
}

/**
 * Stretch last item: when an odd number of items creates a lone orphan on the last row,
 * the last child expands to fill the full row width.
 * :nth-child(odd) targets items at positions 1, 3, 5... — i.e. the lone last item
 * in a 2-column layout (3 items → row 2 has just item 3, which is child #3 = odd).
 */
.doc-row-grid.doc-row-grid-stretch-last>*:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* Column gap utilities */
.doc-row-grid.gap-0 {
  column-gap: 0;
}

.doc-row-grid.gap-05 {
  column-gap: 0.5rem;
}

.doc-row-grid.gap-1 {
  column-gap: 1rem;
}

.doc-row-grid.gap-15 {
  column-gap: 1.5rem;
}

.doc-row-grid.gap-2 {
  column-gap: 2rem;
}

/* Row gap utilities */
.doc-row-grid.row-gap-0 {
  row-gap: 0;
}

.doc-row-grid.row-gap-05 {
  row-gap: 0.5rem;
}

.doc-row-grid.row-gap-1 {
  row-gap: 1rem;
}

.doc-row-grid.row-gap-15 {
  row-gap: 1.5rem;
}

.doc-row-grid.row-gap-2 {
  row-gap: 2rem;
}


.doc-carousel__viewport {
  overflow: hidden;
  width: 100%;
}

.doc-carousel__container {
  display: flex;
  touch-action: pan-y pinch-zoom;
}

.doc-carousel__slide {
  --carousel-cols: 2;
  flex: 0 0 calc(100% / var(--carousel-cols));
  min-width: 0;
}

.doc-carousel__slide,
.doc-product-grid__slide {
  background: #fff;
  border-top: 1px solid var(--doc-border);
  border-bottom: 1px solid var(--doc-border);
  border-right: 0.5px solid var(--doc-border);
  border-left: 0.5px solid var(--doc-border);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.doc-carousel__slide:hover,
.doc-product-grid__slide:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  z-index: 1;
}

.doc-carousel__slide a,
.doc-product-grid__slide a {
  text-decoration: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.doc-carousel__slide .doc-product-card,
.doc-product-grid__slide .doc-product-card {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 0.5rem;
}

.doc-carousel__slide .doc-product-card:hover,
.doc-product-grid__slide .doc-product-card:hover {
  box-shadow: none !important;
}

/* Horizontal Card Layout Override */
.doc-carousel__viewport[data-card-layout="horizontal"] .doc-carousel__slide a {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.doc-carousel__viewport[data-card-layout="horizontal"] .doc-card-image {
  flex: 0 0 30%;
  width: 30%;
}

.doc-carousel__viewport[data-card-layout="horizontal"] .doc-card-body {
  flex-grow: 1;
  height: 100%;
}

.doc-carousel__container>.doc-carousel__slide:first-child {
  border-left: 1px solid var(--doc-border);
}

.doc-carousel__container>.doc-carousel__slide:last-child {
  border-right: 1px solid var(--doc-border);
}

.doc-carousel__slide li {
  list-style: none;
}

.doc-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  object-fit: cover;
  border: 1px solid var(--doc-border);
}

.doc-card-image>img {
  width: 100%;
}

.doc-card-image .badge-solid {
  font-size: 0.6rem;
}

.doc-card-image .doc-sale-badge {
  top: 0.3rem;
  left: 0.3rem;
}

.doc-card-image .doc-preorder-badge {
  top: 0.25rem;
  right: 0.25rem;
  left: initial;
}

.doc-card-image .rx-badge {
  top: initial;
  bottom: 0rem;
  left: 0rem;
  border-radius: 0;
  border-top-right-radius: 1rem;
  height: 2rem;
  font-size: 1rem;
}

.doc-card-body {
  display: flex;
  flex-direction: column;
}

.doc-card-title {
  color: var(--doc-blue-1);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-card-title .badge.rx-badge.small {
  background: transparent;
  color: var(--doc-blue-1);
  padding-left: 0;
  padding-right: 0;
}

.doc-card-rating {
  display: flex;
  align-items: center;
  gap: 2px;
}

.doc-card-star {
  color: var(--doc-gray-3);
  line-height: 1;
}

.doc-card-star.is-filled {
  color: var(--doc-orange-1);
}

.doc-card-rating-count {
  font-size: 11px;
  color: #aaa;
  margin-left: 3px;
}

.doc-card-sold {
  flex-basis: auto;
  line-height: 1;
  font-family: var(--font-ubuntu);
  font-size: var(--font-size-xs);
  color: var(--doc-gray-3);
}

.doc-card-price {
  line-height: 1;
  margin-top: auto;
}

.doc-card-price-now {
  font-family: var(--font-ubuntu);
  color: var(--doc-blue-2);
  font-weight: 600;
  font-size: 1.21rem;
}

.doc-card-price-was {
  font-size: var(--font-size-xs);
  color: var(--doc-gray-3);
  text-decoration: line-through;
}

.doc-card-price-now .woocommerce-Price-currencySymbol {
  font-family: var(--font-ubuntu);
  font-weight: var(--font-weight-ubuntu);
  font-size: 0.55rem;
  padding-top: 0.11rem;
}

/* Base Dynamic Columns (Default / Mobile) */
.doc-carousel__viewport[data-columns="1"] .doc-carousel__slide {
  --carousel-cols: 1;
}

.doc-carousel__viewport[data-columns="2"] .doc-carousel__slide {
  --carousel-cols: 2;
}

.doc-carousel__viewport[data-columns="3"] .doc-carousel__slide {
  --carousel-cols: 3;
}

.doc-carousel__viewport[data-columns="4"] .doc-carousel__slide {
  --carousel-cols: 4;
}

.doc-carousel__viewport[data-columns="5"] .doc-carousel__slide {
  --carousel-cols: 5;
}

.doc-carousel__viewport[data-columns="6"] .doc-carousel__slide {
  --carousel-cols: 6;
}

/* Tablets Portrait (>= 768px) */
@media (min-width: 768px) {
  .doc-carousel__viewport[data-columns-768="1"] .doc-carousel__slide {
    --carousel-cols: 1;
  }

  .doc-carousel__viewport[data-columns-768="2"] .doc-carousel__slide {
    --carousel-cols: 2;
  }

  .doc-carousel__viewport[data-columns-768="3"] .doc-carousel__slide {
    --carousel-cols: 3;
  }

  .doc-carousel__viewport[data-columns-768="4"] .doc-carousel__slide {
    --carousel-cols: 4;
  }

  .doc-carousel__viewport[data-columns-768="5"] .doc-carousel__slide {
    --carousel-cols: 5;
  }

  .doc-carousel__viewport[data-columns-768="6"] .doc-carousel__slide {
    --carousel-cols: 6;
  }
}

/* Tablets Landscape (>= 1024px) */
@media (min-width: 1024px) {
  .doc-carousel__viewport[data-columns-1024="1"] .doc-carousel__slide {
    --carousel-cols: 1;
  }

  .doc-carousel__viewport[data-columns-1024="2"] .doc-carousel__slide {
    --carousel-cols: 2;
  }

  .doc-carousel__viewport[data-columns-1024="3"] .doc-carousel__slide {
    --carousel-cols: 3;
  }

  .doc-carousel__viewport[data-columns-1024="4"] .doc-carousel__slide {
    --carousel-cols: 4;
  }

  .doc-carousel__viewport[data-columns-1024="5"] .doc-carousel__slide {
    --carousel-cols: 5;
  }

  .doc-carousel__viewport[data-columns-1024="6"] .doc-carousel__slide {
    --carousel-cols: 6;
  }
}

/* Small Desktop (>= 1280px) */
@media (min-width: 1280px) {
  .doc-carousel__viewport[data-columns-1280="1"] .doc-carousel__slide {
    --carousel-cols: 1;
  }

  .doc-carousel__viewport[data-columns-1280="2"] .doc-carousel__slide {
    --carousel-cols: 2;
  }

  .doc-carousel__viewport[data-columns-1280="3"] .doc-carousel__slide {
    --carousel-cols: 3;
  }

  .doc-carousel__viewport[data-columns-1280="4"] .doc-carousel__slide {
    --carousel-cols: 4;
  }

  .doc-carousel__viewport[data-columns-1280="5"] .doc-carousel__slide {
    --carousel-cols: 5;
  }

  .doc-carousel__viewport[data-columns-1280="6"] .doc-carousel__slide {
    --carousel-cols: 6;
  }
}

/* Medium Desktop (>= 1440px) */
@media (min-width: 1440px) {
  .doc-carousel__viewport[data-columns-1440="1"] .doc-carousel__slide {
    --carousel-cols: 1;
  }

  .doc-carousel__viewport[data-columns-1440="2"] .doc-carousel__slide {
    --carousel-cols: 2;
  }

  .doc-carousel__viewport[data-columns-1440="3"] .doc-carousel__slide {
    --carousel-cols: 3;
  }

  .doc-carousel__viewport[data-columns-1440="4"] .doc-carousel__slide {
    --carousel-cols: 4;
  }

  .doc-carousel__viewport[data-columns-1440="5"] .doc-carousel__slide {
    --carousel-cols: 5;
  }

  .doc-carousel__viewport[data-columns-1440="6"] .doc-carousel__slide {
    --carousel-cols: 6;
  }
}

/* Large Desktop (>= 1920px) */
@media (min-width: 1920px) {
  .doc-carousel__viewport[data-columns-1920="1"] .doc-carousel__slide {
    --carousel-cols: 1;
  }

  .doc-carousel__viewport[data-columns-1920="2"] .doc-carousel__slide {
    --carousel-cols: 2;
  }

  .doc-carousel__viewport[data-columns-1920="3"] .doc-carousel__slide {
    --carousel-cols: 3;
  }

  .doc-carousel__viewport[data-columns-1920="4"] .doc-carousel__slide {
    --carousel-cols: 4;
  }

  .doc-carousel__viewport[data-columns-1920="5"] .doc-carousel__slide {
    --carousel-cols: 5;
  }

  .doc-carousel__viewport[data-columns-1920="6"] .doc-carousel__slide {
    --carousel-cols: 6;
  }
}

/* Mobile: respect the configured column count at all sizes.
 * For single-slide carousels, peek 85% to hint there are more slides. */
@media (max-width: 480px) {
  .doc-carousel__viewport[data-columns="1"] .doc-carousel__slide {
    flex: 0 0 85%;
  }
}


/* AdhiStrap Top-Right Navigation UI */
.doc-carousel__nav {
  display: flex;
  gap: 8px;
}

.doc-carousel__btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
  color: #2b6cb0;
}

.doc-carousel__btn:not(:disabled):hover {
  background: #ebf8ff;
  border-color: #3182ce;
  color: #2b6cb0;
}

.doc-carousel__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: #f7fafc;
}

/* Skeleton Loading State */
.doc-carousel__container:not(.is-ready) .doc-carousel__slide {
  opacity: 0;
  animation: pulse-skeleton 1.5s infinite;
  background-color: #f7fafc;
}

.doc-carousel__container.is-ready .doc-carousel__slide {
  opacity: 1;
  background-color: #fff;
}

@keyframes pulse-skeleton {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

/* ============================================================
   GLOBAL SHOP ARCHIVE & WISHLIST ELEMENTS
   ============================================================ */
.doc-archive-topbar {
  background: #ffffff;
  transition: all 0.2s ease;
  margin-bottom: 1rem;
}

.doc-archive-topbar-inner {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
}

.doc-topbar-divider,
.doc-onsale-desktop-only {
  display: none;
}

.doc-topbar-divider {
  width: 1px;
  height: 20px;
  background: var(--doc-gray-4, #e5e7eb);
  flex-shrink: 0;
}

/* Results Count & Pill Badge styling */
.doc-result-count {
  font-family: var(--font-inter, sans-serif);
  font-size: 13px;
  color: var(--doc-gray-1, #231c07);
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  grid-column: span 2;
  text-align: left;
  padding-bottom: 2px;
  justify-content: flex-start;
}

.woocommerce-result-count {
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
}

.doc-result-term-pill {
  display: inline-flex;
  align-items: center;
  background: var(--doc-blue-3, #edf7ff);
  color: var(--doc-blue-1, #243271);
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(36, 50, 113, 0.08);
}

/* Elevate Filter Button Drawer Opener */
.doc-filter-drawer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--doc-gray-3, #aebcc7);
  border-radius: 8px;
  font-family: var(--font-inter, sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--doc-blue-1, #243271);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  height: 40px;
  box-sizing: border-box;
  position: relative;
  width: 40px;
  grid-column: span 1;
}

.doc-filter-btn-text {
  display: none;
}

.doc-filter-drawer-btn:hover {
  border-color: var(--doc-blue-2, #4f9dd4);
  background: var(--doc-blue-3, #edf7ff);
}

.doc-filter-drawer-btn svg {
  stroke: var(--doc-blue-1, #243271);
  transition: stroke 0.2s ease;
}

.doc-filter-drawer-btn:hover svg {
  stroke: var(--doc-blue-2, #4f9dd4);
}

.doc-filter-drawer-btn .doc-filter-badge {
  background: var(--doc-blue-1, #243271);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 4px rgba(36, 50, 113, 0.2);
  animation: badgeScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: absolute;
  top: -6px;
  right: -6px;
  margin-left: 0;
}

@keyframes badgeScaleIn {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

/* Custom iOS-style Switch Toggle */
.doc-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-inter, sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--doc-gray-1, #231c07);
  cursor: pointer;
  user-select: none;
}

.doc-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.doc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.doc-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--doc-gray-4, #e5e7eb);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.doc-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.doc-switch input:checked+.doc-switch-slider {
  background-color: var(--doc-blue-1, #243271);
}

.doc-switch input:focus-visible+.doc-switch-slider {
  box-shadow: 0 0 0 2px rgba(79, 157, 212, 0.4);
}

.doc-switch input:checked+.doc-switch-slider:before {
  transform: translateX(18px);
}

.doc-switch-label:hover .doc-switch-slider {
  background-color: var(--doc-gray-3, #aebcc7);
}

.doc-switch-label:hover input:checked+.doc-switch-slider {
  background-color: var(--doc-blue-2, #4f9dd4);
}

/* Elevated Sorting Dropdown select */
.woocommerce-ordering {
  display: flex;
  align-items: center;
  margin: 0;
  grid-column: span 1;
  width: 100%;
}

.woocommerce-ordering select.orderby {
  font-family: var(--font-inter, sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--doc-blue-1, #243271);
  line-height: 1.2;
  border: 1px solid var(--doc-gray-3, #aebcc7);
  border-radius: 8px;
  padding: 8px 32px 8px 12px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23243271' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 12px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  box-sizing: border-box;
  height: 40px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.woocommerce-ordering select.orderby:hover {
  border-color: var(--doc-blue-2, #4f9dd4);
  background-color: var(--doc-blue-3, #edf7ff);
}

.woocommerce-ordering select.orderby:focus {
  border-color: var(--doc-blue-2, #4f9dd4);
  box-shadow: 0 0 0 3px rgba(79, 157, 212, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: none;
}

/* Responsive media queries for layout */
@media (min-width: 471px) {
  .doc-archive-topbar-inner {
    grid-template-columns: 1fr 1fr;
  }

  .doc-filter-drawer-btn {
    position: static;
    width: 100%;
    padding: 8px 16px;
    justify-content: center;
  }

  .doc-filter-btn-text {
    display: inline;
  }

  .doc-filter-drawer-btn .doc-filter-badge {
    position: static;
    margin-left: 4px;
  }
}

@media (min-width: 901px) {
  .doc-archive-topbar {
    padding: 0.5rem 1rem;
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
  }

  .doc-archive-topbar-inner {
    display: flex;
    flex-wrap: nowrap;
  }

  .doc-archive-topbar-inner form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    width: auto;
    flex-shrink: 0;
  }

  .doc-result-count {
    font-size: 14px;
    margin-right: auto;
    padding-bottom: 0;
  }

  .doc-filter-drawer-btn {
    display: none;
  }

  .woocommerce-ordering {
    width: auto;
  }

  .woocommerce-ordering select.orderby {
    width: auto;
  }

  .doc-topbar-divider {
    display: block;
  }

  .doc-onsale-desktop-only {
    display: inline-flex;
  }

  .doc-onsale-mobile-only {
    display: none;
  }
}

/* Custom Orderby Dropdown styling */
.doc-orderby-custom {
  position: relative;
  display: inline-block;
  font-family: var(--font-inter, sans-serif);
}

.doc-orderby-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid var(--doc-gray-3, #aebcc7);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--doc-blue-1, #243271);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  height: 40px;
  width: auto;
  min-width: 180px;
  text-align: left;
  box-sizing: border-box;
}

.doc-orderby-button:hover {
  border-color: var(--doc-blue-2, #4f9dd4);
  background-color: var(--doc-blue-3, #edf7ff);
}

.doc-orderby-button:focus {
  border-color: var(--doc-blue-2, #4f9dd4);
  box-shadow: 0 0 0 3px rgba(79, 157, 212, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: none;
}

.doc-orderby-chevron {
  color: var(--doc-blue-1, #243271);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.doc-orderby-custom.is-open .doc-orderby-chevron {
  transform: rotate(180deg);
}

.doc-orderby-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 100;
  background: #ffffff;
  border: 1px solid var(--doc-gray-4, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 200px;
  display: none;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doc-orderby-custom.is-open .doc-orderby-list {
  display: block;
}

.doc-orderby-item {
  font-size: 13px;
  font-weight: 500;
  color: var(--doc-gray-1, #231c07);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.doc-orderby-item:hover {
  background-color: var(--doc-blue-3, #edf7ff);
  color: var(--doc-blue-1, #243271);
}

.doc-orderby-item.is-active {
  background-color: var(--doc-blue-1, #243271);
  color: #ffffff;
  font-weight: 600;
}

/* Force override native ordering select displaying when custom dropdown is used */
.doc-archive-page .woocommerce-ordering select.orderby {
  display: none !important;
}

@media (max-width: 900px) {
  .doc-orderby-custom {
    display: block;
    width: 100%;
  }

  .doc-orderby-button {
    width: 100%;
    min-width: unset;
  }

  .doc-orderby-list {
    width: 100%;
    left: 0;
    right: 0;
    box-sizing: border-box;
  }
}

/* Custom Dropdown Icon Layouts */
.doc-orderby-current-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-orderby-current-icon {
  display: inline-flex;
  align-items: center;
  color: var(--doc-blue-1, #243271);
}

.doc-orderby-current-icon svg {
  display: block;
}

.doc-orderby-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-orderby-item-icon {
  display: inline-flex;
  align-items: center;
  color: var(--doc-gray-2, #64748b);
  transition: color 0.15s ease;
}

.doc-orderby-item-icon svg {
  display: block;
}

.doc-orderby-item:hover .doc-orderby-item-icon {
  color: var(--doc-blue-1, #243271);
}

.doc-orderby-item.is-active .doc-orderby-item-icon {
  color: #ffffff;
}



/* Product Grid */
.doc-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 750px) {
  .doc-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .doc-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Product Grid — collapsed border fix (mirrors carousel pattern)
   Left/Right: outer edges = 1px, shared inner = 0.5 + 0.5 = 1px visually.
   Top/Bottom: outer edges = 1px, shared row edges = 0.5 + 0.5 = 1px visually. */

/* 3-column (default) — horizontal outer edges */
.doc-product-grid>.doc-product-grid__slide:nth-child(3n+1) {
  border-left: 1px solid var(--doc-border);
}

.doc-product-grid>.doc-product-grid__slide:nth-child(3n) {
  border-right: 1px solid var(--doc-border);
}

/* 3-column — items NOT in the last row share their bottom border with the row below */
.doc-product-grid>.doc-product-grid__slide:not(:nth-last-child(-n+3)) {
  border-bottom: 0.5px solid var(--doc-border);
}

/* 3-column — items from row 2 onwards share their top border with the row above */
.doc-product-grid>.doc-product-grid__slide:nth-child(n+4) {
  border-top: 0.5px solid var(--doc-border);
}

/* 2-column (≤750px) */
@media (max-width: 750px) {

  /* Horizontal: reset 3-col overrides, re-apply for 2 cols */
  .doc-product-grid>.doc-product-grid__slide:nth-child(3n+1),
  .doc-product-grid>.doc-product-grid__slide:nth-child(3n) {
    border-left: 0.5px solid var(--doc-border);
    border-right: 0.5px solid var(--doc-border);
  }

  .doc-product-grid>.doc-product-grid__slide:nth-child(2n+1) {
    border-left: 1px solid var(--doc-border);
  }

  .doc-product-grid>.doc-product-grid__slide:nth-child(2n) {
    border-right: 1px solid var(--doc-border);
  }

  /* Vertical: items NOT in the last 2 share their bottom border */
  .doc-product-grid>.doc-product-grid__slide:not(:nth-last-child(-n+2)) {
    border-bottom: 0.5px solid var(--doc-border);
  }

  /* Vertical: items from row 2+ (item 3+) share their top border */
  .doc-product-grid>.doc-product-grid__slide:nth-child(n+3) {
    border-top: 0.5px solid var(--doc-border);
  }
}

/* 1-column (≤360px — small phones) */
@media (max-width: 360px) {
  .doc-product-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  /* Horizontal: every item spans full width — both edges are outer edges */
  .doc-product-grid>.doc-product-grid__slide:nth-child(2n+1),
  .doc-product-grid>.doc-product-grid__slide:nth-child(2n) {
    border-left: 0.5px solid var(--doc-border);
    /* reset 2-col rules */
    border-right: 0.5px solid var(--doc-border);
  }

  .doc-product-grid>.doc-product-grid__slide {
    border-left: 1px solid var(--doc-border);
    border-right: 1px solid var(--doc-border);
  }

  /* Vertical: every item is its own row — simplifies to first/last child logic */
  .doc-product-grid>.doc-product-grid__slide:not(:last-child) {
    border-bottom: 0.5px solid var(--doc-border);
  }

  .doc-product-grid>.doc-product-grid__slide:nth-child(n+2) {
    border-top: 0.5px solid var(--doc-border);
  }
}

/* Product Card Base styling */
.doc-product-card {
  background: #fff;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 16px 14px 14px;
  transition: box-shadow 0.15s;
  position: relative;
  border-top: 1px solid var(--doc-border);
  border-bottom: 1px solid var(--doc-border);
  border-right: 0.5px solid var(--doc-border);
  border-left: 0.5px solid var(--doc-border);
}

.doc-product-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
  text-decoration: none;
  color: inherit;
  z-index: 1;
}

.doc-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.doc-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.doc-product-card:hover .doc-card-title {
  color: var(--doc-blue-1, #1a5fa8);
}

.doc-card-cta:hover {
  background: var(--doc-blue-2, #0a4f8a);
  color: #fff;
  text-decoration: none;
}

.doc-card-cta.is-disabled {
  background: var(--doc-red-1);
  cursor: default;
  pointer-events: none;
}

.doc-card-cta.main-button {
  margin-top: auto;
  align-self: stretch;
  box-shadow: none;
}

.doc-card-cta.main-button.is-disabled {
  background: var(--doc-red-1) !important;
  border-color: var(--doc-red-1) !important;
  cursor: default;
  pointer-events: none;
}

/* ============================================================
   HEADER NAVIGATION BAR & DRAWER
   ============================================================ */

/* Utility Visibility Classes */
.hide-desktop-tablet {
  display: none !important;
}

@media (max-width: 767px) {
  .hide-desktop-tablet {
    display: inline-flex !important;
  }

  .show-desktop-tablet {
    display: none !important;
  }
}

/* Horizontal Nav Bar */
.header-nav-bar {
  background: linear-gradient(to bottom, var(--doc-gray-5), #ffffff);
  border-top: 1px solid var(--doc-border);
  border-bottom: 1px solid var(--doc-border);
}

.nav-bar-container {
  height: var(--site-header-nav-container);
  display: flex;
  align-items: center;
}

/* Categories Burger Button */
.nav-categories-burger {
  background: none;
  border: none;
  color: var(--doc-blue-1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 32px;
  height: 100%;
  transition: color 0.2s ease;
}

.nav-categories-burger:hover {
  color: var(--doc-blue-2);
}

.nav-bar-divider {
  height: 100%;
  flex-basis: 1px;
  background-color: var(--doc-border);
  flex-shrink: 0;
}

/* Featured Menu links */
.featured-nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  width: 100%;
  min-width: 0;
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.featured-nav-menu-wrapper {
  position: relative;
  display: flex;
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  margin-left: -1rem;
  padding-left: 1rem;
  margin-right: -1rem;
  padding-right: 1rem;
}

.featured-nav-menu-wrapper::before {
  content: "";
  display: block;
  height: 100%;
  width: 1rem;
  position: absolute;
  left: 0;
  top: 0;
  background: linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0.85) 30%, rgba(255, 255, 255, 0.4) 70%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 2;
}

.featured-nav-menu-wrapper::after {
  content: "";
  display: block;
  height: 100%;
  width: 1rem;
  position: absolute;
  right: 0;
  top: 0;
  background: linear-gradient(to left, #fff 0%, rgba(255, 255, 255, 0.85) 30%, rgba(255, 255, 255, 0.4) 70%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Featured Right Menu */
.featured-right-menu {
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: 1rem;
}

.featured-right-menu .nav-submenu-list {
  left: auto;
  right: 0;
}

.nav-menu-item {
  color: var(--doc-blue-1);
  font-family: var(--font-ubuntu);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-ubuntu);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-split-action .nav-menu-item {
  text-transform: uppercase;
  font-size: var(--font-size-s);
  font-weight: var(--font-weight-ubuntu);
}

.nav-menu-item:hover {
  color: var(--doc-blue-2);
}

/* Submenu / Dropdown Styles for Featured Menu */
.nav-menu-item-wrapper {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-submenu-list {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  list-style: none;
  padding: 8px;
  margin: 0;
  min-width: 240px;
  z-index: 100;
  border-radius: 8px;

  /* Smooth Fade/Slide Animation */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
  pointer-events: none;
}

/* Invisible bridge to prevent mouse-out when moving cursor over the gap */
.nav-submenu-list::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: transparent;
  z-index: -1;
}

/* Speech bubble pointed arrow */
.nav-submenu-list::after {
  content: "";
  position: absolute;
  top: -16px;
  left: 24px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M 0.5 16 L 8 1 L 15.5 16' fill='%23ffffff' stroke='%23e0e0e0' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  pointer-events: none;
}

.nav-menu-item-wrapper:hover .nav-submenu-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-submenu-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--doc-blue-1);
  font-family: var(--font-inter);
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-submenu-list li a:hover {
  background-color: rgba(0, 82, 204, 0.05);
  color: var(--doc-blue-2);
  padding-left: 18px;
}

/* Service Menu Icon styles */
.nav-sub-icon {
  color: var(--doc-blue-1);
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.nav-submenu-list li a:hover .nav-sub-icon {
  color: var(--doc-blue-2);
  transform: scale(1.1);
}



.nav-menu-item-wrapper:hover>.nav-menu-item {
  color: var(--doc-blue-2);
}

.nav-menu-item-wrapper:hover>.nav-menu-item.color-red-1 {
  color: #c93b45;
}

.nav-menu-item.color-red-1 {
  color: var(--doc-red-1);
}

.nav-menu-item.color-red-1:hover {
  color: #c93b45;
}

.nav-menu-item svg {
  flex-shrink: 0;
}

.nav-menu-item .chevron-icon {
  opacity: 0.7;
}

/* Scrollbar resetting for menu */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Category Drawer */
.doc-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(750px, 90vw);
  height: 100dvh;
  background-color: #fff;
  z-index: 301;
  transform: translate3d(-100%, 0, 0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  display: flex !important;
  flex-direction: column;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: paint;
}

.doc-nav-drawer.is-open {
  transform: translate3d(0, 0, 0);
}

/* Backdrop overlay base class */
.doc-filter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  z-index: 300;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.doc-filter-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}



/* Drawer Header */
.doc-nav-drawer-header {
  background-color: var(--doc-blue-1);
  padding: 15px 5px 15px 20px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-nav-drawer-title {
  font-family: var(--font-ubuntu);
  font-size: var(--font-size-s);
  color: #fff;
  letter-spacing: 0.5px;
}

.doc-nav-close-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 5px;
  transition: opacity 0.2s ease;
}

.doc-nav-close-btn:hover {
  opacity: 0.8;
}

/* Drawer Body & Panes */
.doc-nav-drawer-body {
  flex-grow: 1;
  overflow: hidden;
  background-color: #fff;
}

/* Left Pane (Parents) */
.doc-nav-drawer-parents {
  width: 260px;
  border-right: 1px solid var(--doc-border);
  overflow-y: auto;
  flex-shrink: 0;
  background-color: var(--doc-gray-5);
}

.doc-nav-parent-list {
  margin: 0;
  padding: 0;
}

.doc-nav-parent-item {
  border-bottom: 1px solid var(--doc-border);
  transition: all 0.2s ease;
}

.doc-nav-parent-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3rem;
  padding: 0 1.25rem;
  color: var(--doc-blue-1);
  font-family: var(--font-inter);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-inter-semibold);
  transition: all 0.2s ease;
}

.doc-nav-parent-item.active,
.doc-nav-parent-item:hover {
  background-color: var(--doc-blue-3);
}

.doc-nav-parent-item.active a,
.doc-nav-parent-item:hover a {
  color: var(--doc-blue-1);
}

.doc-nav-parent-item .chevron-right {
  color: var(--doc-gray-3);
  transition: transform 0.2s ease;
}

.doc-nav-parent-item:hover .chevron-right,
.doc-nav-parent-item.active .chevron-right {
  transform: translateX(3px);
  color: var(--doc-blue-1);
}

/* Right Pane (Children) */
.doc-nav-drawer-children {
  overflow-y: auto;
  background-color: #fff;
}

.doc-nav-child-panel {
  display: none;
}

.doc-nav-child-panel.active {
  display: block;
}

.child-panel-title {
  font-family: var(--font-ubuntu);
  font-size: var(--font-size-l);
  color: var(--doc-blue-1);
  border-top: 2px solid var(--doc-blue-3);
  border-bottom: 2px solid var(--doc-blue-3);
  font-weight: 600;
  padding: 0 1.25rem;
  height: 3rem;
}

/* Child Grid */
.doc-nav-child-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 1rem 1.25rem;
  gap: 1rem;
}

.doc-nav-child-link {
  color: var(--doc-gray-1);
  font-family: var(--font-inter);
  font-size: var(--font-size-xs);
  text-decoration: none;
  transition: color 0.2s ease;
}

.doc-nav-child-link:hover {
  color: var(--doc-blue-2);
  text-decoration: underline;
}

.doc-nav-no-children {
  font-family: var(--font-inter);
  font-size: var(--font-size-xs);
  color: var(--doc-gray-3);
  padding: 1rem 1.25rem;
}

/* Icons styling */
.cat-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.cat-icon {
  color: var(--doc-blue-1);
  flex-shrink: 0;
}

.doc-nav-parent-item:hover .cat-icon,
.doc-nav-parent-item.active .cat-icon {
  color: var(--doc-blue-1);
}

/* Mobile responsive styles */
@media (max-width: 767px) {
  .doc-nav-drawer {
    width: min(320px, 85vw);
  }

  .doc-nav-drawer-body {
    position: relative;
    overflow: hidden;
    height: 100%;
  }

  .doc-nav-drawer-parents {
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    flex-grow: 1;
  }

  .doc-nav-drawer-children {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    overflow-y: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .doc-nav-drawer.show-children .doc-nav-drawer-parents {
    transform: translate3d(-100%, 0, 0);
  }

  .doc-nav-drawer.show-children .doc-nav-drawer-children {
    transform: translate3d(0, 0, 0);
  }

  .mobile-back-row {
    display: inline-flex !important;
    align-items: center;
    color: var(--doc-blue-1);
    font-family: var(--font-inter);
    font-size: var(--font-size-xs);
    border-bottom: 1px solid var(--doc-border);
    width: 100%;
    padding: 0.5rem 1.25rem;
  }

  .doc-nav-child-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .mobile-back-row {
    display: none !important;
  }
}

.doc-gutenberg-wrapper .doc-gutenberg-wrapper.fullwidth .doc-carousel__header-text-container.container {
  padding-left: 0;
  padding-right: 0;
}

.wp-block-table {
  font-size: var(--font-size-xs);
  overflow: scroll;
}

.wp-block-table td,
.wp-block-table th {
  padding: 0.75rem;
}

@media (max-width: 768px) {
  .bottom-cart .single_add_to_cart_button {
    font-size: 0;
    gap: 0;
  }
  .bottom-cart .single_add_to_cart_button .show-tablet {
    display: none !important;
  }
  .bottom-cart .single_add_to_cart_button svg {
    width: 18px;
    height: 18px;
  }
}

/* --- Equal-height consult cards (all screen sizes) --- */
/* Voucher cards: keep the code/label on one line instead of stacking letters */
.doc-m-cols-2 .wp-block-button__link {
  white-space: nowrap !important;
  width: auto !important;
  min-width: 0 !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

/* nudge the code text down so WELCOME10 fits the narrow card */
.doc-m-cols-2 .has-pale-cyan-blue-background-color.wp-block-button__link {
  font-size: 13px !important;
}

/* Hero pill buttons: equal width, no mid-word wrapping */
.doc-hero-pills > .wp-block-buttons {
  flex: 0 0 auto;                 /* stop the wrappers shrinking */
}
.doc-hero-pills .wp-block-button__link.main-button {
  white-space: nowrap;            /* keep ONLINE PHARMACY on one line */
  min-width: 210px;               /* same size regardless of label length */
}

/* Lift the Chaty widget 50px on phones only (desktop unchanged) */
@media (max-width: 767px) {
    #chaty-widget-0 {
        transform: translateY(-50px);
    }
}

@media (max-width: 767px) {
    #chaty-widget-0 { bottom: 75px !important; }
}

form.checkout.doc-unified-checkout { flex-wrap: wrap; }
form.checkout .woocommerce-NoticeGroup-checkout {
    flex: 1 0 100%;
    width: 100%;
    order: -1;
    margin: 0 0 20px;
}
form.checkout .woocommerce-NoticeGroup-checkout .woocommerce-error {
    background: #fff3f3;
    border: 1px solid #e2401c;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 0;
    color: #b91c1c;
    list-style: none;
}
form.checkout .woocommerce-NoticeGroup-checkout .woocommerce-error li { margin: 2px 0; }

body .sticky-product-cart-buttons .number-button {
    flex: 0 0 auto !important;
    width: 112px !important;
    max-width: 112px !important;
    display: flex !important;
    align-items: stretch !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
body .sticky-product-cart-buttons .number-button > .quantity {
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body .sticky-product-cart-buttons .minus,
body .sticky-product-cart-buttons .plus {
    flex: 0 0 34px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    font-size: 18px !important;
    line-height: 1 !important;
    text-align: center !important;
    cursor: pointer;
    color: inherit !important;
    box-sizing: border-box !important;
}
body .sticky-product-cart-buttons .qty {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    font-size: 16px !important;
    text-align: center !important;
    color: inherit !important;
    box-sizing: border-box !important;
}
body .sticky-product-cart-buttons .qty::-webkit-outer-spin-button,
body .sticky-product-cart-buttons .qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

form.checkout.cart-wrapper {
    flex-wrap: wrap;
}
form.checkout.cart-wrapper > .woocommerce-NoticeGroup {
    flex: 0 0 100%;
    width: 100%;
    order: -1;
    margin-bottom: 1rem;
}
