/* ═══════════════════════════════════════════════════════
   COD ORDER PRO — Frontend CSS  (Hanout-style Arabic)
   All directions: RTL default
═══════════════════════════════════════════════════════ */

/* Global mobile overflow fix —
   overflow:hidden on ANY ancestor kills position:sticky.
   Use overflow-x:clip instead — it prevents horizontal scroll
   without creating a scroll container, so sticky still works. */
.cop-shop-section,
.cop-thankyou-wrap {
  overflow-x: clip;
  max-width: 100%;
}
.cop-product-page {
  max-width: 100%;
}

/* Box-sizing reset for all plugin elements */
.cop-page-wrap *,
.cop-page-wrap *::before,
.cop-page-wrap *::after {
  box-sizing: border-box;
}
.cop-page-wrap {
  box-sizing: border-box;
  width: 100%;
}
/* All grid/flex children must respect column width */
.cop-page-wrap [class*="-grid"] > *,
.cop-page-wrap [class*="-layout"] > * {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 540px) {
  .cop-page-wrap { padding-left: 12px !important; padding-right: 12px !important; }
}

:root {
  --cop-primary:    #e63946;
  --cop-primary-d:  #c1121f;
  --cop-primary-l:  #fff0f1;
  --cop-green:      #2d6a4f;
  --cop-green-l:    #d8f3dc;
  --cop-yellow:     #f59e0b;
  --cop-bg:         #ffffff;
  --cop-bg-soft:    #f8f9fa;
  --cop-bg-muted:   #f1f3f5;
  --cop-surface:    #ffffff;
  --cop-border:     #dee2e6;
  --cop-border-d:   #ced4da;
  --cop-text:       #212529;
  --cop-text-s:     #495057;
  --cop-text-m:     #6c757d;
  --cop-text-f:     #adb5bd;
  --cop-radius:     10px;
  --cop-r-sm:       6px;
  --cop-font:       'Cairo','Tajawal',sans-serif;
  --cop-ease:       cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════
   SHOP SECTION HEADING
══════════════════════════ */
.cop-shop-heading {
  text-align: center;
  padding: 40px 0 24px;
  direction: rtl;
  font-family: var(--cop-font);
}
.cop-shop-heading h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--cop-text);
  margin: 0 0 8px;
  line-height: 1.3;
}
.cop-shop-heading p {
  font-size: .9rem;
  color: var(--cop-text-m);
  margin: 0;
}

/* ══════════════════════════
   PRODUCT GRID (shop page)
══════════════════════════ */
.cop-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  direction: rtl;
}
.cop-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cop-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .cop-shop-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 500px) { .cop-shop-grid { grid-template-columns: 1fr; gap: 14px; } }

/* ══════════════════════════
   PRODUCT CARD — redesigned
══════════════════════════ */
.cop-product-card {
  background: var(--cop-surface);
  border: 1px solid var(--cop-border);
  border-radius: var(--cop-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s var(--cop-ease), box-shadow .25s var(--cop-ease), border-color .25s;
  direction: rtl;
  position: relative;
}
.cop-product-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--cop-primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--cop-ease);
  z-index: 1;
}
.cop-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.13);
  border-color: var(--cop-border-d, #d1d5db);
}
.cop-product-card:hover::before { transform: scaleX(1); }

/* Card image */
.cop-card-img-link {
  display: block; position: relative;
  aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--cop-bg-soft);
  text-decoration: none;
}
.cop-card-img-link img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s var(--cop-ease);
}
.cop-product-card:hover .cop-card-img-link img { transform: scale(1.07); }
.cop-card-no-img {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 3.5rem; color: var(--cop-text-f);
  background: var(--cop-bg-muted);
}

