/*
 * sidecart.css — Shopping-Bag (side-cart) redesign
 * Figma: Do-Amore-Redesign_2025 node 12412:25214 (drawer 12419:32705 / 12419:33399)
 * Spec: /FIGMA-CART-REDESIGN.md
 *
 * Enqueued AFTER main.css so these rules override the legacy #sidecart block
 * (main.css ~1941-2375). Tokens come from main.css :root. Mobile-first; the
 * Figma 390px drawer values are the mobile base, drawer fixes to 390px ≥992px.
 *
 * Preserves every JS/AJAX hook documented in FIGMA-CART-REDESIGN.md §5.
 */

/* ============================================================= *
 * 1. DRAWER SHELL
 * ============================================================= */
div#sidecart {
    position: absolute;
    top: 0;
    right: -100%;
    z-index: 100000;
    width: 100vw;
    max-width: 100%;
    min-width: 0;
    height: calc(100vh - 81px);
    background: var(--pearl);
    border-left: 1px solid var(--onyx);
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    transition: right .25s ease;
    display: none;
    /* let the sticky footer pin to the bottom of the scroll area */
    display: none;
}
div#sidecart.open { right: 0; display: flex; flex-direction: column; }
div#sidecart::-webkit-scrollbar { display: none; }
.admin-bar div#sidecart { top: 32px; height: calc(100vh - 95px); }

/* Normalise box model for every button/CTA inside the drawer. The theme's
   legacy button classes (.button_jade/.button_secondary/.primary) ship
   `padding:15px` with content-box sizing; without this they inflate our
   fixed-height CTAs (~44px → ~74px) and read as "too big". */
#sidecart a[class*="button_"],
#sidecart button[class*="button"],
#sidecart button.primary,
#sidecart .dac_checkout,
#sidecart .rb_add_to_cart,
#sidecart .dac_pay_btn,
#sidecart .dac_empty_cta a,
#sidecart .cart_rebuild_submit { box-sizing: border-box; }

/* ---- Header (cognac title bar + promise bar) ---- */
.sidecart_header {
    position: relative;
    margin-top: 0;
    border-bottom: 0;
    flex: 0 0 auto;
}
.dac_titlebar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 48px;
    padding: 6px 24px;
    background: var(--cognac);
}
h2.sidecart_title {
    margin: 0;
    padding: 0;
    border: 0;
    font-family: 'Canela', serif;
    font-weight: 300;
    font-size: 24px;
    line-height: 30px;
    letter-spacing: -0.21px;
    text-transform: uppercase;
    text-align: left;
    color: var(--pearl);
}
h2.sidecart_title .dac_count { font-feature-settings: "tnum"; }
/* legacy injected "Cart" subtitle after ringbuilder — keep readable */
h2.sidecart_title.rb-cart-title {
    padding: 14px 0 0;
    color: var(--onyx);
    font-size: 18px;
}
#sidecart .cart_close {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    cursor: pointer;
}
#sidecart .cart_close svg { width: 18px; height: 18px; display: block; }
#sidecart .cart_close svg path { fill: var(--pearl); }

.dac_promise {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 0;
    padding: 4px 29px;
    background: var(--pearl);
    border-bottom: .5px solid var(--onyx);
}
/* size by the icon's natural aspect (~23.68×31) so there's no empty box padding */
.dac_promise_icon {
    flex: 0 0 auto;
    align-self: center;
    display: flex; align-items: center; justify-content: center;
    line-height: 0;
}
.dac_promise_icon img,
.dac_promise_icon svg { width: auto; height: 44px; display: block; }
.dac_promise p {
    margin: 0;
    font-size: 14px;
    line-height: 16px;
    letter-spacing: -0.21px;
    color: var(--cognac);
}

/* error notices */
.sidecart_error:empty { display: none; }
.sidecart_error .woocommerce-error {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--onyx);
    background: var(--pearl-dark);
    color: var(--onyx);
}

