/* dcn-styles.css
   Strong, defensive CSS for Daisycon campaigns grid and pagination.
   Saves common issues: huge spacing, visible debug JSON, oversized images, theme overrides.
*/

/* Root container */
#dcn-campaigns-wrap {
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
}

/* Campaign grid (responsive) */
#dcn-campaigns-wrap .dcn-campaigns-grid,
.dcn-campaigns-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: start !important;
}

/* Card */
#dcn-campaigns-wrap .dcn-card,
.dcn-card {
  background: #ffffff !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 18px rgba(22,28,37,0.06) !important;
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  min-height: 0 !important;
  border: 1px solid rgba(22,28,37,0.04) !important;
  transition: transform .12s ease, box-shadow .12s ease !important;
  overflow: visible !important;
}

/* Hover */
#dcn-campaigns-wrap .dcn-card:hover,
.dcn-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 10px 30px rgba(22,28,37,0.09) !important;
}

/* Top row: logo + badge container */
.dcn-card-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 8px !important;
}

/* Logo container */
.dcn-logo-wrap {
  width: 88px !important;
  height: 64px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f6f7f9 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(22,28,37,0.03) !important;
}

/* When no logo available */
.dcn-logo-wrap.no-logo {
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  font-size: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Image sizing */
.dcn-logo {
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  object-fit: contain !important;
}

/* Commission badge */
.dcn-commission-badge {
  background: linear-gradient(135deg,#1f8feb,#2bb6ff) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  min-width: 64px !important;
  text-align: center !important;
  box-shadow: 0 4px 12px rgba(43,182,255,0.18) !important;
  flex-shrink: 0 !important;
}

/* Card body */
.dcn-card-body {
  flex: 1 1 auto !important;
  padding: 6px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
}

/* Title */
.dcn-title {
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.18 !important;
  color: #0f1724 !important;
  font-weight: 700 !important;
}

/* Display URL */
.dcn-display-url {
  font-size: 13px !important;
  color: #6b7280 !important;
  word-break: break-all !important;
}

/* Meta info */
.dcn-meta {
  font-size: 13px !important;
  color: #6b7280 !important;
  margin-top: 6px !important;
}

/* Footer: buttons */
.dcn-card-footer {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  margin-top: 12px !important;
  width: 100% !important;
}

/* Open button */
.dcn-open-campaign {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 9px 14px !important;
  border-radius: 8px !important;
  background: #d9b656 !important; /* gold-ish */
  color: #111827 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 6px 16px rgba(217,182,86,0.12) !important;
}

/* Details button */
.dcn-details-btn {
  padding: 7px 10px !important;
  border-radius: 8px !important;
  background: #f3f4f6 !important;
  border: 1px solid #e6e6e6 !important;
  cursor: pointer !important;
  font-size: 13px !important;
  color: #111827 !important;
}

/* Disabled open button */
.dcn-open-campaign.disabled,
.dcn-open-campaign[aria-disabled="true"] {
  opacity: 0.55 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* Details panel should be hidden by default and limited height */
.dcn-details {
  display: none !important;
  margin-top: 10px !important;
  width: 100% !important;
  max-height: 220px !important;
  overflow: auto !important;
  background: #fbfdff !important;
  border-radius: 6px !important;
  border: 1px solid rgba(22,28,37,0.03) !important;
  padding: 8px !important;
}

/* Pre inside details */
.dcn-details-pre {
  white-space: pre-wrap !important;
  font-size: 12px !important;
  color: #374151 !important;
  margin: 0 !important;
}

/* Pagination base button */
.dcn-pagination button,
.dcn-pagination .dcn-page-num,
.dcn-pagination .dcn-prev,
.dcn-pagination .dcn-next {
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  color: #374151 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all .15s ease !important;
}

/* Hover for pagination */
.dcn-pagination button:hover:not(:disabled) {
  background: #0ea5ff !important;
  border-color: #0ea5ff !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 3px 8px rgba(14,165,255,0.18) !important;
}

/* Active page */
.dcn-pagination .active {
  background: #0ea5ff !important;
  border-color: #0ea5ff !important;
  color: #fff !important;
  font-weight: 700 !important;
  pointer-events: none !important;
}

/* Disabled */
.dcn-pagination button:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  background: #f9fafb !important;
  color: #9ca3af !important;
  border-color: #e5e7eb !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Page info */
.dcn-pagination .dcn-page-info {
  font-size: 14px !important;
  color: #6b7280 !important;
  margin: 0 6px !important;
}

/* Small screens: stack nicely */
@media (max-width: 640px) {
  #dcn-campaigns-wrap .dcn-campaigns-grid,
  .dcn-campaigns-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }

  .dcn-logo-wrap { width: 72px !important; height: 56px !important; }
  .dcn-title { font-size: 16px !important; }
  .dcn-open-campaign { padding: 8px 12px !important; font-size: 14px !important; }
  .dcn-card { padding: 12px !important; }
}

/* Accessibility: focus outlines */
.dcn-card :focus,
.dcn-card a:focus,
.dcn-card button:focus {
  outline: 3px solid rgba(14,165,255,0.18) !important;
  outline-offset: 2px !important;
}

/* Ensure grid lives within normal page flow */
#dcn-campaigns-wrap, #dcn-campaigns-wrap * {
  box-sizing: border-box !important;
}

#dcn-pagination,
.dcn-pagination {
  display: flex;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 28px 0 !important;
  flex-wrap: wrap !important;
}

/* Base style for pagination buttons */
#dcn-pagination button,
#dcn-pagination .dcn-page-num,
#dcn-pagination .dcn-prev,
#dcn-pagination .dcn-next {
  background: #fdf7e2 !important;        /* light golden background */
  border: 1px solid #d9b656 !important;  /* golden border */
  color: #111827 !important;             /* dark text */
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  min-width: 38px !important;
  text-align: center !important;
}

