/* DN Store 2.6.2 — consistent black action controls, aligned product detail,
   and a responsive order checkout using WooCommerce's native fields and review. */
:root{--dns-order-ink:#111111;--dns-order-hover:#111111;--dns-popup-surface:#faf7f0;--dns-popup-border:#e8e6df;--dns-popup-forest:#214a35}

/* All real and fallback product actions: dark on hover, no gold inversion. */
body .dns-nproduct .dns-nproduct-btn,
body .dns-nproducts-grid .dns-nproduct .dns-nproduct-btn,
body .woocommerce ul.products li.product .dns-order-trigger.button,
body .woocommerce ul.products li.product .dns-nproduct-btn,
body .dns-nproduct .dns-nproduct-btn:hover,
body .dns-nproducts-grid .dns-nproduct .dns-nproduct-btn:hover,
body .woocommerce ul.products li.product .dns-order-trigger.button:hover,
body .woocommerce ul.products li.product .dns-nproduct-btn:hover{
  display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
  background:var(--dns-order-gold,#111111)!important;
  border-color:var(--dns-order-gold,#111111)!important;
  color:#fff!important;
  box-shadow:none!important;
  filter:none!important;
  text-decoration:none!important;
  transform:none!important;
  opacity:1!important;
  transition:box-shadow .18s ease!important;
}
body .dns-nproduct .dns-nproduct-btn:hover,
body .dns-nproducts-grid .dns-nproduct .dns-nproduct-btn:hover,
body .woocommerce ul.products li.product .dns-order-trigger.button:hover{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.26)!important;
}
body .dns-nproduct-btn .dns-action-icon,
body .woocommerce ul.products li.product .dns-order-trigger .dns-action-icon,
body .dns-popup-choose-submit .dns-action-icon,
body .dns-single-summary .dns-buy-now .dns-action-icon,
body .dns-mobile-order-actions .dns-action-icon{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:0;
}
body .dns-nproduct-btn .dns-action-icon svg,
body .dns-popup-choose-submit .dns-action-icon svg,
body .dns-single-summary .dns-buy-now .dns-action-icon svg,
body .dns-mobile-order-actions .dns-action-icon svg{
  display:block!important;width:16px;height:16px;color:inherit;stroke:currentColor;flex:0 0 auto;
}
body .dns-nproduct-btn .dns-action-label,
body .dns-popup-choose-submit .dns-action-label,
body .dns-single-summary .dns-buy-now .dns-action-label,
body .dns-mobile-order-actions .dns-action-label{display:inline-block;line-height:1.3;text-align:center}
body .dns-nproduct-btn:focus-visible,
body .dns-order-trigger:focus-visible{outline:3px solid #777!important;outline-offset:2px!important}

/* Single product gallery and summary follow the same grid as all lower sections. */
body.woocommerce.single-product .dns-single-reference .dns-single-breadcrumb,
body.woocommerce.single-product .dns-single-reference .dns-single-top{
  width:calc(100% - 72px)!important;max-width:1440px!important;margin-left:auto!important;margin-right:auto!important;
}
body.woocommerce.single-product .dns-single-reference .dns-single-top{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:32px!important;align-items:start!important;
  padding:26px!important;margin-top:8px!important;margin-bottom:32px!important;
  background:#fff;border:1px solid var(--dns-popup-border);border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.055);
}
body.woocommerce.single-product .dns-single-reference .dns-single-gallery,
body.woocommerce.single-product .dns-single-reference .dns-single-summary{min-width:0!important;width:100%!important;box-sizing:border-box}
body.woocommerce.single-product .dns-single-reference .dns-single-summary form.cart .dns-buy-now,
body.woocommerce.single-product .dns-single-reference .dns-single-summary form.cart .dns-buy-now:hover,
body.woocommerce.single-product .dns-single-reference .dns-single-summary form.cart .single_add_to_cart_button:hover,
body.woocommerce.single-product .dns-single-reference .dns-single-summary form.cart .single_add_to_cart_button{
  display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
  transform:none!important;opacity:1!important;box-shadow:none!important;
}
body.woocommerce.single-product .dns-single-reference .dns-single-summary form.cart .dns-buy-now:hover{
  background:var(--dns-order-red,#111111)!important;color:#fff!important;
  border-color:var(--dns-order-red,#111111)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.26)!important;
}
body.woocommerce.single-product .dns-single-reference .dns-single-summary form.cart .single_add_to_cart_button:hover{
  background:#fff!important;color:#111!important;border-color:#111!important;
  box-shadow:inset 0 0 0 1px #111!important;
}
/* WooCommerce generates the add-to-cart label; add an icon without altering its submit semantics. */
body.woocommerce.single-product .dns-single-summary form.cart .single_add_to_cart_button:before,
body.dns-popup-checkout-frame .dns-checkout-summary #place_order:before{
  content:"";display:inline-block;width:17px;height:17px;flex:0 0 17px;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 8h14l1 13H4L5 8Z M9 9V6a3 3 0 0 1 6 0v3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center /contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 8h14l1 13H4L5 8Z M9 9V6a3 3 0 0 1 6 0v3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center /contain no-repeat;
}
body.woocommerce.single-product .dns-mobile-order-actions .dns-order-trigger:hover{background:var(--dns-order-red,#111)!important;color:#fff!important;filter:none;box-shadow:none}

/* Parent modal is a light Naturo-inspired shell, while all calls to place an order remain DN Store black. */
.dns-order-modal .dns-order-dialog{width:min(980px,100%);background:var(--dns-popup-surface);border:1px solid rgba(255,255,255,.85);border-radius:18px;max-height:min(94dvh,990px)}
.dns-order-modal .dns-order-dialog-head{padding:17px 21px 13px}
.dns-order-modal .dns-order-dialog-head h2{margin-top:4px;color:var(--dns-popup-forest);font-size:21px}
.dns-order-modal .dns-order-close{border-color:#e9e8e3;background:#fff}
.dns-order-modal .dns-popup-choose-submit,
.dns-order-modal .dns-popup-choose-submit:hover{
  display:flex;align-items:center;justify-content:center;gap:9px;
  background:var(--dns-order-gold,#111111)!important;color:#fff!important;opacity:1;filter:none;transform:none;
}
.dns-order-modal .dns-popup-choose-submit:hover{box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}

/* The order frame uses the original WooCommerce <form>, review table and gateway actions. */
body.dns-popup-checkout-frame{background:var(--dns-popup-surface)!important;padding-bottom:104px!important}
body.dns-popup-checkout-frame .dns-checkout-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:18px!important;padding:18px 19px 24px!important;max-width:100%!important}
body.dns-popup-checkout-frame .dns-popup-checkout-left,
body.dns-popup-checkout-frame .dns-popup-checkout-right{min-width:0;gap:14px}
body.dns-popup-checkout-frame .dns-popup-items,
body.dns-popup-checkout-frame .dns-popup-delivery-info,
body.dns-popup-checkout-frame .dns-checkout-details,
body.dns-popup-checkout-frame .dns-checkout-summary{
  padding:16px!important;border:1px solid var(--dns-popup-border)!important;
  border-radius:15px!important;background:#fff!important;box-shadow:none!important;
}
body.dns-popup-checkout-frame .dns-popup-items{order:0}
body.dns-popup-checkout-frame .dns-popup-delivery-info{order:1}
body.dns-popup-checkout-frame .dns-popup-box-head strong,
body.dns-popup-checkout-frame .dns-popup-delivery-info h3,
body.dns-popup-checkout-frame .dns-popup-details-heading,
body.dns-popup-checkout-frame .dns-checkout-summary h2{
  color:var(--dns-popup-forest)!important;font-size:16px!important;line-height:1.4!important;
  font-weight:800!important;letter-spacing:0;
}
body.dns-popup-checkout-frame .dns-popup-details-heading,
body.dns-popup-checkout-frame .dns-checkout-summary h2{
  display:block!important;margin:0 0 15px!important;border-bottom:1px solid #ecece7;
  padding:0 0 11px!important;
}
body.dns-popup-checkout-frame .dns-checkout-details .woocommerce-billing-fields>h3,
body.dns-popup-checkout-frame .dns-checkout-details .woocommerce-additional-fields>h3{display:none!important}
body.dns-popup-checkout-frame .dns-popup-box-head span{background:#eef4ed;color:var(--dns-popup-forest)}
body.dns-popup-checkout-frame .dns-popup-shipping-options{margin:12px 0 9px;min-height:38px}
body.dns-popup-checkout-frame .dns-popup-shipping-pending{margin:0;color:#778277;font-size:12px;line-height:1.7}
body.dns-popup-checkout-frame .dns-popup-shipping-note{font-size:11px;line-height:1.6;color:#7d8479;margin:9px 0 0}
body.dns-popup-checkout-frame .dns-popup-shipping-options ul[id^="shipping_method"]{
  margin:0!important;padding:0!important;list-style:none!important;display:grid!important;gap:9px!important;
}
body.dns-popup-checkout-frame .dns-popup-shipping-options li{
  min-width:0;display:flex;align-items:center;gap:11px;
  border:1px solid #e7e6df!important;border-radius:10px;padding:11px 13px;
  background:#fff;line-height:1.5;font-size:12px;transition:border-color .15s ease;
}
body.dns-popup-checkout-frame .dns-popup-shipping-options li:has(input:checked){border-color:#a4aea4!important;background:#f8faf7}
body.dns-popup-checkout-frame .dns-popup-shipping-options li input{accent-color:var(--dns-popup-forest);flex:none;margin:0;width:17px;height:17px}
body.dns-popup-checkout-frame .dns-popup-shipping-options li label{flex:1;display:block;font-size:12px!important;color:#314238;cursor:pointer;font-weight:750;overflow-wrap:anywhere}
body.dns-popup-checkout-frame .dns-popup-shipping-options li .woocommerce-Price-amount{white-space:nowrap;color:var(--dns-popup-forest)}
/* A live selector appears on the left; duplicate controls in the review table are suppressed. */
body.dns-popup-checkout-frame .dns-checkout-form.dns-popup-shipping-relocated .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals{display:none!important}
body.dns-popup-checkout-frame .dns-checkout-summary table.woocommerce-checkout-review-order-table thead,
body.dns-popup-checkout-frame .dns-checkout-summary table.woocommerce-checkout-review-order-table tbody{display:none!important}
body.dns-popup-checkout-frame .dns-checkout-summary .woocommerce-checkout-review-order-table td,
body.dns-popup-checkout-frame .dns-checkout-summary .woocommerce-checkout-review-order-table th{padding:11px 5px!important;font-size:12px!important;line-height:1.5;vertical-align:middle}
body.dns-popup-checkout-frame .dns-checkout-summary .woocommerce-checkout-review-order-table .order-total{
  font-size:16px;color:var(--dns-popup-forest)!important;border-top:1px solid #e8e9e4;
}
body.dns-popup-checkout-frame .dns-checkout-summary .woocommerce-checkout-review-order-table .order-total td{font-size:16px!important;font-weight:900}
body.dns-popup-checkout-frame .dns-checkout-summary .woocommerce-checkout-review-order-table #shipping_method{display:block}
body.dns-popup-checkout-frame .dns-checkout-details .form-row{margin-bottom:12px!important}
body.dns-popup-checkout-frame .dns-checkout-details :is(input,textarea):focus-visible{border-color:#8b9f90!important;outline:2px solid rgba(52,91,59,.2);outline-offset:1px}
body.dns-popup-checkout-frame #payment{background:#fff!important;border:1px solid #e6e7df;border-radius:12px!important;padding:14px!important}
body.dns-popup-checkout-frame #payment ul.payment_methods{padding:0!important;border:0!important}
body.dns-popup-checkout-frame #payment li.wc_payment_method{padding:10px 0}
body.dns-popup-checkout-frame #payment li.wc_payment_method label{font-size:12px!important;color:#263e31;font-weight:750}
body.dns-popup-checkout-frame #payment .place-order{padding:10px 0 4px!important;margin:0!important;min-height:60px}
body.dns-popup-checkout-frame #payment .woocommerce-terms-and-conditions-wrapper{font-size:11px;line-height:1.65;color:#627369}
/* Keep WooCommerce's REAL submit button in its checkout form, fixed at the modal bottom. */
body.dns-popup-checkout-frame:after{content:"";position:fixed;left:0;right:0;bottom:0;height:91px;background:#faf7f0;box-shadow:0 -7px 25px rgba(0,0,0,.06);border-top:1px solid #e8e6df;pointer-events:none;z-index:80}
body.dns-popup-checkout-frame .dns-checkout-summary #place_order,
body.dns-popup-checkout-frame .dns-checkout-summary #place_order:hover{
  position:fixed!important;left:18px!important;right:18px!important;bottom:17px!important;
  width:calc(100vw - 36px)!important;max-width:none!important;min-height:54px!important;
  z-index:90!important;display:flex!important;align-items:center!important;justify-content:center!important;
  gap:9px!important;text-align:center!important;
  background:var(--dns-popup-primary,#111111)!important;color:#fff!important;
  border:1px solid var(--dns-popup-primary,#111111)!important;
  border-radius:10px!important;font-size:14px!important;font-weight:850!important;
  transform:none!important;filter:none!important;opacity:1!important;
  box-shadow:none!important;
}
body.dns-popup-checkout-frame .dns-checkout-summary #place_order[disabled]{opacity:.6!important;cursor:not-allowed!important}
body.dns-popup-checkout-frame .dns-checkout-summary #place_order .dns-popup-submit-total{font-size:13px;font-weight:850;white-space:nowrap}
body.dns-popup-checkout-frame .dns-checkout-summary #place_order:hover{box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)!important}
body.dns-popup-checkout-frame .dns-checkout-summary .woocommerce-checkout-payment{overflow:visible!important}

@media(max-width:1000px){
 body.woocommerce.single-product .dns-single-reference .dns-single-top{gap:23px!important}
}
@media(max-width:980px){
 body.woocommerce.single-product .dns-single-reference .dns-single-breadcrumb,
 body.woocommerce.single-product .dns-single-reference .dns-single-top{width:calc(100% - 36px)!important;max-width:720px!important}
 body.woocommerce.single-product .dns-single-reference .dns-single-top{grid-template-columns:1fr!important;padding:20px!important}
}
@media(max-width:720px){
 .dns-order-modal .dns-order-dialog{border-radius:16px 16px 0 0;max-height:100dvh}
 body.dns-popup-checkout-frame .dns-checkout-form{grid-template-columns:1fr!important;gap:12px!important;padding:12px 12px 20px!important}
 body.dns-popup-checkout-frame .dns-popup-checkout-left,
 body.dns-popup-checkout-frame .dns-popup-checkout-right{gap:12px!important}
 body.dns-popup-checkout-frame .dns-popup-items,
 body.dns-popup-checkout-frame .dns-popup-delivery-info,
 body.dns-popup-checkout-frame .dns-checkout-details,
 body.dns-popup-checkout-frame .dns-checkout-summary{padding:14px!important}
 body.dns-popup-checkout-frame .dns-checkout-summary #place_order{left:12px!important;right:12px!important;width:calc(100vw - 24px)!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important}
 body.dns-popup-checkout-frame:after{height:calc(85px + env(safe-area-inset-bottom,0px))}
 body.dns-popup-checkout-frame{padding-bottom:calc(116px + env(safe-area-inset-bottom,0px))!important}
}
@media(max-width:767px){
 body.woocommerce.single-product .dns-single-reference .dns-single-breadcrumb,
 body.woocommerce.single-product .dns-single-reference .dns-single-top{width:calc(100% - 30px)!important;max-width:none!important}
 body.woocommerce.single-product .dns-single-reference .dns-single-top{padding:15px!important;border-radius:12px;gap:18px!important}
 body.woocommerce.single-product .dns-single-summary form.cart .single_add_to_cart_button:before{width:15px;height:15px;flex-basis:15px}
 body.woocommerce.single-product .dns-mobile-order-actions .dns-action-icon svg{width:14px;height:14px}
}
@media(max-width:380px){
 body .dns-nproduct-btn .dns-action-icon svg{width:14px;height:14px}
 body.dns-popup-checkout-frame .dns-popup-item{grid-template-columns:48px minmax(0,1fr)!important}
 body.dns-popup-checkout-frame .dns-popup-stepper{grid-column:2;justify-self:end}
 body.dns-popup-checkout-frame .dns-checkout-summary #place_order{font-size:12px!important}
}

/* Give the checkout iframe its actual available space instead of a fixed guessed header offset. */
.dns-order-modal .dns-order-frame-wrap{min-height:0;display:block;flex:1;height:min(77dvh,770px)}
.dns-order-modal .dns-order-frame-wrap[hidden]{display:none!important}
.dns-order-modal .dns-order-frame-wrap iframe{height:100%!important;max-height:none!important}
body.dns-popup-checkout-frame #wpadminbar{display:none!important}
html:has(body.dns-popup-checkout-frame){margin-top:0!important}
@media(max-width:720px){
 .dns-order-modal .dns-order-frame-wrap{height:auto;flex:1;min-height:0}
 .dns-order-modal .dns-order-dialog-head h2{font-size:17px;line-height:1.32}
 .dns-order-modal .dns-order-full-checkout{font-size:10px}
}
/* Override the older high-specificity order-button hover rule, too. */
body .dns-nproducts-grid .dns-nproduct .dns-nproduct-btn.dns-order-trigger:hover,
body .dns-nproduct .dns-nproduct-btn.dns-order-trigger:hover,
body .woocommerce ul.products li.product .dns-order-trigger.button:hover {
  background:var(--dns-order-gold,#111111)!important;
  border-color:var(--dns-order-gold,#111111)!important;
  color:#fff!important;
  transform:none!important;
  filter:none!important;
  opacity:1!important;
}
body.dns-popup-checkout-frame .dns-popup-shipping-options ul#shipping_method input[type="radio"],
body.dns-popup-checkout-frame .dns-popup-shipping-options ul[id^="shipping_method"] input[type="radio"]{
  accent-color:var(--dns-popup-forest,#214a35)!important;
}
body.dns-popup-checkout-frame form.checkout.processing #place_order{pointer-events:none!important;opacity:.65!important}
body.dns-popup-checkout-frame .dns-checkout-summary #payment ul.payment_methods{list-style:none!important;padding:0!important;margin:0!important}
/* Elementor-generated order controls without the shared PHP button helper. */
body button.dns-order-trigger:not(:has(.dns-action-icon))::before{
  content:"";width:16px;height:16px;display:inline-block;flex:0 0 16px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 8h14l1 13H4L5 8Z M9 9V6a3 3 0 0 1 6 0v3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center /contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 8h14l1 13H4L5 8Z M9 9V6a3 3 0 0 1 6 0v3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center /contain no-repeat;
}
