/*
Theme Name: AL Safe Minimal
Theme URI: https://andlemmeble.pl
Author: AndLemMeble
Description: Bezpieczny, prosty motyw WooCommerce z poprawionym headerem, usuniętym fallback sidebarem oraz czytelnymi opisami kategorii H2/H3.
Version: 1.7.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: al-safe-minimal
*/

:root{
  --al-bg:#ffffff;
  --al-text:#161616;
  --al-muted:#666666;
  --al-border:#e8e8e8;
  --al-soft:#f7f7f7;
  --al-soft-2:#fafafa;
  --al-dark:#111111;
  --al-container:1200px;
  --al-radius:14px;
  --al-shadow:0 18px 46px rgba(0,0,0,.08);
  --al-header-height:82px;
  --al-mobile-header-height:72px;
}

*,
*::before,
*::after{box-sizing:border-box}

html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}

body.al-safe-minimal{
  margin:0;
  background:var(--al-bg);
  color:var(--al-text);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:16px;
  line-height:1.6;
  text-rendering:optimizeLegibility;
}

body.al-safe-minimal img{max-width:100%;height:auto}
body.al-safe-minimal a{color:inherit;text-decoration:none}
body.al-safe-minimal a:hover{color:#000}
body.al-safe-minimal button,
body.al-safe-minimal input,
body.al-safe-minimal textarea,
body.al-safe-minimal select{font:inherit}

.al-container{
  width:min(var(--al-container),calc(100% - 32px));
  margin-inline:auto;
}

.screen-reader-text,
.skip-link{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
  white-space:nowrap;
}

.skip-link:focus{
  position:fixed;
  left:16px;
  top:16px;
  z-index:99999;
  width:auto;
  height:auto;
  margin:0;
  padding:10px 14px;
  clip:auto;
  background:#fff;
  border:1px solid var(--al-border);
  border-radius:10px;
  box-shadow:var(--al-shadow);
}

/* Header */

.al-site-header{
  position:sticky;
  top:0;
  z-index:9999;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid var(--al-border);
  backdrop-filter:blur(12px);
}

body.admin-bar .al-site-header{top:32px}

.al-header-inner{
  min-height:var(--al-header-height);
  display:grid;
  grid-template-columns:148px minmax(0,1fr) auto;
  align-items:center;
  gap:22px;
}

.al-brand{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  max-width:148px;
  color:var(--al-text);
  font-size:22px;
  font-weight:800;
  letter-spacing:-.04em;
  line-height:1;
}

.al-brand a,
.al-brand .custom-logo-link{
  display:flex!important;
  align-items:center;
  justify-content:flex-start;
  max-width:148px;
  line-height:1;
}

.al-brand img,
.al-brand .custom-logo{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:132px!important;
  max-height:50px!important;
  object-fit:contain!important;
}

.al-main-nav{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.al-main-nav ul{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  list-style:none;
  margin:0;
  padding:0;
}

.al-main-nav li{position:relative;margin:0;padding:0}

.al-main-nav a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  color:var(--al-text);
  font-size:15px;
  font-weight:750;
  line-height:1.2;
  white-space:nowrap;
}

.al-main-nav .sub-menu{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  z-index:10000;
  min-width:240px;
  padding:10px;
  background:#fff;
  border:1px solid var(--al-border);
  border-radius:14px;
  box-shadow:var(--al-shadow);
}

.al-main-nav li:hover > .sub-menu,
.al-main-nav li:focus-within > .sub-menu{display:block}

.al-main-nav .sub-menu a{
  display:flex;
  justify-content:flex-start;
  min-height:38px;
  padding:7px 9px;
  font-size:14px;
}

/* Max Mega Menu */
.al-main-nav .mega-menu-wrap,
.al-main-nav .mega-menu,
.al-main-nav #mega-menu-wrap-primary,
.al-main-nav #mega-menu-primary{
  width:auto!important;
  max-width:100%;
}

.al-main-nav .mega-menu-wrap{display:block}

.al-main-nav .mega-menu-wrap ul.mega-menu{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:nowrap!important;
  gap:0!important;
  width:auto!important;
  max-width:100%;
}

.al-main-nav .mega-menu-wrap ul.mega-menu > li.mega-menu-item{flex:0 0 auto}

.al-main-nav .mega-menu-wrap ul.mega-menu > li.mega-menu-item > a.mega-menu-link{
  font-family:inherit!important;
  font-size:15px!important;
  font-weight:750!important;
  height:auto!important;
  line-height:1.2!important;
  padding:10px 11px!important;
  white-space:nowrap!important;
}