/* ---- Content scroll column ---- */
.sidecart_content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0 0;
}
.sidecart_cart { display: flex; flex-direction: column; gap: 20px; }
.cart_contents { display: flex; flex-direction: column; gap: 20px; }

/* shared content column inset (≈342 within 390) */
.dac_inset { padding-left: 24px; padding-right: 24px; }

/* ============================================================= *
 * 2. OFFERS — gift card
 * ============================================================= */
.dac_offers { padding: 0 24px; }
.dac_giftcard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 80px;
    padding: 0 10px;
    background: var(--pearl-dark);
    border-radius: 8px;
    filter: drop-shadow(0 1px .5px rgba(0,0,0,.3));
    text-decoration: none;
    color: var(--onyx);
}
.dac_giftcard, .dac_giftcard:hover, .dac_giftcard:focus,
.dac_giftcard:hover .dac_gc_head, .dac_giftcard:hover .dac_gc_sub { color: var(--onyx); text-decoration: none; }
.dac_giftcard_graphic { flex: 0 0 auto; width: 90px; height: 60px; line-height: 0; }
.dac_giftcard_graphic img { width: 90px; height: 60px; display: block; border-radius: 4px; }
.dac_giftcard_copy { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.dac_giftcard_copy .dac_gc_head { margin: 0; font-size: 16px; line-height: 19px; letter-spacing: -0.21px; color: var(--onyx); }
.dac_giftcard_copy .dac_gc_sub  { margin: 0; font-size: 14px; line-height: 14px; letter-spacing: -0.21px; color: var(--onyx-light); }
.dac_giftcard_chevron { flex: 0 0 auto; width: 14px; line-height: 0; }
.dac_giftcard_chevron svg, .dac_giftcard_chevron img { width: 14px; height: auto; display: block; }

/* ============================================================= *
 * 3. RING IN PROGRESS (ringbuilder)
 * ============================================================= */
.sidecart_ringbuilder {
    margin: 0 24px;
    padding: 0 10px 12px;
    border: 1px dashed var(--pearl-dark);
    border-radius: 8px;
    overflow: hidden;
}
.sidecart_ringbuilder .rb_progress,
.sidecart_ringbuilder .rb-progress-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    margin: 0;
    padding: 6px;
    border-bottom: 1px solid var(--pearl-dark);
    font-family: 'Canela', serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 19px;
    letter-spacing: -0.21px;
    text-transform: uppercase;
    color: var(--onyx);
}
.sidecart_ringbuilder .rb_setting,
.sidecart_ringbuilder .rb_stone {
    display: flex;
    gap: 12px;
    margin: 12px 0 0;
}
.sidecart_ringbuilder .setting_image img,
.sidecart_ringbuilder .stone_image img,
.sidecart_ringbuilder img { width: 130px; height: 130px; border-radius: 4px; object-fit: cover; }
.sidecart_ringbuilder .setting_info,
.sidecart_ringbuilder .stone_info { margin-left: 0; width: 100%; font-size: 14px; }
.sidecart_ringbuilder .setting_header,
.sidecart_ringbuilder .stone_header { display: flex; justify-content: space-between; }
.sidecart_ringbuilder .setting_title,
.sidecart_ringbuilder .stone_price_label {
    font-family: 'FoundersGrotesk'; font-weight: 500; font-size: 16px; color: var(--onyx);
}
.sidecart_ringbuilder .var_info { display: flex; justify-content: space-between; font-size: 14px; color: var(--onyx-light); margin-bottom: 2px; }
.sidecart_ringbuilder p.stone_title { margin: 12px 0 0; font-family: 'Canela',serif; font-weight:300; font-size:16px; }
/* "Add Ring to Bag" — solid jade primary (JS appends .button_jade; we must set BOTH
   bg and color or legacy .button_jade leaves jade-on-jade = invisible text). */
