/* Presentation parity with pp6. Existing catalogue and module settings remain local. */
#header .ec27-nav-hooks,
#header .ec27-header-hooks #search_block_top {
  display: none !important;
}
body#product .socialsharing_product,
body#product .blockproductscategory {
  display: none !important;
}

/* Keep the dedicated AS4 facet panel and the requested category new products. */
body#category #left_column > .block:not(.PM_ASBlockOutput):not(#prestablog_block_rss):not(#new-products_block_right),
body#manufacturer #left_column > .block:not(.PM_ASBlockOutput):not(#prestablog_block_rss) {
  display: none !important;
}

/* Match the 42px mobile search row, including the current Smart Search wrapper. */
@media (max-width: 767px) {
  #header .ec27-search,
  #header .ec27-search #searchbox { height: 42px; min-height: 0; }
}

/* Preserve newer CMS editorial cards while stacking their inline table layout on phones. */
@media (max-width: 767px) {
  body#cms .rte div[style*="display: table;"] {
    display: block !important; width: 100% !important;
    margin-left: 0 !important; margin-right: 0 !important; border-spacing: 0 !important;
  }
  body#cms .rte div[style*="display: table-row;"] {
    display: grid !important; grid-template-columns: minmax(0, 1fr);
    gap: 12px; margin-bottom: 12px;
  }
  body#cms .rte div[style*="display: table-cell;"] {
    display: block !important; width: 100% !important;
    min-width: 0; box-sizing: border-box; overflow-wrap: anywhere;
  }
}

/* Header search: explicit surface and geometric centering, independent of legacy modules. */
#header .ec27-search #searchbox {
  position: relative; height: 45px; background: #fff; border-radius: 5px;
}
#header .ec27-search #search_query_top {
  display: block; box-sizing: border-box; width: 100%; height: 45px; min-height: 0;
  padding: 0 54px 0 14px; background: #fff !important; color: #34383b;
  line-height: normal; box-shadow: none;
}
#header .ec27-search .button-search {
  display: flex !important; align-items: center; justify-content: center;
  position: absolute; top: 50% !important; right: 4px; left: auto;
  width: 37px; height: 37px; min-height: 0; margin: 0; padding: 0; border: 0;
  background: #11151a !important; color: #fff; line-height: 1;
  transform: translateY(-50%);
}
#header .ec27-search .button-search i {
  display: block; width: auto; height: auto; margin: 0; padding: 0;
  font-size: 18px; line-height: 1 !important; transform: none;
}
#header .ec27-search .button-search i::before { display: block; line-height: 1; }
@media (max-width: 767px) {
  #header .ec27-search,
  #header .ec27-search #searchbox,
  #header .ec27-search #search_query_top { height: 42px; }
  #header .ec27-search .button-search { width: 34px; height: 34px; }
}
/* Remove only the inherited blue decorative separator; retain keyboard focus styling. */
body#product #buy_block #add_to_cart button::after {
  display: none !important; content: none !important; background: none !important;
}

/* Contact: keep the form across the full content width. */
body#contact #center_column { width: 100%; }
body#contact .contact-form-box { width: 100%; max-width: none; box-sizing: border-box; }
body#contact #prestablog_block_rss { display: none !important; }

/* Category new products: Europ-Camera sidebar cards. */
body#category #new-products_block_right {
  display: block; margin: 0 0 20px; padding: 0; border: 1px solid #dce0e5;
  border-radius: 8px; background: #fff; overflow: hidden;
}
body#category #new-products_block_right .title_block {
  margin: 0; padding: 16px; border: 0; border-bottom: 2px solid #f80823;
  background: #fff; color: #24282d; font-size: 14px; font-weight: 800;
}
body#category #new-products_block_right .title_block a { color: inherit; }
body#category #new-products_block_right .title_block::after { display: none; }
body#category #new-products_block_right .block_content { display: block !important; padding: 0 14px 14px; border: 0; }
body#category #new-products_block_right ul.products { margin: 0; padding: 0; list-style: none; }
body#category #new-products_block_right ul.products > li {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px;
  margin: 0; padding: 16px 0; border: 0; border-bottom: 1px solid #eceef1;
}
body#category #new-products_block_right .products-block-image {
  display: flex; align-items: center; justify-content: center; float: none;
  width: 110px; height: 110px; margin: 0; border: 0; background: #fff;
}
body#category #new-products_block_right .products-block-image img { max-width: 100%; max-height: 110px; width: 100%; height: 100%; object-fit: contain; }
body#category #new-products_block_right .product-content { margin: 0; min-width: 0; }
body#category #new-products_block_right h5 { margin: 0 0 8px; }
body#category #new-products_block_right .product-name { color: #24282d; font-size: 12px; font-weight: 600; line-height: 1.45; }
body#category #new-products_block_right .product-name:hover { color: #f80823; }
body#category #new-products_block_right .product-description { display: none; }
body#category #new-products_block_right .price { color: #f80823; font-size: 17px; font-weight: 800; }
body#category #new-products_block_right .block_content > div:last-child { margin-top: 14px; }
body#category #new-products_block_right .button {
  display: block; padding: 11px 12px; border: 1px solid #f80823; border-radius: 5px;
  background: #f80823; color: #fff; text-align: center; font-size: 13px; font-weight: 700; box-shadow: none;
}
body#category #new-products_block_right .button span { display: inline; padding: 0; border: 0; background: none; }
body#category #new-products_block_right .button:hover { background: #d90021; border-color: #d90021; }
@media (max-width: 767px) {
  body#category #new-products_block_right { margin: 0 0 16px; }
  body#category #new-products_block_right ul.products { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; }
  body#category #new-products_block_right ul.products > li { flex: 0 0 260px; scroll-snap-align: start; }
}

