/*
Theme Name: H-Lihapalvelut
Theme URI: https://h-lihapalvelut.fi
Description: H-Lihapalveluiden oma lapsiteema Butcher Meatshop -teemalle.
Author: H-Lihapalvelut
Template: butcher-meatshop
Version: 1.0.0
Text Domain: h-lihapalvelut
*/

/*
 * H-Lihapalveluiden omat tyylit lisätään tähän.
 */
.site-branding .site-title {
    display: none;
}
.site-branding {
    top: calc(50% - 20px);
}
/* Headerin navigointilinkkien vaakasuuntainen tila */
.header-menu-box .main-navigation ul#primary-menu > li > a {
    padding-left: 8px;
    padding-right: 8px;
}
/* H-Lihapalvelut: Myymälän tarjoukset */
.hl-offers-section {
    padding: 50px 0 55px;
    background: #fff;
}

.hl-offers-heading {
    margin: 0 0 28px;
    text-align: center;
}

.hl-offers-heading h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.25;
}

.hl-offers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.hl-offer-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
}

.hl-offer-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hl-offer-card__content {
    padding: 18px 20px 20px;
}

.hl-offer-card__title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

.hl-offer-card__excerpt {
    margin: 0 0 12px;
    line-height: 1.5;
}

.hl-offer-card__price {
    margin: 8px 0 4px;
    color: var(--primary-color, #d5351b);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.hl-offer-card__unit-price,
.hl-offer-card__lowest-price {
    margin: 5px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.hl-offers-note {
    margin: 24px 0 0;
    text-align: center;
    font-weight: 600;
}

@media (max-width: 991px) {
    .hl-offers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 600px) {
    .hl-offers-section {
        padding: 36px 0 40px;
    }

    .hl-offers-heading h2 {
        font-size: 25px;
    }

    .hl-offers-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hl-offer-card__content {
        padding: 15px 16px 17px;
    }
}
/* Tarjouskorttien kuvien maltillisempi koko */

.hl-offer-card__image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
}

@media screen and (max-width: 767px) {
    .hl-offer-card__image {
        height: 180px;
    }
}
/* WooCommerce-tarjouskorttien viimeistely */

.hl-offer-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hl-offer-card__image-link {
    display: block;
    overflow: hidden;
}

.hl-offer-card__image {
    display: block;
    width: 100%;
    height: 210px;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
}

.hl-offer-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.hl-offer-card__button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
    padding: 12px 16px;
    border-radius: 3px;
    background: var(--primary-color, #c93424);
    color: #fff !important;
    text-align: center;
    font-weight: 600;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
}

.hl-offer-card__button:hover,
.hl-offer-card__button:focus {
    background: var(--secondary-color, #333);
    color: #fff !important;
}

@media (max-width: 600px) {
    .hl-offer-card__image {
        height: 170px;
    }
}
/* H-Lihapalvelut: tarjouskorttien hintojen ja ulkoasun viimeistely */

/* Maltillisempi tuotekuva */
.hl-offer-card__image {
    height: 185px;
    object-fit: cover;
    object-position: center;
}

/* Tuotteen nimi pysyy linkkinä, mutta ei näytä alleviivatulta */
.hl-offer-card .hl-offer-card__title a {
    color: inherit;
    text-decoration: none !important;
}

.hl-offer-card .hl-offer-card__title a:hover,
.hl-offer-card .hl-offer-card__title a:focus {
    text-decoration: underline !important;
}

/* Tarjoushinta korostuu; normaalihinta siirtyy sen viereen pienempänä */
.hl-offer-card .hl-offer-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 8px;
    row-gap: 2px;
    color: var(--primary-color, #e5321b);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.25;
}

.hl-offer-card .hl-offer-card__price del {
    display: inline-block;
    color: #777 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.45;
    opacity: 1;
    margin: 0;
}

.hl-offer-card .hl-offer-card__price ins {
    display: inline-block;
    color: var(--primary-color, #e5321b) !important;
    font-size: 25px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    background: transparent !important;
}

.hl-offer-card .hl-offer-card__sale-unit {
    color: var(--primary-color, #e5321b);
    font-size: 25px;
    font-weight: 700;
    white-space: nowrap;
}

/* Lisätiedot ja vertailuhinnat pidetään hillittyinä */
.hl-offer-card .hl-offer-card__unit-price,
.hl-offer-card .hl-offer-card__lowest-price {
    color: #333;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

/* Mobiilissa hieman matalampi kuva ja maltillisempi tarjoushinta */
@media (max-width: 600px) {
    .hl-offer-card__image {
        height: 170px;
    }

    .hl-offer-card .hl-offer-card__price,
    .hl-offer-card .hl-offer-card__price ins,
    .hl-offer-card .hl-offer-card__sale-unit {
        font-size: 22px !important;
    }
}
flex-wrap: wrap;
    gap: 10px;
}

.hl-offer-card__price ins {
    order: 1;
    text-decoration: none;
}

.hl-offer-card__price del {
    order: 2;
    font-size: 0.85em;
    color: #777;
    opacity: 1;
}
/* H-Lihapalvelut: Gallery-kuvien otsikot ja klikattavat kuvapinnat */
#service .hl-gallery-banner {
    position: relative;
    overflow: hidden;
}

#service .hl-gallery-card__link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: #fff !important;
    text-decoration: none !important;
}

#service .hl-gallery-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}

#service .hl-gallery-card__link::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 35% 0 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.68));
    pointer-events: none;
    transition: background .25s ease;
}

#service .hl-gallery-card__title {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 16px;
    left: 18px;
    color: #fff;
    font-size: clamp(16px, 1.7vw, 24px);
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0,0,0,.45);
}

