/*
Theme Name: Serefni
Theme URI:  https://www.wpserveur.net
Author:     WPServeur
Author URI: https://www.wpserveur.net
Template:   woostify
Version:    1.0
License:    GNU General Public License v2 or later
*/

/* ==========================================================================
   Design Tokens — Sérefni brand colors and fonts
   Use var(--ser-*) in new rules. Existing rules will migrate gradually.
   ========================================================================== */
:root {
  --ser-text: #545b5c;
  --ser-text-dark: #2b2b2b;
  --ser-text-light: #484848;
  --ser-bg: #ebe6e3;
  --ser-bg-gray: #ded8d3;
  --ser-gray: #999a97;
  --ser-white: #fff;
  --ser-font-body: granville, serif;
  --ser-font-heading: "ivypresto-display", serif;
  --ser-font-size-body: 15px;
  --ser-line-height-body: 28px;
}




/* Mega-menu column styles are in header.css.
   The --split variant (2-column list) is applied via ser-mega__col--split class. */

/* Hide any remaining Woostify parent theme overlay/sidebar elements */
#woostify-overlay,
.sidebar-menu,
.wrap-toggle-sidebar-menu {
  display: none !important;
}

/* Banner z-index handled in header.css (sticky banner + sticky header) */

/* Global font reset – matches live site's inline * rule */
* {
  font-family: granville, serif;
  font-weight: 400;
  font-style: normal;
}

html {
  background: #ebe6e3;
}

body {
  font-family: granville, serif;
  font-weight: 400;
  font-style: normal;
  color: #545b5c;
  background: #ebe6e3;
  margin: 0;
}

p {
  font-family: granville, serif;
  font-size: 14px !important;
  font-weight: 400;
  font-style: normal;
  color: #545b5c;
  line-height: 28px;
}

html,
body,
#view,
#page,
.site,
.site-header,
.site-footer,
.site-content {
  margin: 0;
  padding: 0;
}

.site-content {
  margin-bottom: 0 !important;
}

/* Cap WooCommerce page content at 1600px.
   Doubled class selector (0,3,0) beats the parent theme's
   .site-full-width-container .site-content .woostify-container (0,3,0)
   by source order since child CSS loads after parent. */
.site-content .woostify-container.woostify-container {
  max-width: 1400px !important;
  margin-left: auto;
  margin-right: auto;
}
.archive.tax-product_cat .site-content .woostify-container.woostify-container {
  max-width: 1400px !important;
}

