/* Electroweld Blog: hub in product-listing style + readable single guides */

/* ---------- Hub ---------- */
.ewb-hub .ew-shop__layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:32px;align-items:start}
.ewb-hub .ewb-filters{position:sticky;top:16px}
.ewb-hub .ewb-toggle{display:none}
.ewb-search{width:100%;box-sizing:border-box;height:40px;padding:0 12px;border:1px solid #d1d5db;font-size:14px;border-radius:0;background:#fff}
.ewb-search:focus{outline:2px solid #df1d16;outline-offset:0;border-color:#df1d16}
.ewb-topics a{display:flex;align-items:center;gap:8px;text-decoration:none;color:inherit;padding:4px 0}
.ewb-topics a.is-active .ew-filter__name{font-weight:700;color:#df1d16}
.ewb-topics a.is-active .ew-check{background:#df1d16;border-color:#df1d16;box-shadow:inset 0 0 0 3px #fff}
.ewb-help p{font-size:14px;line-height:1.5;margin:0}
.ewb-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 16px}
.ewb-toolbar .woocommerce-result-count{white-space:nowrap;margin:0;font-size:14px;color:#4b5563}
.ewb-sort{width:auto !important;flex:0 0 auto;min-width:170px;height:36px;padding:0 10px;border:1px solid #d1d5db;background:#fff;font-size:14px}

.ewb-grid.products{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:16px !important;margin:0 !important;padding:0 !important;list-style:none}
.ewb-grid.products::before,.ewb-grid.products::after{display:none !important}
.ewb-grid li.ewb-card{display:flex !important;flex-direction:column;width:auto !important;margin:0 !important;float:none !important;border:1px solid #e5e7eb;background:#fff;padding:0 0 18px !important;transition:box-shadow .15s,border-color .15s}
.ewb-grid li.ewb-card[hidden]{display:none !important}
.ewb-grid li.ewb-card:hover{border-color:#df1d16;box-shadow:0 6px 18px rgba(0,0,0,.08)}
.ewb-card > a{display:flex;flex-direction:column;flex:1 1 auto;text-decoration:none;color:inherit}
.ewb-thumb{position:relative;aspect-ratio:4/3;background:#16181d;color:#fff;display:flex;flex-direction:column;justify-content:flex-end;padding:16px;overflow:hidden}
.ewb-thumb::before{content:"";position:absolute;right:-34px;top:0;width:96px;height:100%;background:#df1d16;transform:skewX(-16deg)}
.ewb-thumb::after{content:"";position:absolute;right:58px;top:0;width:14px;height:100%;background:rgba(223,29,22,.55);transform:skewX(-16deg)}
.ewb-thumb--img{padding:0;background:#f3f4f6}
.ewb-thumb--img::before,.ewb-thumb--img::after{display:none}
.ewb-thumb--img img{width:100%;height:100%;object-fit:cover;display:block}
.ewb-thumb__kicker{position:relative;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#d1d5db}
.ewb-thumb__topic{position:relative;font-family:inherit;font-size:34px;line-height:1.05;font-weight:700;text-transform:uppercase;letter-spacing:.02em}
.ewb-thumb__bar{position:relative;display:block;width:44px;height:4px;background:#df1d16;margin-top:10px}
.ewb-card .woocommerce-loop-product__title{font-size:16px !important;line-height:1.3 !important;margin:14px 16px 6px !important;padding:0 !important;text-transform:none;letter-spacing:0}
.ewb-card .ewb-meta{display:block;margin:0 16px 8px;font-size:12px;color:#6b7280;text-transform:none}
.ewb-card .ewb-excerpt{margin:0 16px;font-size:14px;line-height:1.5;color:#374151;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ewb-card .ewb-actions{margin:16px 16px 0;margin-top:auto;padding-top:16px;display:flex}
.ewb-card .ewb-actions .ew-btn{flex:1 1 auto;text-align:center;justify-content:center}
.ewb-empty{padding:24px;border:1px dashed #d1d5db;text-align:center}

@media (max-width:1100px){.ewb-grid.products{grid-template-columns:repeat(3,minmax(0,1fr)) !important}}
@media (max-width:900px){
  .ewb-hub .ew-shop__layout{grid-template-columns:1fr;gap:16px}
  .ewb-hub .ewb-filters{position:static}
  .ewb-hub .ewb-toggle{display:flex;justify-content:space-between;width:100%;padding:12px 14px;border:1px solid #d1d5db;background:#fff;font-weight:700;cursor:pointer}
  .ewb-hub .ewb-filters__body{display:none;padding-top:12px}
  .ewb-hub .ewb-filters.is-open .ewb-filters__body{display:block}
  .ewb-grid.products{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px !important}
}
@media (max-width:560px){
  .ewb-grid.products{grid-template-columns:1fr !important}
  .ewb-thumb{aspect-ratio:auto;min-height:110px}
  .ewb-toolbar{flex-wrap:wrap}
}

/* ---------- Single guide ---------- */
.ewb-single{padding-bottom:48px}
.ewb-single__layout{display:grid;grid-template-columns:minmax(0,760px) 300px;gap:48px;justify-content:center;align-items:start;margin-top:8px}
.ewb-article__head{border-bottom:1px solid #e5e7eb;padding-bottom:20px;margin-bottom:28px}
.ewb-pill{display:inline-block;background:#df1d16;color:#fff !important;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:5px 10px;text-decoration:none;margin-bottom:14px}
.ewb-article__title{font-size:40px;line-height:1.12;margin:0 0 12px}
.ewb-article__meta{font-size:14px;color:#6b7280;margin:0 0 14px}
.ewb-article__lead{font-size:19px;line-height:1.6;color:#374151;margin:0}

.ewb-content{font-size:17px;line-height:1.75;color:#23272f}
.ewb-content p,.ewb-content li{font-size:17px !important;line-height:1.75 !important;color:#23272f}
.ewb-content p{margin:0 0 1.15em}
.ewb-content h2{font-size:27px;line-height:1.2;margin:2.1em 0 .65em;padding-top:4px}
.ewb-content h3{font-size:21px;line-height:1.3;margin:1.7em 0 .5em}
.ewb-content > .ew-g > h2:first-child,.ewb-content > h2:first-child{margin-top:0}
.ewb-content ul,.ewb-content ol{margin:0 0 1.4em;padding-left:1.5em}
.ewb-content li{margin:0 0 .55em;padding-left:.2em}
.ewb-content li:last-child{margin-bottom:0}
.ewb-content ul + p,.ewb-content ol + p,.ewb-content table + p{margin-top:0}
.ewb-content strong{color:#111}
.ewb-content a{color:#df1d16;text-decoration:underline;text-underline-offset:2px}
.ewb-content table{display:table;width:100% !important;margin:1.2em 0 1.6em !important;font-size:15px !important;line-height:1.5}
.ewb-content th,.ewb-content td{padding:10px 12px !important}
.ewb-content .ew-related{margin-top:3em;padding:24px;background:#f6f7f9;border-top:4px solid #df1d16}
.ewb-content .ew-related h2{margin:0 0 .6em;font-size:22px}
.ewb-content .ew-related ul{list-style:none;padding:0;margin:0 0 1.2em;display:grid;gap:8px}
.ewb-content .ew-related li{margin:0;padding:0}
.ewb-content .ew-related li a{display:block;background:#fff;border:1px solid #e5e7eb;padding:12px 14px;text-decoration:none;color:#111;font-weight:600;line-height:1.4}
.ewb-content .ew-related li a:hover{border-color:#df1d16;color:#df1d16}
.ewb-content .ew-related p{margin:0;font-size:15px}
.ewb-content .ew-related p a{display:inline-block;margin:6px 6px 0 0;padding:6px 12px;border:1px solid #df1d16;text-decoration:none;font-weight:600}
.ewb-content .ew-related p a:hover{background:#df1d16;color:#fff}
.ewb-back{margin:28px 0 0;font-weight:700}
.ewb-back a{color:#df1d16;text-decoration:none}

.ewb-side{position:sticky;top:16px;display:grid;gap:16px}
.ewb-side__box{border:1px solid #e5e7eb;background:#fff;padding:18px}
.ewb-side__title{font-size:18px;line-height:1.25;margin:0 0 12px}
.ewb-side__list{list-style:none;margin:0 0 14px;padding:0}
.ewb-side__list li{border-top:1px solid #f0f1f3}
.ewb-side__list li:first-child{border-top:0}
.ewb-side__list a{display:block;padding:9px 0;font-size:14px;line-height:1.4;color:#23272f;text-decoration:none}
.ewb-side__list a:hover{color:#df1d16}
.ewb-side__list li.is-current a{color:#df1d16;font-weight:700}
.ewb-side__all{display:flex;justify-content:center;width:100%;box-sizing:border-box}
.ewb-side__help{background:#16181d;color:#fff;border-color:#16181d}
.ewb-side__help .ewb-side__title{color:#fff}
.ewb-side__help p{margin:0;font-size:14px;line-height:1.55}
.ewb-side__help a{color:#fff;font-weight:700}

@media (max-width:1100px){.ewb-single__layout{grid-template-columns:minmax(0,1fr) 260px;gap:32px}}
@media (max-width:900px){
  .ewb-single__layout{grid-template-columns:1fr;gap:28px}
  .ewb-side{position:static}
  .ewb-article__title{font-size:30px}
  .ewb-article__lead{font-size:17px}
  .ewb-content{font-size:16px}
  .ewb-content h2{font-size:23px}
  .ewb-content p,.ewb-content li{font-size:16px !important}
}
@media (max-width:700px){.ewb-content table{display:block;overflow-x:auto;width:100% !important}}
