html, body {
    height: 100%;
}

body {
    width: 100%;
    background-image: url("../assets/images/bg-grain.png");
    padding-top: 66px;
}

/* Fix IE Flexbox image bug */
main {
    min-height: 1px;
}

.required-field:after {
    content: "\002a";
    color: #ED1C24;
    margin-left: 2px;
}

.text-small {
    font-size: 0.875rem;
}

.img-hover-expand {
    overflow: hidden;
}

.img-hover-expand img {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s linear;
}

.img-hover-expand:hover img {
    opacity: .8;
    transform: scale(1.05);
    transition: all 0.3s linear;
}

/*
    Fix IE Flexbox image bug
    https://github.com/philipwalton/flexbugs/issues/75
*/
.card .img-hover-expand {
    min-height: 1px;
}

.btn-primary-light {
    background-color: #E06361;
    color: #FFF;
}

.btn-primary-light:hover {
    background-color: #ED1C24;
    color: #FFF;
}

.tag, .tag-static {
    padding: .5rem 1rem;
    background-color: #e9ecef;
    border-radius: 30px;
    display: inline-block;
    text-align: center;
    vertical-align: baseline;
    font-size: 75%;
    line-height: 1;
    white-space: nowrap;
    margin-bottom: 1rem;
    margin-right: .3rem;
    color: #212529;
}

.tag:hover {
    background-color: #DEE2E6;
    color: #495057;
}

.list-justify li {
    text-align: justify;
}

.list-style-parentheses {
    counter-reset: parentheses;
    list-style: none;
}

.list-style-parentheses li {
    counter-increment: parentheses;
}

.list-style-parentheses li:before {
    content: "("counter(parentheses)")";
    margin-right: .2rem;
    margin-left: -1.6rem;
}

.list-style-lower-latin {
    list-style: lower-latin;
    counter-reset: lower-latin;
}

.list-style-lower-latin li {
    counter-increment: lower-latin;
}

.list-style-lower-latin li:before {
    content: none;
}

#navbar {
    background-color: rgba(255, 255, 255, 0.8);
}


.navbar-extra {
    padding-bottom: .5rem;
}

.navbar-close {
  display: inline-block;
  padding: 0.5rem 1rem;
}

.rollbar {
    overflow: hidden;
    height: 24px;
}

.highlight {
    padding-top: 30px;
    padding-bottom: 60px;
    background-image: linear-gradient(transparent, rgba(255,255,255,.1) 10px, white 130px), url("../assets/images/highlight-bg.jpg");
    background-size: 100%;
    background-position: top center;
    background-repeat: no-repeat;
}

footer {
    background-color: #333;
}

.footer-links .col {
    flex-basis: 96px !important;
}

.footer-text {
    color: rgba(255,255,255,.7);
    white-space: nowrap;
    min-width: 98px;
}

a.footer-text:hover {
    color: rgba(255,255,255,.9);
    text-decoration: none;
}

.footer-text-muted {
    color: #9E9E9E;
}

.zipcode-style {
    display: inline-block;
    width: 100px;
}

#faq .btn {
    white-space: normal;
    text-align: left;
}

.crumb {
    color: #343a40;
}

.latest-receipes .list-group a:nth-child(odd) {
    background-color: #e9ecef;
}

.latest-receipes .list-group a:nth-child(odd):hover {
    color: #495057;
    background-color: #dee2e6;
}

#return-to-top {
    position: fixed;
    right: 20px;
    bottom: 40px;
    display: none;
    transition: all 0.3s ease;
    z-index: 15;
}
@media screen and (max-width:768px) {
    #return-to-top {
        position: fixed;
        right: 20px;
        bottom: 100px;
        display: none;
        transition: all 0.3s ease;
        z-index: 15;
    }
}

