/*
 * RinFire unified storefront skin.
 * Visual overrides only: ShopXO templates, data attributes and JavaScript hooks remain intact.
 */

body:is(
  .index-search-index,
  .index-goods-index,
  .index-cart-index,
  .index-buy-index,
  .index-order-index,
  .index-order-detail,
  .index-order-comments,
  .index-orderaftersale-index,
  .index-orderaftersale-detail,
  .index-orderaftersale-create,
  .index-useraddress-index,
  .index-usergoodsfavor-index,
  .index-usergoodsbrowse-index,
  .index-usergoodscomments-index,
  .index-userintegral-index,
  .index-personal-index,
  .index-safety-index,
  .index-center-index,
  [class^="index-user"],
  [class^="index-order"]
) {
  --color-main: var(--rf-color-brand);
  --color-price: #e96f00;
  --rf-shop-bg: #f4f4f2;
  --rf-shop-panel: #fff;
  --rf-shop-panel-alt: #f8f8f7;
  --rf-shop-ink: #1d1d1d;
  --rf-shop-muted: #6e6e6e;
  --rf-shop-line: #dededb;
  --rf-shop-radius: 16px;
  --rf-shop-radius-sm: 9px;
  background: var(--rf-shop-bg);
  color: var(--rf-shop-ink);
}

body:is(
  .index-search-index,
  .index-goods-index,
  .index-cart-index,
  .index-buy-index,
  .index-order-index,
  .index-order-detail,
  .index-order-comments,
  .index-orderaftersale-index,
  .index-orderaftersale-detail,
  .index-orderaftersale-create,
  .index-useraddress-index,
  .index-usergoodsfavor-index,
  .index-usergoodsbrowse-index,
  .index-usergoodscomments-index,
  .index-userintegral-index,
  .index-personal-index,
  .index-safety-index,
  .index-center-index,
  [class^="index-user"],
  [class^="index-order"]
) .am-container {
  max-width: 1180px;
}

