/*
 * Optimus Oils — responsive layout and YITH quote page fix.
 * Scope quote-specific rules to avoid changing WooCommerce checkout.
 * No product prices, cart data, fields or YITH functions are changed.
 */

/* On tablets, collapse main nav before desktop labels start colliding. */
@media (max-width:1240px){
  body.optimus-theme .optimus-header__inner{height:80px;gap:12px}
  body.optimus-theme .optimus-header .optimus-nav{display:none!important}
  body.optimus-theme .optimus-menu-button{
    display:flex!important;width:44px;height:44px;
    flex-direction:column;align-items:center;justify-content:center;
    gap:6px;background:#f0f4f8;border:1px solid #dae6f0;
    border-radius:3px;flex-shrink:0
  }
  body.optimus-theme .optimus-menu-button span{display:block;width:19px;height:2px;background:#234782;transition:transform .2s,opacity .2s}
  body.optimus-theme .optimus-menu-button[aria-expanded="true"] span:nth-child(1){transform:translateY(8px) rotate(45deg)}
  body.optimus-theme .optimus-menu-button[aria-expanded="true"] span:nth-child(2){opacity:0}
  body.optimus-theme .optimus-menu-button[aria-expanded="true"] span:nth-child(3){transform:translateY(-8px) rotate(-45deg)}
  body.optimus-theme .optimus-header__actions{margin-left:auto;flex-shrink:0}
  body.optimus-theme .optimus-brand{min-width:0}
  body.optimus-theme .optimus-brand__symbol{width:72px;height:72px;flex:0 0 72px}
  body.optimus-theme .optimus-brand__symbol img{width:70px;height:70px}
  body.optimus-theme .optimus-brand__text strong{font-size:22px}
  body.optimus-theme .optimus-mobile-nav:not([hidden]){
    display:flex!important;flex-direction:column;padding:12px 26px 26px;
    background:#fff;box-shadow:0 20px 25px #0002;
    max-height:min(75vh,700px);overflow:auto
  }
  body.optimus-theme .optimus-mobile-nav>a{
    padding:13px 8px;border-bottom:1px solid #edf0f2;
    color:#214588;font-weight:800;font-size:15px
  }
  body.optimus-theme .optimus-mobile-nav__sub{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;
    padding:12px;background:#eaf0f7
  }
  body.optimus-theme .optimus-mobile-nav__sub a{
    padding:10px 12px;background:#fff;color:#244b8a;
    font-size:13px;font-weight:750
  }
  body.optimus-theme .optimus-mobile-nav .optimus-mobile-nav__cta{
    display:block;background:#214990;color:#fff!important;text-align:center;
    border:0;margin-top:12px;padding:14px
  }
}

/* Quote page: leave available width to the forms. */
body.optimus-theme .optimus-quote-page .optimus-page-hero{padding:45px 0 50px}
body.optimus-theme .optimus-quote-page .optimus-page-hero h1{font-size:clamp(35px,4.3vw,59px)}
body.optimus-theme .optimus-quote-page>.optimus-section{padding:42px 0 75px}
body.optimus-theme .optimus-quote__grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 310px;
  gap:30px;
  align-items:start;
}
body.optimus-theme .optimus-quote__content{
  min-width:0;max-width:100%;
  padding:30px;overflow:visible;
}
body.optimus-theme .optimus-quote__form,
body.optimus-theme .optimus-quote__content .ywraq-wrapper,
body.optimus-theme .optimus-quote__content .ywraq-form-table-wrapper{
  width:100%;max-width:100%;min-width:0;
  box-sizing:border-box;
}
body.optimus-theme .optimus-quote__content .ywraq-form-table-wrapper.wide{
  display:block!important;
  flex:none!important;
}
body.optimus-theme .optimus-quote__content .ywraq-form-table-wrapper.wide > form#yith-ywraq-form,
body.optimus-theme .optimus-quote__content .ywraq-form-table-wrapper.wide > .yith-ywraq-mail-form-wrapper{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  flex:none!important;
  margin-left:0!important;
}
body.optimus-theme .optimus-quote__content form#yith-ywraq-form{
  display:block!important;width:100%!important;
  min-width:0!important;max-width:100%!important;
}
body.optimus-theme .optimus-quote__content .yith-ywraq-mail-form-wrapper{
  display:block!important;
  clear:both!important;
  width:100%!important;
  padding:22px 0 4px!important;
  margin:25px 0 0!important;
  border-top:1px solid #e0e8f0;
}
body.optimus-theme .optimus-quote__content .yith-ywraq-mail-form-wrapper h3{
  color:#20478c;
  font-size:clamp(21px,2.5vw,26px);
  line-height:1.25;margin:0 0 16px;
  overflow-wrap:anywhere;
}
body.optimus-theme .optimus-quote__content form#yith-ywraq-mail-form{
  width:100%;max-width:100%;min-width:0;
}
body.optimus-theme .optimus-quote__content form#yith-ywraq-mail-form .form-row{
  width:100%!important;max-width:100%!important;
  float:none!important;clear:both!important;
  padding:0!important;margin:0 0 18px!important;
}
body.optimus-theme .optimus-quote__content form#yith-ywraq-mail-form label{
  display:block;color:#20344f;font-size:14px;font-weight:750;margin:0 0 6px
}
body.optimus-theme .optimus-quote__content form#yith-ywraq-mail-form input:not([type=hidden]):not([type=checkbox]):not([type=submit]),
body.optimus-theme .optimus-quote__content form#yith-ywraq-mail-form textarea{
  display:block!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  padding:12px 14px!important;
  font-size:16px!important;line-height:1.5!important;
  background:#f8fafc;color:#20344f;
  border:1px solid #cdd9e5;border-radius:3px;
  box-sizing:border-box;
}
body.optimus-theme .optimus-quote__content form#yith-ywraq-mail-form textarea{
  min-height:130px;resize:vertical
}
body.optimus-theme .optimus-quote__content .yith-ywraq-mail-form-wrapper input.raq-send-request{
  display:inline-block!important;max-width:100%!important;
  white-space:normal!important;line-height:1.4!important;
  padding:13px 18px!important;background:#b9481d!important;
  color:#fff!important;cursor:pointer;
}

