
.quick_purchase {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    background-color: transparent;
    box-shadow: 0 2px 4px 0px #bcbcbcaf;
    background-color: rgba(255, 255, 255, .4);

    --box-radius: 10px;
    --dark-bg-color: #fbb92a;
    --dark-shadow-color: #ffd67f62;
}


.quick_purchase.error *:not(span.error-msg) {
    display: none;
}

/* header */

.purchase_top_bar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    height: 50px;
    border-radius: var(--box-radius);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--dark-bg-color);
    box-shadow: 0 1px 4px 0px #bcbcbcaf;

    --child-height: 50px;
    --title-size: 20px;
}

.purchase_menu_title {
    cursor: pointer;
    flex-shrink: 0;
    flex-grow: 1;
    display: inline-block;
    height: var(--child-height);
    line-height: var(--child-height);
    text-align: center;
    font-size: var(--title-size);
    color: #333;
    position: relative;
    border-radius: var(--box-radius);
    transition: color 0.3s ease, background-color 0.3s ease;
    z-index: 2;
}
.purchase_menu_title.active {
    font-weight: 600;
    color: #000;
}
.purchase_menu_title:not(.active):hover {
    background-color: var(--dark-shadow-color);
}

.purchase_menu_area {
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block;
    width: 0;
    height: var(--child-height);
    border-radius: var(--box-radius);
    transform-origin: left top;
    transition: transform 0.3s ease, width 0.3s ease;
    background-color: var(--dark-bg-color);
    z-index: 1;
}

/* container */

.purchase_container {
    flex: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    height: auto;
    border-bottom-left-radius: var(--box-radius);
    border-bottom-right-radius: var(--box-radius);
}

.purchase_container_child {
    flex: 1;
    width: 50%;
}

/* list */

