/* ==========================================================================
   Header cart icon (mobile) + slide-out mini cart — 2026-10-30
   ========================================================================== */
.galosom-mobile-cart { display: none; }

.galosom-cart-link .galosom-cart-count,
.galosom-mobile-cart .galosom-cart-count {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) {
    .galosom-header-inner {
        grid-template-columns: minmax(0, 1fr) auto auto;
        column-gap: 6px;
    }
    .galosom-mobile-cart {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        color: #1f1f1f;
        -webkit-tap-highlight-color: transparent;
    }
    .galosom-mobile-cart svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .galosom-mobile-cart .galosom-cart-count {
        position: absolute;
        top: 5px;
        right: 2px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--galosom-header-gold, #a8864a);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 17px;
        text-align: center;
        box-sizing: border-box;
    }
    .galosom-mobile-cart .galosom-cart-count:empty { display: none; }
    /* the cart icon already sits next to the hamburger: hide the duplicate inside the open menu */
    .galosom-site-header .galosom-header-actions > a.galosom-cart-link { display: none !important; }
}

.galosom-cart-count.is-bump { animation: galosom-cc-bump .45s ease; }
@keyframes galosom-cc-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- drawer ---------- */
.gmc-overlay {
    position: fixed;
    inset: 0;
    z-index: 100040;
    background: rgba(17, 17, 17, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
}
.gmc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100041;
    width: min(420px, 100vw);
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #111;
    box-shadow: -12px 0 40px rgba(0, 0, 0, .12);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    font-size: 15px;
}
[dir="rtl"] .gmc-drawer { right: auto; left: 0; transform: translateX(-100%); box-shadow: 12px 0 40px rgba(0,0,0,.12); }
html.gmc-open .gmc-overlay { opacity: 1; visibility: visible; }
html.gmc-open .gmc-drawer { transform: none; }
.gmc-drawer:focus { outline: none; }
html.gmc-open, html.gmc-open body { overflow: hidden; }

.gmc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #ece7dd;
}
.gmc-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.gmc-title small { font-size: 13px; font-weight: 400; letter-spacing: 0; color: #777; margin-inline-start: 6px; }
.gmc-close {
    width: 40px; height: 40px; margin-inline-end: -10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none !important; border: 0; padding: 0; color: #111 !important; cursor: pointer;
}
.gmc-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; }

.gmc-added {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: #f6f1e7;
    color: #6d5428;
    font-size: 13px;
    font-weight: 600;
}
.gmc-added svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.gmc-drawer.is-added .gmc-added { display: flex; }

.gmc-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 20px; -webkit-overflow-scrolling: touch; }
.gmc-drawer.is-busy .gmc-body { opacity: .55; pointer-events: none; }

.gmc-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid #f0ece4;
}
.gmc-item:last-child { border-bottom: 0; }
.gmc-thumb { display: block; width: 84px; height: 84px; background: #f7f5f1; border-radius: 6px; overflow: hidden; }
.gmc-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gmc-name { display: block; color: #111 !important; text-decoration: none !important; font-size: 14px; font-weight: 500; line-height: 1.4; margin-bottom: 4px; }
.gmc-meta { font-size: 12px; color: #777; margin-bottom: 4px; }
.gmc-price { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.gmc-price del { color: #999; font-size: 12px; }
.gmc-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.gmc-qty { display: inline-flex; align-items: center; border: 1px solid #ddd6c9; border-radius: 4px; height: 36px; }
.gmc-qty button {
    width: 34px; height: 34px; padding: 0; border: 0; background: none !important; color: #111 !important;
    font-size: 17px; line-height: 1; cursor: pointer;
}
.gmc-qty button:disabled { color: #ccc !important; cursor: default; }
.gmc-qty span { min-width: 26px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.gmc-remove {
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    background: none !important; border: 0; padding: 0; color: #888 !important; cursor: pointer;
}
.gmc-remove:hover { color: #111 !important; }
.gmc-remove svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.gmc-empty { text-align: center; padding: 56px 10px; color: #555; }
.gmc-empty svg { width: 46px; height: 46px; stroke: #b8934b; stroke-width: 1.2; fill: none; margin-bottom: 14px; }
.gmc-empty p { margin: 0 0 22px; }

.gmc-foot { padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid #ece7dd; background: #fff; }
.gmc-sub { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; font-weight: 600; }
.gmc-note { margin: 6px 0 14px; font-size: 12px; color: #777; }
.gmc-btn {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px;
    border-radius: 4px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    text-decoration: none !important; box-sizing: border-box; cursor: pointer;
}
.gmc-btn--primary { background: #111 !important; color: #fff !important; border: 1px solid #111; }
.gmc-btn--primary:hover { background: #2b2620 !important; }
.gmc-btn--ghost { margin-top: 10px; min-height: 46px; background: #fff !important; color: #111 !important; border: 1px solid #d9d2c4; }
.gmc-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 12px; color: #888; }
.gmc-secure svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.gmc-drawer.is-empty .gmc-foot { display: none; }

.single_add_to_cart_button.is-loading { opacity: .7; pointer-events: none; }

/* "adding…" state: drawer opens immediately, spinner until the Store API answers (2026-10-31) */
.gmc-drawer.is-adding .gmc-body { position: relative; min-height: 160px; opacity: 1; }
.gmc-drawer.is-adding .gmc-body::after {
    content: "";
    position: absolute;
    top: 60px;
    left: 50%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    border: 2px solid #e8e1d4;
    border-top-color: #b8934b;
    border-radius: 50%;
    animation: gmc-spin .8s linear infinite;
}
.gmc-drawer.is-adding .gmc-body > * { opacity: .35; }
.gmc-drawer.is-adding .gmc-foot { opacity: .5; pointer-events: none; }
@keyframes gmc-spin { to { transform: rotate(360deg); } }
