/*
 Theme Name: Storefront Child
 Template: storefront
 Author: TROYA
 Version: 1.0.0
*/

html {
  scroll-behavior: smooth;
}

/* TROYA fontit */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', serif;
}

body, p, span, li, a, input, textarea, select, button {
    font-family: 'Poppins', sans-serif;
}

h2 {
    font-weight: 600;
}


/* BLOGI */

.artikkeli {
    max-width: 800px !important;
    margin: auto;
    padding-top: 3em;
    padding-bottom: 3em;
}

.artikkeli .entry-header {
    border-bottom: 0px;
}

.artikkeli .entry-header a{
    color: #ab3e37;
    text-decoration: none;
    font-weight: 400;
}

.artikkeli strong{
    color: #000;
}

.latest-posts {
  margin: 3rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

.latest-posts__title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.latest-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* kolme rinnakkain */
  gap: 2rem;
}

@media (max-width: 900px) {
  .latest-posts__grid {
    grid-template-columns: repeat(2, 1fr); /* tabletilla 2 vierekkäin */
  }
}

@media (max-width: 600px) {
  .latest-posts__grid {
    grid-template-columns: 1fr; /* mobiilissa yksi allekkain */
  }
}

.latest-posts__item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-posts__item a {
    text-decoration: none !important;
}

.latest-posts__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.latest-posts__thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.latest-posts__heading {
  font-size: 1.25rem;
  margin: 1rem;
  color: #222;
}

.latest-posts__date {
  font-size: 0.9rem;
  color: #777;
  margin: 0 1rem;
  display: block;
}

.latest-posts__excerpt {
  margin: 1rem;
  font-size: 0.9em;
  color: #555;
}

.latest-posts__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* LOPPUU */

/* TROYA värit */

a {
    color: #ab3e37;
}

/* NAPIT */

.wp-element-button {
    background: #ab3e37 !important;
    border: 1px solid #ab3e37 !important;
    color: #FFF !important;
    border-radius: 5px !important;
    padding: 5px 10px !important;
    padding: 10px 20px !important;
    font-size: 0.8em !important;
    transition: all 0.2s ease-in-out;
}

.wp-element-button:hover {
    background: #FFF !important;
    border: 1px solid #ab3e37 !important;
    color: #ab3e37 !important;
}

.wpcf7-submit {
    width: 100%;
    background: #ab3e37 !important;
    border: 1px solid #ab3e37 !important;
    color: #FFF !important;
    border-radius: 5px !important;
    transition: all 0.2s ease-in-out;
}

.wpcf7-submit:hover {
    background: #FFF !important;
    border: 1px solid #ab3e37 !important;
    color: #ab3e37 !important;

}

.troya-split__right-inner .wp-element-button{
    width: 100%;
    font-weight: 600;
}


/* SUODATTIMET */


.wpfSlug {
    background: #ab3e37 !important;
}

.wpfSlugTitle, .wpfSlugDelete {
    color: #FFF !important;
    font-weight: 500 !important;
}

.wpfMainWrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
    gap: 0px 1em;
}

.wpfFilterWrapper i, .wpfFilterWrapper svg {
    margin-top: 7px;
    font-size: 0.8em;
}

.wpfFilterWrapper {
    background: #323231;
    color: #FFF;
    border-radius: 3px;
    padding: auto 10px;
}

.wpfFilterTitle {
    margin-bottom: 0px !important;
    font-size: 0.9em;
    font-weight: 500;
    padding: auto 10px;
}

.wpfCheckboxHier {
    padding-top: 10px;
    font-size: 0.9em;
}

/* VALIKKO */

#mega-menu-wrap-primary .mega-menu-toggle.mega-menu-open + ul.mega-menu {
  position: fixed !important;
  inset: 0;                    /* top/right/bottom/left: 0 */
  z-index: 9999;
  display: flex !important;
  flex-direction: column;
  justify-content: center;     /* pystykeskitys */
  align-items: center;         /* vaakakeskitys */
  gap: 1.2rem;
  padding: 2rem;
  background: #fff;            /* tai rgba(255,255,255,.97) */
  width: 100vw;
  min-height: 100vh;
  text-align: center;
  overflow-y: auto;            /* jos linkkejä paljon */
}

/* Linkit isommiksi ja väljemmiksi */
#mega-menu-wrap-primary .mega-menu-toggle.mega-menu-open + ul.mega-menu > li > a.mega-menu-link {
  font-size: clamp(22px, 2.2vw, 36px);
  line-height: 1.2;
  font-weight: 600;
  padding: .4rem 1rem;
}

