/* =====================================================================
   WordPressi sisu (vanad sisuplokid uues kujunduses)
   ===================================================================== */
main#main { display: block; }
.sm-page { padding-bottom: 48px; }
.page-title, .sm-content h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 18px 0 14px; }
.sm-content { font-size: 1.02rem; color: var(--ink-2); }
.sm-content h2 { color: var(--ink); font-size: clamp(1.35rem, 2.2vw, 1.8rem); margin: 44px 0 14px; }
.sm-content h3 { color: var(--ink); margin: 22px 0 8px; }
.sm-content a:not(.btn):not(.sm-card):not(.chip):not(.sm-model) { color: var(--brand); font-weight: 600; }
.sm-content ul, .sm-content ol { padding-left: 1.3em; }
.sm-content li { margin-bottom: .4em; }
.sm-content table { border: 1px solid var(--line); border-radius: var(--radius); display: block; overflow-x: auto; margin: 16px 0; }
.sm-content img { height: auto; border-radius: 10px; }
.sm-content .sm-lead { font-size: 1.15rem; color: var(--ink-2); max-width: 760px; }
.sm-content .sm-cta, .sm-content a.sm-cta { display: inline-flex; align-items: center; padding: .85em 1.4em; border-radius: 999px; background: var(--brand) !important; color: #fff !important; font-weight: 700; text-decoration: none; border: 0; }
.sm-content .sm-cta:hover { background: var(--brand-ink) !important; }

.btn.is-added, .btn.btn--primary.is-added, .btn.btn--dark.is-added { background: var(--ok) !important; border-color: var(--ok) !important; color: #fff !important; }

/* Tootekaardid (kategoorialehtede sm-grid / sm-card) */
.sm-content .sm-grid, .p-section .sm-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important; gap: 18px !important; margin: 18px 0 8px; }
.sm-card-wrap { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s; }
.sm-card-wrap:hover { box-shadow: var(--shadow); }
.sm-content a.sm-card, .p-section a.sm-card { display: flex !important; flex-direction: column; flex: 1; text-decoration: none; color: var(--ink) !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; background: none !important; }
.p-section a.sm-card { border: 1px solid var(--line) !important; border-radius: var(--radius); overflow: hidden; }
.sm-content a.sm-card img, .p-section a.sm-card img { width: 100% !important; height: auto !important; aspect-ratio: 4/3; object-fit: cover; border-radius: 0; background: var(--bg-soft); margin: 0 !important; }
.sm-content a.sm-card h3, .p-section a.sm-card h3 { font-size: 1.05rem; margin: 14px 16px 6px !important; }
.sm-content a.sm-card p { font-size: .9rem; color: var(--ink-2); margin: 0 16px !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sm-content a.sm-card .sm-more, .p-section a.sm-card .sm-more { margin: 10px 16px 14px; font-weight: 700; color: var(--brand); font-size: .9rem; }
.sm-card-add { margin: 0 16px 16px; }
/* Galeriide koondleht: kaardid ilma tootenuputa, pilt ülal */
.sm-content .sm-menu-hub a.sm-card { border: 1px solid var(--line) !important; border-radius: var(--radius); overflow: hidden; background: #fff !important; transition: box-shadow .15s; }
.sm-content .sm-menu-hub a.sm-card:hover { box-shadow: var(--shadow) !important; }
.sm-content .sm-menu-hub a.sm-card h2 { font-size: 1.05rem; color: var(--ink); margin: 14px 16px 4px; }
.sm-content .sm-menu-hub .sm-card-ph { display: block; aspect-ratio: 4/3; background: var(--bg-soft); }
.sm-content .sm-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.sm-content .sm-guide > div { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; }
.sm-content .sm-guide h3 { margin-top: 0; }

/* Tootevaade */
.pv-top { padding-top: 16px; }
.gallery a.main { display: block; }
.pv-gallery { display: inline-block; margin-top: 12px; }
.pv-body { margin-top: 8px; }
.pv-body .sm-product-detail { font-size: inherit !important; color: inherit !important; }
.pv .p-section { padding: 36px 0; }
.kw-of { margin: -4px 0 12px; color: var(--muted); }

/* Uus tootesisu (sm26) */
.sm26 .sm-lead { font-size: 1.12rem; }
.sm26 .uses { margin: 8px 0 4px; }
.sm26 .ticks { max-width: 820px; }
.sm26 .two { gap: 40px; }
.sm26 .two h2 { margin-top: 36px; }
.sm-files { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.sm-files li { margin: 0 !important; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; background: #fff; }
.sm-files li::before { content: '↓'; font-weight: 800; color: var(--brand); }
.sm-files li.foto::before { content: '▣'; }
.sm-files li a { flex: 1; text-decoration: none; }
.sm-files small { color: var(--muted); text-transform: uppercase; font-size: .72rem; font-weight: 700; }
.buy .tagline { margin-bottom: 4px; }

/* Helkurite mudelivalik (sisu sees: .sm-model) */
.sm-content .sm-model { display: flex !important; flex-direction: column; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; padding: 12px !important; text-decoration: none; background: #fff !important; color: var(--ink) !important; }
.sm-content .sm-model:hover { border-color: var(--ink) !important; box-shadow: var(--shadow); }
.sm-content .sm-model img { width: 100% !important; aspect-ratio: 1; height: auto !important; object-fit: contain !important; margin-bottom: 8px; border-radius: 0; }
.sm-content .sm-model .sm-code { font-weight: 700; }
.sm-content .sm-model .sm-size { color: var(--muted); font-size: .85rem; }
.sm-content .sm-model .sm-open { color: var(--brand); font-weight: 700; font-size: .82rem; margin-top: 4px; }

.sm-content #sm-models, .sm-content #sm-models * { font-family: inherit !important; }
.sm-content #sm-models .sm-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 12px !important; }
.sm-content #sm-models .sm-searchbar { background: var(--bg-soft) !important; border: 0 !important; border-radius: var(--radius) !important; }

/* Vana mitme toote loend ([products]) */
.sm-content .product.shortcode_element { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin: 18px 0; display: block; }
.sm-content .product.shortcode_element .product-images { max-width: 360px; float: left; margin: 0 24px 12px 0; }
.sm-content .product.shortcode_element .small-picts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sm-content .product.shortcode_element .small-picts img { width: 64px; height: 64px; object-fit: cover; }
.sm-content .btn-primary, .sm-content .view-gallery { display: inline-flex; padding: .55em 1em; border-radius: 999px; background: var(--ink); color: #fff !important; text-decoration: none; font-weight: 700; font-size: .85rem; }
.sm-content .ask_for_offer { display: none; }

/* Galeriid */
.sm-gallery .gallery-images, .sm-content .gallery-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sm-content .gallery-images img, .gal-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.gal-grid { margin: 24px 0 8px; }

/* Kontaktileht (.contact-person) */
.sm-content .company-info { clear: both; max-width: 720px; }
.sm-content .contact-person { display: flex; float: left; flex-direction: column; align-items: center; width: calc(25% - 14px); margin: 0 14px 18px 0; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 16px; text-align: center; background: #fff; }
.sm-content .contact-person img { width: 120px !important; height: 120px !important; border-radius: 50% !important; object-fit: cover; margin: 0 auto 12px; }
.sm-content .contact-person__name strong { color: var(--ink); font-size: 1.08rem; }
.sm-content .contact-person__position { color: var(--brand); font-weight: 700; }
.sm-content .contact-person__field { color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.sm-content .company-info__row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sm-content .company-info__cell:first-child { color: var(--muted); font-weight: 600; }

/* Leivapuru (Breadcrumb NavXT) */
.crumbs { padding: 18px 0 0; }
.crumbs a { text-decoration: none; }

/* Contact Form 7 vorm (vanad bootstrap-klassid ilma bootstrapita) */
.wpcf7 .vorm > h2 { display: none; }
.wpcf7 .row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 0 24px; }
.wpcf7 .col-sm-12 { grid-column: 1 / -1; }
.wpcf7 .formitem { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.wpcf7 .formitem .title { font-weight: 700; font-size: .85rem; color: var(--ink); }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.wpcf7 textarea { min-height: 180px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.wpcf7 input[type="submit"] { width: 100%; font: inherit; font-weight: 700; padding: 1em; border: 0; border-radius: 999px; background: var(--brand); color: #fff; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--brand-ink); }
.wpcf7 .mobsend { display: none; }
.wpcf7 .wpcf7-response-output { border-radius: 10px; margin: 12px 0 0 !important; }
.wpcf7 input[type="file"] { font: inherit; font-size: .9rem; }
.quote-block .form-card { background: #fff; }
.cart-summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; font-size: .95rem; }
.mini-qty { width: 56px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.line-item a { text-decoration: none; }

/* Avalehe esimene plokk – madalam, et järgmine sisu paistaks kohe (klient 23.11) */
.hero .wrap { padding-top: 40px; padding-bottom: 40px; gap: 40px; }
.hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
.hero p.lead { font-size: 1.05rem; margin-bottom: 0; }
.hero .hero-search { margin: 20px 0 14px; }
.hero-collage { grid-template-rows: 150px 150px; }
@media (max-width: 860px) {
  .hero .wrap { padding-top: 28px; padding-bottom: 28px; gap: 20px; }
  .hero-collage { grid-template-rows: 110px 110px; }
}
@media (max-width: 520px) { .hero-collage { display: none; } }

/* Otsing, lehitsemine, kliendid */
.search-box form { margin: 0; }
.page-head .hero-search { border: 1px solid var(--line); max-width: 640px; }
.search-list { display: grid; gap: 8px; margin-bottom: 32px; }
.search-item { display: flex; gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: #fff; }
.search-item:hover { border-color: var(--ink); }
.search-item img, .search-ph { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--bg-soft); flex-shrink: 0; }
.search-item small { display: block; color: var(--muted); }
.pager .nav-links { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 40px; }
.pager .page-numbers { padding: .4em .8em; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pager .current { background: var(--ink); color: #fff; }
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; align-items: center; }
.clients img { max-height: 70px; width: auto; margin: 0 auto; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.clients a:hover img { filter: none; opacity: 1; }
.cat-card img { height: auto; }
.cat-card .cat-ph { display: block; aspect-ratio: 3/2; background: var(--bg-soft); }
.mega-cats a span small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

@media (max-width: 860px) {
  .wpcf7 .row { grid-template-columns: 1fr; }
  .wpcf7 .normsend { display: none; }
  .wpcf7 .mobsend { display: flex; }
  .sm-content .contact-person { width: calc(50% - 8px); margin-right: 8px; }
  .sm-content .product.shortcode_element .product-images { float: none; max-width: none; margin: 0 0 12px; }
  .sm-content .company-info__row { grid-template-columns: 1fr; gap: 2px; }
}
