:root {
    --cqg-mc-green: #6f8f5f;
    --cqg-mc-pink: #c98699;
    --cqg-mc-gold: #d5ad67;
    --cqg-mc-text: #252525;
    --cqg-mc-muted: #727272;
    --cqg-mc-line: #e9e7e2;
    --cqg-mc-bg: #fff;
    --cqg-mc-radius: 22px;
}

.cqg-mc-floating {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2147482900;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--cqg-mc-green) 0%, var(--cqg-mc-pink) 52%, var(--cqg-mc-gold) 100%);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease;
}
.cqg-mc-floating:hover { transform: translateY(-2px); box-shadow: 0 15px 34px rgba(0,0,0,.22); }
.cqg-mc-floating__icon { display: inline-flex; align-items: center; justify-content: center; }
.cqg-mc-floating__icon svg { display: block; }
.cqg-mc-floating__count {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--cqg-mc-text);
    border: 2px solid var(--cqg-mc-gold);
    font-size: 12px;
    line-height: 19px;
    font-weight: 800;
    text-align: center;
}

.cqg-mc {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    pointer-events: none;
    visibility: hidden;
}
.cqg-mc.is-open { visibility: visible; pointer-events: auto; }
/* No backdrop/overlay: the garden idea must stay fully visible and undimmed. */
.cqg-mc__panel,
.cqg-mc__idea-panel {
    pointer-events: auto;
}

.cqg-mc__panel {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: min(400px, calc(100vw - 24px));
    background: var(--cqg-mc-bg);
    border-radius: var(--cqg-mc-radius);
    box-shadow: 0 22px 70px rgba(0,0,0,.28);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    transform: translateX(calc(100% + 30px));
    transition: transform .18s cubic-bezier(.2,.8,.2,1);
}
.cqg-mc.is-open .cqg-mc__panel { transform: translateX(0); }
.cqg-mc__mobile-handle { display: none; }