/* Siisti listan marginit ym. */
#mega-menu-wrap-primary .mega-menu-toggle.mega-menu-open + ul.mega-menu,
#mega-menu-wrap-primary .mega-menu-toggle.mega-menu-open + ul.mega-menu > li {
  margin: 0;
}

/* Sulkunappi kulmaan (valinnainen) */
#mega-menu-wrap-primary .mega-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
}

/* YLEISJUTUT */

    .mobile-spacer-5px {
       height: 5px !important; 
    }

    .mobile-spacer-20px {
       height: 0px !important; 
    }

    .mobile-spacer-tuoteryhma {
       height: 50px !important; 
    }

    .woocommerce-Tabs-panel strong {
        color: #000;
    }

.wp-social-link-instagram, .wp-social-link, .wp-social-link-whatsapp {
    color: #FFF;
    background: #000;
}

.hentry {
    margin: 0px;
}

.sivu-otsikko {
    font-size: 0.8em;
    font-weight: 300 !important;
    background: #fff;
    font-family: 'Lora', serif;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

/* TUOTERYHMÄ */

.storefront-sorting {
    margin: 2em 0em;
}

.centered {
  display: flex;
  justify-content: center; 
  align-items: center !important;  
}

.tuoteryhma {
    padding: 2em 0 0 0;
}

.tuoteryhma .woocommerce-LoopProduct-link {
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    padding: 5px;
}

.tuoteryhma .woocommerce-LoopProduct-link a:active, .tuoteryhma .woocommerce-LoopProduct-link:active {
    border: none !important;
}

.tuoteryhma-topheader {
    background-image: url('https://troya.fi/wp-content/uploads/2025/09/hevostausta3.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    height: 50vh;
}

.tuoteryhma-topheader .tuoteryhma-otsikko {
    background: #fff;
    font-family: 'Lora', serif;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

.tuoteryhma-topheader .woocommerce-products-header {
    padding: 0px;
}

.wc-block-product h2, .tuoteryhma .product h2 {
    color: #000;
    font-size: 1.1em !important;
    text-decoration: none;
}

.wc-block-product a, .tuoteryhma .product a {
    color: #000;
    text-decoration: none !important;
}

.wc-block-product .woocommerce-Price-amount, .tuoteryhma .product .woocommerce-Price-amount {
    font-weight: 600;
    color: #ab3e37;
}

/* ETUSIVU */

.etusivu-yhteys .wp-block-contact-form-7-contact-form-selector {
    background: #FFF;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    padding: 2em;
}

.etusivu-yhteys .wp-block-contact-form-7-contact-form-selector p {
    color: #000 !important;
}

.etusivu-yhteys .wp-block-contact-form-7-contact-form-selector input {
    width: 100%;
}

.etusivu-section-white h2 {
    color: #FFF !important;
}

.main-hero {
    background: #000 !important;
}

.etusivu-blokit h2 {
    color: #eeede2 !important;
}

.etusivu-blokit p {
    font-size: 0.9em !important;
}

.etusivu-blokit .wp-block-column {
    background: #FFF;
    padding: 0em;
}

.etusivu-blokit .wp-block-column:not(:last-child) {
    margin-right: 5px !important;
}

.etusivu-blokit .wp-block-button {
    margin-bottom: 0px !important;
}


/* WhatsApp */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  z-index: 9999;
  text-decoration: none;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: bold;
  transition: background 0.2s ease;
}
.whatsapp-float img {
  width: 30px;
  height: 30px;
}
.whatsapp-float:hover {
  background-color: #20b955;
}
.whatsapp-text {
  white-space: nowrap;
}

/* myyntitili */

.myyntitili .wpcf7-list-item {
    margin: 0.3em;
}

.myyntitili .wpcf7-list-item-label {
    padding-left: 10px;
}

.myyntitili input.wpcf7-text {
    width: 100%;
}

button.accordion-item__toggle {
    color: #000;
    font-size: 0.7em;
    padding: 0px 10px;
}

button.accordion-item__toggle:hover {
    background: #eeede2;
}

.accordion-content__wrapper {
    padding: 10px;
}


/* TUOTESIVU */

.woocommerce-tabs ul.tabs li.active a {
    color: #000 !important;
    font-weight: 500;
}

.woocommerce-tabs ul.tabs a {
    color: #6d6d6d !important;
}

.woocommerce-tabs ul.tabs li.active::after {
    color: #ab3e37;
}

.woocommerce-tabs ul:active, .woocommerce-tabs li:active, .woocommerce-tabs a, .woocommerce-tabs a:active {
    border: none !important;
}

.woocommerce-tabs .panel h2:first-of-type {
    margin-top: 0em;
    font-size: 2em; 
}

.woocommerce-tabs .panel h2 {
    margin-top: 1em;
    font-size: 2em; 
}

.woocommerce-product-attributes {
    font-size: 0.9em !important;
}

.woocommerce-product-attributes th, .woocommerce-product-attributes td {
    background-color: #fff !important;
    border-bottom: 1px solid #cbcbcb;
}

.woocommerce-product-attributes th {
    color: #000;
}

.tuotesivu-lomake {
    background: #853531;
    background-image: url('https://troya.fi/wp-content/uploads/2025/09/hevostausta-tuotesivu2.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    padding: 5em 0em;
}

.tuotesivu-lomake .col-full {
    background: #FFF;
    border-radius: 5px;
    padding: 2em;
}

.tuotesivu-lomake .wp-block-contact-form-7-contact-form-selector {
    background: #FFF;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    padding: 2em;
}

.tuotesivu-lomake p {
    color: #000 !important;
}

.tuotesivu-lomake input {
    width: 100%;
}

.storefront-breadcrumb {
    padding: 10px 0px;
    margin: 0px;
    background: #4b4b4b;
    color: #FFF;
}

.storefront-breadcrumb a {
    color: #eeede2;
}

.storefront-breadcrumb .col-full {
    max-width: 100%;
}

#main, #primary {
    margin-bottom: 0px;
}

.troya-split-wrapper {
  width: 100%;
  background-size: auto;
  background-position: top center;
  background-repeat: no-repeat;
  padding: 60px 0;
    background-image: url('https://troya.fi/wp-content/uploads/2025/09/puutausta-1.jpg')
}

.troya-split-inner {
  max-width: 80em; 
  margin-left: auto;
  margin-right: auto;
  padding: 0 2em; 
  box-sizing: border-box;
}

.troya-split { 
  display: flex; 
  gap: 2rem; 
}

.troya-split__left {
    flex: 0 0 60%;
    max-width: 60%;
    background: #FFF;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    padding: 2em;
    border-radius: 5px;
    border: 1px solid #cecece;
}

.troya-split__right {
  flex: 1;
}


.troya-split__container {
    position: relative;
}

.troya-split__right-inner {
    background: #FFF;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    padding: 2em;
    border-radius: 5px;
    border: 1px solid #cecece;
}

.box::before,
.box::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: url('https://troya.fi/wp-content/uploads/2025/09/ruuvi3.png') no-repeat center center;
  background-size: contain;
}

.box::before {
  top: 8px;
  left: 8px;
}

.box::after {
  top: 8px;
  right: 8px;
}

.troya-split__right h1 {
    font-size: 2em;
    font-weight: 700;
}

.troya-split__right .price {
    font-size: 1.2em;
    color: #ab3e37;
    margin: 0px;
}

.troya-split__right .product_meta {
    font-size: 0.8em;
}

.troya-split__right .product_meta a {
    color: #ab3e37;
}


.troya-half {
    display: flex;
    width: 100%;
    border-bottom: 1px solid #cecece;
    padding: 5px 0px;
    font-size: 0.9em;
}

.troya-half i {
    color: #ab3e37;
    padding-right: 8px;
}

.troya-half__left,
.troya-half__right {
  flex: 0 0 50%;
  max-width: 50%;
  box-sizing: border-box;
}

.troya-half__right {
  font-weight: 600;
    color: #000;
}

/* ==========
   TROYA Header Layout
   ========== */

#masthead.site-header {
    display: flex;
    align-items: center; 
    min-height: 80px;  
    padding: 0px 20px;
    margin: 0px;
}