/* Badges */
.cop-card-badges {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 4px; z-index: 1;
}
.cop-badge {
  display: inline-block; padding: 4px 11px; border-radius: 99px;
  font-size: .69rem; font-weight: 800; letter-spacing: .01em;
  font-family: var(--cop-font);
}
.cop-badge-sale {
  background: var(--cop-primary); color: #fff;
  box-shadow: 0 2px 10px rgba(var(--cop-primary-rgb,230,57,70),.38);
}
.cop-badge-custom { }
.cop-badge-oos  { background: rgba(0,0,0,.6); color: #fff; }

/* Discount % badge — bottom-left of image */
.cop-card-discount {
  position: absolute; bottom: 10px; left: 10px;
  background: #16a34a; color: #fff;
  font-size: .72rem; font-weight: 800;
  padding: 3px 10px; border-radius: 99px;
  font-family: var(--cop-font);
  box-shadow: 0 2px 8px rgba(22,163,74,.35);
}

/* Card body */
.cop-card-body {
  padding: 14px 14px 16px;
  flex: 1; display: flex; flex-direction: column; gap: 6px;
  font-family: var(--cop-font);
  text-align: center;
  align-items: center;
}
.cop-card-cat {
  font-size: .7rem; color: var(--cop-primary); font-weight: 700;
  text-decoration: none; text-transform: uppercase; letter-spacing: .05em;
}
.cop-card-cat:hover { color: var(--cop-primary-d); }
.cop-card-title {
  font-size: .95rem; font-weight: 700; color: var(--cop-text);
  line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cop-card-title a { color: inherit; text-decoration: none; }
.cop-card-title a:hover { color: var(--cop-primary); }

/* Stars */
.cop-card-stars {
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
.cop-card-stars span { color: var(--cop-yellow); font-size: .82rem; }
.cop-card-rating-label { color: var(--cop-text-m); font-size: .7rem; margin-right: 5px; }

/* Price */
.cop-card-price {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 2px;
}
.cop-price-sale, .cop-price-main {
  color: var(--cop-primary); font-weight: 900; font-size: 1.1rem;
}
.cop-price-reg {
  color: var(--cop-text-f); text-decoration: line-through; font-size: .82rem;
}

/* Card button */
.cop-card-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: auto; padding: 11px 14px;
  background: var(--cop-primary); color: #fff !important;
  border-radius: var(--cop-r-sm); font-size: .9rem; font-weight: 800;
  text-align: center; text-decoration: none;
  box-shadow: 0 4px 14px rgba(var(--cop-primary-rgb,230,57,70),.3);
  transition: filter .18s, transform .15s;
  font-family: var(--cop-font);
}
.cop-card-btn::after { content: '←'; font-size: .85rem; }
.cop-card-btn:hover { filter: brightness(.9); transform: translateY(-1px); }
.cop-card-btn-oos {
  background: var(--cop-bg-muted); color: var(--cop-text-f) !important;
  box-shadow: none; pointer-events: none;
}
.cop-card-btn-oos::after { content: ''; }

/* ══════════════════════════
   SINGLE PRODUCT PAGE
══════════════════════════ */
.cop-product-page {
  direction: rtl; text-align: right;
  font-family: var(--cop-font);
}

/* Breadcrumb */
.cop-breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: .8rem; color: var(--cop-text-m);
  margin-bottom: 20px; direction: rtl;
}
.cop-breadcrumb a { color: var(--cop-text-m); text-decoration: none; }
.cop-breadcrumb a:hover { color: var(--cop-primary); }
.cop-crumb-sep { color: var(--cop-text-f); }
.cop-crumb-current { color: var(--cop-text); font-weight: 600; }

/* Product layout 2-col */
.cop-product-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: start; margin-bottom: 48px;
  width: 100%; max-width: 100%;
}
/* Form column natural height */
.cop-form-col {
  align-self: start;
}
@media (max-width: 768px) {
  .cop-product-layout { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .cop-product-layout { gap: 14px; margin-bottom: 28px; }
}

/* ── Gallery column ── */
.cop-gallery-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: start;
}

/* Sale badge over image — top-left in RTL = physical left */
.cop-single-sale-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--cop-primary); color: #fff;
  font-size: .75rem; font-weight: 800;
  padding: 4px 12px; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(var(--cop-primary-rgb,230,57,70),.4);
  font-family: var(--cop-font);
}

.cop-main-img-box {
  border: 1px solid var(--cop-border);
  border-radius: var(--cop-radius);
  overflow: hidden;
  background: var(--cop-bg-soft);
  max-height: calc(100vh - 106px - 100px);
  aspect-ratio: 1 / 1;
  width: 100%;
}
@media (max-width: 768px) {
  .cop-main-img-box {
    max-height: none !important;
    aspect-ratio: 3 / 4;
  }
}
.cop-main-img-box a { display: block; height: 100%; }
.cop-main-img-box img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .2s; cursor: zoom-in;
}
.cop-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 4rem; color: var(--cop-text-f);
}