/* Shared controls */
body:is([class*="index-"]) .am-btn-primary,
body:is([class*="index-"]) .am-btn-secondary,
body:is([class*="index-"]) .am-btn-warning,
body:is([class*="index-"]) .am-btn-danger,
body:is([class*="index-"]) .am-btn-success {
  border-radius: 999px !important;
  font-weight: 700;
  min-height: 40px;
  padding-inline: 22px;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

body:is([class*="index-"]) .am-btn-primary {
  background: var(--rf-color-brand) !important;
  border-color: var(--rf-color-brand) !important;
  color: #171717 !important;
}

body:is([class*="index-"]) .am-btn-primary:hover,
body:is([class*="index-"]) .am-btn-primary:focus,
body:is([class*="index-"]) .am-btn-primary:active {
  background: var(--rf-color-brand-hover) !important;
  border-color: var(--rf-color-brand-hover) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

body:is([class*="index-"]) .am-btn-primary-plain,
body:is([class*="index-"]) .am-background-white.am-border-main {
  background: #fff !important;
  border-color: var(--rf-color-brand) !important;
  color: #b75a00 !important;
}

body:is([class*="index-"]) :is(input, textarea, select).am-form-field,
body:is([class*="index-"]) .chosen-single {
  background: #fff;
  border: 1px solid #cfcfcb;
  border-radius: var(--rf-shop-radius-sm) !important;
  box-shadow: none;
  min-height: 42px;
}

body:is([class*="index-"]) :is(input, textarea, select).am-form-field:focus,
body:is([class*="index-"]) .chosen-container-active .chosen-single {
  border-color: var(--rf-color-brand) !important;
  box-shadow: 0 0 0 3px var(--rf-color-focus) !important;
}

body:is([class*="index-"]) .am-breadcrumb {
  color: var(--rf-shop-muted);
  font-size: 13px;
  margin: 18px auto;
  max-width: 1180px;
}

body:is([class*="index-"]) .am-breadcrumb a:hover { color: var(--rf-color-brand-hover); }

body:is([class*="index-"]) .am-pagination > li > a,
body:is([class*="index-"]) .am-pagination > li > span {
  align-items: center;
  background: #fff;
  border-color: var(--rf-shop-line);
  border-radius: 999px !important;
  color: var(--rf-shop-ink);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  margin: 0 3px;
  min-width: 38px;
}

body:is([class*="index-"]) .am-pagination > .am-active > a,
body:is([class*="index-"]) .am-pagination > .active > a {
  background: var(--rf-color-brand);
  border-color: var(--rf-color-brand);
  color: #171717;
}

body:is([class*="index-"]) .am-modal-dialog,
body:is([class*="index-"]) .am-popup-inner,
body:is([class*="index-"]) .am-dropdown-content {
  border-radius: var(--rf-shop-radius) !important;
  box-shadow: 0 22px 60px rgba(0,0,0,.18);
}

/* Catalog and search */
.index-search-index .search-container { padding-bottom: 72px; }
.index-search-index #search-map:not(.am-active) { margin-bottom: 16px; }
.index-search-index #search-map:not(.am-active) .am-offcanvas-bar {
  background: #fff;
  border: 1px solid var(--rf-shop-line);
  border-radius: var(--rf-shop-radius);
  box-shadow: none;
  color: var(--rf-shop-ink);
}

.index-search-index .map-item {
  border-color: var(--rf-shop-line) !important;
  padding: 10px 18px;
}

.index-search-index .map-item a {
  border-radius: 999px;
  color: #555;
  padding: 7px 13px;
}

.index-search-index .map-item a:hover,
.index-search-index .map-item .active a,
.index-search-index .map-item a.active {
  background: var(--rf-color-brand-soft);
  color: #aa5300;
}

.index-search-index .sort-nav {
  background: #fff !important;
  border: 1px solid var(--rf-shop-line);
  border-radius: var(--rf-shop-radius-sm);
  margin: 14px 0 26px;
  min-height: 48px;
  padding: 5px 10px;
}

.index-search-index .sort-nav li a { border-radius: 999px; color: #555; padding: 8px 14px; }
.index-search-index .sort-nav li.active a,
.index-search-index .sort-nav li a:hover { background: var(--rf-color-brand-soft); color: #a95100; }

.index-search-index .module-goods-grid-base > ul {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.index-search-index .module-goods-grid-base > ul::before,
.index-search-index .module-goods-grid-base > ul::after { display: none; }
.index-search-index .module-goods-grid-base > ul > li { float: none; padding: 0; width: auto !important; }

.index-search-index .module-goods-grid-base .item {
  background: var(--rf-shop-panel);
  border: 1px solid var(--rf-shop-line) !important;
  border-radius: var(--rf-shop-radius) !important;
  box-shadow: none;
  height: 100%;
  overflow: hidden;
  padding-bottom: 22px !important;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.index-search-index .module-goods-grid-base .item:hover {
  border-color: rgba(255,143,28,.55) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.09);
  transform: translateY(-3px);
}

.index-search-index .module-goods-grid-base .goods-info {
  align-items: center;
  background: #f8f8f7;
  display: flex;
  justify-content: center;
  min-height: 350px;
  overflow: hidden;
}

.index-search-index .module-goods-grid-base .goods-images {
  height: 320px;
  max-width: 90%;
  object-fit: contain;
  transition: transform 280ms ease;
  width: 100%;
}

.index-search-index .module-goods-grid-base .item:hover .goods-images { transform: scale(1.025); }
.index-search-index .module-goods-grid-base .goods-title { font-size: 17px; font-weight: 600; height: auto; line-height: 1.45; margin-top: 18px; padding-inline: 22px !important; }
.index-search-index .module-goods-grid-base .goods-title a { color: var(--rf-shop-ink); }
.index-search-index .module-goods-grid-base .price-content { padding: 10px 22px 0; }
.index-search-index .module-goods-grid-base .price strong,
.index-search-index .module-goods-grid-base .price { color: #e66d00; font-size: 21px; }

/* Product detail */
.index-goods-index .system-goods-detail { background: var(--rf-shop-bg); padding-bottom: 80px; }
.index-goods-index .system-goods-detail .item-inform {
  background: #fff;
  border: 1px solid var(--rf-shop-line);
  border-radius: 22px !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.06);
  margin-top: 24px;
  padding: 38px;
}

.index-goods-index .clearfix-left .box,
.index-goods-index .tb-booth {
  background: #f8f8f7;
  border: 0;
  border-radius: 16px !important;
}

.index-goods-index .tb-booth img { object-fit: contain; }
.index-goods-index #thumblist li { border: 1px solid var(--rf-shop-line); border-radius: 8px !important; overflow: hidden; }
.index-goods-index #thumblist li.tb-selected { border: 2px solid var(--rf-color-brand); }
.index-goods-index .detail-title { font-size: clamp(27px,3vw,40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.22; }
.index-goods-index .simple-desc { color: var(--rf-shop-muted); font-size: 15px; line-height: 1.7; }

.index-goods-index .tb-detail-panel-base,
.index-goods-index .tb-detail-panel-top-price-content {
  background: var(--rf-shop-panel-alt) !important;
  background-image: none !important;
  border: 1px solid var(--rf-shop-line);
  border-radius: 12px;
}

.index-goods-index .goods-sale-price-value { color: #e66d00; font-size: 30px; }
.index-goods-index .sku-line { border-color: #c9c9c5 !important; border-radius: 8px !important; padding: 3px !important; }
.index-goods-index .sku-line:hover { border-color: var(--rf-color-brand) !important; }
.index-goods-index .sku-line.selected { background: #fff5ea !important; border: 2px solid var(--rf-color-brand) !important; color: #9e4c00 !important; }
.index-goods-index .operate-number-container :is(button,input) { border-color: var(--rf-shop-line); min-height: 40px; }

.index-goods-index .buy-submit-container { display: flex; flex-wrap: wrap; gap: 12px; }
.index-goods-index .buy-submit-container .am-btn { border-radius: 999px !important; flex: 1 1 180px; font-size: 16px; min-height: 50px; }
.index-goods-index .buy-submit-container .am-btn-secondary { background: #fff !important; border: 2px solid var(--rf-color-brand) !important; color: #a65000 !important; }
.index-goods-index .introduce-main { margin-top: 28px; }
.index-goods-index .introduce-main .am-tabs-nav { border: 1px solid var(--rf-shop-line) !important; border-radius: 14px !important; padding: 7px 12px !important; }
.index-goods-index .introduce-main .am-tabs-nav > li > a { border: 0 !important; border-radius: 999px; font-weight: 600; padding: 12px 22px; }
.index-goods-index .introduce-main .am-tabs-nav > li.am-active > a { background: var(--rf-color-brand-soft); color: #a65000; }
.index-goods-index .introduce-main .am-tabs-bd { background: #fff; border: 1px solid var(--rf-shop-line); border-radius: 16px; margin-top: 12px; overflow: hidden; padding: 28px; }

/* Cart */
.index-cart-index .cart-content { margin-top: 30px; padding-bottom: 70px; }
.index-cart-index .cart-table,
.index-cart-index .cart-nav > .am-container {
  border: 1px solid var(--rf-shop-line);
  border-radius: var(--rf-shop-radius) !important;
  box-shadow: none;
}

.index-cart-index .cart-table { overflow: hidden; padding: 10px 22px 18px; }
.index-cart-index .cart-content table th { color: var(--rf-shop-muted); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.index-cart-index .cart-content table td { border-color: #ececea; }
.index-cart-index .goods-detail img { background: #f7f7f6; border: 0 !important; border-radius: 10px !important; object-fit: contain; }
.index-cart-index .goods-title { color: var(--rf-shop-ink); font-size: 15px; font-weight: 600; }
.index-cart-index .goods-title:hover { color: #a65000; text-decoration: none; }
.index-cart-index .stock-tag { border: 1px solid var(--rf-shop-line); border-radius: 999px; overflow: hidden; }
.index-cart-index .stock-tag :is(.am-input-group-label,.am-form-field) { background: #fff; border: 0; }
.index-cart-index .total-price-content,
.index-cart-index .nav-total-price { color: #e66d00 !important; font-size: 18px !important; }
.index-cart-index .cart-nav { margin-top: 18px; }
.index-cart-index .cart-nav > .am-container { padding-block: 14px; }
.index-cart-index .separate-submit { background: var(--rf-color-brand) !important; border-color: var(--rf-color-brand) !important; color: #171717 !important; min-height: 44px; padding-inline: 26px !important; }
.index-cart-index .mixed-tips { margin: 70px auto; }

/* Checkout */
.index-buy-index { background: var(--rf-shop-bg); }
.index-buy-index .buy-items,
.index-buy-index .address-container,
.index-buy-index .buy-nav,
.index-buy-index .business-list {
  border: 1px solid var(--rf-shop-line);
  border-radius: var(--rf-shop-radius) !important;
  box-shadow: none;
}

.index-buy-index .address-container,
.index-buy-index .buy-items { padding: 26px !important; }
.index-buy-index .buy-items h3,
.index-buy-index .address-container h3 { color: var(--rf-shop-ink); font-size: 18px; font-weight: 700; }
.index-buy-index .address-cart { border: 1px solid var(--rf-shop-line) !important; border-radius: 12px !important; }
.index-buy-index .address-cart:hover { border-color: rgba(255,143,28,.55) !important; }
.index-buy-index .address-cart.address-default { background: #fffaf4; border: 2px solid var(--rf-color-brand) !important; }
.index-buy-index .am-panel { border: 1px solid var(--rf-shop-line); border-radius: 12px; box-shadow: none; overflow: hidden; }
.index-buy-index .am-panel-hd { background: var(--rf-shop-panel-alt); border-color: var(--rf-shop-line); font-weight: 700; }
.index-buy-index table th { background: var(--rf-shop-panel-alt); color: var(--rf-shop-muted); font-size: 12px; }
.index-buy-index table td { border-color: #ececea; }
.index-buy-index .buy-nav { background: #fff; margin-bottom: 28px; padding: 18px 24px; }
.index-buy-index .buy-submit,
.index-buy-index .buy-submit-event { background: var(--rf-color-brand) !important; border-color: var(--rf-color-brand) !important; border-radius: 999px !important; color: #171717 !important; font-weight: 800; min-height: 48px; padding-inline: 30px; }
.index-buy-index .total-price { color: #e66d00 !important; font-weight: 800; }

/* Member, order and after-sale pages */
body:is(
  .index-order-index,
  .index-order-detail,
  .index-order-comments,
  .index-orderaftersale-index,
  .index-orderaftersale-detail,
  .index-orderaftersale-create,
  .index-useraddress-index,
  .index-usergoodsfavor-index,
  .index-usergoodsbrowse-index,
  .index-usergoodscomments-index,
  .index-userintegral-index,
  .index-personal-index,
  .index-safety-index,
  .index-center-index,
  [class^="index-user"],
  [class^="index-order"]
) .user-main {
  background: transparent !important;
  display: grid;
  gap: 22px;
  grid-template-columns: 220px minmax(0,1fr);
  margin-bottom: 78px;
  margin-top: 28px;
  padding: 0 !important;
}

body:is(
  .index-order-index,
  .index-order-detail,
  .index-order-comments,
  .index-orderaftersale-index,
  .index-orderaftersale-detail,
  .index-orderaftersale-create,
  .index-useraddress-index,
  .index-usergoodsfavor-index,
  .index-usergoodsbrowse-index,
  .index-usergoodscomments-index,
  .index-userintegral-index,
  .index-personal-index,
  .index-safety-index,
  .index-center-index,
  [class^="index-user"],
  [class^="index-order"]
) .user-sidebar {
  width: auto;
}

body:is(
  .index-order-index,
  .index-order-detail,
  .index-order-comments,
  .index-orderaftersale-index,
  .index-orderaftersale-detail,
  .index-orderaftersale-create,
  .index-useraddress-index,
  .index-usergoodsfavor-index,
  .index-usergoodsbrowse-index,
  .index-usergoodscomments-index,
  .index-userintegral-index,
  .index-personal-index,
  .index-safety-index,
  .index-center-index,
  [class^="index-user"],
  [class^="index-order"]
) .user-offcanvas-bar {
  background: #202020 !important;
  border: 1px solid #343434;
  border-radius: var(--rf-shop-radius) !important;
  color: #fff;
  padding: 16px 10px !important;
}

body:is([class*="index-"]) .user-sidebar-list > li > a,
body:is([class*="index-"]) .user-sidebar-sub li a {
  border-radius: 9px;
  color: rgba(255,255,255,.72);
  margin: 2px 0;
  padding-block: 10px;
}

body:is([class*="index-"]) .user-sidebar-list li.am-active > a,
body:is([class*="index-"]) .user-sidebar-list a:hover {
  background: rgba(255,143,28,.14) !important;
  color: var(--rf-color-brand) !important;
}

body:is([class*="index-"]) .user-content { padding-left: 0; }
body:is([class*="index-"]) .user-content-body {
  background: #fff !important;
  border: 1px solid var(--rf-shop-line);
  border-radius: var(--rf-shop-radius) !important;
  min-height: 430px;
  padding: 28px !important;
}

body:is([class*="index-"]) .user-content-body > h1,
body:is([class*="index-"]) .user-content-body .user-center-admin-nav {
  border-color: var(--rf-shop-line);
}

body:is([class*="index-"]) .user-content-body > h1 { font-size: 26px !important; letter-spacing: -.02em; margin-bottom: 24px; }
body:is([class*="index-"]) .user-center-admin-nav .am-active > a { border-color: var(--rf-color-brand); color: #a65000; }
body:is([class*="index-"]) .user-content-body .am-panel { border: 1px solid var(--rf-shop-line); border-radius: 12px; box-shadow: none; overflow: hidden; }
body:is([class*="index-"]) .user-content-body .am-panel-hd { background: var(--rf-shop-panel-alt); border-color: var(--rf-shop-line); font-weight: 700; }
body:is([class*="index-"]) .user-content-body table { border-collapse: separate; border-spacing: 0; }
body:is([class*="index-"]) .user-content-body table th { background: var(--rf-shop-panel-alt); color: var(--rf-shop-muted); font-size: 12px; font-weight: 600; }
body:is([class*="index-"]) .user-content-body table td { border-color: #ececea; }
body:is([class*="index-"]) .user-content-body .address-content { border: 1px solid var(--rf-shop-line); border-radius: 12px; box-shadow: none; }
body:is([class*="index-"]) .user-content-body .address-default .address-content { background: #fffaf4 !important; border: 2px solid var(--rf-color-brand); }
body:is([class*="index-"]) .user-content-body .price,
body:is([class*="index-"]) .user-content-body .am-color-main { color: #e66d00 !important; }

/* Status, alerts and empty states */
body:is([class*="index-"]) .am-alert { border: 0; border-radius: 10px; }
body:is([class*="index-"]) .am-alert-danger { background: #fff0ef; color: #a42b22; }
body:is([class*="index-"]) .am-alert-success { background: #edf8f0; color: #28663a; }
body:is([class*="index-"]) .not-data,
body:is([class*="index-"]) .mixed-tips { color: var(--rf-shop-muted); }
body:is([class*="index-"]) .am-badge { border-radius: 999px !important; font-weight: 600; }

@media (max-width: 900px) {
  .index-search-index .module-goods-grid-base .goods-info { min-height: 280px; }
  .index-search-index .module-goods-grid-base .goods-images { height: 250px; }
  .index-goods-index .system-goods-detail .item-inform { padding: 24px; }
}

@media (max-width: 640px) {
  body:is(
    .index-search-index,
    .index-goods-index,
    .index-cart-index,
    .index-buy-index,
    .index-order-index,
    .index-order-detail,
    .index-order-comments,
    .index-orderaftersale-index,
    .index-orderaftersale-detail,
    .index-orderaftersale-create,
    .index-useraddress-index,
    .index-usergoodsfavor-index,
    .index-usergoodsbrowse-index,
    .index-usergoodscomments-index,
    .index-userintegral-index,
    .index-personal-index,
    .index-safety-index,
    .index-center-index,
    [class^="index-user"],
    [class^="index-order"]
  ) .am-container { padding-inline: 14px; }

  .index-search-index .search-container { padding-bottom: 44px; }
  .index-search-index .module-goods-grid-base > ul { gap: 15px; grid-template-columns: 1fr; }
  .index-search-index .module-goods-grid-base .goods-info { min-height: 260px; }
  .index-search-index .module-goods-grid-base .goods-images { height: 235px; }
  .index-search-index .module-goods-grid-base .goods-title { font-size: 16px; }

  .index-goods-index .system-goods-detail { padding-bottom: 48px; }
  .index-goods-index .system-goods-detail .item-inform { border-radius: 0 !important; margin-top: 0; padding: 18px 14px; }
  .index-goods-index .detail-title { font-size: 26px; }
  .index-goods-index .buy-submit-container { gap: 8px; }
  .index-goods-index .buy-submit-container .am-btn { min-height: 46px; }
  .index-goods-index .introduce-main .am-tabs-bd { padding: 16px; }

  .index-cart-index .cart-content { margin-top: 15px; }
  .index-cart-index .cart-table { border-radius: 12px !important; padding: 4px 8px 12px; }
  .index-cart-index .goods-title { font-size: 13px; }
  .index-cart-index .cart-nav > .am-container { border-radius: 0 !important; padding-inline: 8px; }

  .index-buy-index .address-container,
  .index-buy-index .buy-items { border-radius: 12px !important; padding: 18px 14px !important; }
  .index-buy-index .buy-nav { border-radius: 0 !important; padding: 12px; }

  body:is(
    .index-order-index,
    .index-order-detail,
    .index-order-comments,
    .index-orderaftersale-index,
    .index-orderaftersale-detail,
    .index-orderaftersale-create,
    .index-useraddress-index,
    .index-usergoodsfavor-index,
    .index-usergoodsbrowse-index,
    .index-usergoodscomments-index,
    .index-userintegral-index,
    .index-personal-index,
    .index-safety-index,
    .index-center-index,
    [class^="index-user"],
    [class^="index-order"]
  ) .user-main {
    display: block;
    margin-top: 14px;
    padding-inline: 12px !important;
  }

  body:is([class*="index-"]) .user-content-body { border-radius: 12px !important; min-height: 0; padding: 18px 14px !important; }
  body:is([class*="index-"]) .user-content-body > h1 { font-size: 22px !important; }
  body:is([class*="index-"]) .user-menu { background: var(--rf-color-brand); color: #171717; }
}