/* On desktop these actions are intentionally hidden to avoid duplication with menu items */
.al-header-actions{
  display:none;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  white-space:nowrap;
}

.al-header-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:9px 14px;
  border:1px solid var(--al-border);
  border-radius:999px;
  background:#fff;
  color:var(--al-text);
  font-size:14px;
  font-weight:800;
  line-height:1;
}

.al-header-action:hover{background:var(--al-soft);color:var(--al-text)}

.al-cart-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  margin-left:7px;
  padding:0 6px;
  border-radius:999px;
  background:var(--al-dark);
  color:#fff;
  font-size:12px;
  line-height:1;
}

.al-menu-toggle{
  display:none;
  width:42px;
  height:42px;
  padding:0;
  border:1px solid var(--al-border);
  border-radius:999px;
  background:#fff;
  cursor:pointer;
}

.al-menu-toggle span{
  display:block;
  width:18px;
  height:2px;
  margin:4px auto;
  background:var(--al-text);
  border-radius:999px;
}

.al-main{min-height:60vh}

/* Simple homepage */

.al-home-simple{
  min-height:64vh;
  display:flex;
  align-items:center;
  padding:84px 0;
  background:#fff;
}

.al-home-simple-inner{max-width:880px}

.al-home-simple-eyebrow{
  display:inline-flex;
  margin-bottom:14px;
  color:var(--al-muted);
  font-size:14px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.al-home-simple h1{
  margin:0 0 18px;
  color:var(--al-text);
  font-size:clamp(38px,6vw,76px);
  line-height:1.03;
  letter-spacing:-.075em;
  font-weight:850;
}

.al-home-simple p{
  max-width:720px;
  margin:0;
  color:var(--al-muted);
  font-size:clamp(17px,2vw,21px);
  line-height:1.65;
}

/* Pages */

.al-page-wrap,
.al-shop-wrap{padding:34px 0 58px}

.al-page-header{padding:20px 0 22px}

.al-page-title,
.woocommerce-products-header__title,
body.al-safe-minimal.woocommerce div.product .product_title{
  margin:0 0 14px;
  color:var(--al-text);
  font-size:clamp(30px,4.2vw,52px);
  line-height:1.08;
  letter-spacing:-.055em;
}

.al-entry-content{max-width:980px}
.al-entry-content > *:first-child{margin-top:0}
.al-entry-content h1,
.al-entry-content h2,
.al-entry-content h3,
.al-entry-content h4{color:var(--al-text);line-height:1.18}
.al-entry-content p,
.al-entry-content li{color:#282828}

.al-post-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
}

.al-card{
  padding:22px;
  border:1px solid var(--al-border);
  border-radius:var(--al-radius);
  background:#fff;
}

.al-card h2,
.al-card h3{margin:0 0 8px;color:var(--al-text);line-height:1.2}
.al-card p{margin:0;color:var(--al-muted)}

.al-search-form{display:flex;gap:10px;max-width:620px}
.al-search-form .search-field{flex:1}

body.al-safe-minimal .input-text,
body.al-safe-minimal input[type="text"],
body.al-safe-minimal input[type="email"],
body.al-safe-minimal input[type="tel"],
body.al-safe-minimal input[type="password"],
body.al-safe-minimal input[type="search"],
body.al-safe-minimal textarea,
body.al-safe-minimal select{
  min-height:46px;
  max-width:100%;
  border:1px solid var(--al-border);
  border-radius:10px;
  padding:9px 12px;
  background:#fff;
  color:var(--al-text);
}

.al-button,
.button,
.wp-block-button__link,
body.al-safe-minimal .woocommerce a.button,
body.al-safe-minimal .woocommerce button.button,
body.al-safe-minimal .woocommerce input.button,
body.al-safe-minimal .woocommerce #respond input#submit,
body.al-safe-minimal button.button,
body.al-safe-minimal input.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 18px;
  border:1px solid #111;
  border-radius:999px;
  background:#111;
  color:#fff!important;
  font-weight:750;
  line-height:1;
  cursor:pointer;
  text-decoration:none;
}

.al-button:hover,
.button:hover,
.wp-block-button__link:hover,
body.al-safe-minimal .woocommerce a.button:hover,
body.al-safe-minimal .woocommerce button.button:hover,
body.al-safe-minimal .woocommerce input.button:hover,
body.al-safe-minimal .woocommerce #respond input#submit:hover,
body.al-safe-minimal button.button:hover,
body.al-safe-minimal input.button:hover{
  background:#333;
  border-color:#333;
  color:#fff!important;
}