.sidecart_ringbuilder a.rb_add_to_cart,
.sidecart_ringbuilder a.rb_add_to_cart.button_jade {
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    height: 40px; margin-top: 12px; padding: 0 16px;
    background: var(--jade); border: 1px solid var(--jade); border-radius: 4px;
    font-size: 15px; letter-spacing: -0.3px; color: var(--pearl);
    text-align: center; text-decoration: none; text-transform: uppercase;
}
.sidecart_ringbuilder a.rb_add_to_cart:hover,
.sidecart_ringbuilder a.rb_add_to_cart.button_jade:hover {
    background: var(--tourmaline); border-color: var(--tourmaline); color: var(--jade);
}
.sidecart_ringbuilder .remove_ringbuilder.remove_text {
    float: right;
    width: 12px; height: 12px; margin: 9px 6px 0 0; padding: 0;
    border: 0; font-size: 0; color: transparent; cursor: pointer;
    background: url("../media/icons/cart-remove.svg") center / 12px no-repeat;
}
.dac_rb_helper { margin: 12px 0 0; font-size: 16px; line-height: 19px; text-align: center; color: var(--onyx); }

/* ============================================================= *
 * 4. CART PRODUCTS — bordered cards (composite group via sibling borders)
 * ============================================================= */
.sidecart_cart .cart_item { position: relative; border: 0; }
/* Hide the gift-card PRODUCT line item (the "lower" duplicate) — the .dac_offers
   promo above represents it, so only the one card shows. */
.sidecart_cart .cart_item.cart_gift_card { display: none; }

/* simple (non-composite) product = a card */
.sidecart_cart .cart_item:not(.composite_parent):not(.composite_child):not(.cart_item_extend) {
    margin: 0 24px;
    border: 1px solid var(--pearl-dark);
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(0,0,0,.4);
    overflow: hidden;
}
/* composite group: parent = top of card, children = body, last child = bottom */
.sidecart_cart .cart_item.composite_parent {
    margin: 0 24px -1px;
    border: 1px solid var(--pearl-dark);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.4);
    overflow: hidden;
}
.sidecart_cart .cart_item.composite_child {
    margin: 0 24px;
    border: 1px solid var(--pearl-dark);
    border-top: 0;
    border-bottom: 0;
}
/* last child of the composite run (any run length) closes the card.
   :has() picks "a composite_child with no composite_child immediately after it". */
.sidecart_cart .cart_item.composite_child:not(:has(+ .cart_item.composite_child)) {
    border-bottom: 1px solid var(--pearl-dark);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 1px rgba(0,0,0,.4);
}
/* fallback for engines without :has() — covers the common 1- and 2-child rings */
.sidecart_cart .cart_item.composite_parent + .composite_child:last-of-type,
.sidecart_cart .cart_item.composite_parent + .composite_child + .composite_child {
    border-bottom: 1px solid var(--pearl-dark);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 1px rgba(0,0,0,.4);
}
/* vertical gap between SEPARATE product cards — applied to each card-start
   (composite parent or simple item) except the first; composite children are
   excluded so they stay seamless inside their card. */
.sidecart_cart .cart_products > .cart_item:not(.composite_child):not(.cart_item_extend):not(:first-child) {
    margin-top: 18px;
}

.sidecart_cart_inner { position: relative; padding: 12px 10px; }
.composite_parent .sidecart_cart_inner { padding-bottom: 0; }
.composite_child  .sidecart_cart_inner { padding-top: 12px; }

/* card title bar (product type / name) — rendered for parent & simple items only */
.dac_card_title {
    width: auto;
    margin: 0 40px 0 6px;     /* leave room for the absolute remove icon */
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pearl-dark);
    font-family: 'Canela', serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 19px;
    letter-spacing: -0.21px;
    text-transform: uppercase;
    color: var(--onyx);
}
/* the in-flow product name is hidden on parent & simple cards (the title covers it);
   composite children keep their own name in the body row. */