body,
#view,
#page,
.site {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

h1 {
  font-family: granville, serif;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 2px;
  color: #545b5c;
}

body h2,
h2.wp-block-heading {
  font-family: "ivypresto-display", serif !important;
  font-weight: 500 !important;
  font-style: normal;
  letter-spacing: 3px;
  color: #545b5c;
}

h3, h4, h5, h6 {
  font-family: granville, serif !important;
  font-weight: 700;
  font-style: normal;
  color: #545b5c;
  letter-spacing: normal;
}

body h3 {
  font-size: 24px !important;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: normal;
}

/* Global Gutenberg button style – matches production (serefni.is) */
.wp-block-button__link,
.wp-element-button,
body .wp-block-button .wp-block-button__link,
body .wp-block-button__link {
  background-color: #545b5c;
  color: #fff;
  border: none;
  border-radius: 0px;
  font-family: granville, serif !important;
  font-size: 15px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
  padding: 8px 20px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
.wp-block-button .wp-block-button__link:hover {
  background-color: #3a4142;
  color: #fff;
  border: none;
  outline: none;
  box-shadow: none;
}

.wp-block-button__link:focus,
.wp-element-button:focus,
.wp-block-button .wp-block-button__link:focus {
  background-color: #545b5c;
  color: #fff;
  border: none;
  outline: none;
  box-shadow: none;
}

.wp-block-button__link:active,
.wp-element-button:active,
.wp-block-button .wp-block-button__link:active {
  background-color: #7e7f7c;
  color: #fff;
  border: none;
  outline: none;
  box-shadow: none;
}

/* Also fix any generic button/a.button outlines across the site */
button:focus,
a.button:focus,
.button:focus,
input[type="button"]:focus,
input[type="submit"]:focus {
  outline: none;
  box-shadow: none;
}

body.page .site-content,
body.page .content-area,
body.page .site-main {
  background: #ebe6e3;
}

/* Page hero — split layout matching live (grey left, beige right) */
.page-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #ebe6e3;
  padding: 0;
  min-height: 340px;
  display: flex;
  align-items: stretch;
  position: relative;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 75%;
  background: #545B5C;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0;
  padding: 0 60px;
  width: 75%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 40px;
}

.page-hero .page-title {
  margin: 0;
  color: #fff;
  font-family: "ivypresto-display", serif;
  font-size: 48px;
  line-height: 1.15;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 1px;
  text-align: left;
}

@media (max-width: 768px) {
  .page-hero::before {
    width: 100%;
  }
  .page-hero-inner {
    width: 100%;
    padding: 0 20px;
    padding-bottom: 30px;
  }
  .page-hero .page-title {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .page-hero .page-title {
    font-size: 26px;
  }
}

body.page .site-content,
body.page .content-area,
body.page .site-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Constrain page content to match live site width */
body.page .woostify-container.woostify-container {
  max-width: 1140px !important;
}

/* Gap between page-hero and content below */
.page-hero {
  margin-bottom: 40px !important;
}

/* ── Showcase grid (3 category images with links) ── */
.ser-showcase-grid {
  margin: 40px 0 60px;
  gap: 30px !important;
}

.ser-showcase-grid .wp-block-column {
  min-width: 0;
}

.ser-showcase-grid .wp-block-image,
.ser-showcase-grid .ser-showcase-img {
  margin: 0 0 8px;
}

.ser-showcase-grid .wp-block-image img,
.ser-showcase-grid .ser-showcase-img img {
  width: 100% !important;
  height: 250px !important;
  object-fit: cover !important;
  border-radius: 2px;
}

.ser-showcase-grid .ser-showcase-title {
  font-family: granville, serif !important;
  font-size: 18px !important;
  font-weight: 400;
  color: #545b5c;
  margin: 8px 0 2px;
}

.ser-showcase-grid .ser-showcase-cta {
  font-family: granville, serif;
  font-size: 14px;
  font-weight: 400;
  color: #545b5c;
  margin: 0;
}

/* ── Client logos row (7 columns, equal size) ── */
.ser-client-logos-row {
  max-width: 800px;
  margin: 20px auto 40px;
  gap: 10px !important;
  align-items: center;
}

.ser-client-logos-row .wp-block-column {
  min-width: 0;
}

.ser-client-logos-row .wp-block-image img {
  max-height: 40px !important;
  width: auto !important;
  max-width: 100px !important;
  object-fit: contain !important;
  filter: grayscale(100%) opacity(0.7);
  margin: 0 auto;
  display: block;
}

.page-hero + * {
  margin-top: 0 !important;
}

/* Single post hero styles moved to dedicated css/single-post.css */

@media (max-width: 480px) {
  .page-hero--single .page-title {
    font-size: 24px;
  }
}

/* Smarter Surfaces section (matches Vöruflokkar look) */
.ser-smarter-surfaces {
  position: relative;
  padding: 84px 0 92px;
  background: #ebe6e3;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: grid;
  grid-template-columns: 30% 1fr;
}

.ser-smarter-surfaces::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 30%;
  background: #999a97;
}

.ser-smarter-surfaces .ser-container {
  position: relative;
  z-index: 1;
  grid-column: 2;
  width: min(100%, 980px);
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

.ser-smarter-surfaces .ser-hero,
.ser-smarter-surfaces .ser-hero-yfir {
  max-width: 920px;
}

.ser-smarter-surfaces .ser-hero__title {
  font-size: clamp(52px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1.04;
  margin: 0 0 14px;
  color: #44515b;
}

.ser-smarter-surfaces .ser-hero__text {
  color: #545B5C;
  line-height: 1.9;
  margin: 0px 0 28px;
  max-width: 725px;
}

/* [Homepage] Smarter Surfaces button — match Skoða úrvalið style */
.ser-smarter-surfaces .ser-btn {
  display: inline-flex;
  background: #999a97;
  color: #fff;
  padding: 12px 24px;
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0;
}

.ser-smarter-surfaces .ser-btn:hover {
  background: #888987;
}

.ser-smarter-surfaces .ser-cat-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ser-smarter-surfaces .ser-cat {
  text-decoration: none;
  color: #545B5C;
}

.ser-smarter-surfaces .ser-cat__img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e3dedb;
  max-width: 200px;
  margin: 0 auto;
  border-radius: 4px;
}

.ser-smarter-surfaces .ser-cat__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ser-smarter-surfaces .ser-cat__meta {
  padding: 12px 0;
  text-align: center;
}

/* [Homepage] Card titles (Segulfletir etc) — increased from 18px for better distinction from CTA */
.ser-smarter-surfaces .ser-cat__title {
  font-family: "ivypresto-display", serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 1px;
  margin: 0 0 6px;
  color: #545B5C;
}

/* [Homepage] "Skoða vöruflokk" CTA — match live: granville serif, 14px, 400 */
.ser-smarter-surfaces .ser-cat__cta {
  font-family: granville, serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  color: #545b5c;
}

@media (max-width: 900px) {
  .ser-smarter-surfaces {
    grid-template-columns: 1fr;
  }

  .ser-smarter-surfaces::before {
    display: none;
  }

  .ser-smarter-surfaces .ser-container {
    grid-column: auto;
    width: 100%;
    max-width: none;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .ser-smarter-surfaces {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 34px 0 44px;
    background: #545B5C;
  }

  .ser-smarter-surfaces::before {
    display: none;
  }

  .ser-smarter-surfaces .ser-container {
    padding: 0 20px;
  }

  .ser-smarter-surfaces .ser-hero,
  .ser-smarter-surfaces .ser-hero-yfir {
    max-width: none;
  }

  .ser-smarter-surfaces .ser-hero__title {
    font-size: clamp(46px, 12vw, 64px);
    color: #f4efe9;
    line-height: 1.05;
    letter-spacing: 1px;
    margin: 0 0 16px;
  }

  .ser-smarter-surfaces .ser-hero__text {
    color: #f4efe9;
    font-size: 15px;
    line-height: 1.75;
    margin: 0 0 26px;
  }

  .ser-smarter-surfaces .ser-btn {
    background: #f4efe9;
    color: #44515b;
    font-size: 18px;
    font-weight: 600;
    padding: 10px 20px;
  }

  .ser-smarter-surfaces .ser-cat-grid {
    margin-top: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .ser-smarter-surfaces .ser-cat__img {
    aspect-ratio: 1 / 1;
  }

  .ser-smarter-surfaces .ser-cat__meta {
    padding: 10px 0 0;
  }

  .ser-smarter-surfaces .ser-cat__title {
    margin: 0;
    font-size: 14px;
    color: #f4efe9;
    letter-spacing: .4px;
  }

  .ser-smarter-surfaces .ser-cat__cta {
    display: none;
  }
}

/* Color page: full-width content (Litaleit / /litir/) — page-id-83 */
body.page-id-83 .woostify-container,
body.page-id-83 .site-content .container,
body.page-id-83 .content-area,
body.page-id-83 .site-main {
  width: 100% !important;
  max-width: 100% !important;
}

body.page-id-83 .woostify-container,
body.page-id-83 .site-content .container {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (max-width: 768px) {
  body.page-id-83 .woostify-container,
  body.page-id-83 .site-content .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ── Litir page: mobile layout & modal fixes ────────────────────── */
@media (max-width: 900px) {
  /* Prevent horizontal overflow on the entire litaval component */
  .litaval-root {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Fix layout padding — plugin's 1200px query overrides its 900px one,
     so we must re-assert narrower padding here with higher specificity */
  .litaval-layout {
    padding: 24px 16px 0 16px !important;
    overflow: hidden;
  }

  /* Constrain main content to fit within parent */
  .litaval-main {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
    padding-right: 0 !important;
  }

  /* Color cards grid: fit within available width */
  .litaval-colors-grid {
    max-width: 100% !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  }

  /* Base color swatches: allow wrapping instead of overflow */
  .litaval-base-swatches {
    flex-wrap: wrap;
    overflow: hidden;
    max-width: 100%;
  }

  .litaval-base-swatch {
    min-width: 36px;
    height: 60px;
  }

  /* Search bar: fit within viewport */
  .litaval-search,
  .litaval-search-row {
    max-width: 100% !important;
  }

  /* Center sidebar when stacked */
  .litaval-sidebar {
    margin: 0 auto;
  }

  /* Reduce modal height so users can tap the overlay to close */
  .litaval-modal-content {
    max-height: 75vh;
    overflow-y: auto;
    width: 92% !important;
    margin: auto;
  }

  /* Favorites section */
  .litaval-favorites,
  .litaval-favorites-grid {
    max-width: 100%;
    overflow: hidden;
  }
}

/* Smaller phones: force 2 columns to prevent overflow */
@media (max-width: 480px) {
  .litaval-colors-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .litaval-layout {
    padding: 20px 12px 0 12px !important;
  }

  .litaval-base-swatch {
    min-width: 28px;
    height: 50px;
  }
}

.serefni-footer {
  background: #DED8D3;
  color: #545b5c;
  padding: 64px 0 72px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 0;
  margin-top: 5rem;
}

.serefni-footer + * {
  margin-top: 0 !important;
}

.serefni-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* [Footer] Grid — match live proportions (399:222:290:228) */
.serefni-footer__grid {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr 1fr 0.77fr;
  gap: 20px;
  align-items: start;
}

/* [Footer] Ensure widget wrappers don't add extra spacing */
.serefni-footer-widget {
  margin: 0;
  padding: 0;
}

/* [Footer] First column: logo + description, left-aligned, top-aligned with other columns */
.serefni-footer__col:first-child {
  padding-top: 0;
  text-align: left;
}

/* [Footer] Description text under logo — constrained to logo width */
.serefni-footer__col:first-child p {
  text-align: left;
  max-width: 345px;
  font-size: 15px !important;
  line-height: 28px !important;
  color: #484848 !important;
}

/* [Footer] Sérefni logo — 389px fixed width like live */
.serefni-footer__col img {
  max-width: 389px;
  height: auto;
  display: block;
  margin-bottom: 12px;
}

/* [Footer] Logo figure — -40px left margin matches live Elementor */
.serefni-footer__col figure,
.serefni-footer__col .wp-block-image {
  margin: 0 0 12px -40px !important;
  padding: 0;
}

/* [Footer] Logo column — logo sits 19px above title row like live */
.serefni-footer__col:first-child .serefni-footer-widget:first-child {
  margin-top: -19px;
}

/* [Footer] Section titles ("Fyrirtækið", "Hafa samband", "Afgreiðslutímar")
   — match live: granville serif, 15px, bold 700, color rgb(72,72,72)
   These are <h3> tags so we need !important to override global h3 { 18px } */
.serefni-footer-title,
.serefni-footer .serefni-footer-title,
.serefni-footer h3.serefni-footer-title {
  margin: 0 0 12px;
  font-family: granville, serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: normal;
  color: rgb(72, 72, 72);
}

.serefni-footer p,
.serefni-footer li {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 28px;
  color: #545b5c;
}

/* [Footer] Links — match live: 15px, 500, #484848 */
.serefni-footer a {
  color: #545b5c;
  text-decoration: none;
  font-weight: 500;
}

.serefni-footer a:hover,
.serefni-footer a:focus {
  color: #545b5c;
}

/* [Footer] Links list — match live: granville sans-serif, 15px, 500, #484848 */
.serefni-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: granville, serif;
  font-size: 14px;
  font-weight: 400;
  color: #545b5c;
}

.serefni-footer .menu li {
  margin-bottom: 6px;
}

.serefni-footer__social {
  margin-top: 14px;
  display: flex;
  gap: 6px;
}

.serefni-footer__social a {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border: 0;
  color: #fff;
  background: #545B5C;
  align-items: center;
  justify-content: center;
}

.serefni-footer__social a[href^="mailto:"] {
  background: #484848;
}

.serefni-footer__social a[href*="instagram.com"] {
  background: #999A97;
}

.serefni-footer__social a:hover,
.serefni-footer__social a:focus {
  color: #fff;
}

.serefni-footer__social svg {
  width: 14px;
  height: 14px;
  fill: #fff;
}

@media (max-width: 960px) {
  .serefni-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .serefni-footer {
    padding: 24px 0 22px;
    color: #23313b;
  }

  .serefni-footer__inner {
    max-width: 560px;
    padding: 0 20px;
  }

  .serefni-footer__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .serefni-footer__col img {
    max-width: 340px;
    margin-bottom: 22px;
  }

  .serefni-footer-title {
    margin: 0 0 14px;
    letter-spacing: 0.2px;
  }

  .serefni-footer p,
  .serefni-footer li {
    margin: 0 0 12px;
    line-height: 1.6;
    color: #23313b;
  }

  .serefni-footer a {
    color: #23313b;
  }

  .serefni-footer .menu li {
    margin-bottom: 10px;
  }

  .serefni-footer__social {
    margin-top: 18px;
  }
}

.single_add_to_cart_button.button {
  min-width: 200px;
  height: 50px;
  font-weight: 600;
  text-transform: uppercase;
  vertical-align: top;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: auto;
}

.veggfodurs_prufa {
  margin-top: 20px;
  width: 100%;
  background: none;
  border: 1px solid #545b5c;
  color: #545b5c;
}

.roll-calculator .calculator-results {
  display: block;
  float: left;
}

/* Calculator + Results headings: granville 26px/700 (matches live) */
.roll-calculator h5,
.roll-calculator .calculator-results h5 {
  font-family: granville, serif !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  line-height: 39px !important;
  color: #545b5c !important;
  letter-spacing: normal !important;
}

/* Results text: bold 16px for actual result, 14px for placeholder message */
.roll-calculator .calculator-results strong {
  font-weight: 700;
}
.roll-calculator .calculator-results p,
.roll-calculator .calculator-results p strong,
.roll-calculator .calc-result-wrapper,
.roll-calculator .calc-result-wrapper * {
  font-size: 16px !important;
  line-height: 30px !important;
}
.roll-calculator .calc-no-result-wrapper {
  font-size: 14px !important;
  line-height: 21px !important;
}
.roll-calculator .calculator-results .calc-disclaimer,
.single-product .roll-calculator .calc-disclaimer,
.single-product .calc-disclaimer {
  font-size: 10px !important;
  line-height: 11px !important;
}
.roll-calculator .calc-disclaimer {
  font-size: 13px;
  line-height: 1.5;
  color: #545b5c;
}

/* [Single Product] SÉRPÖNTUN disclaimer — match live site (10px / 11px) */
.single-product .calc-disclaimer {
  font-size: 10px !important;
  line-height: 11px !important;
  color: #545b5c;
}

.veggfodur-info {
  width: 100%;
  margin-bottom: 40px;
}

._veggfodur_breidd_wrapper,
._veggfodur_lengd_wrapper,
._veggfodur_haed_wrapper,
._veggfodur_litur_wrapper,
._veggfodur_honnun_wrapper {
  display: block !important;
  width: 100%;
}

._veggfodur_breidd_wrapper .label,
._veggfodur_lengd_wrapper .label,
._veggfodur_haed_wrapper .label,
._veggfodur_litur_wrapper .label,
._veggfodur_honnun_wrapper .label {
  font-weight: bold !important;
}

/* [Page: Product] Place calculator between veggfodur-info (order:5) and cart (order:6) */
.roll-calculator {
  margin-bottom: 20px;
  overflow: hidden;
  order: 5;
}

.roll-calculator,
.roll-calculator input[type="text"] {
  font-size: 14px;
  line-height: 21px;
}

/* Calculator form — labels above inputs, 2-col grid for Breidd/Hæð (matches live) */
.roll-calculator .form-horizontal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
}

.roll-calculator .form-group {
  margin-bottom: 15px;
  width: 100%;
  box-sizing: border-box;
}

/* Breidd veggjar + Hæð veggjar: each takes one grid column */
/* Rúllubreidd + Rúllulengd: each takes one grid column */
/* Mynsturhæð: spans full width */
/* Mynsturhæð: same width as Rúllubreidd (single column) */

/* Calculator title and button span full width */
.roll-calculator .form-horizontal > h5,
.roll-calculator .calculator-row,
.roll-calculator .calculator-results {
  grid-column: 1 / -1;
}

.roll-calculator .form-group label {
  display: block;
  white-space: nowrap;
  margin-bottom: 4px;
  font-weight: 600;
  color: #545b5c;
}

.roll-calculator .form-group .col-md-8 {
  width: 100%;
}

.roll-calculator .form-group .input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.roll-calculator .form-group .input-group input {
  flex: 1;
  min-width: 0;
}

.roll-calculator .form-group .input-group .input-group-addon {
  flex-shrink: 0;
  white-space: nowrap;
}

.roll-calculator .calculator-row {
  clear: both;
}

#calculator-button,
#calculator-button-meter {
  padding: 5px 50px;
  margin: 20px 0;
  background: #545b5c;
  color: #fff;
  border: none;
  font-family: granville, serif;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
}

#calculator-button:hover,
#calculator-button-meter:hover {
  background: #3d4344;
}

/* ================================================================
   WooCommerce Product Card Overrides – match production (serefni.is)
   ================================================================ */

/* Product loop wrapper */
.product-loop-wrapper {
  position: relative;
}

/* Product loop image wrapper */
.product-loop-image-wrapper {
  position: relative;
  overflow: hidden;
}

.product-loop-image-wrapper .woocommerce-loop-product__link {
  display: block;
  text-align: center;
}

/* Hover image swap (already provided by Woostify parent, reinforce styles) */
.product-loop-image-wrapper .product-loop-hover-image {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 1;
}

.product-loop-image-wrapper .product-loop-image {
  transition: opacity 0.3s ease-in-out;
  width: 100%;
  height: auto;
}

@media (min-width: 992px) {
  .product-loop-image-wrapper:hover .product-loop-hover-image {
    opacity: 1;
  }
  .product-loop-image-wrapper:hover .product-loop-hover-image + .product-loop-image {
    opacity: 0;
  }
}

/* Product content section */
.product-loop-content {
  padding: 15px 0 10px;
  min-height: 160px;
}

/* Product title */
.woocommerce .product .woocommerce-loop-product__title,
.woocommerce-loop-product__title {
  font-family: granville, serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: 0;
  color: rgb(153, 153, 151);
  margin: 0 0 4px;
}

.woocommerce .product .woocommerce-loop-product__title a,
.woocommerce-loop-product__title a {
  color: rgb(153, 153, 151);
  text-decoration: none;
}

.woocommerce .product .woocommerce-loop-product__title a:hover,
.woocommerce-loop-product__title a:hover {
  color: #2b2b2b;
}

/* Product price — softer than name so name reads as primary (client feedback) */
.woocommerce .product .product-loop-meta .price .woocommerce-Price-amount,
.woocommerce .product .product-loop-meta .price del,
.product-loop-meta .price {
  color: #7a7f80;
  font-family: granville, serif;
  font-size: 14px !important;
  font-weight: 400;
  font-style: normal;
  text-align: center;
}

/* Ensure price container is centered + match live typography */
.product-loop-meta .price,
.product-loop-content .price {
  text-align: center;
  display: block;
  width: 100%;
}
.woocommerce .product .product-loop-meta .price,
.woocommerce .product .product-loop-meta .price .woocommerce-Price-amount,
.woocommerce .product .product-loop-meta .price del {
  font-family: granville, serif !important;
  font-weight: 400 !important;
  font-size: 16px !important;
  line-height: 28px !important;
  color: #2b2b2b !important;
}

/* Product add-to-cart button (all positions) */
.product-loop-wrapper .button,
.product-loop-meta.no-transform .button,
.product-loop-meta.no-transform .added_to_cart,
.loop-add-to-cart-on-image,
.loop-add-to-cart-on-image + .added_to_cart {
  background-color: #545b5c !important;
  color: #ebe6e3 !important;
  border-radius: 0 !important;
  border: none;
  font-family: granville, serif;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.product-loop-wrapper .button:hover,
.product-loop-meta.no-transform .button:hover,
.loop-add-to-cart-on-image:hover {
  background-color: #2b2b2b !important;
  color: #ebe6e3 !important;
}

/* Hide add-to-cart overlay on product image hover */
a.loop-add-to-cart-on-image.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
  display: none !important;
}

/* Hide variable product add-to-cart */
.add_to_cart_button.product_type_variable {
  display: none !important;
}

/* Sale badge */
.onsale,
.woostify-tag-on-sale {
  color: #ffffff;
  background-color: #545b5c;
  border-radius: 0;
  font-family: granville, serif;
  font-size: 12px;
  font-weight: 400;
}

/* Out of stock label */
.woostify-out-of-stock-label {
  color: #ffffff;
  background-color: #818486;
  border-radius: 0;
  font-family: granville, serif;
  font-size: 12px;
}

/* Product action icons (wishlist etc.) slide in from top on hover */
@media (min-width: 992px) {
  .product-loop-action {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .products .product:hover .product-loop-action {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animated meta (no-transform mode for Serefni) */
.no-transform .animated-meta {
  display: inline-flex;
  flex-direction: column;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: flex-start;
}

.product-loop-meta.no-transform .button,
.product-loop-meta.no-transform .added_to_cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  margin-top: 8px;
  height: auto;
  min-height: 36px;
  gap: 6px;
}

/* Product grid – ensure consistent column layout */
.woocommerce ul.products {
  display: grid;
  gap: 10px 20px;
}

/* [Product Category] Hide SKU number on archive/category product cards */
.woocommerce ul.products .product .sku {
  display: none !important;
}

/* [Product Category] Product title — center-align to match live */
.woocommerce ul.products .product .woocommerce-loop-product__title {
  text-align: center !important;
  font-weight: 400 !important;
}

/* [Product Category] Constrain archive page layout to match live site width */
.archive.tax-product_cat .site-content .woostify-container.woostify-container {
  max-width: 1400px !important;
}

.woocommerce ul.products.columns-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.woocommerce ul.products.columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.woocommerce ul.products.columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.woocommerce ul.products .product {
  width: 100% !important;
  margin: 0 !important;
  padding: 0;
  float: none !important;
}

/* Remove the default WooCommerce float-based layout */
.woocommerce ul.products::after,
.woocommerce ul.products::before {
  display: none;
}

@media (max-width: 991px) {
  .woocommerce ul.products.columns-5,
  .woocommerce ul.products.columns-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .woocommerce ul.products.columns-5,
  .woocommerce ul.products.columns-4,
  .woocommerce ul.products.columns-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-loop-content {
    min-height: auto;
    padding: 10px 0 8px;
  }
}

@media (max-width: 479px) {
  .woocommerce ul.products.columns-5,
  .woocommerce ul.products.columns-4,
  .woocommerce ul.products.columns-3,
  .woocommerce ul.products.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Product loop image – consistent aspect ratio */
.product-loop-image-wrapper .product-loop-image {
  width: 100%;
  height: auto;
  display: block;
}

/* [Global] Small text / meta — match live: 12px, weight 400 */
.post-date,
.post-meta,
.entry-meta,
.entry-meta span,
time,
.sku,
.posted_in,
.tagged_as,
small,
.woocommerce-breadcrumb,
.breadcrumbs,
.breadcrumb a,
.woocommerce-result-count {
  font-weight: 400 !important;
}

/* Category text on cards */
.woocommerce-loop-product__category {
  font-size: 12px;
  font-weight: 400;
  color: #8f8f8f;
  margin-bottom: 4px;
}

/* Product card hover shadow */
.product-loop-wrapper {
  transition: box-shadow 0.2s ease;
}

/* Ensure product images stay within bounds */
.product-loop-image-wrapper img {
  max-width: 100%;
  height: auto;
}

/* Woostify product slider widget – used on pages with Elementor sliders */
.woostify-product-slider-widget .products {
  display: flex !important;
  gap: 15px;
}

.woostify-product-slider-widget .products .product {
  flex: 0 0 auto;
}

/* ================================================================
   "Fleiri blogg" – Related Posts Section (single blog posts)
   ================================================================ */

.ser-related-posts {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #ebe6e3;
  padding: 60px 0 80px;
  margin-top: 60px;
}

.ser-related-posts__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.ser-related-posts__title {
  font-family: granville, serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #545b5c;
  margin: 0 0 30px;
  text-align: center;
}

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

/* Card */
.ser-related-card {
  display: block;
  text-decoration: none;
  color: #545b5c;
  position: relative;
  overflow: hidden;
}

.ser-related-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.ser-related-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(58, 64, 67, 0.35);
  transition: background 0.3s ease;
  z-index: 1;
}

.ser-related-card:hover .ser-related-card__image::after {
  background: rgba(58, 64, 67, 0.5);
}

.ser-related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ser-related-card:hover .ser-related-card__image img {
  transform: scale(1.05);
}

.ser-related-card__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 2;
}

.ser-related-card__heading {
  font-family: granville, serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .ser-related-posts {
    padding: 40px 0 50px;
    margin-top: 40px;
  }

  .ser-related-posts__title {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .ser-related-posts__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .ser-related-card__heading {
    font-size: 16px;
  }

  .ser-related-card__body {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .ser-related-posts__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ser-related-card__image {
    aspect-ratio: 16 / 9;
  }
}

/* ==========================================================================
   404 Page
   Matches live site: grey left column, door image right, "Ó nei" title
   ========================================================================== */

.ser-404 {
  display: flex;
  align-items: stretch;
  min-height: 600px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: visible;
  position: relative;
}

.ser-404__content {
  flex: 7;
  background: var(--ser-color-primary);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 40px 40px 60px;
  min-height: 600px;
}

.ser-404__title {
  font-family: granville, serif;
  font-size: 62px;
  font-weight: 500;
  font-style: italic;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: -2.25px;
}

.ser-404__text {
  font-family: granville, serif;
  font-size: 19px;
  line-height: 28px;
  color: var(--ser-color-bg);
  margin: 0 0 28px;
}

.ser-404__btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: granville, serif;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: #999a97;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.ser-404__btn:hover,
.ser-404__btn:focus {
  background: #7d7e7b;
  color: #fff;
}

.ser-404__image {
  flex: 3;
  overflow: visible;
  position: relative;
}

.ser-404__image img {
  width: 116%;
  max-width: none;
  height: auto;
  display: block;
  position: absolute;
  top: 2%;
  left: -52%;
}

@media (max-width: 768px) {
  .ser-404 {
    flex-direction: column;
    min-height: auto;
  }

  .ser-404__content {
    min-height: 300px;
    padding: 40px 20px;
    align-items: center;
    text-align: center;
  }

  .ser-404__title {
    font-size: 42px;
  }

  .ser-404__image {
    max-height: 300px;
    overflow: hidden;
  }

  .ser-404__image img {
    width: 100%;
    position: static;
    left: auto;
    bottom: auto;
    object-fit: cover;
    height: 100%;
  }
}

/* ==========================================================================
   Page-Specific Hero Overrides
   Match live site hero colors/styles per page
   ========================================================================== */

/* Beige hero pages: Húsamálning (8594), Kalkmálning (8595),
   Línolía og trétjara (8597).
   Live site uses beige (#ded8d3) background with dark title text.
   Background on content column (not full hero) to match ~70% pattern. */
body.page-id-8594 .ser-product-hero .ser-product-hero__content,
body.page-id-8595 .ser-product-hero .ser-product-hero__content,
body.page-id-8597 .ser-product-hero .ser-product-hero__content {
  background: #ded8d3;
}

/* Beige bare-h1 pages (no __content wrapper) — bg on inner container */
body.page-id-8594 .ser-product-hero:not(:has(.ser-product-hero__content)) > .wp-block-group__inner-container,
body.page-id-8595 .ser-product-hero:not(:has(.ser-product-hero__content)) > .wp-block-group__inner-container,
body.page-id-8597 .ser-product-hero:not(:has(.ser-product-hero__content)) > .wp-block-group__inner-container {
  background: #ded8d3;
}

/* Kalkmálning h1: #545b5c on live */
body.page-id-8595 .ser-product-hero h1 {
  color: #545b5c;
}

/* Húsamálning & Línolía h1: #484848 on live */
body.page-id-8594 .ser-product-hero h1,
body.page-id-8597 .ser-product-hero h1 {
  color: #545b5c;
}

/* Skipamálning (IDs 73, 8592): full-width grey centered hero on live site */
body.page-id-73 .ser-product-hero,
body.page-id-8592 .ser-product-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #545B5C;
  justify-content: center;
  align-items: center;
}

body.page-id-73 .ser-product-hero .ser-product-hero__content,
body.page-id-8592 .ser-product-hero .ser-product-hero__content {
  background: transparent;
}

body.page-id-73 .ser-product-hero > .wp-block-group__inner-container.wp-block-group__inner-container,
body.page-id-8592 .ser-product-hero > .wp-block-group__inner-container.wp-block-group__inner-container {
  justify-content: center;
  align-items: center;
  max-width: 100%;
  background: transparent;
}

body.page-id-73 .ser-product-hero h1,
body.page-id-8592 .ser-product-hero h1 {
  text-align: center;
}

/* Breytt og bætt (ID 8593) & Kalkmálning (ID 8595):
   Override --centered class to bottom-left layout matching live site */
body.page-id-8593 .ser-product-hero--centered,
body.page-id-8595 .ser-product-hero--centered {
  justify-content: flex-start;
  align-items: stretch;
}

body.page-id-8593 .ser-product-hero--centered > .wp-block-group__inner-container.wp-block-group__inner-container,
body.page-id-8595 .ser-product-hero--centered > .wp-block-group__inner-container.wp-block-group__inner-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  max-width: 70%;
  min-height: 400px;
  padding: 40px 40px 50px;
}

/* Breytt og bætt (8593) uses grey bg on inner container */
body.page-id-8593 .ser-product-hero--centered > .wp-block-group__inner-container.wp-block-group__inner-container {
  background: #545B5C;
}

/* Kalkmálning (8595) uses beige bg — already set via the beige bare-h1 rule above */

body.page-id-8593 .ser-product-hero--centered .ser-product-hero__content,
body.page-id-8595 .ser-product-hero--centered .ser-product-hero__content {
  max-width: 100%;
  text-align: left;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
}

body.page-id-8593 .ser-product-hero h1,
body.page-id-8595 .ser-product-hero h1 {
  text-align: left;
  align-self: flex-start;
}

/* Kalkmálning (8595) hero: match live site dimensions and title style */
body.page-id-8595 .ser-product-hero {
  min-height: 680px;
}

body.page-id-8595 .ser-product-hero h1 {
  margin-left: 0;
  text-transform: capitalize;
}

body.page-id-8595 .ser-product-hero--centered > .wp-block-group__inner-container.wp-block-group__inner-container {
  min-height: 680px;
}

/* Kalkmálning hero image: larger portrait image, matching live */
body.page-id-8595 .ser-product-hero__image img {
  max-width: 30%;
  bottom: -80px;
  right: 14%;
}

/* Steinefnaspartl (8596) hero: match live site (429px tall, image overflows below & left) */
body.page-id-8596 .ser-product-hero {
  max-height: 430px;
  overflow: visible;
}

body.page-id-8596 .ser-product-hero__content {
  min-height: 430px;
  max-height: 430px;
}

body.page-id-8596 .ser-product-hero h1 {
  margin-left: 0;
  text-transform: capitalize;
}

body.page-id-8596 .ser-product-hero__image {
  display: flex;
  align-items: flex-start;
  overflow: visible;
  max-height: 430px;
}

/* Push image down ~90px from hero top and overlap into gray content area */
body.page-id-8596 .ser-product-hero__image .wp-block-group__inner-container {
  width: 100%;
  height: auto;
  overflow: visible;
  margin-top: 90px;
}

body.page-id-8596 .ser-product-hero__image figure {
  width: 100%;
  margin: 0;
  overflow: visible;
  margin-left: -60%;
}

body.page-id-8596 .ser-product-hero__image img {
  position: static;
  width: 130% !important;
  height: auto;
  max-width: none;
  display: block;
}

/* Steinefnaspartl hero button: match live beige filled style */
body.page-id-8596 .ser-product-hero .wp-block-button__link,
body.page-id-8596 .ser-product-hero .ser-product-btn {
  background-color: #cdc5be;
  color: #545b5c;
  border: none;
  border-radius: 2px;
  padding: 12px 24px;
  font-family: granville, serif;
  font-size: 15px;
  font-weight: 500;
}

body.page-id-8596 .ser-product-hero .wp-block-button__link:hover,
body.page-id-8596 .ser-product-hero .ser-product-btn:hover {
  background-color: #b8b0a9;
  color: #545b5c;
}

/* Steinefnaspartl: section headings are centered on live site */
body.page-id-8596 .ser-product-section > .wp-block-group__inner-container > h3,
body.page-id-8596 .ser-product-section > .wp-block-group__inner-container > .wp-block-heading {
  text-align: center;
}

/* Steinefnaspartl: "Skoða vörur" buttons in content sections match hero style */
body.page-id-8596 .ser-product-section .wp-block-button__link {
  background-color: #cdc5be;
  color: #545b5c;
  border: none;
  border-radius: 2px;
  padding: 12px 24px;
  font-family: granville, serif;
  font-size: 15px;
  font-weight: 500;
}

body.page-id-8596 .ser-product-section .wp-block-button__link:hover {
  background-color: #b8b0a9;
  color: #545b5c;
}

/* Steinefnaspartl: center the button containers */
body.page-id-8596 .ser-product-section .wp-block-buttons {
  justify-content: center;
}

/* Steinefnaspartl: product grid image needs to be wider to match live (1024px) */
body.page-id-8596 .ser-product-image {
  max-width: 1100px;
}

body.page-id-8596 .ser-product-image img {
  max-width: 1100px;
}

/* Steinefnaspartl: reduce gap between hero and first content section.
   The hero image overflows below the 430px hero box, so the default
   100px margin-top creates too much empty space. Match live site spacing. */
body.page-id-8596 .ser-product-hero + .ser-product-section {
  margin-top: 0;
  padding-top: 20px;
}

/* ── Línolía og trétjara (8597) ──────────────────────────────────── */

/* Hero: bare h1 + img — two-column look matching live Elementor layout.
   Live: beige left column ~70%, image in right ~30% column but overflows
   left into the beige area and below the hero bottom.
   Image natural size 530×794; hero height ~694px on desktop. */
body.page-id-8597 .ser-product-hero {
  position: relative;
  overflow: visible;
  min-height: 694px;
}

/* Image: positioned in the right area, overflowing left and below.
   left: 62% matches live (image starts at ~62% of hero width).
   Uses natural width; bottom: 0 aligns image bottom with hero bottom,
   and the image is taller than the hero so it overflows upward. */
body.page-id-8597 .ser-product-hero .ser-product-hero__img {
  position: absolute;
  top: 0;
  right: 30px;
  left: auto;
  bottom: auto;
  width: auto;
  max-width: 45%;
  height: 100%;
  display: block;
  z-index: 2;
}
body.page-id-8597 .ser-product-hero .ser-product-hero__img img {
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Beige column: no relative positioning so image is relative to hero */
body.page-id-8597 .ser-product-hero > .wp-block-group__inner-container.wp-block-group__inner-container {
  position: static;
  z-index: auto;
}
/* H1 stays above image */
body.page-id-8597 .ser-product-hero h1 {
  position: relative;
  z-index: 3;
}

/* "Vörur" section: full-bleed with beige + gray right strip, matching live */
body.page-id-8597 .ser-product-section:nth-of-type(3) {
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: linear-gradient(90deg, #ebe6e3 80%, #999a97 80%);
  padding: 100px calc(50vw - 600px);
}

/* Tækniblöð: dark left strip + beige (matches live --oryggi pattern)
   Note: :first-of-type / :nth-of-type counts ALL <div> siblings, not just
   .ser-pdf-section ones. The PDF sections are the 7th and 8th child divs. */
body.page-id-8597 .ser-pdf-section:nth-of-type(7) {
  background: linear-gradient(90deg, #545b5c 10%, #ebe6e3 10%);
}

/* Öryggisblöð: beige + gray right strip (matches live --baeklingar pattern) */
body.page-id-8597 .ser-pdf-section:nth-of-type(8) {
  background: linear-gradient(90deg, #ebe6e3 80%, #999a97 80%);
}

@media (max-width: 1024px) {
  body.page-id-8597 .wp-block-image.ser-product-hero__img {
    right: 5% !important;
  }
}

/* Responsive: remove side strips on mobile */
@media (max-width: 768px) {
  body.page-id-8597 .ser-product-section:nth-of-type(2) {
    background: #ebe6e3;
    padding: 50px 20px;
  }
  body.page-id-8597 .ser-pdf-section:nth-of-type(7),
  body.page-id-8597 .ser-pdf-section:nth-of-type(8) {
    background: linear-gradient(135deg, #f0ece8 0%, #e8e4df 100%);
  }

  /* Hero: stack vertically on mobile, image flows naturally */
  body.page-id-8597 .ser-product-hero {
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.page-id-8597 .ser-product-hero > .wp-block-group__inner-container {
    order: -1;
    min-height: auto !important;
  }
  body.page-id-8597 .ser-product-hero .ser-product-hero__img {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    max-height: none;
    object-fit: cover;
    order: 1;
  }
}

/* Tag cloud links */
a.tag-cloud-link {
  background-color: #DED8D3;
  padding: 5px 10px 5px 10px;
  margin: 5px;
}

/* ---- Page header (shop / category banner) ---- */
.page-header .entry-title {
  font-family: "ivy-presto-headline", ivypresto-display, serif;
  font-weight: 600;
  font-size: 60px !important;
  line-height: 1;
  letter-spacing: 3px;
  color: #ebe6e3;
}

/* ---- Sidebar widget titles (Vöruflokkar, Mynstur) ---- */
.sidebar-shop .widget-title,
#secondary .widget-title,
#secondary .widget_text > p:only-child,
.shop-widget .widget_text p,
.shop-widget .widget_block > p {
  font-family: ivypresto-display, serif !important;
  font-weight: 500 !important;
  font-size: 24px !important;
  line-height: 36px;
  color: #545b5c;
  margin-bottom: 20px;
}

/* ---- Mynstur (pattern tags) -- match live layout ---- */
#secondary .widget_tag_cloud .wp-block-tag-cloud,
.shop-widget .widget_tag_cloud .wp-block-tag-cloud,
#secondary .tagcloud,
.shop-widget .tagcloud {
  display: block !important;
}
#secondary .wp-block-tag-cloud .tag-cloud-link,
.shop-widget .wp-block-tag-cloud .tag-cloud-link,
#secondary .tagcloud .tag-cloud-link,
.shop-widget .tagcloud .tag-cloud-link {
  display: inline-block !important;
  text-align: center;
  padding: 4px 12px !important;
  margin: 0 4px 4px 0 !important;
  font-size: 14px !important;
  line-height: 28px !important;
  border: 1px solid #e2e2e2 !important;
  white-space: nowrap;
}

/* ---- Remove underlines from all sidebar links ---- */
#secondary a,
#secondary a:hover,
#secondary a:focus,
#secondary a:visited {
  text-decoration: none;
}

/* ---- Content-page cover block (.ser-product-hero) ----
   Global hero for product/content landing pages.
   Beige bg covers ~70% from left via ::before; image bottom-right, title bottom-left. */
.wp-block-cover.ser-product-hero {
  background: transparent !important;
  display: flex;
  align-items: stretch;
  min-height: 500px;
  position: relative;
  overflow: visible;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
  border-radius: 0;
  margin-bottom: 100px;
}

/* Beige background strip — left 70% only */
.wp-block-cover.ser-product-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 70%;
  background: #DED8D3;
  z-index: 0;
}

/* Hide the default cover overlay */
.wp-block-cover.ser-product-hero .wp-block-cover__background {
  display: none;
}

/* Cover image — positioned bottom-right */
.wp-block-cover.ser-product-hero > .wp-block-cover__image-background {
  position: absolute;
  width: 27%;
  height: auto;
  right: 15%;
  bottom: -80px;
  left: auto;
  top: auto;
  object-fit: contain;
  object-position: bottom right;
  z-index: 1;
  max-width: 60rem;
}

/* Listar og rosettur (page-id-77) — match live hero scaling */
body.page-id-77 .wp-block-cover.ser-product-hero {
  min-height: 640px !important;
}

body.page-id-77 .wp-block-cover.ser-product-hero > .wp-block-cover__image-background {
  width: 38%;
  right: 9%;
  bottom: -80px;
  max-width: 730px;
}

@media (max-width: 1024px) {
  body.page-id-77 .wp-block-cover.ser-product-hero > .wp-block-cover__image-background {
    right: 5%;
  }
}

@media (max-width: 768px) {
  body.page-id-77 .wp-block-cover.ser-product-hero {
    min-height: auto !important;
  }

  body.page-id-77 .wp-block-cover.ser-product-hero > .wp-block-cover__image-background {
    width: 100%;
    right: auto;
    bottom: auto;
    max-width: none;
  }
}

/* Inner container — title at bottom-left */
.wp-block-cover.ser-product-hero > .wp-block-cover__inner-container {
  flex: 7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 0 50px;
  z-index: 1;
  max-width: 100%;
}

/* Hero title */
.wp-block-cover.ser-product-hero .wp-block-cover__inner-container h1,
.wp-block-cover.ser-product-hero .wp-block-cover__inner-container .wp-block-heading {
  font-family: "ivy-presto-headline", ivypresto-display, serif;
  font-size: 62px;
  font-weight: 500;
  font-style: normal;
  color: #545b5c;
  margin: 0;
  letter-spacing: 2px;
  text-align: left;
  word-break: normal;
  margin-left: 10rem;
}

/* ---- ser-product-hero responsive ---- */
@media (max-width: 768px) {
  .wp-block-cover.ser-product-hero {
    flex-direction: column;
    min-height: auto !important;
    margin-bottom: 0;
  }

  .wp-block-cover.ser-product-hero::before {
    width: 100%;
  }

  .wp-block-cover.ser-product-hero > .wp-block-cover__inner-container {
    order: -1;
    max-width: 100%;
    padding: 40px 20px;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .wp-block-cover.ser-product-hero > .wp-block-cover__image-background {
    position: relative;
    width: 100%;
    right: auto;
    bottom: auto;
    max-width: none;
    max-height: none;
    object-fit: cover;
    order: 1;
  }

  .wp-block-cover.ser-product-hero .wp-block-cover__inner-container h1,
  .wp-block-cover.ser-product-hero .wp-block-cover__inner-container .wp-block-heading {
    font-size: 42px;
    text-align: center;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .wp-block-cover.ser-product-hero .wp-block-cover__inner-container h1,
  .wp-block-cover.ser-product-hero .wp-block-cover__inner-container .wp-block-heading {
    font-size: 32px;
  }
}

/* ── Single Product Page — matches live site (serefni.is) ────────── */

/* Background color — live uses #f6f4f4, dev default is #ebe6e3 */
.single-product {
  background-color: #f6f4f4 !important;
}

.single-product .site-content {
  background-color: #f6f4f4 !important;
}

/* Constrain product layout width */
.single-product .product-page-container .woostify-container {
  max-width: 1120px;
  margin: 0 auto;
}

/* [Single Product] Reorder summary children: title → description → price
   Live site (Elementor) places price after description; Woostify default is title → price → description. */
.single-product .summary.entry-summary {
  display: flex;
  flex-direction: column;
}

.single-product .summary.entry-summary > .product_title { order: 1; }
.single-product .summary.entry-summary > .woocommerce-product-details__short-description { order: 2; }
.single-product .summary.entry-summary > .price { order: 3; }
.single-product .summary.entry-summary > .stock { order: 4; }
.single-product .summary.entry-summary > .veggfodur-info { order: 5; }
.single-product .summary.entry-summary > .cart { order: 6; }
.single-product .summary.entry-summary > .product_meta { order: 7; }

/* Hide +/- buttons and grey out qty when MPC controls quantity (matches live) */
.single-product .quantity.read-only .product-qty { display: none; }
.single-product .quantity.read-only input.qty {
  background-color: lightgray;
  height: 100%;
  cursor: default;
  width: 100%;
  border: none;
  padding: 0;
}

/* Product title — ivypresto-display 32px to match live */
.single-product .product_title {
  font-family: "ivypresto-display", serif !important;
  font-size: 32px !important;
  font-weight: 500 !important;
  color: #545b5c;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

/* Price styling — match live: 32px ivypresto-display, 500 weight, 3px spacing
   Scoped to .summary to avoid affecting related/upsell product prices */
.single-product .summary .price {
  font-size: 32px !important;
  font-family: "ivypresto-display", serif !important;
  font-weight: 500 !important;
  color: #545b5c;
  letter-spacing: 3px;
  margin-top: 20px;
}

.single-product .summary .price .woocommerce-Price-amount {
  font-size: 32px;
  font-family: granville, serif;
  font-weight: 400;
  letter-spacing: 3px;
}

/* Related/upsell product prices — match live (14px, normal weight, centered) */
.single-product .related.products .price,
.single-product .up-sells.products .price,
.single-product .related.products .price .woocommerce-Price-amount,
.single-product .up-sells.products .price .woocommerce-Price-amount {
  font-size: 14px !important;
  font-family: granville, serif !important;
  font-weight: 400 !important;
  letter-spacing: normal !important;
}

.single-product .related.products .product-loop-content,
.single-product .up-sells.products .product-loop-content {
  text-align: center !important;
}

.single-product .related.products .product-loop-meta,
.single-product .up-sells.products .product-loop-meta {
  text-align: center !important;
  justify-content: center !important;
}

/* Description text */
.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-product-details__short-description p {
  font-size: 14px !important;
  line-height: 28px;
  color: #545b5c;
}

/* Paragraph spacing on single product description — client feedback:
   "Texti er í belg og biðu, ekki tekið tillit til efnisgreina". */
.single-product .woocommerce-product-details__short-description p {
  margin: 0 0 18px !important;
}
.single-product .woocommerce-product-details__short-description p:last-child {
  margin-bottom: 0 !important;
}

/* Gallery sizing — live is ~550px, constrained */
.single-product .woocommerce-product-gallery {
  max-width: 550px !important;
}

/* Related products section */
.single-product .related.products,
.single-product .up-sells.products {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

/* Related products grid — 5 columns to show more products */
.single-product .related.products ul.products {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 20px;
}

/* Related product title */
.single-product .related.products > h2, .woostify-product-recently-viewed-inner > h2 {
    font-family: granville, Sans-serif !important;
    font-size: 30px !important;
    font-weight: 800 !important;
    letter-spacing: 0.7px !important;
}

/* Breadcrumb styling — no underline, small gap to product title
   (client feedback: remove underline + tighter spacing). */
.single-product .woocommerce-breadcrumb,
.woostify-breadcrumb {
  font-size: 13px;
  color: #545b5c;
  margin-bottom: 6px;
}
.single-product .woocommerce-breadcrumb a,
.woostify-breadcrumb a,
.woostify-breadcrumb .item-bread a {
  color: #545b5c;
  text-decoration: none;
  transition: color 0.15s ease;
}
.single-product .woocommerce-breadcrumb a:hover,
.woostify-breadcrumb a:hover,
.woostify-breadcrumb .item-bread a:hover {
  color: #2b2b2b;
}
.woostify-breadcrumb .item-bread.delimiter {
  color: #8f8f8f;
  padding: 0 6px;
}
/* Product title: tighten top margin so it sits close to breadcrumb */
.single-product .product_title {
  margin-top: 0 !important;
}


@media (min-width: 992px) {
    .product-page-container {
        max-width: 1140px !important;
        margin: 0 auto !important;
    }
}

.veggfodurs_prufa {
    margin-top: 20px !important;
    width: 100% !important;
    background: none !important;
    border: 1px solid #545b5c !important;
    color: #545b5c !important;
}

/* ── Hide add-to-cart button on product image overlays ── */
a.loop-add-to-cart-on-image.button.product_type_simple {
  display: none !important;
}

/* ── Hide "out of stock" labels on archive/loop ── */
.woostify-out-of-stock-label.position-left {
  display: none !important;
}

/* ── Hide single product stock status label ── */
span.woostify-single-product-stock-label {
  display: none !important;
}

.logged-in.admin-bar #shop-cart-sidebar {
    z-index: 1000;
}

/* ── ivypresto-display overrides ──
   The global * { font-family: granville } rule overrides ivypresto.
   These rules restore ivypresto-display where the live site uses it.
   NOTE: H3s in portfolio/blog cards use granville on live, NOT ivypresto! */
.ser-home-cats h2,
.ser-home h2,
.ser-home-feature h2,
.ser-home-smarter h2,
.ser-home-portfolio h2,
.ser-home-leikid h2,
.ser-home-goodrad h2,
.ser-home-breytt h2 {
  font-family: "ivypresto-display", serif !important;
}

/* Card H3 headings in portfolio sections — match live: granville, NOT ivypresto */
.ser-card__body h3,
.ser-home-portfolio h3,
.ser-home-leikid h3,
.ser-home-goodrad h3,
.ser-home-breytt h3 {
  font-family: granville, serif !important;
}

/* ── Card columns for Breytt og bætt, Leikið, Góð ráð — fixed height boxes ── */
.ser-home-portfolio .wp-block-columns.ser-card-grid--portfolio > .wp-block-column,
.ser-home-leikid .wp-block-columns.ser-card-grid--portfolio > .wp-block-column,
.ser-home-goodrad .wp-block-columns.ser-card-grid--portfolio > .wp-block-column,
.ser-home-breytt .wp-block-columns.ser-card-grid--portfolio > .wp-block-column {
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  grid-template-areas: "card";
  align-items: stretch;
  justify-items: stretch;
  height: 270px;
}

.ser-home-portfolio .ser-card-grid--portfolio > .wp-block-column > .wp-block-image,
.ser-home-leikid .ser-card-grid--portfolio > .wp-block-column > .wp-block-image,
.ser-home-goodrad .ser-card-grid--portfolio > .wp-block-column > .wp-block-image,
.ser-home-breytt .ser-card-grid--portfolio > .wp-block-column > .wp-block-image {
  overflow: hidden;
}

.ser-home-portfolio .ser-card-grid--portfolio > .wp-block-column > .wp-block-image img,
.ser-home-leikid .ser-card-grid--portfolio > .wp-block-column > .wp-block-image img,
.ser-home-goodrad .ser-card-grid--portfolio > .wp-block-column > .wp-block-image img,
.ser-home-breytt .ser-card-grid--portfolio > .wp-block-column > .wp-block-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* ── Button color fix — match live site's muted gray (#999a97) ── */
.wp-block-button__link.wp-element-button,
.wp-block-button .wp-block-button__link {
  background-color: #999a97 !important;
  color: #fff !important;
  font-family: "Roboto", sans-serif !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  border: none !important;
}

/* ── Client logos gallery (Smarter Surfaces page) ── */
.ser-client-logos {
  max-width: 700px;
  margin: 0 auto;
  gap: 20px 30px !important;
}

.ser-client-logos .wp-block-image img {
  max-height: 50px !important;
  width: auto !important;
  object-fit: contain !important;
  filter: grayscale(100%) opacity(0.7);
}

.wp-block-button__link.wp-element-button:hover,
.wp-block-button .wp-block-button__link:hover {
  background-color: #888987 !important;
}

/* ==========================================================================
   BT Studio / Heilmyndir Measurement Calculator
   Ported from live child theme main.css
   ========================================================================== */

.woostify-quantity-calculator-measurement {
  display: flex;
  gap: 50px;
}
.woostify-quantity-calculator-measurement .woostify-measurement {
  flex: 1 auto;
}
.woostify-quantity-calculator-measurement label {
  display: block;
}
.woostify-quantity-calculator-measurement .woostify-select {
  position: relative;
}
.woostify-quantity-calculator-measurement .icon {
  position: absolute;
  top: 10px;
  left: 5px;
  width: 30px;
  height: auto;
}
.woostify-quantity-calculator-measurement .select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 24px;
}
.woostify-quantity-calculator-measurement .select2-container {
  width: 100% !important;
  display: block;
}
.woostify-quantity-calculator-measurement .wc-enhanced-select {
  width: 100%;
  padding: 14px 14px 13px 33px;
  border-radius: 4px;
  border: 1px solid #545b5c;
}
.woostify-quantity-calculator-measurement .select2-container--default .select2-selection--single {
  height: 50px;
  border: 1px solid #545b5c;
  padding-left: 30px;
}
.woostify-quantity-calculator-measurement .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #545b5c;
  line-height: 50px;
}

/* Hide the raw MPC length/width inputs when custom dropdowns are present */
.woostify-quantity-calculator-measurement + .wc-measurement-price-calculator-price-table .price-table-row.length-input,
.woostify-quantity-calculator-measurement + .wc-measurement-price-calculator-price-table .price-table-row.width-input {
  display: none;
}

.calc-disclaimer.square-meter-disclaimer {
  margin-bottom: 30px;
}

div.product-page-container form.cart > h4 {
  font-weight: 800 !important;
}

/* BT Studio: product_meta stays below kaupa prufu (default position) */

/* Product meta labels — bold to match live */
.product_meta .sku_wrapper,
.product_meta .posted_in,
.product_meta .tagged_as {
  display: block;
  font-weight: 600 !important;
  color: #545b5c;
}
.product_meta .sku_wrapper .sku,
.product_meta .posted_in a,
.product_meta .tagged_as a {
  font-weight: 400 !important;
}
