/* Homepage rules from the legacy storefront. */

.sg-home #mainContentArea {
    margin-left: 0;
    margin-right: 0;
    max-width: none !important;
    padding: 0 40px;
    text-align: center;
}

.sg-home #picture {
    background-image: url(../images/source/Chicken-on-Salad-web-1920w.jpg);
    background-size: cover;
    background-position: center;
/*		min-width: 688px;*/
    height: 565px;
}

.sg-home #picture h1 {
    font-family: Epilogue;
    font-size: 48px;
    text-shadow: 4px 4px 8px black;
}

.sg-home p {
    font-family: Epilogue;
    font-weight: 400;
    color: #1a1a1a;
}

.sg-home section {
    justify-items: end;
    align-items: end;
}

.sg-home section div {
    grid-column-start: 1;
    -ms-grid-column-span: 1;
    grid-column-end: span 1;
    -ms-grid-row: 1;
    grid-row-start: 1;
    -ms-grid-row-span: 1;
    grid-row-end: span 1;
}

.sg-home .card-content img {
    width: 100%;
}

.sg-home .products {
    min-width: 768px;
    margin: 0 160px;
}

.sg-home .products div {
    background: url(../images/source/SG-products-square-Grey-1920w.png) no-repeat;
    background-position: center;
    background-size: contain;
    padding: 150px 90px 70px !important;
    max-width: 385px;
    display: grid;
}

.sg-home .products a {
    grid-column-start: 1;
    grid-row-start: 1;
}

.sg-home .products img {
    width: auto;
    height: auto;
    display: block;
}

.sg-home .products p {
    grid-column-start: 1;
    grid-row-start: 1;
    color: #41a9aa;
    font-size: 20px;
    font-weight: 600;
    margin-top: 10px;
}

.sg-home #story .col-2 img {
    box-shadow: #653104 3px 3px 11px 0!important;
    -moz-box-shadow: #653104 3px 3px 11px 0!important;
    -webkit-box-shadow: #653104 3px 3px 11px 0!important;
}

.sg-home .shadow-xl {
    box-shadow: #653104 3px 3px 11px 0!important;
    -moz-box-shadow: #653104 3px 3px 11px 0!important;
    -webkit-box-shadow: #653104 3px 3px 11px 0!important;
}

.sg-home hr {
    background: 0 0!important;
    height: 0!important;
    background-size: initial!important;
    min-height: 0!important;
    border-color: currentColor!important;
    border-width: 3px!important;
    border-top-style: double!important;
    color: #f6c716!important;
}

@media (max-width: 480px) {
    .sg-home #picture h1 {
        font-size: 30px !important;
    }

    .sg-home #pic_cloud {
        width: 100% !important;
        min-width: unset !important;
    }

    .sg-home #pic_cloud + div {
        width: 75% !important;
        min-width: unset !important;
    }

    .sg-home #p_we {
        font-size: 19px !important;
        margin-bottom: 0;
    }

    .sg-home #p_earn {
        font-size: 11px !important;
        margin-bottom: 0;
    }

    .sg-home #description {
        margin-left: -15px !important;
        margin-right: -15px !important;
    }

    .sg-home #description .col-md-10 {
        padding: 0 !important;
    }

    .sg-home #p_it {
        font-size: 22px !important;
    }

    .sg-home #p_there {
        font-size: 14px !important;
    }

    .sg-home #cards div {
        margin: 10px;
    }

    .sg-home #cards a.rounded {
        align-self: center !important;
    }

    .sg-home #product_categories {
        font-size: 22px !important;
    }

    .sg-home .products {
        min-width: unset !important;
        margin: 0 !important
    }

    .sg-home .products div {
        padding: 90px 75px 30px !important;
    }

    .sg-home .products p {
        font-size: 16px;
    }

    .sg-home #story {
        margin-left: -40px;
        margin-right: -40px;
    }

    .sg-home #story_content {
        text-align: center !important;
        padding: unset !important;
    }

    .sg-home .shadow-xl {
        margin-top: 0 !important;
    }

    .sg-home #p_tale {
        margin-left: 0 !important;
        font-size: 24px !important;
    }

    .sg-home #story_content div a {
        display: block;
        text-align: center;
        font-size: 11px;
    }

    .sg-home #img_sun {
        margin-top: 0 !important;
    }

    .sg-home #rows h1 {
        font-size: 30px !important;
        margin-top: 10px;
    }

    .sg-home #rows p {
        font-size: 14px !important;
    }

    .sg-home #rows a {
        font-size: 11px !important;
        text-align: center;
        display: block;
        width: 100%;
    }

    .sg-home .column-reverse {
        flex-direction: column-reverse;
    }
}