.sidecart_cart .cart_item:not(.composite_child):not(.cart_item_extend) .item_info .product-name { display: none; }

/* item body: image left + details right */
.sidecart_cart .item_info { display: flex; gap: 12px; align-items: flex-start; padding-top: 12px; }
.composite_parent .product-thumbnail { display: none; }       /* parent has no image */
.composite_parent .item_info { padding-top: 0; }
.sidecart_cart .product-thumbnail img,
.sidecart_cart .product-thumbnail a img { width: 130px; height: 130px; border-radius: 4px; object-fit: cover; }
.sidecart_cart .product-metadata { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; }
.sidecart_cart .product-metadata .product-name { padding: 0; border: 0; }
.sidecart_cart .product-metadata .product-name p.h5 {
    width: auto;
    font-family: 'FoundersGrotesk'; font-weight: 500; text-transform: none;
    font-size: 16px; line-height: 16px; color: var(--onyx);
}
/* attribute lines (WC dl/dt/dd) → "Label:  value" */
.sidecart_cart .product-data { padding: 0; }
.sidecart_cart .product-data dl.variation,
.sidecart_cart dl.variation { margin: 0; }
.sidecart_cart dt {
    float: left; clear: both; width: auto; margin: 0 6px 0 0;
    font-family: 'FoundersGrotesk'; font-weight: 400; font-size: 14px; line-height: 19px;
    color: var(--onyx-light);
}
/* WooCommerce's cart-item-data.php already prints "<dt>Label:</dt>" with the colon. */
.sidecart_cart dd {
    float: none; width: auto; text-align: left; display: block;
    font-size: 14px; line-height: 19px; color: var(--onyx-light);
}
.sidecart_cart dd p { display: inline; margin: 0; font-size: 14px; line-height: 19px; color: var(--onyx-light); }
.sidecart_cart .product-data:after { content: ""; display: block; clear: both; }

/* metadata visual order to match Figma: name → price → attributes */
.sidecart_cart .product-metadata .product-name { order: 1; }
.sidecart_cart .product-metadata .product-price { order: 2; }
.sidecart_cart .product-metadata .product-data  { order: 3; }
.sidecart_cart .product-metadata .button_underline { order: 4; }

/* per-line price */
.sidecart_cart .product-price { display: flex; align-items: baseline; gap: 6px; clear: both; }
.sidecart_cart .product-price .price_amt { float: none; }
.sidecart_cart .product-price .price_amt p.h5 {
    margin: 0; font-family: 'FoundersGrotesk'; font-weight: 500; font-size: 18px; color: var(--onyx);
}
/* sub-item prices show just the amount (no "Price:" label), per design */
.sidecart_cart .product-metadata .product-price .price_label { display: none; }

/* composite total row = full-width row under the items: "Total" left, amount right */
.sidecart_cart_inner > .product-price {
    order: 0; justify-content: space-between; align-items: baseline;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pearl-dark);
}
.sidecart_cart_inner > .product-price .price_label { float: none; }
.sidecart_cart_inner > .product-price .price_label p {
    margin: 0; font-family: 'FoundersGrotesk'; font-weight: 400; font-size: 18px; color: var(--onyx);
}

/* remove ✕ — vertically centered on the card title line (box top + height match
   the title's padding-top: 12px + line-height: 19px), right-aligned in the card. */
.sidecart-remove { position: absolute; top: 12px; right: 12px; z-index: 2; }
.composite_child .sidecart-remove { display: none; }   /* one remove per card (on parent) */
.sidecart_cart a.remove_icon {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 19px; padding: 0; border: 0;
    font-size: 0; color: transparent; text-decoration: none;
    background: url("../media/icons/cart-remove.svg") center / 12px no-repeat;
}
.sidecart_cart a.remove_icon.remove_text { border: 0; }