body.al-safe-minimal.woocommerce .woocommerce-breadcrumb,
body.al-safe-minimal .woocommerce .woocommerce-breadcrumb{
  margin:0 0 18px;
  color:var(--al-muted);
  font-size:14px;
}

body.al-safe-minimal .woocommerce-message,
body.al-safe-minimal .woocommerce-info,
body.al-safe-minimal .woocommerce-error{
  border-top-color:#111;
  background:var(--al-soft);
}

body.al-safe-minimal.woocommerce ul.products,
body.al-safe-minimal .woocommerce ul.products{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:22px;
  margin:0 0 34px;
  padding:0;
}

body.al-safe-minimal.woocommerce ul.products::before,
body.al-safe-minimal.woocommerce ul.products::after,
body.al-safe-minimal .woocommerce ul.products::before,
body.al-safe-minimal .woocommerce ul.products::after{display:none!important}

body.al-safe-minimal.woocommerce ul.products li.product,
body.al-safe-minimal .woocommerce ul.products li.product{
  float:none!important;
  width:auto!important;
  margin:0!important;
  padding:0 0 15px;
  border:1px solid var(--al-border);
  border-radius:var(--al-radius);
  background:#fff;
  overflow:hidden;
}

body.al-safe-minimal.woocommerce ul.products li.product a img,
body.al-safe-minimal .woocommerce ul.products li.product a img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
  margin:0;
  padding:10px;
  background:#fafafa;
}

body.al-safe-minimal.woocommerce ul.products li.product .woocommerce-loop-product__title,
body.al-safe-minimal .woocommerce ul.products li.product .woocommerce-loop-product__title{
  padding:15px 15px 6px;
  margin:0;
  color:var(--al-text);
  font-size:16px;
  line-height:1.28;
}

body.al-safe-minimal.woocommerce ul.products li.product .price,
body.al-safe-minimal .woocommerce ul.products li.product .price{
  display:block;
  padding:0 15px 12px;
  color:var(--al-text);
  font-size:16px;
  font-weight:800;
}

body.al-safe-minimal.woocommerce ul.products li.product .button,
body.al-safe-minimal .woocommerce ul.products li.product .button{
  width:calc(100% - 30px);
  margin:0 15px;
}

body.al-safe-minimal.woocommerce div.product div.images,
body.al-safe-minimal.woocommerce-page div.product div.images{width:52%}
body.al-safe-minimal.woocommerce div.product div.summary,
body.al-safe-minimal.woocommerce-page div.product div.summary{width:43%}

.al-term-short-desc{max-width:900px;color:var(--al-muted)}

.al-term-bottom-desc{
  margin-top:34px;
  padding:26px;
  border:1px solid var(--al-border);
  border-radius:var(--al-radius);
  background:#fafafa;
}

.al-term-bottom-desc > *:first-child{margin-top:0}
.al-term-bottom-desc > *:last-child{margin-bottom:0}

/* Footer */

.al-site-footer{
  margin-top:48px;
  background:#111;
  color:#fff;
}

.al-footer-main{padding:46px 0 34px}

.al-footer-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr .8fr .8fr;
  gap:34px;
}

.al-footer-brand{max-width:360px}

.al-footer-logo{
  display:block;
  margin-bottom:14px;
  color:#fff;
  font-size:24px;
  font-weight:850;
  letter-spacing:-.045em;
}

.al-footer-text{
  margin:0;
  color:rgba(255,255,255,.72);
  font-size:15px;
  line-height:1.7;
}

.al-footer-title{
  margin:0 0 13px;
  color:#fff;
  font-size:15px;
  line-height:1.2;
  font-weight:850;
}

.al-footer-list{list-style:none;margin:0;padding:0}
.al-footer-list li{margin:0 0 8px}

.al-footer-list a,
.al-footer-contact{
  color:rgba(255,255,255,.72);
  font-size:15px;
}

.al-footer-list a:hover{color:#fff}

.al-footer-bottom{
  padding:16px 0;
  border-top:1px solid rgba(255,255,255,.12);
}

.al-footer-bottom-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  color:rgba(255,255,255,.62);
  font-size:14px;
}

/* Responsive */

