/* Amanos New Design Workflow — v2.26.8 UX/UI refresh.
 * Loaded ONLY on products with _adw_enabled=yes. Legacy product UI stays untouched.
 */
.adw-workflow{
    --adw-green:#123719;
    --adw-green-deep:#0a2711;
    --adw-green-2:#1d4d27;
    --adw-green-soft:#eef5ef;
    --adw-gold:#c7a64a;
    --adw-gold-deep:#a98527;
    --adw-gold-soft:#f8f1dd;
    --adw-ink:#162019;
    --adw-muted:#69736b;
    --adw-line:#e3e8e2;
    --adw-line-strong:#d7ded7;
    --adw-surface:#fff;
    --adw-soft:#f7f9f7;
    --adw-danger:#a52a1f;
    width:100%;
    margin:24px 0;
    border:1px solid var(--adw-line);
    border-radius:22px;
    background:var(--adw-surface);
    box-shadow:0 16px 42px rgba(10,39,17,.08);
    overflow:hidden;
    font-family:inherit;
    color:var(--adw-ink);
    box-sizing:border-box;
}
.adw-workflow *{box-sizing:border-box}
.adw-workflow [hidden]{display:none!important}

/* ===== Steps ===== */
.adw-step{padding:20px}
.adw-step + .adw-step{border-top:1px solid var(--adw-line)}
.adw-step-head{
    display:grid;
    grid-template-columns:40px minmax(0,1fr) 30px;
    gap:12px;
    align-items:center;
    margin:0 0 16px;
}
.adw-step-number{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:var(--adw-green);
    color:#f7df87;
    font-size:15px;
    font-weight:900;
    box-shadow:0 6px 16px rgba(18,55,25,.16);
}
.adw-step-copy{min-width:0}
.adw-step-kicker{
    display:block;
    margin:0 0 2px!important;
    color:var(--adw-gold-deep)!important;
    font-size:10px!important;
    font-weight:800!important;
    line-height:1.2!important;
    text-transform:uppercase;
    letter-spacing:.05em;
}
.adw-step-head h3{
    margin:0!important;
    color:var(--adw-green-deep)!important;
    font-size:18px!important;
    font-weight:850!important;
    line-height:1.35!important;
    letter-spacing:0!important;
}
.adw-step-head p{
    margin:4px 0 0!important;
    color:var(--adw-muted)!important;
    font-size:12px!important;
    line-height:1.65!important;
}
.adw-step-check{
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    justify-self:end;
    border-radius:50%;
    background:#edf2ed;
    color:#aab3ab;
    font-size:13px;
    font-weight:900;
    opacity:.65;
    transition:.18s ease;
}
.adw-step.is-complete .adw-step-check{
    background:var(--adw-green);
    color:#fff;
    opacity:1;
}

/* ===== Quantity selector ===== */
.adw-quantity-block{background:#fcfdfc}
.adw-quantity-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(108px,1fr));
    gap:9px;
}
.adw-quantity-card{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) 19px;
    grid-template-rows:auto auto;
    gap:5px 8px;
    min-width:0;
    padding:13px 12px;
    border:1px solid var(--adw-line);
    border-radius:14px;
    background:#fff;
    cursor:pointer;
    user-select:none;
    transition:border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}