/* dividers between sub-items inside a composite card */
.composite_parent .sidecart_cart_inner { position: relative; }

/* "What's included" / bundle link */
.button_underline.bundle_popup a { font-size: 14px; color: var(--onyx); text-decoration: underline; }

/* ---- Warranty / protection block (.extend_cart, populated by mulberry.js) ---- */
.extend_cart:empty { display: none; }
.extend_cart {
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pearl-dark);
    font-size: 16px; color: var(--onyx);
}
.extend_cart .extend_offer_lead { margin: 0 0 8px; line-height: 19px; }
.extend_cart .extend_offer_lead strong { font-weight: 500; }
.extend_cart .extend_offer_lead a { color: var(--onyx); text-decoration: underline; }
.extend_cart .extend_plans,
.extend_cart .mulberry-plans { display: flex; gap: 8px; }
.extend_cart .extend_plan,
.extend_cart .mulberry-plan {
    flex: 1 1 0; min-width: 0; height: 42px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 4px; background: var(--pearl-dark); cursor: pointer; text-align: center;
}
.extend_cart .extend_plan .term,
.extend_cart .mulberry-plan .term { font-size: 14px; line-height: 19px; color: var(--onyx-light); }
.extend_cart .extend_plan .price,
.extend_cart .mulberry-plan .price { font-size: 16px; line-height: 19px; color: var(--onyx); }
.extend_cart .extend_plan.selected,
.extend_cart .mulberry-plan.selected { background: var(--jade); }
.extend_cart .extend_plan.selected .term,
.extend_cart .extend_plan.selected .price,
.extend_cart .mulberry-plan.selected .term,
.extend_cart .mulberry-plan.selected .price { color: var(--tourmaline); }

/* qty stepper */
.dac_qty { display: flex; align-items: center; gap: 0; }
.dac_qty .dac_qty_label { font-size: 14px; color: var(--onyx); margin-right: 8px; }
.dac_qty .dac_qty_box {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 50px; height: 23px; padding: 2px 6px;
    border: 1px solid var(--pearl-dark); border-radius: 4px; font-size: 16px; color: var(--onyx);
}

/* ============================================================= *
 * 5. DELIVERY PROMISE + SUMMARY
 * ============================================================= */
.dac_summary_wrap { display: flex; flex-direction: column; gap: 10px; padding: 0 24px; }
.dac_promise_dates { display: flex; flex-direction: column; gap: 5px; }
.dac_promise_dates .dac_promise_line { margin: 0; font-size: 16px; line-height: 19px; letter-spacing: -0.21px; color: var(--onyx); }
.dac_promise_dates .dac_promise_line strong,
.dac_promise_dates .dac_countdown { font-weight: 500; color: var(--citrine); }
.dac_promise_dates .dac_dates { display: flex; gap: 21px; margin: 0; font-size: 16px; line-height: 19px; color: var(--onyx); }
.dac_promise_dates .dac_dates span strong { font-weight: 700; }