/* Animations  */

@keyframes anim-to-top {
    from {
        transform: translate3d(0%, 100%, 0px);
    }

    to {
        transform: translate3d(0%, 0%, 0px);
    }
}

@keyframes anim-to-right {
    from {
        transform: translate3d(-100%, 0%, 0px);
    }

    to {
        transform: translate3d(0%, 0%, 0px);
    }
}

@keyframes anim-to-left {
    from {
        transform: translate3d(100%, 0%, 0px);
    }

    to {
        transform: translate3d(0%, 0%, 0px);
    }
}

@media (min-width: 480px) {
    .sg-home .anim-to-top.animated {
        animation: 1.7s 1 alternate anim-to-top;
    }

    .sg-home .anim-to-right.animated {
        animation: 1.7s 1 alternate anim-to-right;
    }

    .sg-home .anim-to-left.animated {
        animation: 1.7s 1 alternate anim-to-left;
    }

    .sg-home #cards {
        margin: 0 45px;
    }

    .sg-home #cards .card {
        width: 31%;
        display: grid;
    }

    .sg-home .card div {
        grid-column-start: 1;
        -ms-grid-column-span: 1;
        grid-column-end: span 1;
        -ms-grid-row: 1;
        grid-row-start: 1;
        -ms-grid-row-span: 1;
        grid-row-end: span 1;
    }

    .sg-home .card-head {
        z-index: 100;
    }

    .sg-home .products div {
        min-width: 385px;
    }

    .sg-home .d-none {
        display: block !important;
    }

    .sg-home #sidebar {
        position: fixed;
        top: 40px;
        right: 30px;
        z-index: 1001;
    }

    .sg-home #sidebar a {
        width: 130px;
    }

    .sg-home #signup_wo {
        position: fixed;
        bottom: 0;
        right: 0;
        z-index: 1001;
    }
}

/* Storefront overrides. */

.sg-home {
    position: relative;
    width: 100%;
    margin-left: 0;
    overflow-x: clip;
}
.sg-home .fa-brands {
    font-family: "Font Awesome 5 Brands";
    font-weight: 400;
}
.sg-home .fa-bars:before {
    content: "\f0c9";
}
.sg-home #mainContentArea {
    overflow-x: clip;
    top: 0;
    margin-top: 0;
}
.sg-home #footer {
    background: #fff !important;
}
.sg-home a:focus-visible,
.sg-home button:focus-visible {
    outline: 2px solid #653104;
    outline-offset: 3px;
}
.sg-home .fa-solid {
    font-family: "Sunset Font Awesome";
    font-weight: 900;
}
.cms-index-index .page-header {
    margin-bottom: 0;
    border-bottom: 0;
}
@media (max-width: 767px) {
    .sg-home .hidden-xs { display: none !important; }
}

/* Homepage body updates matching the current sunsetgourmet.ca design. Loaded after the captured homepage CSS. */

/* Hero "We're Growing" cloud: a wide, flat cloud flush with the bottom-right corner, with the
   hearts, heading, text and link at the same spots as on sunsetgourmet.ca. Narrower screens keep
   the original flexible layout, since the hero is then too narrow for the 750px cloud. */
@media (min-width: 992px) {
    .sg-home #pic_cloud {
        width: 750px !important;
        min-width: 0 !important;
        max-width: 100%;
    }
    .sg-home #pic_cloud img {
        display: block;
        width: 750px;
        max-width: 100%;
        height: 241px;
        object-fit: contain;
        object-position: 100% 100%;
    }
    .sg-home #pic_cloud + div {
        position: relative;
        display: block !important;
        width: 750px !important;
        min-width: 0 !important;
        max-width: 100%;
        height: 241px;
        margin: 0;
    }
    .sg-home #pic_cloud + div > div {
        position: absolute;
        flex: none;
        max-width: none;
        padding: 0;
    }
    .sg-home #pic_cloud + div > div:first-child {
        top: 139px;
        left: 290px;
        width: 84px;
    }
    .sg-home #pic_cloud + div > div:first-child img {
        width: 84px !important;
        height: auto;
    }
    .sg-home #pic_cloud + div > div:last-child {
        top: 126px;
        left: 387px;
        width: 337px;
        text-align: left;
    }
    .sg-home #p_we {
        margin: 0 0 13px 9px;
        font-size: 24px;
        line-height: 25px;
    }
    .sg-home #p_earn {
        margin: 0;
        font-size: 14px;
        line-height: 18.2px;
    }
    .sg-home #p_we + #p_earn + a {
        display: inline-block;
        margin: -2px 0 0 141px;
        line-height: 17px;
        text-decoration: underline;
    }
}