.popup-block * {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-kerning: auto;
    font-size: 12pt;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.popup-block {
    opacity: 0;
    display: block;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: auto;
    overflow-y: scroll;
    background: rgba(0,0,0,.7);
    -webkit-transition: opacity .2s ease-in-out;
    -moz-transition: opacity .2s ease-in-out;
    transition: opacity .2s ease-in-out;
    z-index: 9999;
}

.popup-block article {
    position: relative;
    max-width: 750px;
    margin: 0 auto;
    padding-top: 5px;
    padding-bottom: 10px;
    background: white;
    height: auto;
}

 .popup-block article p {
     font-size: 12pt;
     font-weight: 500;
     line-height: 1.2;
     color: #555;
     margin: 15px 0;
     padding: 0 20px;
 }

 .popup-block article button:first-of-type {
     position: absolute;
     top: 0;
     right: 0;
     -webkit-appearance: none;
     appearance: none;
     display: inline-block;
     padding: 5px 10px 10px 15px;
     font-size: 24pt;
     color: #666;
     line-height: 1;
     font-weight: normal;
     transition: 0;
     border: none;
     outline: none;
     background: transparent;
     -webkit-transition: color .2s ease-in-out;
     -moz-transition: color .2s ease-in-out;
     transition: color .2s ease-in-out;
     cursor: pointer;
     z-index: 1000;
 }


.img-cropped {
    background-repeat: no-repeat;
    background-size: auto 300px;
    height: 300px;
}

.card-img-left {
    width: 100%;
    height: auto;
}

.btn-blue {
    color: #fff !important;
    background-color: #007bff;
    border-color: #007bff;
}

 .btn-blue:focus, .btn-blue.focus {
     box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
 }

 .btn-blue:hover {
     color: #fff;
     background-color: #0069d9;
     border-color: #0062cc;
 }

.popup-block article button:first-of-type:hover,
.popup-block article button:first-of-type:focus {
    color: #c00;
}

.term {
    background-color: yellow;
}

.form-label-required::before {
    content: '*';
    color: red;
}

.min-width-0 {
    min-width: 0px;
}

/* 發票登錄的輸入框 */
.form-control-recipe {
    letter-spacing: 4px;
    font-size: 1.1rem;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 8px;
    padding-right: 8px;
}

/* Mega menu */
.sub-title {
    display: none;
}

.sub-menu-toggle {
    display: block;
    padding: 1rem 2.5rem;
    font-weight: 400;
    white-space: nowrap;
    text-align: inherit;
}

.sub-menu-toggle:after {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: .255em;
    vertical-align: .255em;
    content: "";
    border-top: .3em solid;
    border-right: .3em solid transparent;
    border-bottom: 0;
    border-left: .3em solid transparent;
}

.sub-title:focus,
.sub-title:hover,
.sub-menu-toggle:focus,
.sub-menu-toggle:hover {
    text-decoration: none;
}

.sub-menu {
    display: none;
    border-top: 1px solid rgba(0,0,0,.15);
    border-bottom: 1px solid rgba(0,0,0,.15);
}

.sub-menu-open .sub-menu-toggle,
.sub-menu.sub-menu-open .sub-menu-toggle {
    background-color: #fff;
}

.sub-menu.show {
    display: block;
}

.mega-menu .col-md:last-child > .sub-menu,
.mega-menu .col-md:last-child > .sub-menu > .sub-menu-row:last-child > .sub-menu {
    border-bottom: 0;
}

.menu-item {
    display: block;
    padding: .25rem 2.5rem;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-menu-row .sub-menu-toggle {
    background-color: transparent;
    color: #343a40;
    padding-left: 3.5rem;
}

.sub-menu-row .menu-item {
    padding-left: 3.5rem;
}

@media only screen and (min-width: 375px) {
    .highlight {
        padding-top: 40px;
        background-image: linear-gradient(transparent, rgba(255,255,255,.1) 10px, white 170px), url("../assets/images/highlight-bg.jpg");
    }
}

@media only screen and (min-width: 768px) {
    body {
        padding-top: 96px;
    }

    #return-to-top {
        bottom: 50px;
        right: 30px;
    }

   
    .highlight {
        padding-top: 100px;
        background-image: linear-gradient(transparent, rgba(255,255,255,.1) 10px, white 250px), url("../assets/images/highlight-bg.jpg");
    }

    .popup-block article {
        margin: 50px auto;
        overflow: hidden;
    }

    .popup-block article p {
        font-size: 14pt;
    }

    .card-img-left-s {
        width: 200px;
        height: 170px;
    }

    .card-img-left-m {
        width: 300px;
        height: 200px;
    }

    .card-img-left-m-square {
        width: 200px;
        height: 200px;
    }

    .product-title h1, .product-title span {
        display: inline;
    }

    .mega-dropdown {
        position: static;
    }

    .mega-dropdown .mega-menu {
        width: 100%;
        border: none;
        border-radius: 0;
        box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12);
        background-color: rgba(255, 255, 255, 0.95);
        margin-top: 0;
    }

    .sub-title {
        display: block;
        padding-left: .5rem;
        padding-right: .5rem;
        font-size: 1.5rem;
        margin-bottom: .5rem;
        border-bottom: 1px solid #f3c1c1;
    }

    .sub-title:hover,
    .sub-title:focus {
        color: #1d2124;
    }

    .sub-menu {
        display: flex !important;
        flex-wrap: wrap;
        background-color: transparent;
        border-top: 0;
        border-bottom: 0;
    }

    .sub-menu-toggle {
        display: none;
    }

    .menu-item {
        flex: 1 0 50%;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .sub-menu > .menu-item:last-child:nth-child(odd) {
        flex: 0 0 50%;
    }

    .menu-item:hover,
    .menu-item:focus {
        color: #16181b;
        text-decoration: none;
        background-color: #f8f9fa;
    }

    .sub-menu-row {
        flex: 0 1 100%;
    }

    .sub-menu-row .sub-title {
        flex: 0 1 100%;
        border-bottom: 0;
        font-size: 1.2rem;
        margin-bottom: 0;
        color: #ed1c24;
    }

    .sub-menu-row .sub-title:hover {
        color: #c61017;
    }

    .sub-menu-row .menu-item {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        color: rgba(0,0,0,.8);
    }
}

@media only screen and (min-width: 992px) {
    .product-category {
        width: 85%;
    }
}

@media only screen and (min-width: 1200px) {
}

@media only screen and (min-width: 1900px) {
    .highlight {
        background-image: linear-gradient(transparent, rgba(255,255,255,.1) 20px, white 290px), url("../assets/images/highlight-bg.jpg");
    }
}

@media only screen and (max-width: 767px) {
    .user-content img {
        max-width: 100%;
        height: auto !important;
    }

    .offcanvas-collapse {
        position: fixed;
        top: 0;
        bottom: 0;
        right: -100%;
        width: 238px;
        overflow-y: auto;
        visibility: hidden;
        background-color: #fff;
        transition-timing-function: ease-in-out;
        transition-duration: .3s;
        transition-property: right, visibility;
        box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
    }

    .offcanvas-collapse.open {
        right: 0;
        visibility: visible;
        z-index: 1;
    }

    .navbar-wrapper {
        min-height: 100%;
    }

    .backdrop.visible {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(216,216,216,.6);
    }

    .dropdown-menu.show {
        border: 0;
        border-bottom: 1px solid rgba(0, 0, 0, .15);
    }

    #main-nav .nav-link {
        padding: 1rem;
        /* border-bottom: 1px solid #dee2e6; */
        border-bottom: 1px solid rgba(0, 0, 0, .15);
    }

    #main-nav .dropdown-menu {
        padding-top: 0px;
        padding-bottom: 0px;
        margin-top: 0;
        border-radius: 0;
        background-color: #F8F9FA;
    }

    #main-nav .dropdown-item {
        padding: 1rem 2.5rem;
    }

    .mega-menu .container {
        padding-right: 0;
        padding-left: 0;
    }
}

