/* ==========================================================================
   GEMWISP V6.7 — header utility icons (account / bag)
   Only two things live here: the icon buttons in the header and their
   keyboard/contrast behaviour. Nothing in this file opens checkout.
   ========================================================================== */

.gw-util {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    margin-left: auto;
}

.gw-util__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 44×44：既有触摸最小尺寸，也不会把导航撑高 */
    width: 44px;
    height: 44px;
    color: #e3dfd5;
    text-decoration: none;
    border-radius: 2px;
    transition: color .2s ease, background-color .2s ease;
}

.gw-util__link svg {
    display: block;
    width: 21px;
    height: 21px;
    /* 古金线条，与卡背、按钮同一支金 */
    stroke: currentColor;
    fill: none;
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gw-util__link:hover,
.gw-util__link:focus-visible {
    color: #d9bc87;
    background: rgba(186, 154, 99, .1);
}

.gw-util__link:focus-visible {
    outline: 2px solid #d9bc87;
    outline-offset: 2px;
}

/* 数量角标：结构先留着，购物车为空时隐藏。
   当前是禁购状态，正常情况下它不会出现。 */
.gw-util__count {
    position: absolute;
    top: 6px;
    right: 5px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ba9a63;
    color: #14100b;
    font: 9px/1 Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

.gw-util__count[hidden] {
    display: none;
}

/* 首页导航压在海报上：图标颜色跟着浅色走，并靠顶部渐变保证对比度 */
.home .gw-util__link {
    color: #efe6d6;
}

/* 1.25px 的细线压在月亮/树叶这种高光区会糊掉，加一层极淡的投影把它"托"出来。
   不用描边、不加大按钮，只提高可辨识度。 */
.home .gw-util__link svg {
    filter: drop-shadow(0 1px 2px rgba(8, 12, 10, .85));
}

@media (max-width: 1050px) {
    /* 平板起 header-note 隐藏，图标自然接管右侧 */
    .gw-util {
        margin-left: auto;
    }
}

@media (max-width: 700px) {
    .gw-util {
        gap: 0;
        margin-left: auto;
    }

    .gw-util__link {
        /* 手机上同样给满 44×44，不为了挤一点间距牺牲点击区 */
        width: 44px;
        height: 44px;
    }

    .gw-util__link svg {
        width: 20px;
        height: 20px;
    }

    /* 手机上菜单按钮在最右，图标组紧挨在它左边 */
    .home .site-header .gw-util {
        margin-right: -6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gw-util__link {
        transition: none;
    }
}