.troya-row {
  display: flex;
  align-items: center;   /* keskitys pystysuunnassa */
  width: 100%;
  gap: 12px;             /* väliä palikoiden väliin (valinnainen) */
  box-sizing: border-box;
}

.troya-logo {
  flex: 0 0 150px;       /* kiinteä 200px leveys */
  max-width: 200px;
}

.troya-logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

.troya-main {
  flex: 1 1 auto;        /* täyttää lopun tilan */
  min-width: 0;          /* estää overflowin pitkällä sisällöllä */
}


/* ==========
   TROYA Footer Layout
   ========== */

.footerlinkki {
    margin-bottom: 3px;
}

.footerlinkki a {
    text-decoration: none;
        font-size: 0.9em;
      position: relative;
      color: #FFF;
      text-decoration: none;
}

.footerlinkki a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px; 
  background-color: #ab3e37;
  transition: width 0.3s ease; 
}

.footerlinkki a:hover::after {
  width: 100%;
}


.troya-footer {
  display: flex;
  justify-content: space-between;
}

.troya-footer hr {
    margin: 1em 0em;
}

.troya-footer .column {
  width: 33.33%;
  padding: 10px;
  box-sizing: border-box;
}

.footer-logo {
    max-width: 50%;
}

.footer-ikoni {
    color: #FFF;
    margin-right: 5px;
}

