/*
Theme Name: ITMode Rhythm
Version: 0.3.1
Text Domain: itmode-rhythm
Requires PHP: 7.4
*/
*{box-sizing:border-box}
body{margin:0;background:#fff;color:#14383e;font-family:system-ui,sans-serif;line-height:1.55}
a{color:#134d70;text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto}
:focus-visible{outline:3px solid #1859c2;outline-offset:3px}
.ir-site-header{color:#07383e;background:#fbf7f1}
.ir-site-header a{color:inherit}
.ir-site-header .ir-nav a{color:white}
.ir-masthead,.ir-hero,.ir-service,.ir-categories,.ir-featured,.ir-shell{width:min(100%,1600px);margin-inline:auto}
.ir-shell{padding:1.25rem clamp(.9rem,3vw,3rem)}
.ir-site-footer{padding:1.4rem clamp(.9rem,3vw,3rem);background:#07383e;color:white}
.ir-site-footer a{color:white}
.ir-site-footer nav{display:flex;gap:1rem;flex-wrap:wrap}
.ir-site-footer p{margin-bottom:.4rem}
.ir-site-header .ir-brand span{color:#a63710}
.ir-search input[type=search]{font:inherit}
.ir-search button{font:inherit;cursor:pointer}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.screen-reader-text:focus{width:auto;height:auto;clip-path:none;background:#fff;padding:.5rem;z-index:10}
.woocommerce ul.products li.product .price .amount{white-space:nowrap}
.woocommerce ul.products li.product{padding:.8rem;border:1px solid #e5ded6;border-radius:10px}
.woocommerce ul.products li.product a img{aspect-ratio:4/3;object-fit:contain}
.woocommerce #respond input#submit.alt,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt{background:#a63710;color:#fff}
    .itmode-rhythm{--ink:#07383e;--rust:#a63710;--line:#e5ded6;color:var(--ink);margin:1rem 0 3rem}
    .itmode-rhythm a:focus-visible{outline:3px solid #1859c2;outline-offset:3px}
    .ir-masthead{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1.5rem;padding:1rem clamp(1rem,3vw,2.5rem);background:#fbf7f1}
    .ir-brand{font-size:clamp(1.55rem,3vw,2.6rem);font-weight:900;font-style:italic;letter-spacing:-.055em;color:var(--ink);white-space:nowrap}
    .ir-brand span,.ir-tag{color:var(--rust)}
    .ir-search{display:flex;min-width:0;margin:0}
    .ir-search input[type=search]{min-width:0;width:100%;margin:0;border:1px solid #c7cecd;border-radius:8px 0 0 8px;background:#fff;padding:.65rem}
    .ir-search button{border:0;border-radius:0 8px 8px 0;background:var(--ink);color:#fff;padding:.65rem .85rem}
    .ir-account{display:flex;gap:1rem;flex-wrap:wrap}
    .ir-account a,.ir-service a{color:var(--ink);font-weight:700}
    .ir-service{display:flex;justify-content:space-around;gap:.5rem;flex-wrap:wrap;padding:.75rem;background:#f7f1e9;border-radius:9px;margin-top:.75rem}
    .ir-tag{font-weight:750;font-size:.8rem}
    .ir-nav{display:flex;justify-content:center;gap:clamp(.5rem,3vw,3rem);flex-wrap:wrap;background:#07383e;border-radius:12px 12px 0 0;padding:.75rem 1rem}
    .ir-nav a{color:#fff;font-weight:700;padding:.6rem .35rem}
    .ir-nav a:hover{text-decoration:underline}
    .ir-hero{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,6fr);background:#f8f0e6;overflow:hidden}
    .ir-hero.ir-hero-text{grid-template-columns:1fr}
    .ir-copy{padding:clamp(1.5rem,5vw,5rem)}
    .ir-copy h1{font-size:clamp(2.2rem,5vw,4.8rem);line-height:.99;letter-spacing:-.045em;color:var(--ink);margin:0 0 1rem;font-weight:800}
    .ir-copy p{margin:0 0 1.35rem;font-size:clamp(1rem,1.5vw,1.2rem);max-width:34ch}
    .ir-actions{display:flex;flex-wrap:wrap;gap:.6rem}
    .ir-actions a{display:inline-flex;align-items:center;gap:.65rem;min-height:46px;background:var(--rust);color:#fff;padding:.65rem .95rem;border-radius:8px;font-weight:700}
    .ir-actions a+a{background:#174da8}
    .ir-actions a:hover{filter:brightness(.89)}
    .ir-visual{position:relative;min-height:320px;background:#08434b}
    .ir-visual img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
    .ir-categories{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.65rem;margin:1rem 0 2rem}
    .ir-categories a{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.3rem;padding:.85rem;border-radius:10px;border:1px solid var(--line);background:#f9f4ee;color:var(--ink)}
    .ir-categories strong,.ir-categories span{display:block}
    .ir-categories span{font-size:.83rem;line-height:1.3;margin-top:.2rem}
    .ir-categories img{width:clamp(42px,6vw,85px);height:68px;object-fit:contain}
    .ir-categories b{color:var(--rust)}
    .ir-categories a:hover{border-color:var(--rust)}
    .ir-featured header{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:1rem}
    .ir-featured h2{font-size:clamp(1.25rem,2.5vw,1.65rem);color:var(--ink);font-weight:800}
    .ir-featured header a{color:#174da8;font-weight:700}
    .ir-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
    .ir-product{display:flex;flex-direction:column;justify-content:space-between;gap:.65rem;border:1px solid var(--line);border-radius:12px;padding:.85rem;min-width:0}
    .ir-product img{width:100%;height:clamp(95px,16vw,175px);object-fit:contain;margin-bottom:.6rem}
    .ir-product strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:var(--ink);overflow-wrap:anywhere;line-height:1.35}
    .ir-price{font-weight:800;color:var(--ink);font-size:1.05rem}
    .ir-price .amount{white-space:nowrap;display:inline-block}
    .ir-price del{color:#52666b;font-weight:400}
    .ir-price ins{color:var(--rust);text-decoration:none}
    @media(max-width:950px){.ir-categories{grid-template-columns:repeat(3,minmax(0,1fr))}}
    @media(max-width:700px){
        .ir-hero{grid-template-columns:1fr}
        .ir-visual{min-height:0;aspect-ratio:3/2}
        .ir-masthead{grid-template-columns:1fr auto;gap:.65rem}
        .ir-search{grid-column:1/-1;grid-row:2}
        .ir-nav{justify-content:flex-start;gap:.25rem .8rem}
        .ir-categories,.ir-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    }
    @media(max-width:390px){.ir-categories img{width:34px;height:34px}}
    .ir-masthead{padding-inline:clamp(1rem,4vw,4rem);min-height:70px}
    .ir-nav{border-radius:0;padding-block:.25rem}
    .ir-hero{grid-template-columns:minmax(0,42fr) minmax(0,58fr)}
    .ir-copy{padding:clamp(1.5rem,3.7vw,4.5rem)}
    .ir-copy h1{font-size:clamp(2.25rem,4.4vw,5.15rem)}
    .ir-visual{min-height:clamp(300px,27vw,510px)}
    .ir-visual img{object-position:center 56%}
    .ir-service,.ir-categories,.ir-featured{margin-inline:clamp(.8rem,2.4vw,3rem)}
    .ir-service{margin-top:.85rem;min-height:50px;align-items:center}
    .ir-categories{gap:.7rem;margin-block:.9rem 1.65rem}
    .ir-categories a{position:relative;min-height:126px;padding:1rem;padding-inline-end:40%;overflow:hidden;background:linear-gradient(120deg,#faf3e8,#f2ece5)}
    .ir-categories strong{font-size:clamp(1rem,1.35vw,1.35rem);line-height:1.1}
    .ir-categories img{position:absolute;right:.45rem;bottom:.45rem;width:38%;height:82%;mix-blend-mode:multiply}
    .ir-categories b{grid-column:1;color:white;background:var(--rust);border-radius:5px;width:1.65rem;text-align:center}
    .ir-product{display:grid;grid-template-columns:minmax(0,42fr) minmax(0,58fr);align-items:center;gap:.8rem;padding:.85rem}
    .ir-product img{margin:0;height:clamp(90px,11vw,160px)}
    .ir-product-info{min-width:0;display:grid;justify-items:start;gap:.4rem}
    .ir-product .ir-tag{display:inline-block;background:#f9eee1;padding:.15rem .4rem;border-radius:4px}
    .ir-product-add{background:var(--rust);color:white;border-radius:6px;padding:.32rem .65rem;font-size:.83rem;font-weight:750}
    .ir-product-add:hover{background:#812b0e;color:white}
    @media(max-width:1100px){.ir-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
    @media(max-width:700px){
        .ir-hero{grid-template-columns:1fr}
        .ir-visual{min-height:0}
        .ir-categories a{min-height:104px}
        .ir-service{justify-content:center;column-gap:1rem}
    }
    @media(max-width:480px){.ir-grid{grid-template-columns:1fr}}
.ir-service,.ir-categories,.ir-featured{width:min(calc(100% - 2rem),1540px);margin-inline:auto}
.ir-site-header .ir-nav{width:100%;padding-inline:1rem}
.ir-hero{width:min(100%,1600px)}

/* Rhythm homepage — shared alignment and a full-width hero. */
:root{--rhythm-gutter:clamp(1rem,2.4vw,3rem);--rhythm-content:1680px}
body.home #main{width:100%;max-width:none;margin:0;padding:0}
body.home #main .itmode-rhythm{width:100%;max-width:none;margin:0 auto 2.75rem}
.ir-site-header .ir-masthead{
    max-width:var(--rhythm-content);padding-inline:var(--rhythm-gutter);
    grid-template-columns:minmax(210px,1fr) minmax(0,2.8fr) minmax(195px,1fr);
    gap:clamp(1rem,2.75vw,3.25rem)
}
.ir-site-header .ir-account{justify-content:flex-end}
.ir-site-header .ir-search button{
    background:#07383e;color:#fff;border:1px solid #07383e;border-radius:0 8px 8px 0;
    min-width:74px;font-weight:700
}
body.home #main .ir-hero{
    width:100%;max-width:none;margin:0;
    grid-template-columns:minmax(0,40fr) minmax(0,60fr);
}
body.home #main .ir-copy{
    position:relative;z-index:1;align-self:stretch;display:flex;flex-direction:column;
    justify-content:center;padding:clamp(2rem,4.3vw,5rem) var(--rhythm-gutter);
}
body.home #main .ir-copy h1{font-size:clamp(2.4rem,4.8vw,5.65rem);font-weight:850}
body.home #main .ir-copy h1::after{
    content:"";display:block;margin-top:.65rem;width:5.5rem;height:4px;
    background:#ad4018;border-radius:100%;transform:rotate(-3deg)
}
body.home #main .ir-visual{min-height:clamp(330px,24vw,490px)}
body.home #main .ir-visual img{object-position:center 50%}
body.home #main .ir-visual::after{
    content:"";position:absolute;inset:0;pointer-events:none;
    background:linear-gradient(90deg,#f8f0e6 0%,#f8f0e600 14%)
}
body.home #main .ir-service,
body.home #main .ir-categories,
body.home #main .ir-featured{
    width:min(calc(100% - 2 * var(--rhythm-gutter)),var(--rhythm-content));
    margin-left:auto;margin-right:auto;margin-inline:auto
}
body.home #main .ir-service{
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;
    padding:.55rem .2rem;margin-top:1rem
}
.ir-service a{display:grid;gap:.1rem;padding:.25rem 1rem;line-height:1.25}
.ir-service a+a{border-left:1px solid #dbd4cb}
.ir-service small{font-weight:450;color:#425d60}
body.home #main .ir-categories a{min-height:128px}
.ir-featured-top{padding-bottom:.55rem}
.ir-offer-nav{display:flex;gap:clamp(.8rem,2.1vw,2.5rem);align-items:baseline;flex-wrap:wrap}
.ir-featured-top .ir-offer-nav h2{margin:0;padding-bottom:.25rem;border-bottom:3px solid var(--rust)}
.ir-featured-top .ir-offer-nav a{color:#425d60;font-weight:550}
body.home #main .ir-product{min-height:174px}
.ir-product-add{white-space:nowrap}
@media(max-width:850px){
    .ir-site-header .ir-masthead{grid-template-columns:auto minmax(0,1fr);gap:.6rem}
    .ir-site-header .ir-search{grid-column:1/-1;grid-row:2}
    .ir-site-header .ir-account{grid-column:2;grid-row:1}
}
@media(max-width:700px){
    body.home #main .ir-hero{grid-template-columns:1fr}
    body.home #main .ir-copy{padding-block:1.65rem}
    body.home #main .ir-visual{min-height:0;aspect-ratio:16/9}
    body.home #main .ir-visual::after{background:linear-gradient(180deg,#f8f0e6,#f8f0e600 16%)}
    body.home #main .ir-service{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:.55rem}
    .ir-service a+a{border-left:0}
    .ir-service a:nth-child(even){border-left:1px solid #dbd4cb}
    body.home #main .ir-categories a{min-height:104px}
}

/* Reference layout */
:root{--rhythm-gutter:clamp(1rem,2.35vw,3.2rem);--rhythm-content:2200px}
.ir-site-header .ir-masthead{max-width:none;min-height:73px;padding-inline:clamp(1rem,3.8vw,5rem);grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr)}
.ir-site-header .ir-brand{font-size:clamp(1.8rem,3vw,3.5rem);line-height:1}
.ir-site-header .ir-nav{min-height:49px;gap:clamp(.7rem,3.3vw,3.5rem)}
.ir-site-header .ir-nav a{font-size:clamp(.95rem,1.25vw,1.25rem)}
body.home #main .ir-hero{grid-template-columns:minmax(0,40fr) minmax(0,60fr)}
body.home #main .ir-copy{padding:clamp(1.8rem,2vw,3rem) clamp(1rem,4.1vw,5.5rem);padding-right:0}
body.home #main .ir-copy h1{font-size:clamp(2.6rem,4.45vw,6rem);line-height:.88;letter-spacing:-.055em}
body.home #main .ir-copy p{max-width:42ch;font-size:clamp(1rem,1.3vw,1.4rem);line-height:1.32}
body.home #main .ir-visual{min-height:clamp(310px,22.2vw,460px)}
body.home #main .ir-visual img{object-position:center 61%}
body.home #main .ir-visual::after{background:linear-gradient(90deg,#f8f0e6,#f8f0e600 13%)}
body.home #main .ir-actions{gap:clamp(.5rem,1.35vw,1.5rem)}
body.home #main .ir-actions a{justify-content:space-between;min-height:clamp(46px,3.45vw,65px);padding:.5rem clamp(.8rem,1.65vw,1.8rem);min-width:clamp(125px,15vw,300px);font-size:clamp(.95rem,1.25vw,1.3rem);background:#b63e12}
body.home #main .ir-actions a+a{background:#064cd5}
body.home #main .ir-service{min-height:56px;background:#f7f1ea;margin-top:1rem}
.ir-service strong{font-size:clamp(.95rem,1.08vw,1.15rem)}
.ir-service small{font-size:clamp(.8rem,.9vw,1rem)}
body.home #main .ir-categories{gap:clamp(.55rem,.85vw,1.1rem);margin-block:1.25rem 1.5rem}
body.home #main .ir-categories a{min-height:clamp(115px,9.4vw,185px);padding-inline-end:49%;background:linear-gradient(125deg,#f9f0e5,#f4f2ef);border:0;border-radius:12px}
body.home #main .ir-categories strong{font-size:clamp(1rem,1.45vw,1.65rem)}
body.home #main .ir-categories span:not(.ir-category-art){font-size:clamp(.78rem,.9vw,1.05rem)}
.ir-category-art{position:absolute;right:0;bottom:0;width:49%;height:100%;background-repeat:no-repeat;background-position:center;background-size:contain;mix-blend-mode:multiply;pointer-events:none}
.ir-category-art[data-category="0"]{background-image:url(assets/category-0.webp)}
.ir-category-art[data-category="1"]{background-image:url(assets/category-1.webp)}
.ir-category-art[data-category="2"]{background-image:url(assets/category-2.webp)}
.ir-category-art[data-category="3"]{background-image:url(assets/category-3.webp)}
.ir-category-art[data-category="4"]{background-image:url(assets/category-4.webp)}
.ir-product .ir-product-name{font-size:clamp(.9rem,1.04vw,1.14rem)}
.ir-product .ir-price{font-size:clamp(1rem,1.27vw,1.45rem)}
.ir-product .ir-product-add{font-size:clamp(.85rem,.99vw,1rem);background:#b63e12}
body.home #main .ir-product{min-height:clamp(166px,14vw,235px)}
@media(max-width:850px){
  .ir-site-header .ir-masthead{grid-template-columns:1fr auto}
}
@media(max-width:700px){
  body.home #main .ir-hero{grid-template-columns:1fr}
  body.home #main .ir-copy{padding:1.75rem var(--rhythm-gutter)}
  body.home #main .ir-copy h1{font-size:clamp(2.2rem,9vw,3.6rem)}
  body.home #main .ir-visual{min-height:0;aspect-ratio:16/9}
  body.home #main .ir-visual::after{background:none}
  body.home #main .ir-categories a{min-height:108px}
}

/* ITMode catalog layout v1 */
body.woocommerce.archive .ir-shell {
    max-width: 1680px;
}

body.woocommerce.archive .woocommerce-products-header__title {
    color: #07383e;
    font-size: clamp(1.65rem, 3vw, 2.65rem);
    font-weight: 800;
    letter-spacing: -.035em;
}

body.woocommerce.archive ul.products::before,
body.woocommerce.archive ul.products::after {
    display: none;
}

body.woocommerce.archive ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(.55rem, 1.4vw, 1.25rem);
}

body.woocommerce.archive ul.products li.product {
    float: none;
    clear: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: clamp(.6rem, 1.4vw, 1.1rem);
    border: 1px solid #e4ded6;
    border-radius: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

body.woocommerce.archive ul.products li.product:hover {
    border-color: #bcaaa0;
    box-shadow: 0 6px 20px rgba(7, 56, 62, .07);
}

body.woocommerce.archive li.product .woocommerce-loop-product__title {
    color: #07383e;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

body.woocommerce.archive li.product .price {
    margin: .65rem 0;
    color: #07383e;
    font-size: clamp(1rem, 1.55vw, 1.4rem);
    font-weight: 800;
}

body.woocommerce.archive li.product .price ins {
    color: #a63710;
    text-decoration: none;
}

body.woocommerce.archive li.product .price del {
    font-size: .8em;
}

body.woocommerce.archive li.product > a.button {
    align-self: flex-start;
    margin-top: auto;
    background: #a63710;
    color: #fff;
    border-radius: 7px;
    padding: .65rem .8rem;
    font-size: .875rem;
    line-height: 1.25;
}

body.woocommerce.archive li.product > a.button:hover {
    background: #812b0e;
    color: #fff;
}

@media (max-width: 1000px) {
    body.woocommerce.archive ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body.woocommerce.archive ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ITMode footer grid */
.ir-site-footer .ir-footer-grid,
.ir-site-footer .ir-footer-bottom {
    width:min(100%,1480px);margin-inline:auto
}
.ir-site-footer .ir-footer-grid {
    display:grid;grid-template-columns:1.25fr repeat(3,minmax(0,1fr));
    gap:clamp(1rem,3vw,3rem);padding:1.15rem 0 1.6rem
}
.ir-site-footer .ir-footer-grid nav {
    display:flex;flex-direction:column;align-items:flex-start;gap:.42rem
}
.ir-site-footer .ir-footer-grid a,
.ir-site-footer .ir-footer-grid strong {color:#fff}
.ir-site-footer .ir-footer-grid nav a {font-size:.92rem;color:#d8e8e7}
.ir-site-footer .ir-footer-grid a:hover {text-decoration:underline}
.ir-site-footer .ir-footer-brand {font-size:1.6rem;font-weight:850}
.ir-site-footer .ir-footer-grid p {color:#d8e8e7}
.ir-site-footer .ir-footer-bottom {
    border-top:1px solid #ffffff3b;padding:.85rem 0 .2rem;color:#d8e8e7;font-size:.85rem
}
@media(max-width:750px) {
    .ir-site-footer .ir-footer-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:380px) {
    .ir-site-footer .ir-footer-grid {grid-template-columns:1fr}
}
