/* Promotion code */
.discount-code-box {
    display: flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #EDFBFD 0%, #FFF 100%);
}

.open-discount-code.showcode-content {
    display: flex;
    padding: 2px 4px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 4px;
    border: 0.4px dashed #EC4747;
    background: #FEF2F2;
    font-weight: 600;
}

.code-apply {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    color: #EC4747;
    text-overflow: ellipsis;
}

#discount-list-code {
    display: flex;
    align-items: end;
    gap: 12px;
}

.list-code-apply {
    position: relative;
    --itemW: calc(250px + (400 - 250) * ((100vw - 300px) / (1920 - 300)));
    margin-left: calc(-1 * var(--gap12));
    margin-right: calc(-1 * var(--gap12));
}

/* .list-code-apply:not(.slick-slider) .code-apply-item:nth-child(n + 4) {
    display: none;
} */

.list-code-apply .slick-arrow {
    z-index: 9;
    width: 32px;
    height: 32px;
    background-color: #fff;
    border-radius: 999px;
    line-height: 38px;    
    box-shadow: 0 2px 8px rgba(11 11 11 / 11%);
    color: var(--dark)
}

.list-code-apply .slick-arrow svg {
    width: 20px;
    height: 20px;
}

.list-code-apply .slick-arrow.slick-prev {
    transform: translate(-7px, -57%);
}

.list-code-apply .slick-arrow.slick-next {
    transform: translate(7px, -57%);
}

.discount-code-wrapper-visible .list-code-apply {
    opacity: 1;
    pointer-events: all;
}

.discount-code-wrapper-visible {
    overflow: hidden;
}


#best-seller-product{
    margin-top: 0px;
}
.loading-image{
    background: transparent url('/frontend/images/Rolling-0.7s-28px.gif') center center no-repeat;
}
.discount-code-box {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

#discount-list-code {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    grid-gap: 12px;
}

.showcode-content {
    --c: #111;
    --b: rgba(38, 149, 230, 0.6);
    background: #fff;
    color: #000;
    position: relative;
    margin-top: auto;
    width: -webkit-fit-content;
    width: fit-content;
    width: -moz-fit-content;
}

.showcode-content:hover {
    --c: var(--primary);
    --b: #38b5df;
}

.open-discount-code.detail-discount-code {
    margin-left: 0;
}

.discount-circle {
    display: block;
    width: 12px;
    height: 12px;
    position: absolute;
    top: calc(50% - 6px);
    background-color: #fff;
    border-radius: 14px;
    border-width: 1px;
    border-style: dashed;
    border-color: transparent var(--b) var(--b) transparent;
}

.circle-left {
    left: -6px;
    transform: rotate(-45deg);
}

.circle-right {
    right: -6px;
    transform: rotate(135deg);
}

.code-apply {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
}

.detail-discount-code {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    user-select: none;
    cursor: pointer;
}

.detail-discount-code:hover {
    color: #34b0dd;
}

.discount-code-wrapper-visible {
    overflow: hidden;
}

.discount-code-wrapper-visible .code-apply-background {
    opacity: 1;
    pointer-events: all;
}
.discount-code-wrapper-visible .opent-promotion-detail-popup {
    pointer-events: auto;
}

.code-apply-item {
    --w: calc(120px + (180 - 120) * ((100vw - 300px) / (1920 - 300)));
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    padding: 0;
    box-shadow: 0 1px 6px 0 rgb(0 0 0 / 10%);
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    min-height: 140px;
}

.code-apply-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    font-weight: 600;
    font-family: -apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Arial, sans-serif;
    font-size: 19px;
    color: #666;
    user-select: none;
    padding: 16px 20px 0;
}

.code-apply-title small {
    text-transform: none;
    font-size: 15px;
    color: #666;
    margin-right: auto;
    margin-left: 7px;
    font-weight: normal;
}

.code-apply-background {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1235;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease-in-out;
    background: radial-gradient(ellipse closest-corner,rgba(0,0,0,.2) 1%,rgba(0,0,0,.7) 100%);
}

.close-apply-code {
    color: #999;
    cursor: pointer;
}