/* ── Thumb centering wrapper ── */
.cop-thumb-center {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}
.cop-thumb-strip {
  display: flex; gap: 8px; flex-wrap: nowrap;
  justify-content: flex-start;
  direction: ltr;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  padding: 4px;
  width: max-content;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.cop-thumb-strip::-webkit-scrollbar { display: none; }
.cop-thumb-btn {
  width: 68px; height: 68px;
  border: 2px solid var(--cop-border);
  border-radius: var(--cop-r-sm); overflow: hidden; padding: 0;
  background: var(--cop-bg-soft); cursor: pointer; flex-shrink: 0;
  transition: border-color .15s, box-shadow .15s;
}
.cop-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cop-thumb-btn:hover { border-color: var(--cop-primary); }
.cop-thumb-btn.active {
  border-color: var(--cop-primary);
  box-shadow: 0 0 0 3px rgba(var(--cop-primary-rgb,230,57,70),.2);
}
@media (max-width: 480px) {
  .cop-thumb-btn { width: 60px; height: 60px; }
}

/* ── Gallery prev/next arrows ── */
.cop-gal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.9);
  border: 1.5px solid rgba(0,0,0,.1); border-radius: 50%;
  cursor: pointer; font-size: 1.4rem; color: #222;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15); padding: 0;
  transition: background .15s;
}
.cop-gal-arrow:hover { background: #fff; }
.cop-gal-prev { right: 10px; left: auto; }
.cop-gal-next { left: 10px; right: auto; }

/* Main img element inside box */
#cop-main-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cop-product-title {
  font-size: clamp(1.75rem,4vw,2.2rem); font-weight: 800;
  color: var(--cop-text); line-height: 1.25;
  margin: 0 0 22px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--cop-font);
}
.cop-product-badge {
  font-size: .7rem; font-weight: 800;
  padding: 3px 11px; border-radius: 6px;
  vertical-align: middle; flex-shrink: 0;
}
.cop-product-subtitle {
  font-size: .92rem; color: var(--cop-text2);
  margin: 0 0 10px; font-weight: 500; line-height: 1.5;
}

/* Stars row */
.cop-product-stars {
  display: flex; align-items: center; gap: 8px; margin-bottom: 20px;
  flex-wrap: wrap; font-family: var(--cop-font);
}
.cop-product-stars.cop-stars-centered {
  justify-content: center; text-align: center;
}
.cop-stars-row { color: var(--cop-yellow); font-size: 1rem; letter-spacing: 2px; }
.cop-stars-label { font-size: .82rem; color: var(--cop-text-m); }
.cop-stars-label strong { color: var(--cop-text); }

/* Price row */
.cop-price-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.cop-price-current {
  font-size: 1.75rem; font-weight: 800;
  color: var(--cop-primary); line-height: 1;
  font-family: var(--cop-font);
}
.cop-price-original {
  font-size: 1rem; color: var(--cop-text-f); text-decoration: line-through;
}
.cop-price-pct {
  background: var(--cop-primary); color: #fff;
  font-size: .75rem; font-weight: 800;
  padding: 3px 10px; border-radius: 6px;
  font-family: var(--cop-font);
}

/* Delivery trust line */
.cop-delivery-trust {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 22px;
  background: var(--cop-green-l); border: 1px solid #95d5b2;
  border-radius: var(--cop-r-sm);
  font-size: .85rem; font-weight: 700; color: var(--cop-green);
  font-family: var(--cop-font);
}