/* Introduction: hearts beside a centred heading and paragraph. */
.sg-home .sg-intro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 1060px;
    margin: 40px auto 30px;
}
.sg-home .sg-intro-hearts {
    flex: 0 0 144px;
    width: 144px;
    height: auto;
    align-self: flex-start;
}
.sg-home .sg-intro-copy {
    max-width: 840px;
    text-align: center;
}
.sg-home #p_it {
    max-width: 690px;
    margin: 0 auto 24px;
    font-family: Marydale, "Marydale Bold", cursive;
    font-size: 30px;
    font-weight: 700;
    line-height: 36px;
    color: #41a9aa;
}
.sg-home #p_there {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
}

/* Feature cards: three fixed-width coloured panels. */
.sg-home #cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 12px;
    margin: 40px auto 0;
}
.sg-home #cards .card {
    width: 392px;
    max-width: 100%;
    margin: 0;
    padding: 16px !important;
    border: 0;
    border-radius: 0;
}
.sg-home #cards .card-head p {
    margin-top: 4px;
    line-height: 1.2;
}
.sg-home #cards .card-content > a:first-child {
    position: relative;
    display: block;
}
.sg-home #cards .card-content > a:first-child > img:first-child {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.sg-home #cards .card-content > p {
    margin-bottom: 4px;
}
.sg-home #cards .card-content > a.rounded {
    display: block;
    width: fit-content !important;
    margin: 8px 0 0 auto;
    padding: 8px 12px !important;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    text-decoration: none;
}
/* Specials photo: SG logo inside a shopping-bag outline (a static version of the live site's animation). */
.sg-home #cards .sg-card-bag {
    position: absolute;
    left: 1%;
    top: 62%;
    width: 26%;
    height: auto;
}
.sg-home #cards .sg-card-badge {
    position: absolute;
    left: 6.5%;
    top: 73%;
    width: 15.3%;
    height: auto;
}

/* Product categories: 4-column photo gallery with a caption on hover. */
.sg-home #product_categories {
    line-height: 90px;
    font-weight: 700;
}
.sg-home .sg-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    max-width: 1200px;
    margin: 30px auto 50px;
}
.sg-home .sg-category-tile {
    position: relative;
    display: block;
    aspect-ratio: 289 / 300;
    overflow: hidden;
    text-decoration: none;
}
.sg-home .sg-category-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sg-home .sg-category-tile span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: #d35f02;
    font-family: Poppins, Epilogue, Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sg-home .sg-category-tile:hover span,
.sg-home .sg-category-tile:focus-visible span {
    opacity: 1;
}
/* Touch screens have no hover, so keep the category name visible along the bottom. */
@media (hover: none) {
    .sg-home .sg-category-tile span {
        inset: auto 0 0 0;
        padding: 8px;
        font-size: 14px;
        opacity: 1;
    }
}

/* Story: "Read more" link below the paragraph. */
.sg-home .sg-story-more {
    text-align: right;
    margin: 6px 0 10px;
}
.sg-home .sg-story-more a {
    display: inline-block;
    padding: 10px 7px;
    border: 1px solid #ef3a46;
    color: #ef3a46;
    font-family: Epilogue, Arial, sans-serif;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
}
.sg-home .sg-story-more a:hover,
.sg-home .sg-story-more a:focus-visible {
    background: #ef3a46;
    color: #fff;
}

@media (max-width: 991px) {
    .sg-home .sg-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .sg-home .sg-intro { gap: 12px; margin: 24px auto; }
    .sg-home .sg-intro-hearts { flex-basis: 72px; width: 72px; }
    .sg-home .sg-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .sg-home .sg-story-more { text-align: center; }
}
@media (max-width: 480px) {
    .sg-home .sg-intro-hearts { display: none; }
    .sg-home #p_it { font-size: 22px; line-height: 28px; }
    .sg-home #cards .card { width: 100%; }
    .sg-home #product_categories { line-height: 1.4; }
}