/* remove hover on touch devices */
@media (hover: none) {
    .img-hover-expand:hover img {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .footer-link:hover {
        color: rgba(255,255,255,.7);
    }
}

/* Safe-area variables for iPhone X */
/* iOS 11.0 ~ 11.2 */
@supports ( (padding-right: constant(safe-area-inset-right)) and (padding-left: constant(safe-area-inset-left)) ) {
    :root {
        --safe-area-inset-right: constant(safe-area-inset-right);
        --safe-area-inset-left: constant(safe-area-inset-left);
        --safe-area-inset-bottom: constant(safe-area-inset-bottom);
    }
}
/* iOS 11.2+ */
@supports ( (padding-right: env(safe-area-inset-right)) and (padding-left: env(safe-area-inset-left)) ) {
    :root {
        --safe-area-inset-right: env(safe-area-inset-right);
        --safe-area-inset-left: env(safe-area-inset-left);
        --safe-area-inset-bottom: env(safe-area-inset-bottom);
    }
}
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
    footer, .breadcrumbs, .content, .news, .marketing, .highlight, .hero {
        padding-right: var(--safe-area-inset-right);
        padding-left: var(--safe-area-inset-left);
    }
    #navbar {
        padding-right: calc(1rem + var(--safe-area-inset-right));
        padding-left: calc(1rem + var(--safe-area-inset-left));
    }
    .navbar-extra {
        padding-bottom: var(--safe-area-inset-bottom);
    }
    #carousel .carousel-control-prev {
        margin-left: var(--safe-area-inset-left);
    }
    #carousel .carousel-control-next {
        margin-right: var(--safe-area-inset-right);
    }
}
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape) {
    #navbar {
        padding-right: var(--safe-area-inset-right);
        padding-left: var(--safe-area-inset-left);
    }
    #return-to-top {
        right: calc(30px + var(--safe-area-inset-right));
    }
}
