/* ============================================================
   Bundle Enhance — Brassandwood UI polish
   High-specificity selectors + targeted !important to override the
   parent theme's global button / form styles.
   ============================================================ */

/* Reset surrounding wrapper */
body.page-product-bundle .fieldset.fieldset-bundle-options {
    padding: 0;
    border: none;
    background: transparent;
}

body.page-product-bundle .fieldset.fieldset-bundle-options legend.title {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ece6dc;
}

body.page-product-bundle .fieldset.fieldset-bundle-options legend.title span {
    font-size: 16px;
    font-weight: 600;
    color: #2b2316;
    letter-spacing: 0.3px;
}

/* Card */
body.page-product-bundle .fieldset-bundle-options .field.option {
    border: 1px solid #ece6dc !important;
    border-radius: 10px !important;
    padding: 16px 18px !important;
    margin-bottom: 12px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.02) !important;
    transition: box-shadow .2s ease, border-color .2s ease !important;
    position: relative !important;
}

body.page-product-bundle .fieldset-bundle-options .field.option:hover,
body.page-product-bundle .fieldset-bundle-options .field.option.bnw-active {
    border-color: #c8a96a !important;
    box-shadow: 0 3px 10px rgba(176,138,73,.12) !important;
}

/* Title */
body.page-product-bundle .fieldset-bundle-options .field.option > label.label {
    display: block !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    margin-bottom: 12px !important;
    color: #5d4416 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    padding: 0 !important;
}

body.page-product-bundle .fieldset-bundle-options .field.option > label.label > span {
    font-size: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
}

/* Required asterisk in gold */
body.page-product-bundle .fieldset-bundle-options .field.option.required > label.label::after {
    content: ' *';
    color: #c8a96a;
}

/* ROW LAYOUT: [thumb 64px LEFT] [dropdown CENTER] [qty 148px RIGHT] */
body.page-product-bundle .fieldset-bundle-options .field.option > .control {
    display: grid !important;
    grid-template-columns: 64px 1fr 148px !important;
    grid-template-rows: auto auto !important;
    grid-gap: 14px !important;
    align-items: center !important;
    width: 100% !important;
}

/* LEFT: thumbnail (rounded, smaller) */
body.page-product-bundle .fieldset-bundle-options .bnw-row-meta {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
    margin: 0 !important;
}

body.page-product-bundle .fieldset-bundle-options .bnw-row-meta .bnw-row-thumb {
    display: block !important;
    width: 64px !important;
    height: 64px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #efe9df !important;
    background: #fafafa !important;
    text-decoration: none !important;
    transition: border-color .15s, transform .15s !important;
}

body.page-product-bundle .fieldset-bundle-options .bnw-row-meta .bnw-row-thumb:hover {
    border-color: #c8a96a !important;
    transform: scale(1.04) !important;
}

body.page-product-bundle .fieldset-bundle-options .bnw-row-meta .bnw-row-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: inherit !important;
}

/* Hide thumb until selection */
body.page-product-bundle .fieldset-bundle-options .field.option:not(.bnw-active) .bnw-row-meta {
    visibility: hidden !important;
}

