﻿* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*:before,
*:after {
  box-sizing: border-box;
}

a {
  display: block;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  border: 0;
}

table img {
  max-width: 100%;
}

section {
  display: block;
}

body {
  font-size: 14px;
  font-family: PingFangTC-regular, Roboto, "LiHei Pro", "Source Han Sans TC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft JhengHei",
    sans-serif;
}

/* rwd title */
.header__wrap.header--show {
  background: #fff;
}

.header__info {
  margin: 0 auto;
  max-width: 960px;
  height: 55px;
  background: #fff;
  padding: 5px;
}

.header__info--sm {
  max-width: 960px;
}

.header__wrap :after {
  clear: both;
  content: "";
  display: block;
  overflow: auto;
}

.community__ico {
  float: right;
}

.header__ico {
  float: left;
}

.header__ico img {
  height: 45px;
  width: auto;
  padding-left: 5px;
}

.bg-line a {
  width: 35px;
  height: 35px;
  background: url("https://www.etmall.com.tw/XML/content/DMSetting/Final/209901/SP_1106167/line.jpg")
    no-repeat;
  background-size: 35px, 35px;
  border-radius: 5px;
}

.bg-facebook a {
  width: 35px;
  height: 35px;
  background: url("https://www.etmall.com.tw/XML/content/DMSetting/Final/209901/SP_1106167/facebook.jpg")
    no-repeat;
  background-size: 35px, 35px;
}

.community__ico li {
  display: inline-block;
  cursor: pointer;
  line-height: 40px;
  margin-top: 4px;
  margin-right: 5px;
}

.community__ico li.bg-line {
  display: none;
}

@media screen and (max-width: 768px) {
  .community__ico li.bg-line {
    display: inline-block;
  }
}

/* margin 調整 */
.margin-top-sm {
  margin-top: 2%;
}

.margin-bottom-sm {
  margin-bottom: 2%;
}

.margin-bottom-md {
  margin-bottom: 4%;
}

.margin-bottom-lg {
  margin-bottom: 8%;
}

/* build & item */
.layout--main {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.build__wrap .item__wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
}

/* ===== RWD 768 ===== */
@media screen and (min-width: 960px) {
  .build__wrap .item__wrap {
    padding-left: 0;
    padding-right: 0;
  }
}

.build__wrap {
  display: flex;
  flex-wrap: wrap;
  /* 過渡期先將此設定各自放在新宮格裡 */
  /* justify-content: space-between; */

  /* 舊宮格樣式 */
  justify-content: space-around;
}

.build__item {
  width: calc(50% - 5px);
  margin-bottom: 10px;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 20%);
  overflow: hidden;
  transition: all 0.16s;
}

/* hover float */
.build__item.hover--float-sm:active,
.build__item.hover--float-sm:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4.5px 0 rgb(0 0 0 / 25%);
}

/* hover scale */
.build__item.hover--scale-xs:active,
.build__item.hover--scale-xs:hover {
  transform: scale(1.03);
}

.build__item.hover--scale-sm:active,
.build__item.hover--scale-sm:hover {
  transform: scale(1.05);
}

/* ===== RWD 960 ===== */
@media screen and (min-width: 960px) {
  .build__item {
    width: calc(25% - 7.5px);
  }
}

.build__item a {
  color: #5d5d5d;
}

.item__pic {
  position: relative;
  z-index: 0;
  padding-top: 100%;
  overflow: hidden;
}

.item__img {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
}

.item__info {
  padding: 2%;
}

.item__push {
  width: 100%;
  height: 28px;
  text-align: center;
}

.item__push span {
  position: relative;
  z-index: 0;
  display: block;
  max-height: 28px;
  margin: 0 3%;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 200%;
  color: #cc1e05;
  font-weight: bold;
  overflow: hidden;
}

.item__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  height: 36px;
  line-height: 120%;
  font-size: 15px;
  overflow: hidden;
}

.item__price span:last-child {
  color: #cc1e05;
  font-size: 22px;
}

/* ===== build__banner--1 (750x328) ===== */
.build__banner--1 {
  position: relative;
  width: 100%;
  text-align: center;
  border: 0;
}

.build__banner--1 .item__pic {
  width: 100%;
  /* banner 高(328) / 寬(750) 計算 padding-top*/
  padding-top: 43.4%;
  margin-top: 0;
}

.build__banner--1 .item__pic img {
  left: 50%;
  transform: translateX(-50%);
}

/* ===== build__banner--2 (630x940) ===== */
.build__banner--2 {
  position: relative;
  width: calc(50% - 5px);
  text-align: center;
  border: 0;
}

@media screen and (min-width: 960px) {
  .build__banner--2 {
    position: relative;
    width: calc(25% - 7.5px);
    text-align: center;
    border: 0;
  }
}

.build__banner--2 .item__pic {
  width: 100%;
  /* banner 高(940) / 寬(630) 計算 padding-top*/
  padding-top: 149%;
  margin-top: 0;
}

.build__banner--2 .item__pic img {
  left: 50%;
  transform: translateX(-50%);
}