.code-apply-logo {
    width: var(--w);
    min-width: var(--w);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-apply-logo-content-wrap {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.code-apply-logo-content-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.svg-txt {
    display: none
}

.apply-button {
    border: none;
    background-color: #34b0dd;
    color: #fff;
    padding: 6px 0;
    width: 90px;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    min-width: 90px;
    margin-left: 4px;
}

.apply-button.active {
    border: 1px dashed #34b0dd;
    background-color: transparent;
    color: #111;
}

.choose-discount-code, #btn-chiaki-voucher .btn-show-voucher {
    cursor: pointer;
    user-select: none;
    color: #1a73e8;
    padding: 4px 0;
    display: block;
}

.choose-discount-code:hover {
    color: #1756a9;
}

.code-notification {
    padding: 0 20px;
    font-size: 14px;
}

.discount-code-wrapper-visible .list-code-apply::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 60px;
    width: calc(100% - 16px);
    display: block;
    background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0, 0%, 100%, 0)), to(#fff));
    background-image: linear-gradient(180deg, hsla(0, 0%, 100%, 0), #fff);
    pointer-events: none;
}

@media (min-width: 760px) and (orientation:portrait), (min-width: 990px) and (orientation:landscape) {
    .code-apply-item-wrapper {
        max-height: 70vh;
        overflow: hidden auto;
        padding: 12px 16px 12px 20px;
        margin: 12px 6px 16px 0;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        flex-direction: column;
        grid-gap: 20px;
    }

    .code-apply-item-wrapper::-webkit-scrollbar {
        width: 6px;
        border-radius: 8px;
        background-color: #e1e1e1;
        transition: width 300ms ease-in-out;
    }

    .code-apply-item-wrapper::-webkit-scrollbar-thumb {
        width: 6px;
        border-radius: 8px;
        background-color: var(--primary-dk);
    }

    .code-apply-content::after,
    .code-apply-content::before {
        content: "";
        display: block;
        width: 18px;
        height: 18px;
        background-color: #fff;
        border-radius: 16px;
        border-width: 1px;
        border-style: dashed;
        border-color: transparent #e1e1e1 #e1e1e1 transparent;
        position: absolute;
        left: -9px;
    }

    .code-apply-content::before {
        top: -10px;
        transform: rotate(45deg);
    }

    .code-apply-content::after {
        bottom: -10px;
        transform: rotate(-135deg);
    }

    .code-apply-logo:not(:has(h3))::after {
        content: "";
        padding-top: 75%;
        display: block;
    }

    .code-apply-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        position: absolute;
        top: 0;
        left: 0;
        border-radius: 7px 0 0 7px;
    }

    .code-apply-content {
        width: 100%;
        position: relative;
        padding-right: 12px;
        padding-left: 24px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
    }


    .list-code-apply {
        color: #333;
        font-size: 15px;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 90%;
        max-height: 90vh;
        max-width: 640px;
        background-color: #fff;
        box-shadow: 0 3px 4px -1px rgb(0 0 0 / 20%), 0 3px 6px 0 rgb(0 0 0 / 14%), 0 1px 8px 0 rgb(0 0 0 / 10%);
        z-index: 1236;
        display: block;
        opacity: 0;
        pointer-events: none;
        padding: 0;
        border-radius: 5px;
    }
}
@media (max-width: 900px) and (orientation:portrait) {
    .pr-meta-label + * {
        font-weight: 600;
    }
    #discount-list-code {
        padding-left: 0;
        font-size: 14px;
    }

}
@media (max-width: 760px) and (orientation:portrait), (max-width: 990px) and (orientation:landscape) {
    .code-apply {
        padding: 6px 20px;
    }

    .list-code-apply {
        color: #333;
        font-size: 15px;
        position: fixed;
        bottom: 0;
        left: 0;
        /* transform: translateY(110%); */
        width: 100%;
        background-color: #fff;
        box-shadow: 0 3px 4px -1px rgb(0 0 0 / 20%), 0 3px 6px 0 rgb(0 0 0 / 14%), 0 1px 8px 0 rgb(0 0 0 / 10%);
        z-index: 9999991;
        display: block;
        opacity: 1;
        /* pointer-events: none; */
        padding: 0;
        transition: transform 300ms ease-in-out;
        border-radius: 5px;
        padding-bottom: 60px;
    }

    .code-apply-background {
        z-index: 1235;
    }

    .code-apply-item {
        align-items: stretch;
        position: relative;
    }

    .discount-code-wrapper-visible .list-code-apply {
        transform: translateY(0);
        border-radius: 21px 21px 0 0;
    }

    .code-apply-item:last-child {
        margin-bottom: 0;
    }

    .code-apply-item-wrapper {
        padding: 12px 16px 0;
        max-height: 552px;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

@media (max-width: 990px) and (orientation:landscape) {
    .code-apply-item-wrapper {
        max-height: 205px;
    }
}

@media (min-width: 768px) and (max-width: 1180px) and (orientation:portrait) {
    .code-apply-item-wrapper {
        max-height: 640px;
    }
}
@media (min-width: 768px) and (max-width: 1180px) and (orientation:landscape) {
    .code-apply-item-wrapper {
        max-height: 460px;
    }
}
@media (min-width: 768px){
    .apply-button {
        margin-left: auto;
    }
}
/* Promotion Detail Popup */
.opent-promotion-detail-popup {
    cursor: pointer;
    display: block;
    position: absolute;
    pointer-events: none;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 20px;
}

.opent-promotion-detail-popup:hover {
    text-decoration: underline;
}

.cart-discount-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 11, 11, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    visibility: visible;
    opacity: 1;
}

.cart-discount-page .cart-discount-popup {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 6px 36px rgba(11, 11, 11, 0.15);
    position: relative;
    display: flex;
    flex-direction: column;
}

.cart-discount-popup-content {
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

.cart-discount-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f5;
    background: #fff;
    z-index: 10;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.cart-discount-title {
    font-size: 18px;
    font-weight: 700;
    color: #0A0A0A;
}

.cart-discount-header svg {
    cursor: pointer;
    transition: color 0.2s ease;
}

.cart-discount-header svg:hover {
    color: var(--primary);
}

.cart-discount-voucher-card {
    padding: 0 20px;
    margin-bottom: 56px;
    background: var(--primary-dk);
}

.cart-discount-voucher-card-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    position: relative;
    bottom: -50px;
    box-shadow: 0px 4px 4px -2px #e5e5e5;
    border-radius: 4px;
}

.cart-discount-voucher-card .promotion-code-img {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #ACE7F6;
    font-weight: 600;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.cart-discount-voucher-card .promotion-code-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-discount-voucher-info {
    flex: 1;
}

.cart-discount-voucher-name {
    font-size: 16px;
    font-weight: 600;
    color: #0A0A0A;
    margin: 0 0 4px 0;
}

.cart-discount-voucher-minorder {
    font-size: 14px;
    color: #525252;
    margin-bottom: 4px;
}

.cart-discount-voucher-expire {
    font-size: 14px;
    color: #EC4747;
}

.cart-discount-section {
    padding: 16px 20px;
}

.cart-discount-section:last-of-type {
    border-bottom: none;
}

.cart-discount-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #0A0A0A;
    margin: 0 0 8px 0;
}

.cart-discount-section-content {
    font-size: 14px;
    color: #525252;
    line-height: 1.5;
}

.cart-discount-line {
    margin-bottom: 8px;
}

.cart-discount-line:last-child {
    margin-bottom: 0;
}

.cart-discount-note {
    margin-bottom: 12px;
}

.cart-discount-bullet-list {
    margin: 8px 0;
    padding-left: 16px;
}

.cart-discount-bullet-item {
    margin-bottom: 4px;
}

.cart-discount-bullet-item:last-child {
    margin-bottom: 0;
}

.cart-discount-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.cart-discount-link:hover {
    text-decoration: underline;
}

.cart-discount-shippers-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cart-discount-shippers-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cart-discount-shippers-item {
    font-size: 14px;
    color: #525252;
    margin-bottom: 4px;
    position: relative;
}

.cart-discount-shippers-item::before {
    color: #A3A3A3;
    position: absolute;
    left: 0;
}

.cart-discount-shippers-item:last-child {
    margin-bottom: 0;
}

.cart-discount-terms-line {
    margin-bottom: 8px;
}

.cart-discount-terms-line:last-child {
    margin-bottom: 0;
}

.cart-discount-code {
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
    color: var(--primary);
}

.cart-discount-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #f5f5f5;
    background: #fff;
    border-radius: 0 0 8px 8px;
    flex-shrink: 0;
}

