/* CrystalDerma Divi Mockup – scope everything to the mockup to avoid Divi/WooCommerce conflicts. */
.cdm-shop-section, .cdm-demo-page, .cdm-product-page, .cdm-checkout-page, .cdm-global-ui {
  --cdm-green: #023416;
  --cdm-muted: #e3e6e0;
  --cdm-subtle: #657269;
  --cdm-line: #e1e4e2;
  --cdm-radius: 14px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--cdm-green);
  box-sizing: border-box;
}
.cdm-shop-section *, .cdm-demo-page *, .cdm-product-page *, .cdm-checkout-page *, .cdm-global-ui * { box-sizing: border-box; }
.cdm-shop-section button, .cdm-demo-page button, .cdm-product-page button, .cdm-checkout-page button, .cdm-global-ui button,
.cdm-shop-section input, .cdm-demo-page input, .cdm-product-page input, .cdm-checkout-page input, .cdm-global-ui input { font: inherit; }
.cdm-shop-section button, .cdm-demo-page button, .cdm-product-page button, .cdm-checkout-page button, .cdm-global-ui button {
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
.cdm-shop-section button:focus-visible, .cdm-demo-page button:focus-visible, .cdm-product-page button:focus-visible,
.cdm-checkout-page button:focus-visible, .cdm-global-ui button:focus-visible, .cdm-global-ui input:focus-visible,
.cdm-checkout-page input:focus-visible { outline: 2px solid #1d8751; outline-offset: 3px; }

/* Product rows */
.cdm-shop-section { width: 100%; max-width: 1280px; margin: 0 auto 40px; }
.cdm-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin: 0 0 20px; }
.cdm-shop-section .cdm-section-heading h2 {
  margin: 0; padding: 0; color: var(--cdm-green); font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500; font-size: clamp(22px, 2.7vw, 31px); line-height: 1.25; letter-spacing: .015em;
}
.cdm-heading-link { background: transparent; border: 0; color: var(--cdm-green); padding: 0; font-size: 13px; line-height: 1.4; }
.cdm-heading-link:hover { text-decoration: underline; }
.cdm-heading-link span { padding-left: 4px; }
.cdm-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2.2vw, 24px); }
.cdm-card { min-width: 0; display: flex; flex-direction: column; color: var(--cdm-green); }
.cdm-card-picture {
  border: 0; width: 100%; aspect-ratio: 1 / 1.13; min-height: 0; padding: 10px;
  display: grid; place-items: center; background: var(--cdm-muted); border-radius: var(--cdm-radius);
  transition: background-color 180ms ease, transform 180ms ease;
}
.cdm-card-picture:hover { background: #d7ddd4; }
.cdm-card-picture img {
  display: block; object-fit: contain; width: 86%; height: 86%; max-width: 195px; max-height: 195px;
  filter: none; transition: transform 200ms ease;
}
.cdm-card-picture:hover img { transform: scale(1.045); }
.cdm-card-copy { flex: 1; display: flex; flex-direction: column; padding: 12px 3px 0; }
.cdm-card-info { display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: transparent; border: none; padding: 0; width: 100%; color: inherit; }
.cdm-card-info:hover .cdm-name { text-decoration: underline; text-underline-offset: 2px; }
.cdm-brand { display: block; font-weight: 700; color: var(--cdm-green); font-size: 14px; line-height: 1.5; }
.cdm-name { display: block; font-weight: 400; color: var(--cdm-green); font-size: 13px; line-height: 1.55; min-height: 3.05em; }
.cdm-card-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 5px; margin-top: auto; padding-top: 7px; min-height: 46px; }
.cdm-card-prices { min-width: 0; }
.cdm-old-price { display: flex; flex-wrap: wrap; column-gap: 12px; color: #647b6c; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.cdm-old-price s { text-decoration-thickness: 1px; }
.cdm-price { display: block; font-size: clamp(12px, 1.25vw, 15px); line-height: 1.35; letter-spacing: -.018em; font-weight: 800; white-space: nowrap; }
.cdm-unpriced { display: block; font-size: 11px; line-height: 1.4; color: #68776a; font-weight: 400; }
.cdm-add-icon { display: grid; place-items: center; flex: 0 0 27px; height: 29px; background: transparent; color: var(--cdm-green); border: 0; padding: 0 1px 2px; }
.cdm-add-icon:hover { color: #147344; transform: translateY(-1px); }
.cdm-more-section { margin-top: 28px; }
.cdm-cart-shortcode { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #c8d5cd; background: white; border-radius: 20px; padding: 7px 12px; color: #023416; font-size: 12px; }
.cdm-cart-shortcode b { background: #023416; color: white; font-size: 11px; width: 19px; height: 19px; display: inline-grid; place-items: center; border-radius: 50%; }
.cdm-demo-page > .cdm-cart-shortcode { float: right; margin: 0 0 15px 15px; }
.cdm-demo-page > .cdm-shop-section:first-of-type { clear: both; }
.cdm-demo-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin: 0 0 15px; flex-wrap: wrap; }
.cdm-search-shortcode { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; padding: 6px 0; color: #023416; font-family: 'Jost', Arial, Helvetica, sans-serif; font-weight: 500; font-size: 16px; letter-spacing: .01em; text-transform: uppercase; }
.cdm-search-shortcode:hover { text-decoration: underline; text-underline-offset: 3px; }
.cdm-demo-page > .cdm-cart-shortcode, .cdm-demo-page > .cdm-search-shortcode { float: none; margin: 0; }

/* Product detail, used both in the dedicated product shortcode and popup */
.cdm-product-page { max-width: 1260px; margin: 0 auto; }
.cdm-product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3.3vw, 55px); color: #282d2e; }
.cdm-detail-media { min-width: 0; }
.cdm-detail-image { background: #f5f6f4; border: 1px solid #e6e7e4; aspect-ratio: 1/1; display: grid; place-items: center; padding: 26px; }
.cdm-detail-image img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.cdm-detail-dots { display: flex; justify-content: center; gap: 7px; margin: 10px 0 20px; }
.cdm-detail-dots i { width: 6px; height: 6px; border-radius: 50%; background: #babfc0; }
.cdm-detail-dots i:first-child { background: #273036; }
.cdm-detail-content { min-width: 0; }
.cdm-breadcrumbs { color: #778187; font-size: 11px; margin: 10px 0 22px; }
.cdm-detail-brand { font-size: 13px; font-weight: 700; color: #023416; }
.cdm-detail-content h1 { margin: 5px 0 8px; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: clamp(24px, 2.3vw, 34px); font-weight: 750; line-height: 1.25; letter-spacing: -.035em; color: #242829; }
.cdm-detail-subtitle { margin: 0 0 20px; color: #353a3a; font-size: 14px; line-height: 1.6; }
.cdm-detail-prices { display: flex; flex-direction: column; gap: 7px; margin-bottom: 19px; }
.cdm-detail-price { font-size: 30px; font-weight: 750; letter-spacing: -.03em; color: #2c3031; line-height: 1.2; }
.cdm-detail-old { color: #858c8e; font-size: 12px; }
.cdm-detail-actions { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; }
.cdm-primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: #023416; color: white; border: 1px solid #023416; border-radius: 3px; padding: 15px 24px; font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
.cdm-primary-btn svg { width: 18px; height: 18px; }
.cdm-primary-btn:hover { background: #135630; border-color: #135630; }
.cdm-outline-btn { background: transparent; color: #023416; border: 1px solid #cad4ce; padding: 15px 18px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.cdm-outline-btn:hover { background: #f2f7f3; }
.cdm-detail-delivery { display: flex; flex-wrap: wrap; column-gap: 6px; align-items: center; margin: 25px 0 30px; font-size: 12px; color: #166239; }
.cdm-detail-delivery span { display: block; width: 100%; color: #6a7371; margin-top: 5px; line-height: 1.5; }
.cdm-product-tabs { border-top: 1px solid #c5cbcb; padding-top: 0; color: #333; font-size: 13px; line-height: 1.75; }
.cdm-tab-head { display: flex; justify-content: space-around; gap: 12px; border-bottom: 1px solid #c5cbcb; padding: 14px 0; margin: 0 0 17px; font-size: 12px; font-weight: 700; }
.cdm-tab-head span { font-weight: 400; }
.cdm-product-tabs p { margin: 0 0 15px; }
.cdm-detail-meta { font-size: 12px; margin-bottom: 5px; }

/* Drawer and overlays */
.cdm-global-ui { position: relative; z-index: 999999; }
.cdm-global-ui [hidden], .cdm-checkout-page [hidden], .cdm-shop-section [hidden] { display: none !important; }
.cdm-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 999990; }
.cdm-cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(478px, 100%); transform: translateX(103%); transition: transform 260ms ease; z-index: 999991; display: flex; flex-direction: column; background: #fff; box-shadow: -5px 0 28px rgba(0,0,0,.14); color: #292d2e; outline: none; }
.cdm-cart-drawer.cdm-open { transform: translateX(0); }
.cdm-drawer-header { flex: 0 0 52px; position: relative; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #e3e4e6; }
.cdm-drawer-header h2 { margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; letter-spacing: 1.6px; font-size: 16px; font-weight: 750; color: #2d3032; }
.cdm-close-round { position: absolute; left: 6px; top: 7px; width: 36px; height: 36px; display: grid; place-items: center; background: #e7e8ea; border: 0; border-radius: 50%; color: #292d2e; font-size: 26px; font-weight: 300; line-height: 1; }
.cdm-close-round:hover { background: #d6d9d9; }
.cdm-drawer-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 30px 27px; }
.cdm-empty { text-align: center; font-style: italic; font-size: 16px; color: #2b2e30; padding: 0; }
.cdm-drawer-footer { flex: 0 0 auto; padding: 33px 20px 26px; box-shadow: 0 -8px 28px rgba(0,0,0,.035); text-align: center; background: #fff; }
.cdm-drawer-footer > div { font-size: 20px; margin-bottom: 33px; color: #353839; }
.cdm-drawer-footer strong { font-size: 23px; color: #242829; }
.cdm-drawer-checkout { min-width: 151px; padding: 18px 25px; background: #023416; border: 0; color: #fff; border-radius: 4px; letter-spacing: 1.2px; font-size: 13px; font-weight: 650; }
.cdm-drawer-checkout:hover:not(:disabled) { background: #135d35; }
.cdm-drawer-checkout:disabled { background: #cfcfdf; color: #8d8e9a; cursor: not-allowed; }
.cdm-drawer-footer small { display: block; color: #909999; font-size: 10px; margin-top: 12px; }
.cdm-drawer-line { display: flex; align-items: center; gap: 13px; border-bottom: 1px solid #eaeeeb; padding: 0 0 17px; margin: 0 0 17px; }
.cdm-drawer-line img { width: 75px; height: 84px; object-fit: contain; background: #e7e9e6; border-radius: 7px; padding: 7px; }
.cdm-drawer-line-main { flex: 1; min-width: 0; }
.cdm-drawer-line-main strong { font-size: 12px; display: block; line-height: 1.45; color: #25332b; }
.cdm-drawer-line-main small { display: block; color: #708076; font-size: 11px; margin: 4px 0 7px; }
.cdm-drawer-line .cdm-drawer-line-total { font-size: 12px; font-weight: bold; white-space: nowrap; align-self: flex-start; }
.cdm-qty { display: flex; width: max-content; align-items: center; gap: 10px; }
.cdm-qty button { width: 24px; height: 24px; border: 1px solid #bec8c0; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #023416; line-height: 1; }
.cdm-qty span { font-size: 13px; min-width: 10px; text-align: center; }
.cdm-drawer-warning { background: #f5f3e9; color: #756135; padding: 12px; border-radius: 4px; font-size: 12px; line-height: 1.5; }
.cdm-modal-backdrop { position: fixed; inset: 0; z-index: 999992; background: rgba(15,25,18,.55); display: flex; align-items: center; justify-content: center; padding: 22px; }
.cdm-dialog { position: relative; background: #fff; border-radius: 5px; max-width: 1100px; width: 100%; max-height: 92vh; overflow-y: auto; color: #282d2e; padding: clamp(24px, 3.3vw, 45px); box-shadow: 0 16px 60px rgba(0,0,0,.19); }
.cdm-modal-close { position: sticky; float: right; top: 0; right: 0; z-index: 2; margin: -14px -14px 0 0; border: 0; border-radius: 50%; width: 35px; height: 35px; display: grid; place-items: center; font-size: 27px; color: #26332a; background: #f1f3f1; }
.cdm-modal-close:hover { background: #e1e8e3; }
.cdm-product-dialog { max-width: 1050px; }
.cdm-search-dialog { max-width: 620px; }
.cdm-search-modal { padding: 10px 4px 8px; }
.cdm-search-title { margin: 0 0 18px; color: #023416; font-family: 'Jost', Arial, Helvetica, sans-serif; font-size: 22px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.cdm-search-input { width: 100%; min-height: 54px; border: 1px solid #ccd7cf; border-radius: 5px; padding: 14px 16px; font-size: 15px; color: #213127; background: #fff; }
.cdm-search-input::placeholder { color: #7b8780; }
.cdm-search-help { margin: 12px 0 0; color: #748078; font-size: 12px; line-height: 1.6; }
.cdm-toast { position: fixed; right: 22px; bottom: 22px; z-index: 999995; padding: 15px 19px; border-radius: 5px; box-shadow: 0 7px 30px rgba(0,0,0,.14); background: #023416; color: white; font-size: 13px; line-height: 1.5; max-width: 330px; }
body.cdm-overlay-active { overflow: hidden; }

/* The checkout design echoes the reference without embedding a payment service. */
.cdm-checkout-page { max-width: 1080px; margin: 0 auto; }
.cdm-checkout { color: #202525; font-family: Arial, Helvetica, sans-serif; }
.cdm-checkout .cdm-checkout-title { font-size: 24px; line-height: 1.25; font-family: Arial, Helvetica, sans-serif; color: #161b1b; font-weight: 700; margin: 0 0 28px; }
.cdm-checkout-columns { display: grid; grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); gap: clamp(34px, 9vw, 125px); align-items: start; }
.cdm-checkout-left { min-width: 0; }
.cdm-shipping-panel { border: 1px solid #e0e1e1; border-radius: 4px; padding: 14px 12px 18px; }
.cdm-shipping-panel h3 { font-size: 12px; font-weight: 700; line-height: 1.5; margin: 0 0 10px; color: #252929; }
.cdm-shipping-option { border-top: 1px solid #e1e3e1; display: flex; align-items: flex-start; gap: 8px; padding: 13px 0; min-width: 0; cursor: pointer; color: #242829; }
.cdm-shipping-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cdm-radio-visual { width: 15px; height: 15px; border: 1px solid #c7cbca; border-radius: 50%; flex: 0 0 15px; margin-top: 1px; background: #fff; }
.cdm-shipping-option input:checked + .cdm-radio-visual { border: 4px solid #222729; }
.cdm-shipping-option input:focus-visible + .cdm-radio-visual { outline: 2px solid #14804a; outline-offset: 3px; }
.cdm-ship-copy { flex: 1; min-width: 0; }
.cdm-ship-copy strong { display: block; font-size: 11px; line-height: 1.4; font-weight: 650; }
.cdm-ship-copy small { display: block; color: #7b8083; font-size: 10px; line-height: 1.6; }
.cdm-ship-copy em { display: block; font-size: 10px; color: #158342; line-height: 1.6; font-style: normal; margin-top: 3px; }
.cdm-shipping-option > b { font-size: 10px; line-height: 1.7; flex: 0 0 auto; }
.cdm-delivery-tag { width: 20px; height: 20px; color: #fff; background: #0aa8cb; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 700; flex: 0 0 20px; }
.cdm-tag-red { background: #f22f4a; }
.cdm-tag-green { background: #31bb91; }
.cdm-shipping-credit { padding-top: 4px; font-size: 9px; color: #979d9b; text-align: right; }
.cdm-contact-box { margin-top: 22px; }
.cdm-contact-box h3 { font-size: 15px; color: #151a1a; margin: 0 0 15px; font-weight: 700; }
.cdm-contact-box input { display: block; width: 100%; padding: 16px 13px; background: white; border: 1px solid #e0e1e0; border-radius: 3px 3px 0 0; color: #2c3031; min-height: 52px; font-size: 11px; }
.cdm-contact-box input + input { border-top: 0; border-radius: 0 0 3px 3px; }
.cdm-contact-box input:focus { outline: 1px solid #31865a; }
.cdm-add-phone { display: block; width: 100%; text-align: right; background: transparent; color: #222; text-decoration: underline; font-size: 10px; padding: 13px 0; border: 0; }
.cdm-checkout-continue { width: 100%; background: #023416; color: white; border: 0; border-radius: 18px; min-height: 40px; font-weight: 750; font-size: 12px; }
.cdm-checkout-continue:hover { background: #155632; }
.cdm-checkout-feedback { min-height: 20px; font-size: 11px; line-height: 1.5; color: #19613b; text-align: center; margin-top: 7px; }
.cdm-checkout-total-bottom { border-top: 1px solid #e4e6e5; border-bottom: 1px solid #e4e6e5; text-align: center; margin: 21px 0 12px; padding: 19px 0; color: #a1a7a7; font-size: 10px; }
.cdm-checkout-total-bottom strong { display: block; font-size: 30px; line-height: 1.45; color: #d0d3d3; }
.cdm-checkout-powered { text-align: center; font-size: 9px; color: #a9aead; padding: 9px; letter-spacing: .5px; }
.cdm-checkout-right { background: #f4f4f3; padding: 16px 15px 14px; min-width: 0; }
.cdm-free-note { font-size: 10px; line-height: 1.5; color: #3d4140; display: flex; justify-content: space-between; gap: 5px; }
.cdm-progress { width: 100%; height: 3px; background: #b7bdb9; margin: 1px 0 18px; }
.cdm-progress > span { display: block; height: 100%; background: #023416; max-width: 100%; transition: width .2s; }
.cdm-order-items { min-height: 75px; }
.cdm-order-item { display: flex; gap: 12px; padding: 0 0 15px; margin: 0 0 15px; border-bottom: 1px solid #e2e4e3; }
.cdm-order-item img { height: 72px; width: 60px; object-fit: contain; background: #e6e9e5; padding: 5px; }
.cdm-order-item-detail { min-width: 0; flex: 1; }
.cdm-order-item-detail strong { display: block; font-size: 11px; font-weight: 700; line-height: 1.4; }
.cdm-order-item-detail small { display: block; margin-top: 3px; color: #707875; font-size: 10px; }
.cdm-order-item-detail .cdm-qty { margin-top: 10px; }
.cdm-order-item-detail .cdm-qty button { width: 18px; height: 18px; font-size: 12px; color: #303735; border-color: #303735; }
.cdm-order-item-detail .cdm-qty span { font-size: 10px; }
.cdm-order-price { font-size: 10px; white-space: nowrap; font-weight: 650; }
.cdm-order-empty { font-size: 12px; text-align: center; font-style: italic; color: #727a76; padding: 25px 0; }
.cdm-order-summary { margin: 18px 0 20px; }
.cdm-order-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: #202525; font-size: 10px; }
.cdm-order-summary strong { font-size: 10px; font-weight: 600; }
.cdm-order-summary .cdm-order-total { font-weight: 750; }
.cdm-discount-toggle { width: 100%; border: 1px solid #7d878a; background: white; padding: 8px; font-size: 10px; color: #232728; min-height: 29px; }
.cdm-discount-toggle:hover { background: #edf0ef; }
.cdm-discount { display: flex; padding: 8px 0; gap: 6px; }
.cdm-discount input { min-width: 0; flex: 1; border: 1px solid #c5cbc7; padding: 9px; color: #303936; background: white; font-size: 11px; }
.cdm-discount button { border: 0; background: #023416; color: white; padding: 7px 12px; font-size: 11px; }
.cdm-demo-disclaimer { font-size: 10px; line-height: 1.6; color: #79817e; margin: 12px 0 0; }
.cdm-checkout-dialog { max-width: 1050px; }
.cdm-checkout-dialog > .cdm-checkout { clear: both; }

@media (max-width: 860px) {
  .cdm-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; row-gap: 27px; }
  .cdm-card-picture { aspect-ratio: 1/1; }
  .cdm-card-picture img { width: 80%; height: 80%; }
  .cdm-price { font-size: 14px; }
  .cdm-product-detail { grid-template-columns: 1fr; gap: 16px; }
  .cdm-detail-image { max-height: 490px; }
  .cdm-checkout-columns { gap: 25px; }
  .cdm-demo-actions { justify-content: space-between; }
}

@media (max-width: 660px) {
  .cdm-checkout-columns { grid-template-columns: 1fr; gap: 25px; }
  .cdm-checkout-right { grid-row: 1; }
  .cdm-checkout .cdm-checkout-title { margin: 0 0 18px; }
  .cdm-dialog { padding: 24px 16px 28px; }
  .cdm-modal-backdrop { padding: 8px; }
  .cdm-modal-close { margin: -13px -4px 8px 0; }
  .cdm-breadcrumbs { margin: 3px 0 10px; }
}
@media (max-width: 400px) {
  .cdm-product-grid { column-gap: 12px; }
  .cdm-card-copy { padding-left: 0; padding-right: 0; }
  .cdm-name { font-size: 12px; }
  .cdm-old-price { font-size: 10px; }
  .cdm-price { font-size: 12px; }
  .cdm-add-icon { flex-basis: 22px; }
  .cdm-add-icon svg { width: 19px; height: 19px; }
  .cdm-shop-section .cdm-section-heading h2 { font-size: 20px; }
  .cdm-search-shortcode { font-size: 14px; }
  .cdm-shipping-promo { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cdm-cart-drawer, .cdm-card-picture img, .cdm-card-picture, .cdm-progress > span { transition: none; }
}