/* Hover effect */
#dcn-pagination button:hover:not(:disabled) {
  background: #d9b656 !important; /* solid golden */
  border-color: #d9b656 !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 3px 10px rgba(217,182,86,0.25) !important;
}

/* Active/current page */
#dcn-pagination .active {
  background: #d9b656 !important;
  border-color: #d9b656 !important;
  color: #fff !important;
  font-weight: 700 !important;
  cursor: default !important;
  pointer-events: none !important;
  box-shadow: 0 3px 10px rgba(217,182,86,0.25) inset !important;
}

/* Disabled buttons (Prev when on page 1, Next when last) */
#dcn-pagination button:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  background: #fdfdfd !important;
  color: #9ca3af !important;
  border-color: #e5e7eb !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Page info (e.g. "Page 1 of 3") */
#dcn-pagination .dcn-page-info {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #6b7280 !important;
  margin: 0 6px !important;
}

.dcn-details-btn { display:none !important; }

body.dcn-modal-open {
  overflow: hidden !important;
}

/* overlay */
.dcn-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;                    /* high so it sits above theme chrome */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(7, 12, 20, 0.56); /* dark translucent backdrop */
  -webkit-overflow-scrolling: touch;
}

/* modal card */
.dcn-modal-box {
  width: 100%;
  max-width: 980px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(2,6,23,0.48);
  overflow: hidden;                /* container will scroll internally */
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(18, 23, 30, 0.06);
  padding: 10px 10px 0px 10px;
}

/* close top-left (or top-right depending on design) */
.dcn-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: #111827;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(17,24,39,0.12);
}

/* modal content wrapper (scrollable) */
.dcn-modal-body {
  padding: 28px 28px 12px 28px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 200px;
}

/* title */
.dcn-modal-title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  color: #0f1724;
}

/* meta row: price / in-stock */
.dcn-modal-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dcn-modal-price {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.dcn-modal-stock {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: #0f1724;
  font-weight: 600;
}

/* gallery: horizontal thumbnail strip */
.dcn-modal-gallery {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 6px;
}

.dcn-modal-gallery::-webkit-scrollbar { height: 9px; }
.dcn-modal-gallery::-webkit-scrollbar-thumb {
  background: rgba(17,24,39,0.12);
  border-radius: 999px;
}
.dcn-modal-thumb {
  width: 110px;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 110px;
  background: #f6f7f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(17,24,39,0.04);
}
.dcn-modal-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* description (rich) */
.dcn-modal-desc {
  margin-top: 6px;
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* sticky action/footer inside modal */
.dcn-modal-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid rgba(17,24,39,0.04);
  background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,0.92));
  position: sticky;
  bottom: 0;
  z-index: 3;
}