body#category #new-products_block_right ul.products > li::before,
body#category #new-products_block_right ul.products > li::after { display: none; }

body#category #new-products_block_right .title_block { background: #fff !important; color: #24282d !important; }
body#category #new-products_block_right .title_block a { color: #24282d !important; }
body#category #new-products_block_right .product-content h5 { position: static; top: auto; }
body#category #new-products_block_right ul.products > li { height: auto; min-height: 0; align-content: start; }

/* Obfuscated new-products links retain their visual and keyboard affordances. */
#new-products_block_right .oblink { cursor: pointer; }
#new-products_block_right .oblink:focus-visible { outline: 2px solid #f80823; outline-offset: 3px; }
body#category #new-products_block_right .title_block > .oblink { color: #24282d; }

#new-products_block_right .ec27-new-old-price { display: block; margin-top: 3px; color: #737980; font-size: 12px; font-weight: 400; text-decoration: line-through; }
body#category #new-products_block_right .title_block { font-size: 13px; }

/* Keep horizontal thumbnails centered beneath the main image. */
body#product #thumbs_list_frame { margin: 0 auto !important; height: auto !important; }

/* Leave the same inset as the image when the thumbnail strip overflows. */
body#product #thumbs_list { box-sizing: border-box; width: calc(100% - 24px) !important; margin: 0 12px; padding: 0; }

/* Match the main product card contour, with room to avoid clipping its corners. */
body#product #thumbs_list li { padding: 1px; box-sizing: border-box; }
body#product #thumbs_list li a,
body#product #thumbs_list li a:hover,
body#product #thumbs_list li a.shown,
body#product #thumbs_list li a.shown:hover {
  display: block; box-sizing: border-box; width: 66px; height: 66px;
  overflow: hidden; border: 0; padding: 3px; border-radius: 8px;
  background: #fff; box-shadow: 0 0 0 1px #e0e4e8;
  font: inherit; color: inherit; transition: none;
}
body#product #thumbs_list li a.shown,
body#product #thumbs_list li a.shown:hover { box-shadow: 0 0 0 1px #f80823; }
body#product #thumbs_list li a img {
  display: block; width: 60px; height: 60px; border: 0;
  border-radius: 5px; object-fit: contain; box-shadow: none;
}

/* Variant choices sit outside the summary: retain the same inner spacing. */
body#product .ec27-product-main > .pb-center-column > #attributes:has(.ec27-variant-options) {
  box-sizing: border-box; width: 100%; min-width: 0; padding: 0 16px 16px;
}

/* Match the category listing width and right alignment. */
@media (min-width: 768px) {
  body#new-products #columns > .row { margin-left: 0; margin-right: 0; }
  body#new-products #center_column {
    float: none; width: calc((100% - 30px) * .75); padding: 0; margin: 0 0 0 auto;
  }
}
body:is(#new-products, #category) ul.product_list .new-box {
  position: absolute; top: 12px; left: 12px; right: auto;
  width: auto; height: auto; padding: 0; margin: 0; overflow: visible;
  transform: none; z-index: 2;
}
body:is(#new-products, #category) ul.product_list .new-label {
  display: inline-block; position: static; width: auto; height: auto;
  padding: 5px 10px; margin: 0; border: 0; border-radius: 5px;
  background: #f80823 !important; color: #fff !important; font-family: inherit;
  font-size: 11px; font-weight: 700; line-height: 1.3; text-transform: uppercase;
  transform: none; text-shadow: none; box-shadow: none;
}
body:is(#new-products, #category) ul.product_list .new-label::before,
body:is(#new-products, #category) ul.product_list .new-label::after { display: none; }

/* Keep the cached icon markup on all page types; display it with category headings. */
#new-products_block_right .ec27-new-products-icon { display: none; }

/* New products sidebar: match the category filter card heading. */
body#category #new-products_block_right .title_block {
  display: flex; align-items: center; gap: 9px;
  margin: 0; padding: 13px 14px; border: 0; border-bottom: 1px solid #eceef1;
  border-radius: 6px 6px 0 0; background: #fff; color: #24282d;
  font-family: "Open Sans", sans-serif; font-weight: 800; line-height: 22px; text-transform: none;
}
body#category #new-products_block_right .title_block > .oblink {
  min-width: 0; font-size: 16px !important; font-weight: inherit; line-height: inherit;
}
body#category #new-products_block_right .ec27-new-products-icon {
  display: block; flex: 0 0 24px; width: 24px; height: 22px;
  margin: 0; color: #f80823;
}

/* Category 181 already has its page H1; hide the repeated description heading. */
body#category.category-181 .content_scene_cat .cat_desc .rte > h3:first-child { display: none; }