/* Empty placeholder square so the layout doesn't collapse */
body.page-product-bundle .fieldset-bundle-options .field.option:not(.bnw-active) .bnw-row-meta::after {
    content: '';
    visibility: visible;
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f9f4e8 0%, #f0e8d3 100%);
    border: 1px dashed #d8cdb8;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* Hide the 2nd link (we use thumb as the link) */
body.page-product-bundle .fieldset-bundle-options .bnw-row-meta .bnw-row-link {
    display: none !important;
}

/* CENTER: dropdown + small product name below */
body.page-product-bundle .fieldset-bundle-options .field.option > .control > select.bundle-option-select {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 42px !important;
    padding: 0 36px 0 14px !important;
    border: 1px solid #d8cdb8 !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    font-size: 14px !important;
    color: #2b2316 !important;
    cursor: pointer !important;
    transition: border-color .15s, box-shadow .15s !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%23876422' d='M6 8L0 0h12z'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 10px !important;
}

body.page-product-bundle .fieldset-bundle-options .field.option > .control > select.bundle-option-select:focus {
    outline: none !important;
    border-color: #c8a96a !important;
    box-shadow: 0 0 0 3px rgba(200,169,106,0.18) !important;
}

/* Hide the empty option-tier-prices block */
body.page-product-bundle .fieldset-bundle-options .field.option > .control > .option-tier-prices {
    display: none !important;
}

/* RIGHT: qty stepper, vertically centered */
body.page-product-bundle .fieldset-bundle-options .field.option > .control > .nested {
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
    margin: 0 !important;
}

body.page-product-bundle .fieldset-bundle-options .field.qty.qty-holder {
    margin: 0 !important;
}

body.page-product-bundle .fieldset-bundle-options .qty-holder > label.label {
    display: block !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: #88806e !important;
    margin-bottom: 6px !important;
    padding: 0 !important;
    font-weight: 500 !important;
}

body.page-product-bundle .fieldset-bundle-options .qty-holder > .control {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 148px !important;
    border: 1px solid #d8cdb8 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #fff !important;
    transition: border-color .15s !important;
    padding: 0 !important;
}

body.page-product-bundle .fieldset-bundle-options .field.option.bnw-active .qty-holder > .control {
    border-color: #c8a96a !important;
}

/* STEPPER buttons — use !important to beat theme global button styles */
body.page-product-bundle .fieldset-bundle-options .qty-holder button.bnw-stepper-btn {
    width: 38px !important;
    height: auto !important;
    min-height: 38px !important;
    border: none !important;
    border-radius: 0 !important;
    background: #f6f0e4 !important;
    color: #5d4416 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background .15s !important;
    font-weight: 600 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
}

body.page-product-bundle .fieldset-bundle-options .qty-holder button.bnw-stepper-btn:hover {
    background: #ebe1cc !important;
    color: #2b2316 !important;
}

body.page-product-bundle .fieldset-bundle-options .qty-holder button.bnw-stepper-btn:active {
    background: #ddd0a8 !important;
}

body.page-product-bundle .fieldset-bundle-options .qty-holder input.qty {
    flex: 1 !important;
    border: none !important;
    text-align: center !important;
    height: 38px !important;
    padding: 0 !important;
    background: #fff !important;
    font-weight: 600 !important;
    color: #2b2316 !important;
    font-size: 15px !important;
    -moz-appearance: textfield !important;
    min-width: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
body.page-product-bundle .fieldset-bundle-options .qty-holder input.qty::-webkit-outer-spin-button,
body.page-product-bundle .fieldset-bundle-options .qty-holder input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

body.page-product-bundle .fieldset-bundle-options .qty-holder input.qty.qty-disabled {
    color: #c8c0ad !important;
    background: #f7f4ed !important;
}

/* ============================================================
   Customizable bundle badge near product title
   ============================================================ */
body .bnw-bundle-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, #f6efde 0%, #ede1c4 100%) !important;
    color: #5d4416 !important;
    border: 1px solid #d8c692 !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.2 !important;
    width: fit-content !important;
    box-shadow: 0 1px 3px rgba(176,138,73,.15) !important;
}
body .bnw-bundle-badge::before {
    content: '\2728';
    font-size: 13px;
}

/* ============================================================
   "Your Customization" summary panel — small thumbs per line
   ============================================================ */
body.page-product-bundle .bnw-summary-thumb {
    display: inline-block !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #efe9df !important;
    background: #fafafa !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}
body.page-product-bundle .bnw-summary-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}
body.page-product-bundle .bnw-summary-line {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 8px 0 !important;
    line-height: 1.4 !important;
    font-size: 13px !important;
}
body.page-product-bundle .bnw-summary-line .bnw-summary-text {
    flex: 1 !important;
    min-width: 0 !important;
    color: #2b2316 !important;
}

/* Polish summary panel container */
body.page-product-bundle .block-bundle-summary,
body.page-product-bundle .bundle-summary {
    border-radius: 10px !important;
}

body.page-product-bundle .bundle-summary > .subtitle {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #5d4416 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    margin-bottom: 12px !important;
    display: block !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #ece6dc !important;
}

body.page-product-bundle .bundle-summary ul.bundle.items > li {
    padding: 8px 0 !important;
    border-bottom: 1px dashed #f0ebe0 !important;
}
body.page-product-bundle .bundle-summary ul.bundle.items > li:last-child {
    border-bottom: none !important;
}

body.page-product-bundle .bundle-summary ul.bundle.items > li > strong.label {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: #88806e !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 4px !important;
}

/* ============================================================
   Mobile (< 768 px): stack columns, qty full width below
   ============================================================ */
@media (max-width: 768px) {
    body.page-product-bundle .fieldset-bundle-options .field.option {
        padding: 12px !important;
    }

    body.page-product-bundle .fieldset-bundle-options .field.option > .control {
        grid-template-columns: 56px 1fr !important;
        grid-template-rows: auto auto !important;
        grid-gap: 10px !important;
    }

    body.page-product-bundle .fieldset-bundle-options .bnw-row-meta {
        grid-column: 1 !important;
        grid-row: 1 / span 1 !important;
    }
    body.page-product-bundle .fieldset-bundle-options .bnw-row-meta .bnw-row-thumb,
    body.page-product-bundle .fieldset-bundle-options .field.option:not(.bnw-active) .bnw-row-meta::after {
        width: 56px !important;
        height: 56px !important;
        border-radius: 10px !important;
    }

    body.page-product-bundle .fieldset-bundle-options .field.option > .control > select.bundle-option-select {
        grid-column: 2 !important;
        grid-row: 1 !important;
        height: 44px !important;
        font-size: 15px !important;
    }

    body.page-product-bundle .fieldset-bundle-options .field.option > .control > .nested {
        grid-column: 1 / span 2 !important;
        grid-row: 2 !important;
    }

    body.page-product-bundle .fieldset-bundle-options .qty-holder > .control {
        max-width: 180px !important;
    }

    body.page-product-bundle .fieldset-bundle-options .qty-holder button.bnw-stepper-btn {
        width: 48px !important;
        min-height: 44px !important;
        font-size: 20px !important;
    }

    body.page-product-bundle .fieldset-bundle-options .qty-holder input.qty {
        height: 44px !important;
        font-size: 16px !important;
    }
}