/* Quote table on desktop and tablet; never let the form force overflow. */
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list{
  border-collapse:collapse!important;border-spacing:0!important;
  table-layout:auto;
  max-width:100%!important;width:100%!important;margin:16px 0 0!important;
}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list th,
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td{
  box-sizing:border-box;
  padding:12px 9px!important;
  vertical-align:middle!important;
  overflow-wrap:anywhere;
  border:1px solid #dce4ed!important;
}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-thumbnail{width:98px!important}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-thumbnail img{
  display:block;width:85px!important;height:85px!important;max-width:100%!important;
  object-fit:contain;margin:0 auto
}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-name{
  min-width:0!important;width:auto!important;
  font-size:14px!important;line-height:1.5!important;
}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-name a{
  font-weight:750;color:#214990!important;
  text-decoration:none;overflow-wrap:anywhere
}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-remove{width:34px}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-quantity{width:92px}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list .quantity{width:auto!important;margin:0!important}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list .qty{
  width:76px!important;max-width:100%!important;min-width:0!important;
  padding:8px!important;border:1px solid #ccd8e1!important;
  background:#f8fafb;text-align:center;font-size:16px!important
}
body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.actions{
  text-align:right!important;background:#f8fafc
}
body.optimus-theme .optimus-quote__content .woocommerce .button{
  white-space:normal!important;overflow-wrap:anywhere
}
body.optimus-theme .optimus-quote__aside{
  min-width:0;padding:27px 24px;
  overflow-wrap:break-word
}
body.optimus-theme .optimus-quote__aside h2{font-size:clamp(24px,2.2vw,29px)}
body.optimus-theme .optimus-quote__aside .optimus-btn{
  min-width:0;max-width:100%;gap:12px;white-space:normal
}
body.optimus-theme .optimus-quote__help{overflow-wrap:anywhere}