.cart_summary {
    background: #fff;
    border: 1px solid var(--pearl-dark);
    border-radius: 4px;
    padding: 16px 22px;
    /* uniform spacing between every row (subtotal / shipping / tax / divider / total) */
    display: flex; flex-direction: column; gap: 9px;
}
.cart_summary .dac_sum_row {
    display: flex; align-items: center; justify-content: space-between;
    margin: 0; font-size: 16px; line-height: 19px; letter-spacing: -0.21px; color: var(--onyx);
}
.cart_summary .dac_sum_row .dac_sum_label { display: flex; align-items: center; gap: 4px; }
.cart_summary .dac_sum_row .dac_info { width: 14px; height: 14px; line-height: 0; }
.cart_summary .dac_sum_row .dac_info img, .cart_summary .dac_sum_row .dac_info svg { width: 14px; height: 14px; display: block; }
.cart_summary .dac_sum_divider { height: 0; border-top: .5px solid var(--pearl-dark); margin: 0; }
.cart_summary .cart_subtotal { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.cart_summary .dac_sum_total { display: flex; align-items: center; justify-content: space-between; }
.cart_summary .dac_sum_total p { margin: 0; font-size: 21px; line-height: 21px; color: var(--onyx); }

/* ============================================================= *
 * 6. TRUST BAND
 * ============================================================= */
.dac_trust {
    display: flex; align-items: stretch; justify-content: center; gap: 9px;
    width: 100%; min-height: 134px; padding: 14px 24px;
    background: var(--pearl-dark);
}
.dac_trust .dac_trust_col {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 15px 6px; background: var(--pearl); border-radius: 4px;
}
.dac_trust .dac_trust_icon { width: 44px; height: 44px; line-height: 0; }
.dac_trust .dac_trust_icon img, .dac_trust .dac_trust_icon svg { width: 44px; height: 44px; display: block; }
.dac_trust .dac_trust_label { margin: 0; font-size: 14px; line-height: 16px; letter-spacing: -0.21px; color: #000; text-align: center; }

/* ============================================================= *
 * 7. REVIEWS (Swiper)
 * ============================================================= */
.cart_reviews { position: relative; border: 0; padding: 0 0 0 24px; }
.cart_reviews .dac_reviews_title { margin: 0 0 12px; font-family: 'Canela',serif; font-weight: 300; font-size: 21px; line-height: 19px; letter-spacing: -0.21px; color: var(--onyx); }
.cart_reviews_slider_container { width: 100%; height: auto; overflow: hidden; }
.cart_reviews_slider_container .swiper-wrapper { align-items: stretch; }
.cart_review_slide.swiper-slide {
    width: 244px; height: auto; padding: 14px 12px 12px;
    background: #fff; border-radius: 8px; font-family: 'FoundersGrotesk';
    display: flex; flex-direction: column; gap: 10px;
}
.cart_review_slide .slide_inner { display: flex; flex-direction: column; gap: 12px; }
.cart_review_header { display: flex; align-items: center; justify-content: space-between; }
.cart_review_header p { margin: 0; }
.cart_review_rating { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--citrine); }
.cart_review_rating svg, .cart_review_rating img { width: 13px; height: 12px; }
.cart_review_rating .dac_rating_num { font-weight: 500; font-size: 13px; color: var(--onyx-light); margin-left: 2px; }
.cart_review_quote { font-family: 'English1766', serif; font-style: italic; font-size: 15px; line-height: 18px; color: var(--onyx); margin: 0; }
.cart_review_text { font-size: 13px; line-height: 18px; color: var(--onyx-light); margin: 0; }
.cart_review_attr { font-size: 13px; line-height: 18px; color: var(--citrine); margin: 0; text-transform: uppercase; }
.g_review_icon svg, .g_review_icon img { height: 14px; width: auto; }
.cart_review-swiper-prev, .cart_review-swiper-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 9; cursor: pointer; }
.cart_review-swiper-prev { left: 6px; }
.cart_review-swiper-next { right: 6px; }
.cart_review-swiper-prev svg line, .cart_review-swiper-next svg line { stroke: var(--onyx); }

/* ============================================================= *
 * 8. SHARE BAG (= cart_rebuild_email form, restyled)
 * ============================================================= */