#colophon {
    background: #323231;
    color: #9f9f9f;
    border-top: 10px solid #ab3e37;
}

#colophon p {
    color: #9f9f9f;
}

#colophon a {
    color: #eeede2;
}

#colophon h1, #colophon h2, #colophon h3, #colophon h4, #colophon h5  {
    color: #FFF;
}

/* ==========
   MOBIILI
   ========== */

@media (max-width: 768px) {
  .troya-split {
    flex-direction: column;
  }
  .troya-split__left,
  .troya-split__right {
    max-width: 100%;
  }
    
/* BLOGI */

.artikkeli h1 {
    font-size: 1.8em;
}
    
.artikkeli  {
    padding-top: 1em;
    padding-bottom: 1em;
}

    
ul.products li.product {
    width: 50% !important; 
    float: left; 
    clear: none !important;
  }

  /* jos haluat vielä tasaiset rivit ilman turhia marginaaleja */
  ul.products {
    display: flex;
    flex-wrap: wrap;
  }

  ul.products li.product {
    box-sizing: border-box;
    padding: 0 10px; /* halutessa sisämarginaali */
  }
    
    .col-full {
        margin-left: 0.5em;
        margin-right: 0.5em;
    }
    
    .troya-split-wrapper {
        padding: 5px 0px;
    }
    
    .troya-split-inner {
        padding: 0px 0.5em;
    }
    
    .troya-split__right h1 {
        font-size: 1.5em;
    }
    
    p.rahoitus {
        font-size: 0.8em;
    }
    
    .troya-half__left {
        flex: 0 0 70%;
        max-width: 70%;
    }
    
    .troya-split__left {
        padding: 0.5em;
    }
    
    .woocommerce-Tabs-panel p, .woocommerce-Tabs-panel li, .woocommerce-Tabs-panel ul {
        font-size: 0.9em;
    }
    
    .tuotesivu-lomake {
        padding: 1em 0em;
    }
    
    .tuotesivu-lomake p {
        font-size: 0.8em;
    }
    
    .wpfMainWrapper {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
        gap: 0px 1em;
    }
    
    .wpfFilterTitle {
        font-size: 0.8em;
    }
    
    .wpfFilterWrapper {
        margin-top: 0px !important;
    }
    
    .wpfSlugWrapper {
        padding: 0px !important;
    }
    
    .wpfFilterWrapper {
        padding: 10px !important;
    }
    
    h2 {
        font-size: 1.5em !important;
    }
    
    .wc-block-product h2, .tuoteryhma .product h2 {
        font-size: 0.9em !important;
    }
    
    .tuoteryhma-topheader .tuoteryhma-otsikko {
        font-size: 0.6em;
    }

    .wp-block-cover p, .wp-block-column p {
        font-size: 0.9em !important;
    }
    
    .wp-block-cover h2 {
        font-size: 1.4em;
    }
    
    .wc-block-product-template__responsive {
        margin: 0px;
    }
    
    .sivu-otsikko {
        font-size: 0.5em !important;
    } 
    
    .mobile-spacer {
       height: 0px !important; 
    }
    
    .mobile-spacer-20px {
       height: 20px !important; 
    }
    
    .mobile-spacer-tuoteryhma {
       height: 20px !important; 
    }
    
    .etusivu-blokit {
        gap: 0px;
    }
    
    .etusivu-yhteys label {
        font-size: 0.8em !important;
    }
    
    .wpcf7-submit {
        font-size: 0.8em !important;
    }
    
    .hentry .entry-content .wp-block-cover .wp-block-cover__inner-container {
       padding: 0px !important; 
    }
    
      .troya-footer { flex-direction: column; justify-content: initial; }
      .troya-footer .column { flex: 0 0 auto; width: 100%; }

     .etusivu-blokit {
        display: flex !important;  
        flex-direction: row !important;
        flex-wrap: nowrap !important;  
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
        gap: 12px;
      }
      .etusivu-blokit > .wp-block-column {
        flex: 0 0 75vw;  
        max-width: 75vw;
        min-width: 240px; 
      }
        
    .wpfFloatingTitle {
        background: #FFF !important;
    }


.wpfFilterWrapper {
    background: #FFF;
    color: #323231;
}

    
    
}