@media(max-width:1280px){
  body.optimus-theme .optimus-quote__grid{
    grid-template-columns:minmax(0,1fr);
    gap:24px;
    max-width:950px;
    margin-inline:auto;
  }
  body.optimus-theme .optimus-quote__aside{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
    column-gap:18px;padding:22px 25px;
  }
  body.optimus-theme .optimus-quote__aside>.optimus-overline,
  body.optimus-theme .optimus-quote__aside>h2,
  body.optimus-theme .optimus-quote__aside>.optimus-btn,
  body.optimus-theme .optimus-quote__aside>.optimus-quote__help{grid-column:1/-1}
  body.optimus-theme .optimus-quote__aside>div{
    display:flex;gap:9px;padding:14px 2px
  }
  body.optimus-theme .optimus-quote__aside .optimus-btn{max-width:315px}
  body.optimus-theme .optimus-quote__aside h2{font-size:25px}
}
@media(max-width:850px){
  body.optimus-theme .optimus-brand__symbol{width:49px;height:52px;flex:0 0 49px}
  body.optimus-theme .optimus-brand__symbol img{width:49px;height:49px}
  body.optimus-theme .optimus-brand__text strong{font-size:19px}
  body.optimus-theme .optimus-header__inner{height:74px}
  body.optimus-theme .optimus-quote-page .optimus-page-hero{padding:35px 0 38px}
  body.optimus-theme .optimus-quote-page>.optimus-section{padding:25px 0 55px}
  body.optimus-theme .optimus-quote__aside{display:block}
}
@media(max-width:800px){
  body.optimus-theme .optimus-quote__content{padding:18px 15px;min-height:0}
  body.optimus-theme .optimus-quote__form>p{font-size:14px;line-height:1.6}
  body.optimus-theme .optimus-quote__form>p:nth-of-type(2){margin-bottom:19px}
  body.optimus-theme .optimus-quote__content .yith-ywraq-mail-form-wrapper{margin-top:18px!important}
  body.optimus-theme .optimus-quote__aside{padding:20px 18px}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list{
    width:100%!important;
    display:block!important;border:0!important
  }
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list thead{display:none!important}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list tbody{display:block!important}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list tr.cart_item{
    display:grid!important;
    grid-template-columns:24px 83px minmax(0,1fr)!important;
    gap:8px 12px!important;
    width:100%!important;
    padding:13px 10px!important;
    margin:0 0 12px!important;
    background:#fff;border:1px solid #d9e4ed!important;
    border-radius:4px;
  }
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list tr.cart_item td{
    display:block!important;float:none!important;position:static!important;
    padding:0!important;border:0!important;
    width:auto!important;min-width:0!important;
    text-align:left!important;background:transparent!important;
  }
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list tr.cart_item td::before{display:none!important;content:none!important}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-remove{grid-column:1;grid-row:1}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-thumbnail{grid-column:2;grid-row:1 / span 2}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-thumbnail img{width:78px!important;height:80px!important}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-name{grid-column:3;grid-row:1;line-height:1.45!important}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-quantity{grid-column:3;grid-row:2}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-quantity:before{
    content:"Määrä";display:block!important;
    float:none!important;clear:none!important;font-size:12px;font-weight:750;margin:0 0 4px;color:#536b82
  }
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-subtotal{grid-column:3;grid-row:3}
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list tbody>tr:not(.cart_item){
    display:block!important;width:100%;border:0!important
  }
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list tbody>tr:not(.cart_item) td.actions{
    display:block!important;width:100%!important;
    padding:10px 0!important;border:0!important;text-align:left!important
  }
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.actions .button{
    display:block!important;width:100%!important;margin:0!important;
    padding:13px!important
  }
  body.optimus-theme .optimus-quote__content form#yith-ywraq-mail-form .raq-send-request{
    width:100%!important
  }
}
@media(max-width:390px){
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list tr.cart_item{
    grid-template-columns:20px 66px minmax(0,1fr)!important;gap:7px!important;
  }
  body.optimus-theme .optimus-quote__content #yith-ywrq-table-list td.product-thumbnail img{
    width:64px!important;height:68px!important;
  }
}