.cart_contact, .dac_share { padding: 0 24px; }
.dac_share .dac_share_title { margin: 0 0 7px; font-family: 'FoundersGrotesk'; font-weight: 500; font-size: 16px; line-height: 19px; letter-spacing: -0.21px; color: #000; }
.cart_rebuild_email { margin: 0; display: flex; align-items: stretch; justify-content: space-between; gap: 8px; }
input#cart_rebuild_email_form {
    flex: 1 1 auto; width: auto; min-width: 0; height: 42px; margin: 0;
    padding: 9px 14px; border: 1px solid var(--pearl-dark); border-radius: 4px;
    background: #fff; font-size: 16px; letter-spacing: -0.21px; color: var(--onyx);
}
input#cart_rebuild_email_form::placeholder { color: #797978; }
button.cart_rebuild_submit, .dac_share button.primary {
    box-sizing: border-box;
    flex: 0 0 78px; width: 78px; height: 40px; padding: 0; border: 0; border-radius: 4px;
    background: var(--jade); color: var(--pearl); font-size: 15px; text-transform: uppercase; cursor: pointer;
}
button.cart_rebuild_submit:hover, .dac_share button.primary:hover { background: var(--onyx); color: var(--pearl); }

/* ============================================================= *
 * 9. STICKY FOOTER (Estimated total + checkout + express + affirm + time)
 * ============================================================= */