.adw-quantity-card:hover{
    border-color:#d7c68e;
    box-shadow:0 7px 18px rgba(10,39,17,.07);
    transform:translateY(-1px);
}
.adw-quantity-card.is-selected{
    border-color:var(--adw-gold);
    background:#fffdf7;
    box-shadow:0 7px 20px rgba(10,39,17,.08), inset 0 0 0 1px rgba(199,166,74,.12);
}
.adw-quantity-input,.adw-mode-input{
    position:absolute!important;
    opacity:0!important;
    pointer-events:none!important;
    width:1px!important;
    height:1px!important;
}
.adw-quantity-number{
    display:flex;
    flex-direction:column;
    min-width:0;
    line-height:1.15!important;
}
.adw-quantity-number strong{
    color:var(--adw-green-deep)!important;
    font-size:17px!important;
    font-weight:900!important;
    white-space:nowrap;
}
.adw-quantity-number small{
    margin-top:2px!important;
    color:var(--adw-muted)!important;
    font-size:10px!important;
    font-weight:650!important;
}
.adw-quantity-price{
    grid-column:1/3;
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:6px;
    padding-top:6px;
    border-top:1px solid #edf0ed;
}
.adw-quantity-price small{
    margin:0!important;
    color:var(--adw-muted)!important;
    font-size:9.5px!important;
    line-height:1.2!important;
}
.adw-quantity-price b{
    color:var(--adw-green-deep)!important;
    font-size:11px!important;
    font-weight:850!important;
    white-space:nowrap;
}
.adw-radio-mark{
    width:19px;
    height:19px;
    border:1.5px solid #b8c0b9;
    border-radius:50%;
    background:#fff;
    display:grid;
    place-items:center;
    transition:.16s ease;
}
.adw-radio-mark i{
    width:7px;
    height:7px;
    border-radius:50%;
    background:transparent;
    transition:.16s ease;
}
.adw-quantity-card .adw-radio-mark{grid-column:2;grid-row:1;justify-self:end}
.adw-quantity-card.is-selected .adw-radio-mark,
.adw-mode-card.is-selected .adw-radio-mark{
    border-color:var(--adw-green);
    box-shadow:0 0 0 3px var(--adw-green-soft);
}
.adw-quantity-card.is-selected .adw-radio-mark i,
.adw-mode-card.is-selected .adw-radio-mark i{background:var(--adw-green)}
.adw-quantity-error{
    margin:11px 0 0!important;
    padding:10px 12px;
    border:1px solid #efc0ba;
    border-radius:11px;
    background:#fff4f2;
    color:var(--adw-danger)!important;
    font-size:11px!important;
    font-weight:750!important;
    line-height:1.5!important;
}
.adw-quantity-block.adw-has-error{background:#fffafa}

/* ===== Design methods ===== */
.adw-design-step{background:#fff}
.adw-mode-grid{display:grid;grid-template-columns:1fr;gap:11px}
.adw-mode-item{min-width:0}
.adw-mode-card{
    position:relative;
    display:grid;
    grid-template-columns:46px minmax(0,1fr) auto 20px;
    gap:12px;
    align-items:center;
    min-height:82px;
    padding:14px 14px;
    border:1px solid var(--adw-line);
    border-radius:15px;
    background:#fff;
    cursor:pointer;
    user-select:none;
    text-align:start;
    transition:border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}
.adw-mode-card:hover{
    border-color:#d8c78f;
    box-shadow:0 8px 22px rgba(10,39,17,.07);
    transform:translateY(-1px);
}
.adw-mode-card.is-selected{
    border-color:var(--adw-gold);
    background:#fffdf8;
    box-shadow:0 9px 25px rgba(10,39,17,.09), inset 0 0 0 1px rgba(199,166,74,.10);
}
.adw-mode-card.is-selected::before{
    content:"";
    position:absolute;
    inset-block:10px;
    inset-inline-start:0;
    width:3px;
    border-radius:0 99px 99px 0;
    background:var(--adw-gold);
}
.adw-mode-icon{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border-radius:13px;
    background:var(--adw-green-soft);
    border:1px solid #dce9de;
    color:var(--adw-green);
    transition:.16s ease;
}
.adw-mode-icon svg,.adw-upload-zone-icon svg{
    width:23px;
    height:23px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.75;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.adw-mode-card.is-selected .adw-mode-icon{
    background:var(--adw-green);
    border-color:var(--adw-green);
    color:#f5dc82;
    box-shadow:0 7px 16px rgba(18,55,25,.17);
}
.adw-mode-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.adw-mode-copy strong{
    color:var(--adw-ink)!important;
    font-size:14px!important;
    line-height:1.35!important;
    font-weight:850!important;
}
.adw-mode-copy small{
    color:var(--adw-muted)!important;
    font-size:11.5px!important;
    line-height:1.55!important;
}
.adw-price-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:5px 9px;
    border:1px solid #dce7dc;
    border-radius:999px;
    background:#f3f8f2;
    color:var(--adw-green-deep)!important;
    font-size:10.5px!important;
    line-height:1!important;
    font-weight:850!important;
    white-space:nowrap;
}
.adw-mode-professional .adw-price-badge{
    border-color:#eadcae;
    background:var(--adw-gold-soft);
}
.adw-mode-card .adw-radio-mark{justify-self:end}

/* Fields are attached to the selected card so the flow reads naturally. */
.adw-mode-fields{
    margin:8px 4px 3px;
    padding:15px;
    border:1px solid var(--adw-line);
    border-radius:14px;
    background:var(--adw-soft);
    animation:adwReveal .18s ease-out;
}
@keyframes adwReveal{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
.adw-mode-item.is-selected .adw-mode-fields{box-shadow:0 7px 18px rgba(10,39,17,.05)}

/* ===== Upload zone ===== */
.adw-upload-zone{
    position:relative;
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr);
    gap:11px;
    align-items:center;
    width:100%;
    margin:0!important;
    padding:14px!important;
    border:1.5px dashed #c7d3c8!important;
    border-radius:13px!important;
    background:#fff!important;
    cursor:pointer;
    overflow:hidden;
    transition:border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.adw-upload-zone:hover,.adw-upload-zone:focus-within{
    border-color:var(--adw-gold)!important;
    background:#fffdf8!important;
    box-shadow:0 0 0 3px rgba(199,166,74,.10);
}
.adw-file-control{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    opacity:0!important;
    cursor:pointer!important;
    z-index:2;
}
.adw-upload-zone-icon{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:var(--adw-green-soft);
    color:var(--adw-green);
    border:1px solid #dbe8dc;
}
.adw-upload-zone-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.adw-upload-zone-copy strong{
    color:var(--adw-green-deep)!important;
    font-size:12.5px!important;
    line-height:1.35!important;
    font-weight:850!important;
}
.adw-upload-zone-copy strong em{color:#b42318!important;font-style:normal}
.adw-upload-zone-copy small{
    margin:0!important;
    color:var(--adw-muted)!important;
    font-size:10.5px!important;
    line-height:1.5!important;
}
.adw-upload-status{
    grid-column:1/-1;
    display:block;
    padding-top:8px;
    border-top:1px solid #edf0ed;
    color:var(--adw-muted)!important;
    font-size:10.5px!important;
    line-height:1.4!important;
}
.adw-upload-zone.has-files .adw-upload-status{color:var(--adw-green)!important;font-weight:800!important}

/* ===== Professional check ===== */
.adw-check-row{
    display:grid;
    grid-template-columns:20px minmax(0,1fr) auto;
    gap:10px;
    align-items:start;
    margin:12px 0 0!important;
    padding:12px!important;
    border:1px solid #e5e1d4;
    border-radius:12px;
    background:#fffdf7;
    cursor:pointer;
}
.adw-check-row input{margin-top:2px!important;accent-color:var(--adw-green)}
.adw-check-row span{min-width:0}
.adw-check-row span strong{display:block;color:var(--adw-ink)!important;font-size:12px!important;font-weight:850!important}
.adw-check-row span small{display:block;margin-top:2px!important;color:var(--adw-muted)!important;font-size:10.5px!important;line-height:1.5!important}
.adw-check-row b{
    color:var(--adw-green-deep)!important;
    background:var(--adw-gold-soft);
    border:1px solid #eadcae;
    border-radius:999px;
    padding:5px 8px;
    font-size:10.5px!important;
    font-weight:850!important;
    white-space:nowrap;
}

/* ===== Professional design form ===== */
.adw-professional-fields{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.adw-professional-fields[hidden]{display:none!important}
.adw-pro-field{display:block;margin:0!important;min-width:0}
.adw-pro-field>span{
    display:block;
    margin:0 0 6px!important;
    color:var(--adw-green-deep)!important;
    font-size:11.5px!important;
    font-weight:800!important;
    line-height:1.35!important;
}
.adw-pro-field em{color:#b42318!important;font-style:normal}
.adw-pro-field input[type=text],
.adw-pro-field input[type=email],
.adw-pro-field textarea{
    width:100%!important;
    border:1px solid #dce2dc!important;
    border-radius:11px!important;
    background:#fff!important;
    color:var(--adw-ink)!important;
    box-shadow:none!important;
    outline:0!important;
    font:inherit!important;
}
.adw-pro-field input[type=text],.adw-pro-field input[type=email]{min-height:44px!important;padding:9px 11px!important}
.adw-pro-field textarea{min-height:104px!important;padding:10px 11px!important;resize:vertical}
.adw-pro-field input:focus,.adw-pro-field textarea:focus{
    border-color:var(--adw-gold)!important;
    box-shadow:0 0 0 3px rgba(199,166,74,.11)!important;
}
.adw-pro-field-instructions,.adw-pro-field-files{grid-column:1/-1}
.adw-pro-field-files{display:grid!important}

/* ===== Selection review ===== */
.adw-review-bar{
    display:grid;
    grid-template-columns:34px minmax(0,1fr);
    gap:10px;
    align-items:center;
    margin:0 20px 20px;
    padding:12px 13px;
    border:1px solid #d8e4d9;
    border-radius:14px;
    background:#f1f7f2;
}
.adw-review-check{
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:var(--adw-green);
    color:#fff;
    font-weight:900;
}
.adw-review-copy{display:flex;flex-direction:column;gap:1px;min-width:0}
.adw-review-copy small{color:var(--adw-green)!important;font-size:9.5px!important;font-weight:850!important}
.adw-review-copy strong{color:var(--adw-green-deep)!important;font-size:12px!important;font-weight:850!important;line-height:1.4!important}
.adw-review-copy span{color:var(--adw-muted)!important;font-size:10px!important;line-height:1.45!important}

/* ===== New-workflow actions only ===== */
body.adw-workflow-active form.cart .single_add_to_cart_button:not(.apc-add-customized),
body.adw-workflow-active form.cart button[name="add-to-cart"]:not(.apc-add-customized),
body.adw-workflow-active #apc-open-customizer{
    width:100%!important;
    min-height:50px!important;
    border:1px solid var(--adw-green, #123719)!important;
    border-radius:13px!important;
    background:#123719!important;
    color:#fff!important;
    box-shadow:0 8px 18px rgba(18,55,25,.14)!important;
    font-weight:850!important;
    transition:transform .16s ease, box-shadow .16s ease, background .16s ease!important;
}
body.adw-workflow-active form.cart .single_add_to_cart_button:not(.apc-add-customized):hover,
body.adw-workflow-active form.cart button[name="add-to-cart"]:not(.apc-add-customized):hover,
body.adw-workflow-active #apc-open-customizer:hover{
    background:#0a2711!important;
    box-shadow:0 10px 23px rgba(18,55,25,.20)!important;
    transform:translateY(-1px);
}
body.adw-workflow-active #apc-open-customizer:disabled,
body.adw-workflow-active form.cart .single_add_to_cart_button:disabled{
    opacity:.45!important;
    cursor:not-allowed!important;
    transform:none!important;
    box-shadow:none!important;
}

/* Existing APC bridge behavior — scoped to explicitly opted-in workflow products only. */
.adw-non-online-selected.single-product form.cart .single_add_to_cart_button:not(.apc-add-customized),
.adw-non-online-selected.single-product form.cart button[name="add-to-cart"]:not(.apc-add-customized),
.adw-non-online-selected.single-product form.cart input[name="add-to-cart"]:not([type="hidden"]){display:inline-flex!important}
.adw-non-online-selected .apc-product-entry{display:none!important}

/* The New Workflow selector is the single source of truth for quantity. */
.adw-workflow-active.adw-has-workflow-quantity .apc-simple-quantity-selector,
.adw-workflow-active.adw-has-workflow-quantity form.cart .apc-native-allowed-quantity,
.adw-workflow-active.adw-has-workflow-quantity form.cart .adw-native-quantity-hidden{display:none!important}

/* Keyboard accessibility */
.adw-quantity-card:has(.adw-quantity-input:focus-visible),
.adw-mode-card:has(.adw-mode-input:focus-visible){
    outline:3px solid rgba(199,166,74,.26);
    outline-offset:2px;
}

@media(max-width:680px){
    .adw-workflow{margin:18px 0;border-radius:18px}
    .adw-step{padding:16px}
    .adw-step-head{grid-template-columns:36px minmax(0,1fr) 26px;gap:10px;margin-bottom:13px}
    .adw-step-number{width:36px;height:36px;font-size:13px}
    .adw-step-check{width:25px;height:25px;font-size:12px}
    .adw-step-head h3{font-size:16px!important}
    .adw-step-head p{font-size:11px!important}
    .adw-quantity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .adw-mode-card{grid-template-columns:42px minmax(0,1fr) 20px;gap:10px;min-height:78px;padding:12px}
    .adw-mode-icon{width:42px;height:42px;border-radius:12px}
    .adw-mode-copy{grid-column:2;grid-row:1}
    .adw-radio-mark{grid-column:3;grid-row:1/3;align-self:center}
    .adw-price-badge{grid-column:2;grid-row:2;justify-self:start;margin-top:2px}
    .adw-professional-fields{grid-template-columns:1fr}
    .adw-pro-field-instructions,.adw-pro-field-files{grid-column:auto}
    .adw-review-bar{margin:0 16px 16px}
}
@media(max-width:420px){
    .adw-quantity-grid{grid-template-columns:1fr}
    .adw-check-row{grid-template-columns:20px minmax(0,1fr)}
    .adw-check-row b{grid-column:2;justify-self:start}
}
@media(prefers-reduced-motion:reduce){
    .adw-workflow *{scroll-behavior:auto!important;animation:none!important;transition:none!important}
}

/* v2.26.7 route ownership: Online Design shows only the designer CTA; direct
 * routes show only the WooCommerce cart CTA. This removes the previous double
 * action / disabled-button ambiguity. */
.adw-online-selected.single-product form.cart .ct-cart-actions{display:none!important}
.adw-online-selected.single-product .apc-product-entry{display:block!important}
.adw-non-online-selected.single-product .apc-product-entry{display:none!important}
.adw-cart-locked-quantity{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:72px;
    min-height:38px;
    padding:6px 10px;
    border:1px solid #dfe5df;
    border-radius:10px;
    background:#f7f9f7;
    color:#123719;
    font-weight:800;
}

/* v2.26.8: variation-aware package-pricing state. */
.adw-variation-quantity-note{margin:12px 0 0;padding:10px 12px;border:1px dashed rgba(24,45,14,.28);border-radius:12px;background:#f7faf5;color:#53604d;font-size:13px;line-height:1.6}