/* primary (visit offer) button - golden */
.dcn-modal-visit,
.dcn-modal-visit.button {
  background: linear-gradient(90deg,#d9b656 0%,#d9b656 100%);
  color: #111827;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(217,182,86,0.14);
}

/* secondary close button */
.dcn-modal-close-2 {
  background: #f3f4f6;
  border: 1px solid #e6e6e6;
  padding: 8px 12px;
  border-radius: 8px;
  color: #111827;
  cursor: pointer;
}

/* small devices: stacked layout and full-width button */
@media (max-width: 720px) {
  .dcn-modal-box { max-width: 98%; margin: 0 6px; border-radius: 10px; }
  .dcn-modal-title { font-size: 20px; }
  .dcn-modal-gallery { gap: 8px; }
  .dcn-modal-thumb { width: 84px; height: 84px; flex: 0 0 84px; }
  .dcn-modal-actions { flex-direction: column-reverse; align-items: stretch; gap: 10px; padding: 12px; }
  .dcn-modal-visit { width: 100%; text-align: center; }
  .dcn-modal-close-2 { width: 100%; }
}

/* nice subtle focus outlines for accessibility */
.dcn-modal :focus, .dcn-modal button:focus, .dcn-modal a:focus {
  outline: 3px solid rgba(14,165,255,0.14);
  outline-offset: 2px;
}

/* small utility */
.dcn-modal .dcn-modal-meta .muted { color: #6b7280; font-weight:500; }

/* Optional: fade-in animation */
@keyframes dcnModalIn {
  from { opacity: 0; transform: translateY(8px) scale(.995); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dcn-modal-box { animation: dcnModalIn .18s ease both; }

/* ---------- small product-listing tweaks (optional) ---------- */
.dcn-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.dcn-product { background: #fff; border-radius: 10px; padding: 12px; box-shadow: 0 6px 18px rgba(2,6,23,0.04); display:flex; flex-direction:column; gap:10px; }
.dcn-thumb { height: 120px; display:flex; align-items:center; justify-content:center;  border-radius:8px; overflow:hidden; }
.dcn-product-title { font-weight:700; margin:0; font-size:15px; color:#0f1724; }
.dcn-price { color:#374151; font-weight:700; margin-top:4px; }
.dcn-product-actions { display:flex; gap:8px; margin-top:auto; }
.dcn-product-actions .button { padding:9px 12px; border-radius:8px; border:none; cursor:pointer; }

/* Webkit scrollbar small polish (modal body & gallery) */
.dcn-modal-body::-webkit-scrollbar, .dcn-modal-gallery::-webkit-scrollbar { height:10px; width:10px; }
.dcn-modal-body::-webkit-scrollbar-thumb, .dcn-modal-gallery::-webkit-scrollbar-thumb {
  background: rgba(2,6,23,0.08);
  border-radius: 999px;
}

.dcn-products-header,
.dcn-products-list {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 18px;
  padding-right: 18px;
  box-sizing: border-box;
}

/* header container (back button + title) */
.dcn-products-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 0;
  background: #ffffff;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(17,24,39,0.05);
  box-shadow: 0 8px 28px rgba(2,6,23,0.04);
}

/* Back button */
.dcn-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f3f4f6;
  color: #0f1724;
  border: 1px solid rgba(17,24,39,0.06);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  min-width: 48px;
}
.dcn-back-btn:hover,
.dcn-back-btn:focus {
  background: #e9e6d1; /* subtle golden hover */
  outline: none;
  box-shadow: 0 6px 18px rgba(217,182,86,0.08);
}

/* title */
.dcn-products-title {
  margin: 0;
  color: #0f1724;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

/* optional smaller subtitle under the title (if you want campaign name) */
.dcn-products-subtitle {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

/* product list spacing */
.dcn-products-list {
  margin-top: 18px;
  margin-bottom: 26px;
}

/* grid: keep gap and nice card sizing */
.dcn-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* product card polish (re-affirm, in case theme overrides) */
.dcn-product {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(2,6,23,0.03);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

/* thumbnail area */
.dcn-thumb {
  height: 230px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

/* product title & price */
.dcn-product-title { font-weight:700; color:#0f1724; margin: 0 0 6px; font-size: 15px; }
.dcn-price { color:#374151; font-weight:700; margin-bottom: 8px; }

/* align the action buttons to bottom */
.dcn-product-actions {
  margin-top: auto;
  display:flex;
  gap:8px;
  align-items:center;
}

/* make the Visit / Add buttons match golden theme */
.dcn-product-actions .button,
.dcn-product-actions a.button {
  padding:8px 12px;
  border-radius:8px;
  font-weight:700;
  text-decoration:none;
  border: none;
  cursor: pointer;
}

/* Visit button is golden */
.dcn-product-actions .dcn-visit {
  background: linear-gradient(90deg,#d9b656,#d9b656);
  color: #111827;
  box-shadow: 0 8px 20px rgba(217,182,86,0.12);
}

/* Details / Add buttons neutral */
.dcn-product-actions .dcn-view,
.dcn-product-actions .dcn-add {
  background: #f3f4f6;
  color: #0f1724;
  border: 1px solid rgba(17,24,39,0.04);
}

/* small badges */
.dcn-instock { color:#065f46; background:#ecfdf5; padding:6px 8px; border-radius:999px; font-weight:700; font-size:12px; display:inline-block; margin-top:6px; }
.dcn-outofstock,{ color:#b91c1c; background:#fff1f2; padding:6px 8px; border-radius:999px; font-weight:700; font-size:12px; display:inline-block; margin-top:6px; }
.dcn-modal-stock.outofstock { color:#b91c1c; background:#fff1f2;}
/* make sure header shadows and grid do not overflow narrow containers */
@media (max-width: 900px) {
  .dcn-products-header { padding:12px; gap:12px; }
  .dcn-products-title { font-size: 20px; }
  .dcn-back-btn { padding:7px 9px; font-size:13px; }
  .dcn-thumb { height: 110px; }
}

/* stacked layout for very small screens */
@media (max-width: 520px) {
  .dcn-products-header { flex-direction: column; align-items: flex-start; gap:10px; padding:12px; }
  .dcn-products-title { font-size:18px; }
  .dcn-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
  .dcn-product { min-height: 180px; padding:10px; }
}

/* ensure content spacing when campaigns grid hidden (back button anchor) */
#dcn-campaign-products { padding-top: 6px; }
.dcn-thumb img { width: 100% !important; height: auto !important; max-width: 400px; display: block; object-fit: contain; margin: 0 auto; width: 100%; object-fit: cover; }
.dcn-products-list .dcn-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* desktop: responsive columns */
  gap: 16px;
  align-items: start;
}

/* Each product card */
.dcn-product {
  display: flex;
  flex-direction: column;
}

/* Thumb container: responsive square using padding-top trick */
.dcn-thumb {
  width: 100%;
  overflow: hidden;
  position: relative;
  /* If you want square thumbnails: */
  padding-top: 100%; /* 1:1 aspect ratio; change to 75% for 4:3 */
}

/* Make img fill the thumb area */
.dcn-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;    /* use 'contain' to show whole image without crop */
  display: block;
}

/* --- Breakpoints --- */
/* Tablet: 2 columns */
@media (max-width: 900px) {
  .dcn-products-list .dcn-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 column (one product per row) */
@media (max-width: 600px) {
  .dcn-products-list .dcn-products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* make product content spacing nicer on small screens */
  .dcn-product { padding: 12px; }
  .dcn-thumb { padding-top: 100%; } /* keep square on mobile too */
  .dcn-product-title { font-size: 14px; line-height: 1.3; }
  .dcn-price, .dcn-outofstock { font-size: 13px; }
}

.dcn-products-pagination .dcn-pager-controls {
  display: flex;
  flex-wrap: nowrap;            /* keep single horizontal row */
  gap: 8px;
  padding: 10px;
  overflow-x: auto;             /* allow horizontal scroll on very small screens */
  -webkit-overflow-scrolling: touch;
  align-items: center;
  justify-content: flex-start;
}

/* Page buttons */
.dcn-pager-page.button {
  min-width: 44px;              /* recommended minimum touch target */
  height: 44px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 44px;
  border-radius: 8px;
  border: none;
  background: #f5c85a;          /* golden look like screenshot — change as needed */
  color: #1b1b1b;
  box-shadow: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
}

/* Active/current */
.dcn-pager-page.button.active {
  background: #d4a83a;
  color: #fff;
  font-weight: 700;
}

/* Prev/Next buttons */
.dcn-pager-prev,
.dcn-pager-next {
  background: transparent;
  color: #333;
  min-width: 56px;
}

/* Disabled state */
.dcn-pager-prev[disabled],
.dcn-pager-next[disabled],
.dcn-pager-page.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Small screens: adjust spacing and reduce font a bit */
@media (max-width: 420px) {
  .dcn-products-pagination .dcn-pager-controls { gap: 6px; padding: 8px; }
  .dcn-pager-page.button { min-width: 40px; height: 40px; line-height: 40px; font-size: 13px; border-radius: 6px; }
}

.dcn-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}

.dcn-modal-box {
  background: #fff;
  width: 100%;
  max-width: 1100px;
  border-radius: 8px;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
}

/* close button */
.dcn-modal-close {
  position: absolute;
  right: 18px;
  top: 14px;
  background: #0f1720;
  color: #fff;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  border: none;
  font-size: 20px;
  line-height: 36px;
  cursor: pointer;
}

.dcn-readmore { border: 2px solid #eee; outline: 0; border-radius: 0; padding: 1.3rem 2.7rem; font-weight: 600; font-size: 1.4rem; line-height: 1.2; text-transform: uppercase; text-align: center; transition: color 0.3s, border-color 0.3s, background-color 0.3s, box-shadow 0.3s; white-space: nowrap; cursor: pointer; color: #fff; border-color: var(--wolmart-primary-color, #2879FE); background-color: var(--wolmart-primary-color, #2879FE);}
/* grid layout */
.dcn-modal-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

/* LEFT: image */
.dcn-modal-left { display: flex; flex-direction: column; gap: 12px; }
.dcn-main-image-wrap {
  width: 100%;
  height: 420px;
  background: #f7f7f7;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius: 8px;
}
.dcn-main-image-wrap img.dcn-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.dcn-outofstock { display: none; } .dcn-instock { display: none !important; } .dcn-modal-stock { display: none;}
/* gallery thumbnails */
.dcn-gallery-row {
  display:flex;
  gap:8px;
  align-items:center;
}
.dcn-gallery-thumb {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius:6px;
  cursor:pointer;
  border: 2px solid transparent;
}
.dcn-gallery-thumb:hover { border-color: rgba(0,0,0,0.08); }

/* RIGHT: content */
.dcn-modal-title {
  margin: 0 0 8px 0;
  font-size: 20px;
  line-height:1.2;
}
.dcn-modal-meta { display:flex; gap:12px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.dcn-modal-price { background:#f3f3f3; padding:8px 12px; border-radius:20px; font-weight:700; }
.dcn-modal-stock { padding:6px 10px; border-radius:14px; background:#e6fff0; color:#0a6e3a; font-weight:600; }

.dcn-modal-desc { margin-top:12px; color:#333; line-height:1.5; }

/* actions */
.dcn-modal-actions { margin-top:18px; display:flex; gap:12px; align-items:center; }
.dcn-modal-visit.button {
  background:#f3c75f;
  border:none;
  padding:10px 16px;
  border-radius:6px;
  color:#111;
  text-decoration:none;
}
.dcn-modal-close-2.button { background:#e0e0e0; border:none; padding:10px 14px; border-radius:6px; cursor:pointer; }

/* smaller screens: stack */
@media (max-width: 900px) {
  .dcn-modal-grid { grid-template-columns: 1fr; }
  .dcn-main-image-wrap { height: 320px; }
  .dcn-gallery-thumb { width:58px; height:58px; }
}
@media (max-width: 420px) {
  .dcn-main-image-wrap { height: 240px; }
  .dcn-modal-box { padding:12px; }
  .dcn-modal-title { font-size:18px; }
}

@media (max-width: 600px) {
  .dcn-modal {
    align-items: stretch;
    padding: 0;
  }
  .dcn-modal-box {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    padding: 12px;
    overflow: auto;
  }
  .dcn-modal-close {
    right: 12px;
    top: 8px;
  }
  .dcn-main-image-wrap { height: 40vh; } /* smaller main image height on mobile */
  .dcn-modal-desc { font-size: 14px; }
}

.dcn-modal-box {
  max-height: calc(100vh - 40px); /* leave some gap for top/bottom */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

/* hide the action button bar */
.dcn-modal-actions {
  display: none !important;
}

/* optionally make close icon remain visible (top-right) */
.dcn-modal-close {
  z-index: 3;
}

/* small tweak to ensure gallery thumbs and description don't overflow */
.dcn-modal-desc {
  word-break: break-word;
  overflow-wrap: break-word;
}

#main #wcfm_menu .wcfm_menu_items a.wcfm_menu_item { display: flex; align-items: center; align-content: center; }
#main #wcfm_menu .wcfm_menu_items a.wcfm_menu_item .wcfmfa { min-width: 25px; }
#main #wcfm_menu .wcfm_menu_items a.wcfm_menu_item .text { line-height: 1; }
.page-id-27154 #main #wcfm_affiliate_listing_expander { margin-top: 15px; background: transparent; }
#main .dcn-products-pagination .dcn-pager-controls { flex-wrap: wrap; }
#main .dcn-products-pagination .dcn-pager-controls .dcn-pager-next.button { border-radius: 6px; padding: 10px 12px; }
#dcn-filter { text-align: center; font-size: 14px; color: #202020; margin: 0 0 20px; display: flex; align-items: center;/* justify-content: center; */ gap: 10px; }
.filter-box { display: flex; align-items: center; gap: 10px; }
#dcn-filter #campaign-category { margin-right: 10vw; }
#dcn-filter #dcn-search, #dcn-product-search { width: 100%; height: 40px; padding: 0 13px; color: #202020 !important; }
#dcn-filter .search_cmp { display: inline-block; padding: 9px 15px; border-radius: 4px; background: #d9b656; color: #111827; font-weight: 600; text-decoration: none; border: none; cursor: pointer; box-shadow: 0 6px 16px rgba(217,182,86,0.12); }
#dcn-filter #dcn-filter-clear { background: #17a2b8; color: #fff; }
#dcn-campaigns-wrap .load_msg { text-align: center; color: #000; font-size: 18px; font-weight: 500; padding: 25px 0; margin: 0; }
#dcn-campaigns-wrap .error { text-align: center; background: #ffd2d2; color: #000; font-size: 18px; font-weight: 600; display: inline-block; padding: 30px 15px; width: 100%; border-radius: 8px; }
#scroll-top.show { position: fixed; bottom: 15px; right: 15px; width: 40px; height: 40px; display: inline-flex ; min-width: 40px; z-index: 99; overflow: hidden; background: #6d6d6d; border-radius: 100px; box-shadow: 0 0 5px rgba(255, 255, 255, 0.2); }
#scroll-top i { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex ; align-items: center; justify-content: center; font-size: 19px; font-weight: 700; color: #fff; }


@media (max-width: 1199px) {
#dcn-filter #campaign-category { margin-right: 0px; }	
	
	
}

@media (max-width: 991px) {
#dcn-filter { flex-wrap: wrap; }	
#dcn-filter .filter-box:first-child, #dcn-filter .filter-box:nth-child(2) { width: 100%; justify-content: center; }
#dcn-filter .filter-box label { margin: 0 !important; }
	
}


@media (max-width: 767px) {
body .dcn-modal { padding: 15px 10px; }	
body .dcn-modal .dcn-modal-left .dcn-main-image-wrap, body .dcn-modal .dcn-modal-left .dcn-main-image-wrap .dcn-main-image { width: 100% !important; height: 100% !important; }
#dcn-campaigns-wrap .load_msg { font-size: 16px; line-height: 1.5em; }
#dcn-campaigns-wrap .error { font-size: 16px; line-height: 1.5em; padding: 15px 15px; }	
	
}

.brand_view .dcn-commission-badge, .brand_view .dcn-card-footer,.brand_view .dcn-meta{ display:none !important; }