@media (max-width: 1240px){
  .al-header-inner{
    grid-template-columns:126px minmax(0,1fr);
  }

  .al-brand img,
  .al-brand .custom-logo{
    max-width:112px!important;
    max-height:44px!important;
  }

  .al-main-nav{
    justify-content:flex-end;
  }

  .al-main-nav .mega-menu-wrap ul.mega-menu > li.mega-menu-item > a.mega-menu-link{
    font-size:14px!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }

  .al-main-nav a{font-size:14px}
}

@media (max-width: 1080px){
  .al-header-inner{
    grid-template-columns:112px minmax(0,1fr);
    gap:16px;
  }

  .al-brand img,
  .al-brand .custom-logo{
    max-width:96px!important;
    max-height:40px!important;
  }

  .al-main-nav .mega-menu-wrap ul.mega-menu > li.mega-menu-item > a.mega-menu-link{
    font-size:13px!important;
    padding-left:6px!important;
    padding-right:6px!important;
  }

  .al-main-nav a{font-size:13px}
}

@media (max-width: 980px){
  .al-site-header{top:0}
  body.admin-bar .al-site-header{top:46px}

  .al-header-inner{
    min-height:var(--al-mobile-header-height);
    display:flex;
    justify-content:space-between;
    gap:12px;
  }

  .al-brand{
    max-width:112px;
    min-width:88px;
  }

  .al-brand a,
  .al-brand .custom-logo-link{
    max-width:112px;
  }

  .al-brand img,
  .al-brand .custom-logo{
    max-width:100px!important;
    max-height:40px!important;
  }

  .al-main-nav{
    display:none;
    position:fixed;
    left:12px;
    right:12px;
    top:86px;
    z-index:10001;
    padding:16px;
    border:1px solid var(--al-border);
    border-radius:16px;
    background:#fff;
    box-shadow:var(--al-shadow);
    max-height:calc(100vh - 98px);
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }

  body.admin-bar .al-main-nav{
    top:132px;
    max-height:calc(100vh - 144px);
  }

  body.al-menu-open{overflow:hidden}
  body.al-menu-open .al-main-nav{display:block}

  .al-main-nav ul{display:block}
  .al-main-nav a{
    display:flex;
    min-height:44px;
    white-space:normal;
    font-size:15px;
  }

  .al-main-nav .sub-menu{
    position:static;
    display:block;
    min-width:0;
    padding:0 0 0 14px;
    border:0;
    box-shadow:none;
  }

  .al-main-nav .mega-menu-wrap,
  .al-main-nav #mega-menu-wrap-primary{
    width:100%!important;
  }

  .al-main-nav .mega-menu-wrap ul.mega-menu{
    display:block!important;
    width:100%!important;
  }

  .al-main-nav .mega-menu-wrap ul.mega-menu > li.mega-menu-item{
    display:block!important;
    width:100%!important;
    margin:0!important;
    border-bottom:1px solid #f0f0f0;
  }

  .al-main-nav .mega-menu-wrap ul.mega-menu > li.mega-menu-item:last-child{
    border-bottom:0;
  }

  .al-main-nav .mega-menu-wrap ul.mega-menu > li.mega-menu-item > a.mega-menu-link{
    display:flex!important;
    align-items:center!important;
    min-height:46px!important;
    padding:10px 4px!important;
    font-size:15px!important;
    white-space:normal!important;
  }

  .al-header-actions{
    display:flex;
    margin-left:auto;
  }

  .al-header-action--account{
    display:none;
  }

  .al-header-action--cart{
    min-height:42px;
    padding:8px 13px;
  }

  .al-menu-toggle{
    display:inline-block;
  }

  body.al-safe-minimal.woocommerce ul.products,
  body.al-safe-minimal .woocommerce ul.products{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .al-footer-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 760px){
  .al-post-grid,
  body.al-safe-minimal.woocommerce ul.products,
  body.al-safe-minimal .woocommerce ul.products{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  body.al-safe-minimal.woocommerce div.product div.images,
  body.al-safe-minimal.woocommerce-page div.product div.images,
  body.al-safe-minimal.woocommerce div.product div.summary,
  body.al-safe-minimal.woocommerce-page div.product div.summary{
    float:none;
    width:100%;
  }
}

@media (max-width: 560px){
  .al-container{
    width:calc(100% - 24px);
  }

  .al-brand{
    max-width:96px;
    min-width:76px;
  }

  .al-brand a,
  .al-brand .custom-logo-link{
    max-width:96px;
  }

  .al-brand img,
  .al-brand .custom-logo{
    max-width:82px!important;
    max-height:36px!important;
  }

  .al-home-simple{
    min-height:56vh;
    padding:54px 0;
  }

  .al-home-simple h1,
  .al-page-title,
  .woocommerce-products-header__title,
  body.al-safe-minimal.woocommerce div.product .product_title{
    font-size:34px;
  }

  .al-search-form{
    flex-direction:column;
  }

  .al-post-grid,
  body.al-safe-minimal.woocommerce ul.products,
  body.al-safe-minimal .woocommerce ul.products{
    grid-template-columns:1fr;
    gap:16px;
  }

  .al-header-action{
    min-height:40px;
    padding:8px 11px;
    font-size:13px;
  }

  .al-footer-grid{
    grid-template-columns:1fr;
    gap:26px;
  }

  .al-footer-bottom-inner{
    display:block;
  }

  .al-footer-bottom-inner span{
    display:block;
    margin-bottom:8px;
  }

  .al-term-bottom-desc{
    padding:18px;
  }
}


/* v1.7 - remove unwanted legacy sidebars */

#sidebar,
.sidebar,
.widget-area:not(.woocommerce-widget-layered-nav-list),
.al-legacy-sidebar{
  display:none!important;
}

/* v1.7 - readable SEO category descriptions */

.al-term-short-desc{
  max-width:920px;
  margin:0 0 28px;
}

.al-term-short-desc p{
  margin:0 0 14px;
  color:#555;
  font-size:17px;
  line-height:1.75;
}

.al-term-bottom-desc{
  max-width:980px;
  margin:48px auto 0;
  padding:34px;
  border:1px solid var(--al-border);
  border-radius:18px;
  background:#fafafa;
}

.al-term-bottom-desc h2,
.woocommerce-products-header .term-description h2,
.term-description h2{
  display:block;
  margin:0 0 16px;
  color:#161616;
  font-size:clamp(26px,3vw,38px);
  line-height:1.15;
  letter-spacing:-.04em;
  font-weight:850;
}

.al-term-bottom-desc h2:not(:first-child),
.woocommerce-products-header .term-description h2:not(:first-child),
.term-description h2:not(:first-child){
  margin-top:42px;
}

.al-term-bottom-desc h3,
.woocommerce-products-header .term-description h3,
.term-description h3{
  display:block;
  margin:30px 0 12px;
  color:#161616;
  font-size:clamp(21px,2.2vw,27px);
  line-height:1.2;
  letter-spacing:-.025em;
  font-weight:800;
}

.al-term-bottom-desc p,
.woocommerce-products-header .term-description p,
.term-description p{
  margin:0 0 17px;
  color:#333;
  font-size:16px;
  line-height:1.78;
}

.al-term-bottom-desc ul,
.al-term-bottom-desc ol,
.woocommerce-products-header .term-description ul,
.woocommerce-products-header .term-description ol,
.term-description ul,
.term-description ol{
  margin:0 0 22px 22px;
  padding:0;
  color:#333;
  line-height:1.75;
}

.al-term-bottom-desc li,
.woocommerce-products-header .term-description li,
.term-description li{
  margin:0 0 8px;
}

.al-term-bottom-desc strong,
.woocommerce-products-header .term-description strong,
.term-description strong{
  color:#161616;
  font-weight:800;
}

.al-term-bottom-desc table,
.woocommerce-products-header .term-description table,
.term-description table{
  width:100%;
  margin:24px 0;
  border-collapse:collapse;
  background:#fff;
  border:1px solid var(--al-border);
  border-radius:12px;
  overflow:hidden;
}

.al-term-bottom-desc th,
.al-term-bottom-desc td,
.woocommerce-products-header .term-description th,
.woocommerce-products-header .term-description td,
.term-description th,
.term-description td{
  padding:12px 14px;
  border-bottom:1px solid var(--al-border);
  text-align:left;
}

.al-term-bottom-desc > *:first-child{
  margin-top:0!important;
}

.al-term-bottom-desc > *:last-child{
  margin-bottom:0!important;
}

@media (max-width: 560px){
  .al-term-short-desc p{
    font-size:16px;
  }

  .al-term-bottom-desc{
    margin-top:34px;
    padding:20px;
  }

  .al-term-bottom-desc h2,
  .woocommerce-products-header .term-description h2,
  .term-description h2{
    font-size:26px;
  }

  .al-term-bottom-desc h3,
  .woocommerce-products-header .term-description h3,
  .term-description h3{
    font-size:21px;
  }
}