/* Mobile identity: make the logo and name more prominent, without pushing
   search and menu outside the viewport. */
@media(max-width:1240px){
  body.optimus-theme .optimus-header__inner{min-width:0}
  body.optimus-theme .optimus-brand{flex:0 1 auto;min-width:0;gap:12px}
  body.optimus-theme .optimus-brand__text{min-width:0}
  body.optimus-theme .optimus-brand__text strong{
    color:#234589!important;font-size:25px;line-height:1.02;
    letter-spacing:-.055em;white-space:nowrap
  }
  body.optimus-theme .optimus-brand__text strong span{color:#234589!important}
  body.optimus-theme .optimus-brand__symbol{width:79px;height:79px;flex:0 0 79px}
  body.optimus-theme .optimus-brand__symbol img{width:79px;height:79px}
  body.optimus-theme .optimus-header__inner{height:94px;gap:8px}
  body.optimus-theme .optimus-header__actions{gap:7px}
  body.optimus-theme .optimus-header .optimus-container{padding-inline:22px}
}
@media(max-width:720px){
  body.optimus-theme .optimus-header__inner{height:83px}
  body.optimus-theme .optimus-header .optimus-container{padding-inline:16px}
  body.optimus-theme .optimus-brand{gap:9px}
  body.optimus-theme .optimus-brand__symbol{width:61px;height:63px;flex:0 0 61px}
  body.optimus-theme .optimus-brand__symbol img{width:61px;height:61px}
  body.optimus-theme .optimus-brand__text strong{font-size:22px}
  body.optimus-theme .optimus-brand__text small{
    font-size:7.3px;letter-spacing:.06em;margin-top:6px;
    white-space:nowrap;display:block
  }
  body.optimus-theme .optimus-search-button,
  body.optimus-theme .optimus-menu-button{
    width:42px!important;height:43px!important;flex:0 0 42px;
  }
  body.optimus-theme .optimus-header__actions{gap:7px}
  body.optimus-theme .optimus-hero__actions .optimus-btn{
    justify-content:center;gap:0;text-align:center
  }
}
@media(max-width:395px){
  body.optimus-theme .optimus-header .optimus-container{padding-inline:12px}
  body.optimus-theme .optimus-brand{gap:7px}
  body.optimus-theme .optimus-brand__symbol{width:53px;height:57px;flex:0 0 53px}
  body.optimus-theme .optimus-brand__symbol img{width:53px;height:55px}
  body.optimus-theme .optimus-brand__text strong{font-size:20.5px}
  body.optimus-theme .optimus-brand__text small{font-size:6.5px;letter-spacing:.03em}
  body.optimus-theme .optimus-search-button,
  body.optimus-theme .optimus-menu-button{
    width:38px!important;height:40px!important;flex:0 0 38px;
  }
  body.optimus-theme .optimus-header__actions{gap:6px}
}
@media(max-width:350px){
  body.optimus-theme .optimus-brand__symbol{width:45px;height:49px;flex-basis:45px}
  body.optimus-theme .optimus-brand__symbol img{width:45px;height:47px}
  body.optimus-theme .optimus-brand__text strong{font-size:18px}
  body.optimus-theme .optimus-brand__text small{display:none}
}

/* Readability update: legible mobile wordmark and category cards. */
@media(max-width:720px){
  body.optimus-theme .optimus-header__inner{height:93px}
  body.optimus-theme .optimus-brand{gap:10px}
  body.optimus-theme .optimus-brand__symbol{
    width:70px;height:72px;flex:0 0 70px
  }
  body.optimus-theme .optimus-brand__symbol img{width:70px;height:70px}
  body.optimus-theme .optimus-brand__text strong{
    font-size:25px;letter-spacing:-.06em;line-height:1.08
  }
  body.optimus-theme .optimus-brand__text small{
    display:block;font-size:8px;letter-spacing:.035em;
    font-weight:800;margin-top:7px
  }
  body.optimus-theme .optimus-categories .optimus-overline{
    font-size:13px;line-height:1.5;letter-spacing:.1em
  }
  body.optimus-theme .optimus-categories .optimus-section-head h2{
    font-size:clamp(31px,7vw,42px);
    line-height:1.15;overflow-wrap:normal
  }
  body.optimus-theme .optimus-categories .optimus-text-link{
    font-size:16px;line-height:1.5
  }
  body.optimus-theme .optimus-category{padding:22px 18px;min-height:225px}
  body.optimus-theme .optimus-category__top small{
    font-size:12px;line-height:1.45;letter-spacing:.035em
  }
  body.optimus-theme .optimus-category strong{
    font-size:clamp(29px,7vw,36px);
    margin-top:30px;line-height:1.08
  }
  body.optimus-theme .optimus-category__desc{
    font-size:15px;line-height:1.5;color:#445d75
  }
  body.optimus-theme .optimus-category__bottom{
    font-size:14px;line-height:1.4;color:#435c72;
    padding-top:13px
  }
}
@media(max-width:430px){
  body.optimus-theme .optimus-header .optimus-container{padding-inline:10px}
  body.optimus-theme .optimus-brand{gap:6px}
  body.optimus-theme .optimus-brand__symbol{
    width:62px;height:65px;flex:0 0 62px
  }
  body.optimus-theme .optimus-brand__symbol img{width:62px;height:62px}
  body.optimus-theme .optimus-brand__text strong{font-size:23px}
  body.optimus-theme .optimus-brand__text small{font-size:7px;letter-spacing:0}
  body.optimus-theme .optimus-header__actions{gap:5px}
  body.optimus-theme .optimus-search-button,
  body.optimus-theme .optimus-menu-button{
    width:39px!important;height:41px!important;flex:0 0 39px
  }
  body.optimus-theme .optimus-categories__grid{
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  body.optimus-theme .optimus-category{padding:19px 13px;min-height:218px}
  body.optimus-theme .optimus-category__top small{font-size:11px}
  body.optimus-theme .optimus-category strong{font-size:30px}
  body.optimus-theme .optimus-category__desc{font-size:14px}
  body.optimus-theme .optimus-category__bottom{font-size:13px}
}
@media(max-width:375px){
  body.optimus-theme .optimus-brand__symbol{
    width:55px;height:59px;flex:0 0 55px
  }
  body.optimus-theme .optimus-brand__symbol img{width:55px;height:57px}
  body.optimus-theme .optimus-brand__text strong{font-size:21px}
  body.optimus-theme .optimus-brand__text small{font-size:6.5px}
  body.optimus-theme .optimus-search-button,
  body.optimus-theme .optimus-menu-button{
    width:36px!important;height:39px!important;flex:0 0 36px
  }
}

/* Accessible category selection guide on the shop landing page. */
.optimus-seo-guide{margin:18px 0 33px;padding:24px 27px;background:#f1f5fa;border-left:4px solid #27549a;color:#263e58}
.optimus-seo-guide h2{font-size:clamp(23px,2.5vw,31px);color:#20478c;margin:0 0 12px;line-height:1.2}
.optimus-seo-guide p{margin:0 0 11px;font-size:15px;line-height:1.68;color:#344b63}
.optimus-seo-guide__links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:16px}
.optimus-seo-guide__links p{background:#fff;border:1px solid #dce6f0;padding:14px 16px;margin:0}
.optimus-seo-guide a{color:#164c94!important;text-decoration:underline!important;text-underline-offset:3px;font-weight:750}
.optimus-seo-guide a:hover{color:#a43b17!important}
.optimus-seo-guide__help{margin:15px 0 0!important}
@media(max-width:900px){.optimus-seo-guide__links{grid-template-columns:1fr;gap:9px}}
@media(max-width:640px){.optimus-seo-guide{padding:19px 16px;margin:14px 0 25px}.optimus-seo-guide h2{font-size:25px}.optimus-seo-guide p{font-size:15px}}