.cqg-mc__header {
    min-height: 64px;
    padding: 11px 14px 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--cqg-mc-green), var(--cqg-mc-pink), var(--cqg-mc-gold)) 1;
}
.cqg-mc__heading-wrap { min-width: 0; }
.cqg-mc__title { margin: 0; font-size: 20px; line-height: 1.15; color: var(--cqg-mc-text); }
.cqg-mc__return { border: 0; background: transparent; padding: 0 0 3px; color: var(--cqg-mc-green); font-size: 13px; font-weight: 700; cursor: pointer; }
.cqg-mc__header-actions { display: flex; align-items: center; gap: 7px; }
.cqg-mc__sync { width: 16px; height: 16px; opacity: 0; transition: opacity .12s ease; }
.cqg-mc.is-syncing .cqg-mc__sync { opacity: 1; border: 2px solid #dedbd4; border-top-color: var(--cqg-mc-green); border-radius: 50%; animation: cqgMcSpin .7s linear infinite; }
@keyframes cqgMcSpin { to { transform: rotate(360deg); } }
.cqg-mc__resize { display: none; }
.cqg-mc__close, .cqg-mc__resize {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #e4e1db;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 24px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cqg-mc__body { overflow-y: auto; overscroll-behavior: contain; padding: 5px 14px 12px; }
.cqg-mc__loading, .cqg-mc__error, .cqg-mc__empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--cqg-mc-muted); gap: 12px; }
.cqg-mc__empty-icon { font-size: 38px; }
.cqg-mc__continue { border: 0; background: #f3f2ef; border-radius: 999px; padding: 10px 16px; cursor: pointer; font-weight: 700; }

.cqg-mc__item {
    position: relative;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 11px;
    padding: 12px 0;
    border-bottom: 1px solid var(--cqg-mc-line);
}
.cqg-mc__item.is-updating { opacity: .72; }
.cqg-mc__thumb { display: block; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; background: #f5f5f2; }
.cqg-mc__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cqg-mc__item-main { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.cqg-mc__item-head { position: relative; min-height: 24px; padding-right: 26px; }
.cqg-mc__item-name { display: block; color: var(--cqg-mc-text) !important; text-decoration: none !important; font-weight: 750; font-size: 14px; line-height: 1.28; }
.cqg-mc__meta { margin-top: -2px; color: var(--cqg-mc-muted); font-size: 11.5px; line-height: 1.3; }
.cqg-mc__meta p { margin: 0; }
.cqg-mc__remove {
    position: absolute;
    top: -2px;
    right: 0;
    width: 23px !important;
    min-width: 23px !important;
    height: 23px !important;
    min-height: 23px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #f5f3f0 !important;
    color: #666 !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}
.cqg-mc__remove svg { display: block; pointer-events: none; }
.cqg-mc__item-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.cqg-mc__qty {
    display: inline-grid !important;
    grid-template-columns: 31px 38px 31px !important;
    align-items: center !important;
    height: 32px !important;
    border: 1px solid #dedbd4 !important;
    border-radius: 9px !important;
    overflow: hidden !important;
    background: #fff !important;
}
.cqg-mc__qty-btn {
    width: 31px !important;
    min-width: 31px !important;
    height: 31px !important;
    min-height: 31px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f7f6f3 !important;
    color: #333 !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}
.cqg-mc__qty-btn:hover { background: #efede8 !important; color: #222 !important; }
.cqg-mc__qty-btn svg { display: block !important; width: 16px !important; height: 16px !important; pointer-events: none; }
.cqg-mc__qty-value {
    width: 38px;
    height: 31px;
    border-left: 1px solid #eeeae4;
    border-right: 1px solid #eeeae4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    color: #222;
    background: #fff;
}
.cqg-mc__line-total { margin-left: auto; font-weight: 800; font-size: 14.5px; white-space: nowrap; color: var(--cqg-mc-text); }

.cqg-mc__footer { padding: 12px 14px 14px; border-top: 1px solid var(--cqg-mc-line); background: rgba(255,255,255,.98); box-shadow: 0 -8px 24px rgba(0,0,0,.04); }
.cqg-mc__footer-tools { display: flex; justify-content: flex-end; margin: -2px 0 5px; }
.cqg-mc__clear { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 3px 0 !important; margin: 0 !important; color: #7a716c !important; font-size: 12px !important; line-height: 1.2 !important; font-weight: 700 !important; text-decoration: underline !important; text-underline-offset: 3px; cursor: pointer; }
.cqg-mc__clear:hover { color: #a33f48 !important; }
.cqg-mc__clear:disabled { opacity: .55; cursor: wait; }
.cqg-mc__total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 15px; }
.cqg-mc__total-row strong { font-size: 20px; color: var(--cqg-mc-text); }
.cqg-mc__checkout { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 13px; text-decoration: none !important; color: #fff !important; font-weight: 800; letter-spacing: .01em; background: linear-gradient(90deg, var(--cqg-mc-green), var(--cqg-mc-pink), var(--cqg-mc-gold)); box-shadow: 0 9px 22px rgba(111,143,95,.18); }
.cqg-mc__checkout:hover { color: #fff !important; filter: brightness(.98); }

@media (max-width: 767px) {
    .cqg-mc-floating { width: 54px; height: 54px; right: 14px; bottom: 16px; }
    .cqg-mc__panel {
        top: auto;
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        height: 72dvh;
        max-height: 72dvh;
        border-radius: 22px 22px 18px 18px;
        transform: translateY(calc(100% + 18px));
        transition: transform .18s cubic-bezier(.2,.8,.2,1), height .18s ease, max-height .18s ease;
    }
    .cqg-mc.is-open .cqg-mc__panel { transform: translateY(0); }
    .cqg-mc.is-expanded .cqg-mc__panel { height: 78dvh; max-height: 78dvh; }
    .cqg-mc__mobile-handle { display: flex; height: 15px; align-items: center; justify-content: center; padding-top: 5px; }
    .cqg-mc__mobile-handle span { width: 44px; height: 4px; border-radius: 999px; background: #d8d5cf; }
    .cqg-mc__header { min-height: 52px; padding: 5px 10px 7px 13px; }
    .cqg-mc__title { font-size: 19px; }
    .cqg-mc__resize { display: inline-flex; font-size: 20px; }
    .cqg-mc__close { display: inline-flex; }
    .cqg-mc__body { padding: 3px 11px 10px; }
    .cqg-mc__footer { padding: 10px 11px 11px; }
    .cqg-mc__item { grid-template-columns: 58px minmax(0,1fr); gap: 9px; padding: 10px 0; }
    .cqg-mc__thumb { width: 58px; height: 58px; border-radius: 11px; }
    .cqg-mc__item-name { font-size: 13px; }
    .cqg-mc__item-controls { gap: 8px; }
    .cqg-mc__qty { grid-template-columns: 30px 36px 30px !important; height: 31px !important; }
    .cqg-mc__qty-btn { width: 30px !important; min-width: 30px !important; height: 30px !important; min-height: 30px !important; }
    .cqg-mc__qty-value { width: 36px; height: 30px; font-size: 13px; }
    .cqg-mc__line-total { font-size: 14px; }
}

@media (max-width: 390px) {
    .cqg-mc__panel { height: 72dvh; max-height: 72dvh; }
    .cqg-mc.is-expanded .cqg-mc__panel { height: 76dvh; max-height: 76dvh; }
}

/* v0.3.1 — idea + cart workspace, intentionally no backdrop/overlay */

.cqg-mc__panel {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.cqg-mc__content {
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.cqg-mc__body,
.cqg-mc__mobile-idea {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cqg-mc__body[hidden],
.cqg-mc__mobile-idea[hidden] {
    display: none !important;
}

.cqg-mc__idea-panel {
    position: absolute;
    top: 12px;
    right: 424px;
    bottom: 12px;
    width: min(338px, calc(100vw - 460px));
    min-width: 290px;
    background: #fff;
    border: 1px solid rgba(111,143,80,.18);
    border-radius: var(--cqg-mc-radius);
    box-shadow: 0 22px 70px rgba(0,0,0,.20);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateX(24px);
    opacity: 0;
    transition: transform .18s cubic-bezier(.2,.8,.2,1), opacity .15s ease;
}
.cqg-mc.is-open.has-idea-context .cqg-mc__idea-panel:not([hidden]) {
    transform: translateX(0);
    opacity: 1;
}

.cqg-mc__idea-head {
    min-height: 64px;
    padding: 11px 15px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--cqg-mc-green), var(--cqg-mc-pink), var(--cqg-mc-gold)) 1;
}
.cqg-mc__idea-kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--cqg-mc-muted);
    font-size: 10px;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 700;
}
.cqg-mc__idea-head h3 {
    margin: 0;
    color: var(--cqg-mc-text);
    font-size: 18px;
    line-height: 1.15;
}
.cqg-mc__idea-count {
    color: var(--cqg-mc-muted);
    font-size: 12px;
    white-space: nowrap;
}
.cqg-mc__idea-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 6px 12px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cqg-mc__idea-items {
    display: flex;
    flex-direction: column;
}
.cqg-mc__idea-item {
    position: relative;
    display: grid;
    grid-template-columns: 24px 56px minmax(0,1fr);
    gap: 8px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid var(--cqg-mc-line);
}
.cqg-mc__idea-item:last-child { border-bottom: 0; }
.cqg-mc__idea-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--cqg-mc-green);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
}
.cqg-mc__idea-thumb {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f2;
}
.cqg-mc__idea-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cqg-mc__idea-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.cqg-mc__idea-name {
    color: var(--cqg-mc-text) !important;
    text-decoration: none !important;
    font-size: 12.5px;
    line-height: 1.25;
    font-weight: 750;
}
.cqg-mc__idea-price {
    color: var(--cqg-mc-text);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}
.cqg-mc__idea-action { margin-top: 2px; }
.cqg-mc__idea-add {
    min-height: 30px !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: var(--cqg-mc-green) !important;
    color: #fff !important;
    box-shadow: none !important;
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    cursor: pointer;
}
.cqg-mc__idea-add:hover { background: #587546 !important; }
.cqg-mc__idea-add:disabled { opacity: .6; cursor: wait; }
.cqg-mc__idea-in-cart {
    display: inline-flex;
    gap: 3px;
    align-items: baseline;
    color: var(--cqg-mc-green);
    font-size: 10.5px;
    line-height: 1.25;
    font-weight: 700;
}
.cqg-mc__idea-unavailable {
    color: #8a6b63;
    font-size: 10.5px;
    font-weight: 700;
}

.cqg-mc__tabs {
    padding: 8px 10px 0;
    gap: 6px;
    grid-template-columns: 1fr 1fr;
    background: #fff;
}
.cqg-mc__tabs[hidden] { display: none !important; }
.cqg-mc__tab {
    min-height: 38px !important;
    padding: 7px 8px !important;
    margin: 0 !important;
    border: 1px solid #e6e2da !important;
    border-radius: 10px !important;
    background: #f7f6f3 !important;
    color: #4d514a !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    cursor: pointer;
}
.cqg-mc__tab.is-active {
    border-color: rgba(111,143,80,.45) !important;
    background: #eef4e9 !important;
    color: #4c653c !important;
}

@media (min-width: 1101px) {
    .cqg-mc__tabs,
    .cqg-mc__mobile-idea { display: none !important; }
}

@media (max-width: 1100px) {
    .cqg-mc__idea-panel { display: none !important; }
    .cqg-mc.has-idea-context .cqg-mc__tabs:not([hidden]) { display: grid; }
    .cqg-mc__mobile-idea { padding: 5px 12px 12px; }
    .cqg-mc__mobile-idea .cqg-mc__idea-item {
        grid-template-columns: 24px 54px minmax(0,1fr);
    }
    .cqg-mc.is-idea-tab .cqg-mc__footer { display: none !important; }
}

@media (max-width: 767px) {
    .cqg-mc__tabs { padding: 6px 9px 0; }
    .cqg-mc__tab { min-height: 35px !important; font-size: 10.5px !important; }
    .cqg-mc__mobile-idea { padding: 3px 10px 10px; }
    .cqg-mc__mobile-idea .cqg-mc__idea-item {
        grid-template-columns: 22px 50px minmax(0,1fr);
        gap: 7px;
        padding: 8px 0;
    }
    .cqg-mc__mobile-idea .cqg-mc__idea-thumb { width: 50px; height: 50px; }
    .cqg-mc__mobile-idea .cqg-mc__idea-name { font-size: 12px; }
    .cqg-mc__mobile-idea .cqg-mc__idea-add { font-size: 10px !important; }
}

/* v0.3.2 — mobile idea/cart panes are mutually exclusive, opaque and non-overlapping. */
.cqg-mc__content{
    background:#fff!important;
    isolation:isolate;
    position:relative;
    z-index:1;
}
.cqg-mc__body,
.cqg-mc__mobile-idea{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    max-width:100%;
    background:#fff!important;
    opacity:1!important;
    visibility:visible;
    z-index:1;
    overflow-y:auto;
    overflow-x:hidden;
}
.cqg-mc__body[hidden],
.cqg-mc__mobile-idea[hidden]{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
}
.cqg-mc__tabs{
    position:relative;
    z-index:3;
    background:#fff!important;
    overflow:hidden;
}
.cqg-mc__header,
.cqg-mc__footer{
    position:relative;
    z-index:4;
    background:#fff!important;
}
@media (max-width:767px){
    /* mobile-handle + header + tabs + content + footer = five real grid rows */
    .cqg-mc__panel{
        grid-template-rows:15px auto auto minmax(0,1fr) auto!important;
        background:#fff!important;
        isolation:isolate;
    }
    .cqg-mc__mobile-handle{position:relative;z-index:5;background:#fff!important;}
    .cqg-mc__tabs{min-height:41px;flex:0 0 auto;}
    .cqg-mc__content{min-height:0!important;overflow:hidden!important;}
    .cqg-mc__body,
    .cqg-mc__mobile-idea{padding-top:6px!important;}
}


/* v0.3.3 — keep cart content in its own grid row even when the idea tabs are hidden.
   Without explicit grid placement, hidden tabs make content/footer shift upward and the
   footer consumes the flexible row, leaving the cart items visually missing after refresh. */
@media (min-width:768px){
    .cqg-mc__header{grid-row:1;}
    .cqg-mc__tabs{grid-row:2;}
    .cqg-mc__content{grid-row:3;}
    .cqg-mc__footer{grid-row:4;}
}
@media (max-width:767px){
    .cqg-mc__mobile-handle{grid-row:1;}
    .cqg-mc__header{grid-row:2;}
    .cqg-mc__tabs{grid-row:3;}
    .cqg-mc__content{grid-row:4;}
    .cqg-mc__footer{grid-row:5;}
}
