/* AMMO Showroom: single product — photo + info on the left, sticky title / price / buttons on the right. */
.single-product .product-entry-wrapper{display:grid!important;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:36px;align-items:start}
.single-product .product-entry-wrapper>.summary{position:sticky;top:calc(var(--wp-admin--admin-bar--height,0px) + 24px);width:auto!important;max-width:none!important;margin:0!important}
.am-pleft{min-width:0;display:flex;flex-direction:column;gap:24px}

/* main photo: frame follows its orientation (4:5 … 16:10), whole photo always visible */
.am-gal{position:relative;margin:0}
.am-gal__main{display:block;aspect-ratio:var(--am-frame,1.333);max-height:80vh;background:var(--am-fill);overflow:hidden;cursor:zoom-in}
.am-gal.is-portrait .am-gal__main{background:#fff;box-shadow:inset 0 0 0 1px var(--am-line)}
.am-gal__main img{display:block;width:100%!important;height:100%!important;object-fit:contain;margin:0;border-radius:0}
.am-gal__all{position:absolute;right:12px;bottom:12px;display:inline-flex;align-items:center;gap:10px;padding:0 14px 0 0;border:0;border-radius:0;background:#fff;color:var(--am-ink);font:inherit;font-size:14px;font-weight:600;cursor:pointer;box-shadow:0 2px 10px rgba(30,34,38,.25)}
.am-gal__ico{display:flex;align-items:center;justify-content:center;width:42px;height:42px;background:var(--am-cta);color:#fff}
.am-gal__all:hover{color:var(--am-cta)}
.am-gal__all:hover .am-gal__ico{background:#A93A32}
.am-gal--empty img{display:block;width:100%;height:auto}

/* info under the photo: short description, then sections with sticky anchor nav (as the company profile on ammo.md) */
.am-pinfo{display:flex;flex-direction:column;gap:0}
.am-pshort{padding:0 0 22px;font-size:16px;line-height:1.6;color:#3A3A3A}
.am-pshort p{margin:0 0 10px}
.am-pshort p:last-child{margin:0}
.am-tabs{position:sticky;top:var(--wp-admin--admin-bar--height,0px);z-index:20;display:flex;gap:4px;overflow-x:auto;background:#fff;border-bottom:1px solid var(--am-line);font-size:15px;font-weight:500;scrollbar-width:none}
.am-tabs::-webkit-scrollbar{display:none}
.am-tabs a{flex:0 0 auto;padding:14px 14px 12px;border-bottom:2px solid transparent;color:var(--am-muted);text-decoration:none}
.am-tabs a.is-active,.am-tabs a:hover{color:var(--am-ink);border-bottom-color:var(--am-cta)}
.am-co-sec{display:flex;flex-direction:column;gap:14px;padding:28px 0;border-bottom:1px solid var(--am-line);scroll-margin-top:60px}
.am-co-sec>h2{margin:0;font-size:21px;font-weight:600;color:var(--am-ink)}
.am-prose{font-size:15px;line-height:1.65;color:#3A3A3A}
.am-prose>*:first-child{margin-top:0}
.am-prose>*:last-child{margin-bottom:0}
.am-prose h2{font-size:19px;font-weight:600;margin:22px 0 10px;color:var(--am-ink)}
.am-prose h3{font-size:17px;font-weight:600;margin:18px 0 8px;color:var(--am-ink)}
.am-prose table.shop_attributes{width:100%;margin:0;border-collapse:collapse;border:0}
.am-prose .shop_attributes th,.am-prose .shop_attributes td{padding:10px 0;border:0;border-bottom:1px solid var(--am-line);background:none;text-align:left;font-size:14px;vertical-align:top}
.am-prose .shop_attributes th{width:38%;font-weight:500;color:var(--am-muted)}
.am-prose .shop_attributes td p{margin:0}
.am-prose iframe,.am-prose video{max-width:100%}

/* offer block: conditions, two buttons, note, perks */
.am-offer{display:flex;flex-direction:column;gap:16px}
.am-offer__terms{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:15px;font-weight:600;color:var(--am-ink)}
.am-offer__btns{display:flex;flex-direction:column;gap:8px}
.am-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 18px;border:0;border-radius:0;font:inherit;font-size:15px;font-weight:600;text-decoration:none;cursor:pointer;box-sizing:border-box}
.am-btn--main{background:var(--am-cta);color:#fff}
.am-btn--main:hover{background:#A93A32;color:#fff}
a.am-btn.am-btn--line{background:#fff;color:var(--am-ink);box-shadow:inset 0 0 0 1px var(--am-ink)}
a.am-btn.am-btn--line:hover{background:#fff;color:var(--am-cta);box-shadow:inset 0 0 0 1px var(--am-cta)}
.am-offer__note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;background:var(--am-fill);font-size:13px;line-height:1.5;color:#3A3A3A}
.am-offer__note svg{flex:0 0 auto;margin-top:1px;color:var(--am-muted)}
.am-offer__note p{margin:0}
.am-perks{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px}
.am-perks li{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin:0;padding:12px;border:1px solid var(--am-line);font-size:13px;line-height:1.35;color:var(--am-ink)}
.am-perks svg{color:var(--am-cta)}

/* price request pop-up */
.am-dlg{width:min(460px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:28px 24px 20px;border:0;border-radius:0;box-shadow:0 20px 60px rgba(30,34,38,.25);color:var(--am-ink)}
.am-dlg::backdrop{background:rgba(30,34,38,.55)}
.am-dlg__x{position:absolute;top:10px;right:10px;display:flex;padding:6px;border:0;background:none;color:var(--am-ink);cursor:pointer}
.am-dlg__t{margin:0 0 4px;font-size:21px;font-weight:600}
.am-dlg__p{margin:0 0 18px;font-size:14px;color:var(--am-muted)}
/* forms were styled for the old dark pop-up: own title is shown above, texts in site colours */
.am-dlg .ff-custom_html,.am-dlg .ff-custom_html *{color:var(--am-muted)!important;font-size:13px}
.am-dlg .ff-el-input--label label{color:var(--am-ink)!important;font-size:14px;font-weight:500}
.am-dlg .ff-el-form-control{border-radius:0!important;border-color:var(--am-line)!important;min-height:46px}
.am-dlg .ff-btn-submit{width:100%;min-height:48px;border-radius:0!important;background:var(--am-cta)!important;font-weight:600}

/* right column (sticky): title, price, buttons, meta */
.single-product .summary .product_title{margin:0 0 10px}
.single-product .summary .price{margin:0 0 20px}
.single-product .summary .product_meta{display:flex;flex-direction:column;gap:8px;margin:4px 0 0;padding:16px 0 0;border-top:1px solid var(--am-line);font-size:14px;color:var(--am-muted);text-transform:none;letter-spacing:0}
.single-product .summary .product_meta>span{display:block;margin:0;font-weight:500}
.single-product .summary .product_meta a{color:var(--am-ink);text-decoration:none;font-weight:400;text-transform:none}
.single-product .summary .product_meta a:hover{color:var(--am-cta)}

@media (max-width:999px){
  .single-product .product-entry-wrapper{grid-template-columns:1fr;gap:20px}
  .single-product .product-entry-wrapper>.summary{position:static;grid-row:2}
  .am-pleft{display:contents}
  .am-gal{grid-row:1}
  .am-pinfo{grid-row:3}
}

/* lightbox */
.am-lb{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;background:rgba(18,20,22,.94);color:#fff;touch-action:pan-y}
.am-lb[hidden]{display:none}
.am-lb__img{max-width:calc(100vw - 160px);max-height:calc(100vh - 120px);width:auto;height:auto;object-fit:contain;user-select:none;-webkit-user-drag:none}
.am-lb button{position:absolute;display:flex;align-items:center;justify-content:center;border:0;border-radius:0;background:rgba(255,255,255,.08);color:#fff;cursor:pointer;padding:0}
.am-lb button:hover{background:rgba(255,255,255,.18)}
.am-lb button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.am-lb__prev,.am-lb__next{top:50%;width:52px;height:52px;margin-top:-26px}
.am-lb__prev{left:20px}
.am-lb__next{right:20px}
.am-lb__close{top:16px;right:16px;width:44px;height:44px}
.am-lb__count{position:absolute;top:26px;left:24px;font-size:14px;font-weight:600;letter-spacing:.04em}
@media (max-width:767px){
  .am-lb__img{max-width:100vw;max-height:calc(100vh - 140px)}
  .am-lb__prev,.am-lb__next{top:auto;bottom:24px;margin-top:0}
  .am-lb__prev{left:calc(50% - 60px)}
  .am-lb__next{right:calc(50% - 60px)}
}
/* pop-up always centred on the screen */
dialog.am-dlg{position:fixed;inset:0;margin:auto!important;height:fit-content}
dialog.am-dlg:not([open]){display:none}
/* single product: title regular weight, price in brand red */
.single-product .summary .product_title{font-weight:500!important;line-height:1.2!important}
.single-product .summary .price,.single-product .summary .price *{color:var(--am-cta)!important;font-weight:500!important}
.single-product .summary .price{font-size:26px!important;line-height:1.2}
.single-product .summary .price .am-price-neg{font-weight:500!important}
/* phone: smaller title and price so long names stay compact */
@media (max-width:767px){
  .single-product .summary .product_title{font-size:22px!important;line-height:1.25!important;margin:0 0 6px!important}
  .single-product .summary .price{font-size:21px!important;margin:0 0 14px!important}
}
/* perks: always one row, however many (2–4) */
.am-perks{grid-template-columns:none!important;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
@media (max-width:767px){
  .am-perks{gap:6px}
  .am-perks li{padding:10px 8px;gap:6px;font-size:12px;line-height:1.3;overflow-wrap:anywhere}
  .am-perks svg{width:18px;height:18px}
}
/* product note: full on desktop; two lines + toggle on phones */
.am-offer__nt{display:flex;flex-direction:column;gap:4px;min-width:0}
.am-offer__more{display:none;align-self:flex-start;padding:0;border:0;background:none;font:inherit;font-size:13px;font-weight:600;color:var(--am-cta);cursor:pointer}
@media (max-width:767px){
  .am-offer__note{padding:10px 12px}
  .am-offer__note p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .am-offer__note.is-open p{display:block;-webkit-line-clamp:unset}
  .am-offer__more{display:inline-block}
}
