/* ==========================================================================
   本地化定制：隐藏「登录 / 账户」与「购物车 / 加入购物车」交互
   - 原站主题 HTML / CSS 一律保持原样，这里只用 CSS 隐藏对应控件。
   - 想恢复原状：删除 base.html 里对本文件的 <link> 即可，零残留。
   - 本文件独立、不被 tools/harvest_theme.py 覆盖，可安全重复生成主题。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) 账户 / 登录入口
   - 桌面 header 的用户图标  -> https://account.svakom.com/orders
   - 页脚“登录”链接          -> https://account.svakom.com/orders?...
   - 移动端抽屉“登入”        -> /customer_authentication/redirect?...
   -------------------------------------------------------------------------- */
a[href*="account.svakom.com"],
a[href*="customer_authentication"] {
  display: none !important;
}
/* 页脚与移动抽屉里，登录项被 <li> 包着——连 <li> 一起收起，避免留空洞 */
li:has(> a[href*="account.svakom.com"]),
li:has(> a[href*="customer_authentication"]) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   2) 购物车入口图标（header 右上角）
   -------------------------------------------------------------------------- */
a[data-icon="cart"],
a.js-drawer-open-cart {
  display: none !important;
}

/* --------------------------------------------------------------------------
   3) 「加入购物车」按钮
   覆盖：首页 tab / 集合页 / 搜索页 / 相关商品的商品卡片、
        商品详情页、以及购物车页里的加购表单（均指向 /cart/add/）。
   - 先隐藏表单本身（即使浏览器不支持 :has 也生效）；
   - 再把直接包住表单的容器收起，避免按钮位置留白。
   -------------------------------------------------------------------------- */
form[action*="cart/add"] {
  display: none !important;
}
div:has(> form[action*="cart/add"]) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   4) 购物车抽屉（入口已移除，抽屉本身也强制不显示，防止残留遮罩）
   -------------------------------------------------------------------------- */
#CartDrawer {
  display: none !important;
}