/* ===== build__banner--3 (正方形圖片) ===== */
.build__banner--3 {
  text-align: center;
  background-color: #626483;
  border: 0;
  box-shadow: none;
}

/* ===== build__banner--4 (470x315) ===== */
.build__banner--4 {
  position: relative;
  text-align: center;
  border: 0;
  box-shadow: none;
}

/* ===== banner__hover ===== */
.banner__hover {
  cursor: pointer;
  transition: 0.2s !important;
}

.banner__hover:active,
.banner__hover:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 2px 4.5px 0 rgb(0 0 0 / 25%) !important;
  filter: brightness(1.05) !important;
}

/* ===== item__price ===== */
.item__price span {
  display: inline-flex;
  height: 20px;
  line-height: 20px;
}

.item__price .price-original {
  text-decoration: line-through;
  color: #999;
}

.item__price .price-t {
  margin-left: 0;
  max-width: 44px;
  overflow: hidden;
}

.item__price .price-unit {
  max-width: 44px;
  overflow: hidden;
}

.item__price .price-t,
.item__price .price-symbol,
.item__price .price-unit {
  color: #cc1e05 !important;
  font-weight: 400;
  font-size: 14px;
}

/* ===== border__arrow--right ===== */
.item--1b4s .border__arrow--right {
  position: relative;
  z-index: 0;
  display: inline-block;
  overflow: hidden;
  cursor: pointer;
  width: 15px;
  height: 15px;
}

.item--1b4s .border__arrow--right::after {
  transform: rotate(-45deg);
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  z-index: 1;
  width: 60%;
  height: 60%;
  margin-top: 2px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0.75;
}

/* ===== animation setting start ===== */
.build__wrap.wow {
  animation: 0.5s bounce-in-left both;
}

@keyframes bounce-in-left {
  from {
    transform: translateX(-30%);
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bounce-in-left-top {
  from {
    transform: translate(-50%, 0);
  }

  to {
    transform: translate(0, 0);
  }
}
/* ===== animation setting end ===== */

/* banner 表頭 */
.title__wrap {
  max-width: 960px;
  margin: 0.5% auto;
  padding: 0;
}

.title__wrap__img {
  margin: 0;
  height: 65px;
  border: 0;
  background: 50% 0% / auto auto no-repeat;
}
/* banner 表頭 end */

/* ===== item__push & item__btn background-color start ===== */
.item__btn {
  position: relative;
  display: none;
  justify-content: center;
  align-items: center;
  letter-spacing: 0.5px;
}

.item__btn.btn__solid {
  border-radius: 2px;
}

.item__btn.btn__rounded--right {
  border-radius: 4px 20px 20px 4px;
}

.item__btn.btn__rounded {
  border-radius: 20px;
}

.item__push.bg__blue,
.item__btn.bg__blue {
  background: #3000b1;
  background: -webkit-linear-gradient(to right, #1a00ea, #3000b1, #1a00ea);
  background: linear-gradient(to right, #1a00ea, #3000b1, #1a00ea);
  /* background: -webkit-linear-gradient(90deg, #1A00EA -10%, #3000B1 105%);
  background: linear-gradient(90deg, #1A00EA -10%, #3000B1 105%); */
  border-radius: 20px;
  color: #fff;
  /* letter-spacing: 1.5px; */
}

.item__push.bg__green,
.item__btn.bg__green {
  background: #3ca55c;
  background: -webkit-linear-gradient(to right, #7fc313, #3ca55c, #7fc313);
  background: linear-gradient(to right, #7fc313, #3ca55c, #7fc313);
  /* background: -webkit-linear-gradient(90deg, #7fc313 -10%, #3ca55c 105%);
  background: linear-gradient(90deg, #7fc313 -10%, #3ca55c 105%); */
  border-radius: 20px;
  color: #fff;
  /* letter-spacing: 1.5px; */
}

.item__push.bg__red,
.item__btn.bg__red {
  background: #f01400;
  background: -webkit-linear-gradient(to right, #f07219, #f01400, #f07219);
  background: linear-gradient(to right, #f07219, #f01400, #f07219);
  /* background: -webkit-linear-gradient(90deg, #f07219 -10%, #f01400 105%);
  background: linear-gradient(90deg, #f07219 -10%, #f01400 105%); */
  border-radius: 20px;
  color: #fff;
  /* letter-spacing: 1.5px; */
}
/* ===== item__push & item__btn background-color end ===== */

/* ===== card--material (4px 的 border-radius) ===== */
.card--material .build__item {
  margin-top: 1%;
  margin-bottom: 1%;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 2px 2px rgba(0, 0, 0, 0.2);
}

/* ===== card--small-space (更小的 margin) ===== */
.card--small-space .build__item {
  margin-top: 0.4%;
  margin-bottom: 0.4%;
}

/* 過渡期宮格縮 */
.build--1260 {
  max-width: 960px !important;
}

.header__info--sm {
  max-width: 960px;
}

/* 因應有些價格命名使用 price-unit 來當價格，先將 max-width 拿掉 */
.item__price .price-unit {
  max-width: none;
}

/* =============== 共用 End =============== */