.purchase_list {
    --item-width: 120px;
    --item-height: 135px;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--item-width), 1fr));
    grid-auto-rows: var(--item-height);
    gap: 20px;
    padding: 20px;
    overflow-y: scroll;
    position: relative;
}
.purchase_list.loading  * {
    display: none;
}
.purchase_list.loading {
    background-color: var(--dark-shadow-color);
    font-size: 16px;
    color: var(--dark-bg-color);
    position: relative;
    border-radius: 10px;
}
.purchase_list.loading::after {
    content: attr(data-loading);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.purchase_list .no-data-img {
    width: 60%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.purchase_item {
    cursor: pointer;
    height: var(--item-height);
    background-color: #fff;
    border-radius: 15px;
    padding-top: 20px;
    text-align: center;
    transition-duration: .3s;
    transition-timing-function: ease;
    box-shadow: 0 0 8px #cccccc34;
    transition-property: box-shadow, background-color;
}
.purchase_item:not(.active):hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
    background-color: #f3f1f1;
}
.purchase_item.active {
    background-color: var(--dark-bg-color);
}

.purchase_item_img {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
}
.purchase_item_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.purchase_item_name {
    display: inline-block;
    max-width: 100%;
    font-size: 14px;
    line-height: 2;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    padding: 0 5px;
}

/* pay panel */

.purchase_panel {
    padding: 20px;

    --sub-height: 45px;
}

.purchase_title {
    width: 100%;
    height: 100px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 10px 0;
}

.purchase_title .title_text {
    flex: 1;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    padding-left: 5px;
    overflow: hidden;
}

.purchase_title .title_text > span {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchase_title .title_game_name {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.purchase_title .title_description {
    font-size: 14px;
    color: #f00;
}

.purchase_title .title_img {
    display: none;
    padding-right: 5px;
    user-select: none;
}

.purchase_title .title_img .title_img_container {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
}
.purchase_title .title_img .title_img_container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.purchase_info {
    min-height: var(--sub-height);
    margin-top: 25px;
}
.purchase_info.purchase_price {
    margin-top: 5px;
}
.purchase_info .sub_title {
    display: inline-block;
    width: 80px;
    height: var(--sub-height);
    line-height: var(--sub-height);
    font-size: 14px;
    color: #7d7d7d;
    padding-right: 10px;
    white-space: nowrap;
}

.purchase_info.flex {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

.purchase_info.flex .full {
    flex: 1;
}

.purchase_info .purchase_loading {
    font-size: 14px;
    color: #999;
    line-height: var(--sub-height);
}

/* single price */

.purchase_price_value {
    white-space: nowrap;
    font-size: 25px;
    color: #000;
    vertical-align: middle;
}

.purchase_price_value .original_number {
    display: none;
    font-size: 14px;
    vertical-align: baseline;
    color: #ea641c;
    margin-left: 5px;
    font-weight: bold;
    text-decoration: line-through;
}

.purchase_price_value .original_number.active {
    display: inline;
}

/* selcted unit */

.purchase_info .select_items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: var(--sub-height);
    gap: 20px;
}

.purchase_info .select_items .select_item {
    cursor: pointer;
    display: inline-block;
    line-height: var(--sub-height);
    text-align: center;
    border-radius: 5px;
    background-color: transparent;
    font-size: 14px;
    color: #777;
    border-width: 1px;
    border-style: solid;
    border-color: #dedede;
    transition-duration: .2s;
    transition-timing-function: ease;
    transition-property: color, background-color, border-color, box-shadow;
    padding: 0 5px;
    position: relative;
}
.purchase_info .select_items .select_item:not(.active):hover {
    border-color: var(--dark-bg-color);
    box-shadow: 0 0 5px var(--dark-shadow-color);
}
.purchase_info .select_items .select_item.active {
    font-weight: 600;
    color: #ea641c;
    border-color: var(--dark-bg-color);
    background-color: var(--dark-shadow-color);
}
.purchase_info .select_item.none_data {
    cursor: default;
    color: #999;
    border: none;
    text-align: left;
}
.purchase_info .select_item.none_data:hover {
    border: none;
    box-shadow: none;
}

.purchase_info .select_items .item_content {
    cursor: pointer;
    pointer-events: none;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.purchase_info .select_items .hot-tag{
    position: absolute;
    top: 0px;
    right: 0;
    transform: translate(2px, -75%);
    background: url(../../images/product/hot.webp) no-repeat center;
    background-size: 100%;
    width: 60px;
    height: 30px;
    overflow: hidden;
    text-indent: -999px;
    z-index: 1;
   

}

/* show tag */

.purchase_info .select_item[data-tag="true"] {
    position: relative;
}

.purchase_info .select_item[data-tag="true"] .select_item_child {
    user-select: none;
    pointer-events: none;
    display: inline-block;
    height: 18px;
    max-width: 100%;
    position: absolute;
    font-size: 12px;
    right: 0;
    top: 0;
    transform: translateY(-50%);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchase_info .select_item[data-tag="true"] .select_item_parvalues_tag {
    color: #fff;
    background-color: red;
    vertical-align: top;
    line-height: 1.5;
    font-weight: 500;
    font-size: inherit;
    padding: 1px 5px;
    border-bottom-left-radius: 8px;
    border-top-right-radius: 8px;
}

.purchase_info .select_item[data-tag="true"] .select_item_parvalues_tag:not(:last-child) {
    margin-right: 5px;
}




.purchase_info .select_item[data-tag="true"] .select_hot_tag  {
    background: url(../../images/product/hot-bg.webp) no-repeat right 0px;
    background-size: cover;
    color: #fff;
    position: relative;
    font-size: 12px;
    padding-left: 15px;
    padding-right: 14px;
    padding-top: 4px;
    padding-bottom: 2px;
    margin-left: 8px;
    top:-12px;
}
.purchase_info .select_item[data-tag="true"] .select_hot_tag::before {
    content: "";
    position: absolute;
    background: url(../../images/product/hot-icon.webp) no-repeat;
    background-size: cover;
    width: 19px;
    height: 31px;
    left: -6px;
    top: -9px;
} 
.purchase_info .select_item[data-tag="true"] .select_hot_tag :not(:last-child) {
    margin-right: 5px;
}



/* select number */

.purchase_quantity .select_quantity {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 180px;
    height: var(--sub-height);
    border-radius: 5px;
    background-color: transparent;
    border-width: 1px;
    border-style: solid;
    border-color: #dedede;
    transition-duration: .2s;
    transition-duration: .2s;
    transition-timing-function: ease;
    transition-property: color, border-color;
    overflow: hidden;
}
.purchase_quantity .select_quantity:hover {
    border-color: var(--dark-bg-color);
    box-shadow: 0 0 5px var(--dark-shadow-color);
}

.purchase_quantity .select_quantity .quantity_btn {
    cursor: pointer;
    display: inline-block;
    width: 40px;
    text-align: center;
    line-height: var(--sub-height);
    font-size: 14px;
    color: #333;
    background-color: transparent;
    transition: color .2s ease, background-color .2s ease;
}
.purchase_quantity .select_quantity .quantity_btn:hover {
    color: var(--dark-bg-color);
    background-color: var(--dark-shadow-color);
}
.purchase_quantity .select_quantity .quantity_btn.disabled:hover {
    color: #777;
}

.purchase_quantity .input {
    flex: 1;
}
.purchase_quantity .input input[type=number] {
    font-size: 14px;
    color: #333;
    background-color: transparent;
}

/* pay area */

.purchase_pay {
    --pay-container-height: 60px;
    height: var(--pay-container-height);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    box-sizing: content-box;
    padding-bottom: 10px;
    margin-top: 30px;
}

.purchase_pay .purchase_total {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    max-width: 60%;
    height: var(--pay-container-height);
    font-size: 22px;
    font-weight: 600;
    color: #000;
}
.purchase_pay .purchase_total > span {
    vertical-align: middle;
}

.purchase_total .total_price {
    white-space: nowrap;
}

.purchase_pay .total_title {
    margin-right: 10px;
}

.purchase_pay .total_unit, .purchase_pay .total_number {
    color: #f00;
}

.purchase_submit {
    flex: 1;
    height: var(--pay-container-height);
    padding: 0 10px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.purchase_submit_btn {
    min-width: 190px;
    line-height: 50px;
    font-size: 20px;
    background-color: var(--dark-bg-color);
    border-radius: 60px;
    outline-color: transparent;
    outline-width: 2px;
    outline-style: solid;
    outline-offset: 2px;
    border: none;
    color: #000;
    font-weight: 600;
    transition: outline-color .2s ease, background-color .2s ease;
}
.purchase_submit_btn.disabled {
    outline-width: 0;
    outline-color: transparent;
    background-color: var(--dark-shadow-color);
    color: #666;
}
.purchase_submit_btn:not(.disabled):hover {
    outline-color: var(--dark-bg-color);
    background-color: var(--dark-shadow-color);
}

@media screen and (max-width: 1000px) {
    .purchase_pay  {
        height: calc(var(--pay-container-height) * 2);
        flex-direction: column;
    }
    .purchase_submit {
        justify-content: flex-start;
        padding: 0;
        margin-top: 10px;
    }
}

.input-number {width:180px;height:100%;display:flex;border:1px solid #dedede;border-radius:6px;background:#fff;}
.input-number:hover {border-color:#fbb92a;}
.input-number .fa {display:inline-flex;width:40px;color:#333;font-size:14px;align-items:center;justify-content:center;cursor:pointer;transition:all .3s;}
.input-number .fa-minus {border-radius:6px 0 0 6px;}
.input-number .fa-plus {border-radius:0 6px 6px 0;}
.input-number .fa:hover {color:#ea641c;background-color:#fcf3de;}
.input-number .fa.disabled {color:#777;cursor:not-allowed;}
.input-number .fa.disabled:hover {background:#f5f5f5;}
.input-number .int {flex:1;overflow:hidden;}
.input-number .int input {width:100%;height:100%;text-align:center;color:#000;font-size:14px;border:none;outline:none;}
/* Chrome,Safari,Edge,Opera */input::-webkit-outer-spin-button,input::-webkit-inner-spin-button {-webkit-appearance:none;margin:0;}
/* Firefox */input[type=number] {-moz-appearance:textfield;appearance: textfield;}


/*add-to-cart*/
.add-to-cart {border-radius:6px;--color: #fff;--icon: var(--color);--cart: #fff;--dots: #fff;cursor: pointer;position: relative;outline: none;border: none;-webkit-appearance: none;-webkit-tap-highlight-color: transparent;font-size: 16px;padding:10px 12px;font-weight: 500;line-height: 20px;-webkit-transform: scale(var(--s, 0.97));transform: scale(var(--s, 0.97));color: var(--color);background:#40a785;transition: box-shadow .3s, -webkit-transform .3s;transition: transform .3s, box-shadow .3s;transition: transform .3s, box-shadow .3s, -webkit-transform .3s;margin-left: 20px;opacity: .8;}
.add-to-cart:hover{opacity: 1;color:#fff}
.add-to-cart .default {padding-left: 0px;position: relative;opacity: var(--o, 1);-webkit-transform: scale(var(--s, 1));  transform: scale(var(--s, 1));transition: opacity .3s, -webkit-transform .3s;transition: transform .3s, opacity .3s;transition: transform .3s, opacity .3s, -webkit-transform .3s;transition-delay: var(--d, 0.3s);font-size: 24px;}
.add-to-cart .default:after {--r: 90deg;}
.add-to-cart .success {opacity: var(--o, 0);-webkit-transform: translate(-50%, var(--y, 12px));transform: translate(-50%, var(--y, 12px));position: absolute;top: 10px; left: 50%;transition: opacity .3s, -webkit-transform .3s;transition: opacity .3s, transform .3s;transition: opacity .3s, transform .3s, -webkit-transform .3s;transition-delay: var(--d, 0s);}
.add-to-cart .dots {width: 4px;height: 4px;top:10px;left: 50%;margin-left: -7px;border-radius: 2px;position: absolute;-webkit-transform-origin: 10px 50%;transform-origin: 10px 50%;background: var(--dots);box-shadow: 5px 0 0 var(--dots), 10px 0 0 var(--dots);opacity: var(--o, 0);-webkit-transform: scale(var(--s, 0.4));transform: scale(var(--s, 0.4));transition: opacity .3s, -webkit-transform .3s;transition: opacity .3s, transform .3s;transition: opacity .3s, transform .3s, -webkit-transform .3s;transition-delay: var(--d, 0s);}
.add-to-cart .cart {position: absolute;left: 0;top: 0; right: 0;bottom: 0;z-index: 1;border-radius: inherit;overflow: hidden;-webkit-mask-image: -webkit-radial-gradient(white, black);}
.add-to-cart .cart:before {content: '';position: absolute;width: 20px;height: 16px;background: var(--background);top: 17px;right: 100%;z-index: 1;margin-right: -20px;-webkit-transform: translateX(-18px) rotate(-16deg);transform: translateX(-18px) rotate(-16deg);}
.add-to-cart .cart > div {top: 13px;right: 100%;-webkit-transform: translateX(-18px) rotate(-16deg);transform: translateX(-18px) rotate(-16deg);position: absolute;z-index: 2;-webkit-transform-origin: 1px 21px;transform-origin: 1px 21px;}
.add-to-cart .cart > div:before, .add-to-cart .cart > div:after {content: '';position: absolute;top: var(--t, 4px);left: var(--l, 0);height: 2px;width: var(--w, 18px);background: var(--cart);border-radius: 1px;}
.add-to-cart .cart > div:after {--w: 16px;--t: 14px;--l: 1px;}
.add-to-cart .cart > div > div {width: 2px;height: var(--h, 15px);border-radius: 1px;-webkit-transform: rotate(var(--r, -8deg));transform: rotate(var(--r, -8deg));background: var(--cart);position: relative;}
.add-to-cart .cart > div > div:before, .add-to-cart .cart > div > div:after {content: '';position: absolute;background: inherit;}
.add-to-cart .cart > div > div:after {width: 4px;height: 4px;border-radius: 2px;bottom: var(--b, -6px);left: var(--l, 0);}
.add-to-cart .cart > div > div:first-child:before {border-radius: inherit;top: 0;right: 0;height: 2px;width: 6px;-webkit-transform-origin: 5px 1px;transform-origin: 5px 1px;-webkit-transform: rotate(16deg);transform: rotate(16deg);}
.add-to-cart .cart > div > div:last-child {--h: 12px;--r: 8deg;position: absolute;left: 16px;bottom: -1px;}
.add-to-cart .cart > div > div:last-child:after {--l: -2px;--b: -5px;}
.add-to-cart.added .default {--o: 0;--s: .8;--d: 0s;}
.add-to-cart.added .default:before { --r: -180deg;}
.add-to-cart.added .default:after {--r: -90deg;}
.add-to-cart.added .dots {--o: 1;--s: 1;--d: .3s;-webkit-animation: dots 2s linear forwards;animation: dots 2s linear forwards;}
.add-to-cart.added .success {--o: 1;--y: 0;--d: 1.8s;}
.add-to-cart.added .cart:before, .add-to-cart.added .cart > div {-webkit-animation: cart 2s forwards; animation: cart 2s forwards;}
.add-to-cart:not(.added):hover {--s: 1;--s-y: 8px;--s-b: 20px;}
.add-to-cart:not(.added):active {--s: .94;--s-y: 2px;--s-b: 6px;}
@-webkit-keyframes cart {
    41%,
      49%,
      57%,
      60% {
      -webkit-transform: translateX(16px) rotate(0deg);
              transform: translateX(16px) rotate(0deg);
    }
    40%,
      47%,
      54% {
      -webkit-transform: translateX(16px) rotate(0deg) translateY(1px);
              transform: translateX(16px) rotate(0deg) translateY(1px);
    }
    100% {
      -webkit-transform: translateX(76px) rotate(-16deg);
              transform: translateX(76px) rotate(-16deg);
    }
  }

  @keyframes cart {
    41%,
      49%,
      57%,
      60% {
      -webkit-transform: translateX(16px) rotate(0deg);
              transform: translateX(16px) rotate(0deg);
    }
    40%,
      47%,
      54% {
      -webkit-transform: translateX(16px) rotate(0deg) translateY(1px);
              transform: translateX(16px) rotate(0deg) translateY(1px);
    }
    100% {
      -webkit-transform: translateX(76px) rotate(-16deg);
              transform: translateX(76px) rotate(-16deg);
    }
  }
  @-webkit-keyframes dots {
    5% {
      -webkit-transform: translateY(0);
      transform: translateY(0);
    }
    25% {
      -webkit-transform: translateY(-10px) rotate(-32deg);
      transform: translateY(-10px) rotate(-32deg);
      box-shadow: 5px 0 0 var(--dots), 10px 0 0 var(--dots);
    }
    31% {
      box-shadow: 5px -4px 0 var(--dots), 10px -8px 0 var(--dots);
    }
    32%,
      50% {
      -webkit-transform: translateY(0) rotate(0deg);
      transform: translateY(0) rotate(0deg);
      opacity: 1;
    }
    45%,
      100% {
      box-shadow: 5px 0 0 var(--dots), 10px 0 0 var(--dots);
    }
    51%,
      100% {
      opacity: 0;
    }
  }
  @keyframes dots {
    5% {
      -webkit-transform: translateY(0);
      transform: translateY(0);
    }
    25% {
      -webkit-transform: translateY(-10px) rotate(-32deg);
      transform: translateY(-20px) rotate(-32deg);
      box-shadow: 5px 0 0 var(--dots), 10px 0 0 var(--dots);
    }
    31% {
      box-shadow: 5px -4px 0 var(--dots), 10px -8px 0 var(--dots);
    }
    32%,
      50% {
      -webkit-transform: translateY(0) rotate(0deg);
              transform: translateY(0) rotate(0deg);
      opacity: 1;
    }
    45%,
      100% {
      box-shadow: 5px 0 0 var(--dots), 10px 0 0 var(--dots);
    }
    51%,
      100% {
      opacity: 0;
    }
  }