#service .hl-gallery-card__link:hover .hl-gallery-card__image,
#service .hl-gallery-card__link:focus-visible .hl-gallery-card__image {
    transform: scale(1.035);
}

#service .hl-gallery-card__link:focus-visible {
    outline: 3px solid #e3371a;
    outline-offset: -3px;
}

@media (max-width: 767px) {
    #service .hl-gallery-card__title {
        right: 12px;
        bottom: 12px;
        left: 12px;
        font-size: 17px;
    }
}
/* H-Lihapalvelut: Gallery-otsikot kuvan yläreunaan */

/* Tumma liukuväri yläreunaan, jotta otsikko erottuu heti kuvan alkaessa näkyä. */
#service .hl-gallery-card__link::after {
    inset: 0 0 45%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.62) 0%,
        rgba(0, 0, 0, 0.28) 58%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* Otsikko kuvan vasempaan yläkulmaan. */
#service .hl-gallery-card__title {
    top: 22px;
    right: 18px;
    bottom: auto;
    left: 18px;
    text-align: left;
}

@media (max-width: 767px) {
    #service .hl-gallery-card__title {
        top: 16px;
        right: 12px;
        bottom: auto;
        left: 12px;
        font-size: 17px;
    }
}
/* H-Lihapalvelut: alatunnisteen tilankäyttö */

.site-footer .footer-top > .container {
    width: calc(100% - 48px);
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer .footer-top .flex-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.site-footer .footer-top .flex-row > aside,
.site-footer .footer-top .flex-row > .footer-col {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

.site-footer .footer-top .widget-title {
    width: 100%;
    box-sizing: border-box;
}

.site-footer .footer-top .calendar_wrap,
.site-footer .footer-top table {
    width: 100%;
}

/* Tabletti */
@media screen and (max-width: 1024px) {
    .site-footer .footer-top .flex-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Puhelin */
@media screen and (max-width: 600px) {
    .site-footer .footer-top > .container {
        width: calc(100% - 32px);
    }

    .site-footer .footer-top .flex-row {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}
/* H-Lihapalvelut – karusellin korkeuden säätö */

#main-slider-wrap img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    opacity: 0.5;
}

/* Tabletit */
@media screen and (max-width: 1024px) {
    #main-slider-wrap img {
        height: 380px;
    }
}

/* Puhelimet */
@media screen and (max-width: 600px) {
    #main-slider-wrap img {
        height: 300px;
    }
}
/* Pääkuvan vaakasuuntainen rajaus */
#main-slider-wrap .main-slider-inner-box img {
    object-position: 45% center;
}
/* H-Lihapalvelut: Yritysmyyntisivun yhteydenotto-osion väli */
.hl-yhteydenotto-osio {
    margin-top: -15px !important;
}
/* H-Lihapalvelut: Tuotteet ja palvelut -osion mobiilijärjestys */
@media screen and (max-width: 781px) {

    .hl-tuotteet-palvelut-osio > .wp-block-column:first-child {
        order: 2;
    }

    .hl-tuotteet-palvelut-osio > .wp-block-column:last-child {
        order: 1;
    }
}
/* H-Lihapalvelut: Tuoteryhmäkorttien otsikko- ja tekstiväli */

.wp-block-column.hl-tuoteryhma-otsikko h4 {
    margin-bottom: 3px !important;
}

.wp-block-column.hl-tuoteryhma-otsikko p {
    margin-top: 0 !important;
}