.cart-discount-accept {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-discount-accept:hover {
    background: var(--primary-dk);
    border-color: var(--primary-dk);
}

.cart-discount-accept:active {
    transform: translateY(1px);
}

.code-apply-logo-store-name {
    font-size: 20px;
    text-align: center;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.code-apply-logo-store-name-ribbon {
    font-size: 14px;
    position: absolute;
    top: 6px;
    left: 0;
    transform: translateX(-6px);
    background: var(--price);
    color: white;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1;
}

.code-apply-logo-store-name-ribbon::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 0;
    border-right: 6px solid var(--price);
    border-bottom: 6px solid transparent;
}

.detail-promotion-content {
    font-size: 14px;
    font-weight: normal;
}

.promotion-code-content {
    position: relative;
}

.detail-promotion-content::after {
    content: " " attr(data-promotion-text) "";
    color: var(--primary);
}

.detail-promotion-content strong:first-child {
    font-size: 16px;
}

.detail-promotion-content > div:not(:has(strong)):last-child {
    display: inline-block;
}

.shop-voucher-name {
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-discount-applicable-products .cart-discount-section-content p {
    margin: 0;
}

.promotion-button-group {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.promotion-save-button,
.promotion-copy-button {
    min-width: 80px;
    padding: 6px 12px;
    border: 1px solid var(--primary);
    border-radius: 4px;
    background: white;
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.promotion-save-button:hover,
.promotion-copy-button:hover {
    background: var(--primary);
    color: white;
}

.promotion-save-button.active {
    background: var(--primary);
    color: white;
    cursor: default;
}

.promotion-save-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.promotion-loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: promotion-spin 0.6s linear infinite;
}

.promotion-save-button:hover .promotion-loading-spinner {
    border-color: white;
    border-top-color: transparent;
}

@keyframes promotion-spin {
    to {
        transform: rotate(360deg);
    }
}

.promotion-copied-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    pointer-events: none;
}

.promotion-copied-content {
    background: rgba(0, 0, 0, 0.85);
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: promotion-scale-in 0.15s ease-out;
}

.promotion-copied-content svg {
    width: 32px;
    height: 32px;
}

.promotion-copied-content span {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

@keyframes promotion-scale-in {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}