/* Stock */
.cop-stock-status {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 22px; font-size: .85rem; font-weight: 700;
  font-family: var(--cop-font);
}
.cop-stock-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cop-stock-dot.in  { background: #16a34a; }
.cop-stock-dot.low { background: var(--cop-yellow); }
.cop-stock-dot.out { background: var(--cop-primary); }
.cop-stock-in  { color: #16a34a; }
.cop-stock-low { color: var(--cop-yellow); }
.cop-stock-out { color: var(--cop-primary); }

/* Excerpt */
.cop-product-excerpt {
  font-size: .88rem; color: var(--cop-text-s);
  line-height: 1.75; margin-bottom: 22px; font-family: var(--cop-font);
}

/* ══════════════════════════
   COD ORDER FORM
══════════════════════════ */
.cop-express-wrap {
  border: 2px solid var(--cop-border);
  border-radius: var(--cop-radius);
  padding: 20px; margin-top: 8px;
  background: var(--cop-surface);
  direction: rtl; font-family: var(--cop-font);
  box-sizing: border-box; width: 100%;
}
@media (max-width: 380px) {
  .cop-express-wrap { padding: 14px 12px; }
}

.cop-express-header { margin-bottom: 14px; }
.cop-express-title {
  font-size: .95rem; font-weight: 800; color: var(--cop-text);
  margin: 0 0 3px; line-height: 1.3;
}
.cop-express-subtitle { font-size: .8rem; color: var(--cop-text-m); margin: 0; }

.cop-alert { padding: 10px 14px; border-radius: var(--cop-r-sm);
  font-size: .85rem; margin-bottom: 12px; font-family: var(--cop-font); }
.cop-alert-error { background: var(--cop-primary-l, #fff0f1);
  border: 1px solid #ffc8cc; color: #991b1b; display: none; }

/* Variations */
.cop-variations-wrap { margin-bottom: 22px; }
.cop-var-field { margin-bottom: 12px; }
.cop-var-label {
  font-size: .76rem; font-weight: 700; color: var(--cop-text-s);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px;
}
.cop-req { color: var(--cop-primary); }
.cop-swatch-group { display: flex; flex-wrap: wrap; gap: 6px; }
.cop-swatch {
  padding: 6px 14px; border: 2px solid var(--cop-border-d);
  border-radius: var(--cop-r-sm); background: var(--cop-bg-soft);
  color: var(--cop-text); font-size: .82rem; font-weight: 600;
  cursor: pointer; line-height: 1; transition: all .15s;
  font-family: var(--cop-font);
}
.cop-swatch:hover { border-color: var(--cop-primary); background: #fff0f1; color: var(--cop-primary); }
.cop-swatch-active {
  border-color: var(--cop-primary) !important;
  background: var(--cop-primary) !important; color: #fff !important;
}

/* Qty */
.cop-qty-field {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.cop-qty-field label {
  font-size: .82rem; font-weight: 700; color: var(--cop-text-s);
  text-transform: uppercase; letter-spacing: .05em;
}
.cop-qty-ctrl {
  display: flex; align-items: center;
  border: 2px solid var(--cop-border-d); border-radius: var(--cop-r-sm); overflow: hidden;
}
.cop-qty-btn {
  width: 36px; height: 36px; background: var(--cop-bg-muted);
  font-size: 1.1rem; font-weight: 700; color: var(--cop-text);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; border: none; cursor: pointer;
  font-family: var(--cop-font);
}
.cop-qty-btn:hover { background: var(--cop-border-d); }
#cop-qty-display {
  min-width: 40px; text-align: center; font-weight: 800; font-size: .95rem;
  line-height: 36px; padding: 0 4px; color: var(--cop-text);
  border-inline: 2px solid var(--cop-border-d);
}

/* Form fields */
.cop-field { margin-bottom: 12px; }
.cop-field label {
  display: block; font-size: .77rem; font-weight: 700;
  color: var(--cop-text-s); margin-bottom: 5px;
}
.cop-field input,
.cop-field textarea,
.cop-field select {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--cop-border-d); border-radius: var(--cop-r-sm);
  font-size: .9rem; color: var(--cop-text); background: var(--cop-bg-soft);
  outline: none; direction: rtl; text-align: right;
  transition: border-color .18s, box-shadow .18s;
  font-family: var(--cop-font); resize: vertical;
}
.cop-field input:focus,
.cop-field textarea:focus,
.cop-field select:focus {
  border-color: var(--cop-primary);
  box-shadow: 0 0 0 3px rgba(var(--cop-primary-rgb,230,57,70),.1);
  background: var(--cop-bg);
}
/* Select arrow for RTL */
.cop-select-wrap { position: relative; }
.cop-select-wrap::before {
  content: "▾"; position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--cop-text-m);
  font-size: .75rem; pointer-events: none; z-index: 1;
}
.cop-select-wrap select { padding-left: 32px; -webkit-appearance: none; appearance: none; cursor: pointer; }

/* Price summary */
.cop-price-summary {
  background: var(--cop-bg-soft); border: 1px solid var(--cop-border);
  border-radius: var(--cop-r-sm); padding: 12px 14px; margin-bottom: 14px;
}
.cop-price-row-label {
  font-size: .72rem; font-weight: 800; color: var(--cop-text-m);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px;
}
.cop-price-row-item {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .84rem; color: var(--cop-text-s); padding: 4px 0;
  border-bottom: 1px dashed var(--cop-border);
}
.cop-price-row-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .95rem; font-weight: 800; color: var(--cop-text);
  padding-top: 8px; margin-top: 4px;
}

/* Order button */
.cop-btn {
  display: block; width: 100%; padding: 14px;
  background: var(--cop-primary); color: #fff;
  font-size: .95rem; font-weight: 800;
  border: none; border-radius: var(--cop-radius); cursor: pointer;
  box-shadow: 0 4px 16px rgba(var(--cop-primary-rgb,230,57,70),.3);
  transition: filter .18s, transform .12s;
  margin-bottom: 10px; font-family: var(--cop-font);
  text-align: center; text-decoration: none;
}
.cop-btn:hover:not(:disabled) { filter: brightness(.9); transform: translateY(-1px); color: #fff; }
.cop-btn:disabled { opacity: .6; cursor: not-allowed; }
.cop-btn-label, .cop-btn-spinner { pointer-events: none; }

/* Trust row */
.cop-trust-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; margin-top: 2px;
}
.cop-trust-row span {
  font-size: .74rem; color: var(--cop-text-m); font-weight: 600;
  font-family: var(--cop-font);
}

/* ── Success panel ── */
.cop-express-success { text-align: center; padding: 24px 10px; }
.cop-success-icon { font-size: 3rem; margin-bottom: 8px; }
#cop-success-title-inline { font-size: 1.1rem; font-weight: 800; color: #16a34a; margin-bottom: 6px; font-family: var(--cop-font); }
#cop-success-msg-inline { font-size: .88rem; color: var(--cop-text-m); margin-bottom: 12px; font-family: var(--cop-font); }
#cop-success-details-inline { font-size: .84rem; font-family: var(--cop-font); }

/* Product description section */
.cop-product-desc-section {
  border-top: 2px solid var(--cop-border);
  padding-top: 36px;
  margin-top: 48px;
  width: 100%;
}
@media (max-width: 768px) {
  .cop-product-desc-section {
    margin-top: 16px;
    padding-top: 20px;
  }
}
.cop-desc-body { font-size: .9rem; line-height: 1.8; color: var(--cop-text-s); font-family: var(--cop-font); }
.cop-desc-body img { border-radius: var(--cop-r-sm); margin: 16px 0; max-width: 100%; }

/* ══════════════════════════
   THANK YOU PAGE
══════════════════════════ */
.cop-thankyou-wrap {
  display: flex; justify-content: center; padding: 40px 16px;
  direction: rtl; font-family: var(--cop-font);
}
.cop-thankyou-card {
  background: var(--cop-surface); border: 1px solid var(--cop-border);
  border-radius: 16px; padding: 40px; max-width: 520px; width: 100%;
  text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,.08);
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .cop-thankyou-card { padding: 24px 16px; border-radius: 12px; }
}
.cop-ty-icon { font-size: 3.5rem; margin-bottom: 12px; }
.cop-thankyou-card h1 { font-size: 1.5rem; font-weight: 800; color: var(--cop-text); margin-bottom: 6px; }
.cop-ty-msg { color: var(--cop-text-m); font-size: .9rem; margin-bottom: 20px; }
.cop-ty-ref { font-size: .8rem; color: var(--cop-text-f); margin-bottom: 20px; font-weight: 700; }
.cop-ty-table { width: 100%; border-collapse: collapse; text-align: right; font-size: .85rem; }
.cop-ty-table td { padding: 8px; border-bottom: 1px solid var(--cop-border); }
.cop-ty-table td:last-child { font-weight: 700; color: var(--cop-text); }

/* ══════════════════════════
   DARK MODE
══════════════════════════ */
[data-theme="dark"] .cop-express-wrap    { background: #161b22; border-color: #30363d; }
[data-theme="dark"] .cop-field input,
[data-theme="dark"] .cop-field textarea,
[data-theme="dark"] .cop-field select    { background: #21262d; border-color: #484f58; color: #e6edf3; }
[data-theme="dark"] .cop-swatch          { background: #21262d; border-color: #484f58; color: #e6edf3; }
[data-theme="dark"] .cop-price-summary   { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .cop-main-img-box    { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .cop-thumb-btn       { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .cop-product-card    { background: #161b22; border-color: #30363d; }
[data-theme="dark"] .cop-card-img-link   { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .cop-delivery-trust  { background: #052e16; border-color: #166534; color: #4ade80; }

/* ═══ Bundle & Save Variant Cards ═══ */
.copfb-var-group-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #374151;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}
.copfb-bundle-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.copfb-bundle-item {
    display: flex;
    flex-direction: column;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    position: relative;
    background: #fff;
    overflow: visible;
}
.copfb-bundle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    width: 100%;
    box-sizing: border-box;
}
.copfb-bundle-item.has-top-badge {
    margin-top: 12px;
}
.copfb-bundle-item input[type=radio] { display: none; }
.copfb-bundle-item:hover {
    border-color: var(--fb-btn-color, #e63946);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.copfb-bundle-item.is-selected {
    border-color: var(--fb-btn-color, #e63946);
    background: #fff9f9;
    box-shadow: 0 0 0 3px rgba(var(--cop-primary-rgb,230,57,70),.1);
}
/* Radio dot */
.copfb-bundle-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    position: relative;
    transition: border-color .15s;
}
.copfb-bundle-item.is-selected .copfb-bundle-dot {
    border-color: var(--fb-btn-color, #e63946);
}
.copfb-bundle-item.is-selected .copfb-bundle-dot::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fb-btn-color, #e63946);
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}
/* Free Gift Strip — inline inside card */
.copfb-gift-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    width: 100%;
    box-sizing: border-box;
    width: calc(100% + 4px);
    margin: 0 -2px -2px;
    border-radius: 0 0 calc(var(--fb-field-radius, 10px) - 2px) calc(var(--fb-field-radius, 10px) - 2px);
    overflow: hidden;
}
.copfb-gift-inline .copfb-gift-img { flex-shrink:0;width:36px;height:36px;border-radius:6px;overflow:hidden;border:2px solid rgba(255,255,255,.4);background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center; }
.copfb-gift-inline .copfb-gift-img img { width:100%;height:100%;object-fit:cover;display:block; }
.copfb-gift-inline .copfb-gift-text { flex:1;font-size:12px;font-weight:800;color:#fff; }
.copfb-gift-inline .copfb-gift-value { font-size:11px;color:rgba(255,255,255,.75);font-weight:600;white-space:nowrap; }
/* Free Gift Strip */
.copfb-gift-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-top: 8px;
}
.copfb-gift-img {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.2);
}
.copfb-gift-img img { width:100%;height:100%;object-fit:cover;display:block; }
.copfb-gift-text {
    flex: 1;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}
.copfb-gift-value {
    font-size: 12px;
    color: rgba(255,255,255,.75);
    font-weight: 600;
    white-space: nowrap;
}
/* Variant image */
.copfb-bundle-img {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
}
.copfb-bundle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.copfb-bundle-item.has-img .copfb-bundle-dot { display: none; }
/* Info */
.copfb-bundle-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.copfb-bundle-label {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}
.copfb-bundle-sub {
    font-size: 11px;
    color: var(--fb-btn-color, #e63946);
    font-weight: 600;
    margin-top: 2px;
}
/* Badge */
.copfb-bundle-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    background: #16a34a;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: .01em;
}
.copfb-bundle-top-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    right: auto;
    transform: none;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.22), 0 1px 4px rgba(0,0,0,.10);
    overflow: hidden;
}
.copfb-bundle-top-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(0,0,0,.10) 100%);
    pointer-events: none;
}
/* Price */
.copfb-bundle-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}
.copfb-bundle-price {
    font-size: 15px;
    font-weight: 900;
    color: #111827;
    white-space: nowrap;
}
.copfb-bundle-regular {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
}
.copfb-bundle-item.is-selected .copfb-bundle-price {
    color: var(--fb-btn-color, #e63946);
}
