.csm-sre-summary{
  margin-top: 6px;
  font-size: 12px;
  color: #374151;
}

/* Columns */
.csm-columns{ display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
@media (min-width: 640px){ .csm-columns{ grid-template-columns: 1fr 1fr; } }
.csm-col{ background: #fff; border: 1px solid #e6e8eb; border-radius: 10px; padding: 8px; }
.csm-col > .csm-col-title{ font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; margin: 0 0 6px; }
.csm-col ul{ list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

/* Desktop resizable columns (optional) */
@media (min-width: 980px){
  .csm-columns.resizable{ display:flex; gap:12px; align-items:stretch; }
  .csm-columns.resizable .csm-col{ flex: 1 1 0%; min-width: 280px; }
  .csm-columns .csm-divider{ display:none; }
  .csm-columns.resizable .csm-divider{ display:block; position:relative; width: 14px; cursor: col-resize; flex: 0 0 14px; }
  .csm-columns.resizable .csm-divider::before{ content:''; position:absolute; top:0; bottom:0; left:6px; width:2px; background:#cfd7df; border-radius:2px; }
  .csm-columns.resizable .csm-divider:hover::before, .csm-columns.resizable .csm-divider.dragging::before{ background:#94a3b8; }
  .csm-columns.resizable .csm-divider .csm-divider-tooltip{
    position:absolute; top:8px; left:50%; transform: translateX(-50%);
    background:#0b4a6f; color:#fff; border-radius:14px; padding:4px 8px; font-size:11px; font-weight:700; white-space:nowrap;
    opacity:0; pointer-events:none; transition: opacity .15s ease; user-select:none;
  }
  .csm-columns.resizable .csm-divider:hover .csm-divider-tooltip{ opacity:1; pointer-events:auto; cursor:pointer; }
}

/* Accordions */
.csm-drug-accordion{ border: 1px solid #e6e8eb; border-radius: 8px; }
.csm-drug-header{ display:flex; align-items:center; justify-content:space-between; padding:10px 12px; cursor:pointer; background:#f9fafb; border-bottom:1px solid #e6e8eb; }
.csm-header-right{ display:flex; align-items:center; gap:8px; }
.csm-arrow{ display:inline-block; width:8px; height:8px; border-right:2px solid #6b7280; border-bottom:2px solid #6b7280; transform: rotate(-45deg); transition: transform 150ms ease; }
.expanded .csm-arrow{ transform: rotate(45deg); }
.csm-badge{ display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; color:#fff; }
.csm-badge.brand{ background:#008815; }
.csm-badge.generic{ background:#f86d11; }
.csm-pricefrom{ display:inline-block; padding:2px 10px; border-radius:999px; font-size:12px; font-weight:800; color:#fff; background:#16a34a; }
.csm-drug-body[hidden]{ display:none; }

.csm-strength{ border-top:1px dashed #e6e8eb; }
.csm-strength-header{ display:flex; align-items:center; justify-content:space-between; padding:8px 12px; cursor:pointer; background:#ffffff; }
.csm-strength-header .csm-arrow{ border-right-color:#9ca3af; border-bottom-color:#9ca3af; }
.csm-strength-body[hidden]{ display:none; }

.csm-pkg-table{ width:100%; border-collapse: collapse; }
.csm-pkg-table thead th{ text-align:left; font-size:12px; color:#6b7280; padding:8px 12px; border-bottom:1px solid #e6e8eb; }
.csm-pkg-table tbody td{ padding:10px 12px; border-bottom:1px solid #f1f5f9; font-size:14px; }
.csm-view-btn{ display:inline-block; background:#0b4a6f; color:#fff; border-radius:6px; padding:6px 10px; text-decoration:none; font-weight:700; font-size:13px;text-align: center; }

/* Toggle bar */
.csm-togglebar{ display:flex; gap:8px; align-items:center; border:1px solid #e6e8eb; background:#fff; border-radius:8px; padding:6px; margin-bottom:10px; }
.csm-togglebar .csm-tab{ appearance:none; -webkit-appearance:none; border:1px solid #e6e8eb; background:#f9fafb; padding:6px 10px; border-radius:6px; font-weight:700; cursor:pointer; }
.csm-togglebar .csm-tab.active{ background:#0ea5e9; color:#fff; border-color:#0ea5e9; }

/* Filters */
.csm-filters{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; border:1px solid #e6e8eb; background:#fff; border-radius:8px; padding:8px; margin:10px 0; }
.csm-filters.vertical{ flex-direction:column; align-items:stretch; }
.csm-filters > *{ flex: 0 0 auto; }
.csm-checkbox-group{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.csm-checkbox-group label{ display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border:1px solid #e5e7eb; border-radius:6px; background:#f9fafb; cursor:pointer; }
.csm-slider-group{ display:flex; align-items:center; gap:8px; position:relative; }
.csm-slider{ position:relative; width:260px; height:24px; }
.csm-slider input[type=range]{ position:absolute; left:0; right:0; top:0; bottom:0; width:100%; pointer-events: none; background:transparent; }
.csm-slider input[type=range].handle{ pointer-events:auto; -webkit-appearance: none; appearance: none; background: transparent; }
.csm-slider input[type=range].handle::-webkit-slider-thumb{ -webkit-appearance: none; appearance: none; width:14px; height:14px; background:#0ea5e9; border-radius:50%; border:2px solid #fff; box-shadow: 0 0 0 1px #0ea5e9; cursor:pointer; }
.csm-slider-track{ position:absolute; left:0; right:0; top:50%; height:4px; background:#e5e7eb; transform: translateY(-50%); border-radius:999px; }
.csm-slider-range{ position:absolute; top:50%; height:4px; background:#0ea5e9; transform: translateY(-50%); border-radius:999px; }
.csm-drop{ position:relative; }
.csm-drop-btn{ border:1px solid #e5e7eb; background:#f9fafb; border-radius:6px; padding:6px 10px; cursor:pointer; font-weight:600; }
.csm-drop-btn::after{ content:''; display:inline-block; width:8px; height:8px; border-right:2px solid #6b7280; border-bottom:2px solid #6b7280; transform: translateY(-1px) rotate(45deg); margin-left:8px; transition: transform 150ms ease; }
.csm-drop.open .csm-drop-btn::after{ transform: translateY(-1px) rotate(-135deg); }
.csm-drop-panel{ position:absolute; z-index:50; top:calc(100% + 6px); left:0; background:#fff; border:1px solid #e5e7eb; border-radius:8px; padding:8px; min-width:220px; box-shadow:0 6px 18px rgba(16,24,40,0.08); display:none; }
.csm-drop.open .csm-drop-panel{ display:block; }
.csm-filter-chips{ display:flex; gap:6px; flex-wrap:wrap; }
.csm-chip{ display:inline-flex; align-items:center; gap:6px; background:#eef2ff; color:#374151; font-size:12px; border-radius:999px; padding:4px 10px; border:1px solid #c7d2fe; }
.csm-chip .csm-chip-x{ cursor:pointer; font-weight:800; }

/* Fade in/out */
.csm-fade{ opacity:0; transform: translateY(4px); transition: opacity 200ms ease, transform 200ms ease; }
.csm-fade.show{ opacity:1; transform: translateY(0); }

/* Flags */
.csm-flag{ display:inline-flex; width:18px; height:18px; border-radius:999px; overflow:hidden; border:1px solid #e5e7eb; vertical-align:middle; }
.csm-flag img{ width:100%; height:100%; object-fit:cover; display:block; }
.csm-flag-stack{ display:inline-flex; gap:4px; align-items:center; }
.csm-country-cell{ display:flex; align-items:center; gap:8px; }

.csm-highlight{ animation: csmFlash 2s ease; box-shadow: 0 0 0 3px rgba(14,165,233,0.35) inset; }
@keyframes csmFlash{ 0%{ box-shadow: 0 0 0 0 rgba(14,165,233,0.0) inset; } 20%{ box-shadow: 0 0 0 3px rgba(14,165,233,0.45) inset; } 100%{ box-shadow: 0 0 0 0 rgba(14,165,233,0.0) inset; } }

/* Detail page grid */
.csm-detail-grid{ display:grid; grid-template-columns: 1fr; gap:20px; }
@media (min-width: 980px){ .csm-detail-grid{ grid-template-columns: 420px 1fr; } }
.csm-detail-media{ background:#fff; border:1px solid #e6e8eb; border-radius:10px; padding:16px; display:flex; flex-direction:column; gap:10px; }
.csm-media-main{ width:100%; background:#f9fafb; border:1px dashed #e5e7eb; border-radius:10px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.csm-media-ph{ width:120px; height:120px; background:#eef2ff; border-radius:16px; }
.csm-media-thumbs{ display:flex; gap:12px; }
.csm-thumb{ width:60px; height:60px; border:1px solid #e5e7eb; border-radius:8px; background:#f9fafb; }
.csm-media-main img.csm-main-img{ max-width:100%; max-height:100%; height:auto; width:auto; object-fit:contain; display:block; }

.csm-detail-info{ background:#fff; border:1px solid #e6e8eb; border-radius:10px; padding:16px; }
.csm-detail-title{ font-size:26px; font-weight:800; margin-bottom:6px; }
.csm-detail-price{ margin:8px 0 10px; }
.csm-price{ font-size:24px; font-weight:900; color:#16a34a; }
.csm-detail-badge{ margin-bottom:8px; }
.csm-section{ margin-top:14px; }
.csm-label{ font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:#6b7280; margin-bottom:8px; }
.csm-chip-group{ display:flex; flex-wrap:wrap; gap:8px; }
.csm-chip{ border:1px solid #e6e8eb; background:#f9fafb; padding:6px 10px; border-radius:999px; font-weight:700; cursor:pointer; }
.csm-chip.active{ background:#0ea5e9; color:#fff; border-color:#0ea5e9; }
.csm-chip.disabled{ position:relative; opacity:.6; cursor:not-allowed !important; background:#f3f4f6; border-color:#e5e7eb; color:#9ca3af;  }
.csm-chip.disabled::after{ content:''; position:absolute; inset:0; background-image: linear-gradient(135deg, transparent 44%, rgba(156,163,175,.85) 46%, rgba(156,163,175,.85) 54%, transparent 56%); border-radius:999px; pointer-events:none; }
.csm-info-pill{ background:#eef2ff; border-color:#c7d2fe; color:#111827; }

.csm-pkg-list{ display:flex; flex-direction:column; gap:10px; }
.csm-pkg-card{ display:flex; align-items:center; justify-content:space-between; border:1px solid #22c55e55; border-radius:10px; padding:12px; background:#f8fff9; cursor:pointer; }
.csm-pkg-card.selected{ background:#eafff1; border-color:#22c55e; box-shadow:0 0 0 2px #22c55e22 inset; }
.csm-pkg-main{ display:flex; flex-direction:column; gap:4px; }
.csm-pkg-qty{ font-weight:800; }
.csm-pkg-strength{ font-size:12px; color:#374151; }
.csm-pkg-attr{ font-size:12px; color:#6b7280; }
.csm-pkg-country{ display:flex; gap:8px; align-items:center; font-size:12px; color:#374151; }
.csm-pkg-side{ display:flex; align-items:center; gap:12px; }
.csm-pkg-price{ font-weight:900; color:#16a34a; }

/* Right-side cart panel on product detail */
.csm-cart-panel{ margin:8px 0 12px; padding:10px; background:#f8fafc; border:1px solid #e5e7eb; border-radius:8px; }

/* Tier chips */
.csm-tier-group{ display:flex; gap:6px; margin-top:8px; flex-wrap:wrap; }
.csm-tier-chip{ border:1px solid #e5e7eb; background:#fff; padding:4px 8px; border-radius:999px; font-weight:700; cursor:pointer; font-size:12px; }
.csm-tier-chip.active{ background:#0ea5e9; color:#fff; border-color:#0ea5e9; }

/* Breadcrumb */
.csm-breadcrumb{ margin:8px 0 10px; font-size:13px; color:#6b7280; }
.csm-breadcrumb a{ color:#0b4a6f; text-decoration:none; font-weight:700; }
.csm-breadcrumb a:hover{ text-decoration:underline; }


/* Custom CSS nav */
.csm-brand .csm-drug-header{
  background: #17a34a12;
  border-bottom:0px;
}
.csm-generic .csm-drug-header{
  background: #f86d110d;
  border-bottom:0px;
}
.csm-drug-header{
  color:#333333;
}
.csm-generic .csm-drug-accordion {
  border: 1px solid #f86d11;
  background-color: #f86d110d;
}

.csm-brand .csm-drug-accordion {
  border: 1px solid #008815;
  background-color: #f3f9f4;
}
.csm-strength-header{
  color:#333333;
  border-radius: 10px;
}
.csm-pkg-table thead th{
  color:#333333;
}
.csm-pkg-table tbody td{
  color:#333333;
}
.csm-pkg-table a{
  white-space: nowrap;
}
.csm-drop-btn {
  border: 1px solid #008815;
  background: #f3f9f4;
  border-radius: 10px !important;
  padding: 6px 20px;
  cursor: pointer;
  color: #008815;
  font-weight: 600;
  width: 220px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.csm-checkbox-group {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: nowrap;
  max-height: 250px;
  overflow: auto;
  padding: 1px 5px 1px 0px;
}
.csm-checkbox-group label {
  display: inline-flex
;
  align-items: center;
  gap: 0px;
  padding: 2px 0px;
  border: 1px solid #008815;
  border-radius: 6px;
  background: #f3f9f4;
  cursor: pointer;
  width: 100%;
  justify-content: flex-start;
}
.csm-drop-btn:focus, .csm-drop-btn:hover {
  background: #f86d110d;
  color: #f86d11;
  border: 1px solid #f86d11;
  
}
.csm-drop-panel {
  overflow: auto;
  max-height: 280px;
  padding-bottom: 15px !important;
  background: white;
}
.csm-drop-btn::after{
  border-right: 2px solid #008815;
  border-bottom: 2px solid #008815;
}
.csm-drop-btn:focus::after, .csm-drop-btn:hover::after{
  border-right: 2px solid #f86d11;
  border-bottom: 2px solid #f86d11;
}
.csm-filters{
  /* display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  justify-items: center;
  align-items: center; */
  justify-content: space-between;
}
.csm-filters input[type="text"]{
  margin-bottom: 0px;
  width: 220px;
  justify-self: start;
  align-self: start;
  border: 1px solid #747575;
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  min-width: 220px;
  outline: none;
  box-shadow: none;
  margin-bottom: 0px;
}
.csm-filter-buttons{
  display: flex;
  gap: 10px;
  flex-shrink: 1;
  flex-wrap: wrap;
}
.csm-drug-header strong{
  padding-right: 10px;
}
.csm-generic .csm-pricefrom{
  background: #f86d11;
}
.csm-pkg-table tbody td small{
  display: block;
  white-space: nowrap;
}






/* Make the table itself fully responsive */
.csm-strength-body{ min-width:0; overflow-x:hidden; }  /* no sideways push */
.csm-pkg-table{
  width:100%;
  table-layout:fixed;        /* forces columns to shrink */
  border-collapse:collapse;
}

/* Let cells wrap/break and be allowed to shrink */
.csm-pkg-table th,
.csm-pkg-table td{
  min-width:0;
  vertical-align:top;
  /* white-space:normal !important;    */
  /* overflow-wrap:anywhere;             */
  /* word-break:break-word; */
  padding:.5rem .75rem;
}
/* If descendants had nowrap, inherit the normal wrapping */
.csm-pkg-table th *,.csm-pkg-table td *{ white-space:inherit !important; }

/* If a cell still gets too tall, make just that cell y-scrollable */
/* .csm-pkg-table td.csm-attr-cell,
.csm-pkg-table td:nth-child(1){      
  max-height:5.5rem;                 
  overflow-y:auto;
} */

/* Optional: keep headers visible if you ever add a max-height to the table wrapper */
.csm-pkg-table thead th{ position:sticky; top:0; background:#fff; z-index:1; }

/* If this table sits in a flex/grid parent, allow it to shrink */
.csm-drug-accordion{ min-width:0; }

/* Cap the table area and let the body scroll vertically */
.csm-strength-body{
  /* max-height:420px;        */
  overflow-y:auto;
}
.csm-pkg-table tbody td {
  white-space: normal !important;
  /* overflow-wrap: anywhere;
  word-break: break-word; */
}

.csm-checkbox-group label:hover{
  background: #f86d110d;
  border: 1px solid #f86d11;
  color: #f86d11;
}

/* Loading skeletons for Brand/Generic columns */
.csm-skeleton-li{
  display:block;
  height:56px;
  border:1px solid #e6e8eb;
  border-radius:8px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
  background-size: 400% 100%;
  animation: csmSkeleton 1.2s ease-in-out infinite;
}

@keyframes csmSkeleton{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}