.dac_footer {
    position: sticky; bottom: 0; z-index: 5;
    margin-top: 0;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 24px;
    background: #fff;
    border: 0; border-radius: 8px 8px 0 0;
    box-shadow: 0 -1px 4px rgba(0,0,0,.25);
}
/* footer content fills the padded area (even 24px inset on all sides) */
.dac_footer > * { width: 100%; }
.dac_footer .dac_foot_total.cart_subtotal { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.dac_footer .dac_foot_total .dac_foot_label { margin: 0; font-family: 'FoundersGrotesk'; font-weight: 700; font-size: 16px; letter-spacing: -0.21px; color: var(--onyx); }
.dac_footer .dac_foot_total .dac_foot_label .dac_foot_items { font-weight: 400; }
.dac_footer .dac_foot_total .dac_foot_amt { margin: 0; font-family: 'FoundersGrotesk'; font-weight: 700; font-size: 16px; color: var(--onyx); }
.dac_footer .cart_subtotal { display: flex; align-items: center; justify-content: space-between; margin: 0; }

.dac_footer a.button_secondary,
.dac_footer a.dac_checkout {
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    height: 44px; margin: 0; padding: 0 16px; border: 0; border-radius: 4px;
    background: var(--jade); color: var(--pearl);
    font-size: 15px; letter-spacing: -0.3px; text-transform: uppercase;
    text-align: center; text-decoration: none;
}
.dac_footer a.dac_checkout:hover { background: var(--onyx); color: var(--pearl); }

.dac_or { display: flex; align-items: center; gap: 8px; margin: 0; }
.dac_or:before, .dac_or:after { content: ""; flex: 1 1 auto; height: 0; border-top: .5px solid var(--pearl-dark); }
.dac_or span { font-size: 10px; line-height: 19px; color: var(--pearl-dark); }

/* Checkout is the full row (342 in the 390 spec); each express button is 163.45 wide
   with a 15.1 gap → 163.45/342 = 47.8% per button, 4.4% gap. % gap keeps the ratio at any width. */
.dac_express { display: flex; align-items: center; justify-content: center; gap: 4.4%; }
.dac_express .dac_pay_btn {
    box-sizing: border-box;
    flex: 1 1 0; min-width: 0; height: 44px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 4px; cursor: pointer; text-decoration: none;
}
.dac_express .dac_pay_apple { background: var(--onyx); }
/* the Apple Pay mark ships solid black; invert to white on the black button */
.dac_express .dac_pay_apple img { height: 19px; width: auto; filter: invert(1); }
.dac_express .dac_pay_paypal { background: #FFD140; }
.dac_express .dac_pay_paypal img { height: 19px; width: auto; }

/* Affirm financing line (.affirm-as-low-as widget container) — inline text so word
   spacing is preserved and the real Affirm widget's markup is untouched. */
.dac_footer p.affirm-as-low-as,
p.affirm-as-low-as {
    margin: 0; padding: 0; text-align: center;
    font-size: 14px; line-height: 20px; letter-spacing: -0.21px; color: var(--onyx-light);
}
.dac_footer p.affirm-as-low-as a { text-decoration: underline; color: var(--onyx-light); }
/* Affirm logo is a FONT-LIGATURE span (<span class="__affirm-logo">Affirm</span>),
   ~0.8em, vertical-align:baseline — NOT an image. It aligns with the text on its own,
   so we must NOT force display/height/width/vertical-align on it (doing so dropped it
   below the line). Leave Affirm's own inline rendering untouched. */

/* time / cutoff bar */
.dac_timebar {
    display: flex; align-items: center; justify-content: center; gap: 3px;
    height: 36px; padding: 8px 16px 10px; border-radius: 4px; background: var(--pearl);
    font-size: 14px; line-height: 19px; letter-spacing: -0.21px; color: var(--onyx);
    overflow: hidden; white-space: nowrap;
}
.dac_timebar p { margin-bottom: 0rem; margin-top: 0; }
.dac_timebar .dac_clock { width: 16px; height: 16px; line-height: 0; flex: 0 0 auto; }
.dac_timebar .dac_clock img, .dac_timebar .dac_clock svg { width: 16px; height: 16px; display: block; }
.dac_timebar strong { font-weight: 700; }
.dac_timebar .dac_urgent { font-weight: 500; color: var(--terracotta); }

/* admin rebuild link */
.cart_rebuild_link_admin { margin-top: 16px; text-align: center; font-size: 12px; }

/* ============================================================= *
 * 10. EMPTY STATE
 * ============================================================= */
/* Incomplete bag: while a ring is being built (ringbuilder shown, jQuery drops the
   inline display:none), hide the empty-cart state — no "empty" message, no tile links.
   The ring card + "Add Ring to Bag" is the only content in that state. */
.sidecart_content:has(.sidecart_ringbuilder:not([style*="none"])) .dac_empty { display: none; }

.dac_empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 24px 28px; text-align: center; }
.dac_empty .dac_empty_icon { line-height: 0; }
.dac_empty .dac_empty_icon img, .dac_empty .dac_empty_icon svg { width: auto; height: 56px; display: block; }
.dac_empty .dac_empty_title { margin: 0; font-family: 'Canela', serif; font-weight: 300; font-size: 24px; line-height: 28px; letter-spacing: -0.21px; text-transform: uppercase; color: var(--onyx); }
.dac_empty .dac_empty_text { margin: 0; max-width: 280px; font-size: 15px; line-height: 19px; color: var(--onyx-light); }

/* category tiles — image + dark scrim + white title (mirrors the bestsellers "View All" card).
   Phone card = 163×177 (2 cols within the 24px-inset drawer); aspect-ratio scales it up on desktop. */
.dac_empty_tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 6px; }
.dac_empty_tiles .dac_tile {
    position: relative; display: flex; align-items: flex-end;
    aspect-ratio: 163 / 177; padding: 12px; overflow: hidden; border-radius: 4px;
    background-color: var(--pearl-dark); background-size: cover; background-position: center;
    text-decoration: none;
}
.dac_empty_tiles .dac_tile::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 58%);
}
.dac_empty_tiles .dac_tile_title {
    position: relative; z-index: 1; text-align: left; color: #fff;
    font-family: 'Canela', serif; font-weight: 300; font-size: 16px; line-height: 18px; letter-spacing: -0.21px;
}

/* ============================================================= *
 * 11. RESPONSIVE
 * ============================================================= */
@media (min-width: 992px) {
    div#sidecart { width: 448px; max-width: 448px; min-width: 448px; }   /* was 390px — widened ~15% */
    .sidecart_header { margin-top: 0; }
}

/* neutralize a few legacy main.css sidecart rules that would leak */
.cart_da_callouts, .cart_callout, .cart_shipping { /* replaced by .dac_trust / .dac_timebar */ }
.cart_totals:not(.dac_footer) { padding: 0; border-bottom: 0; }
