:root {
  --hsur-black: #0a0a0a;
  --hsur-gold: #c9a84c;
  --hsur-white: #f5f5f0;
  --hsur-gray: #2a2a2a;
  --hsur-border: #3a3a3a;
  --hsur-font: "Cormorant Garamond", Georgia, serif;
  --hsur-sans: "Montserrat", sans-serif;
  --hsur-sidebar-width: 440px;
  --hsur-transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dölj kvarvarande varukorgselement ---------------------------------- */
.woocommerce a.add_to_cart_button:not(.hsur-view-btn),
.woocommerce button.add_to_cart_button:not(.hsur-view-btn),
.single_add_to_cart_button:not(.hsur-contact-btn),
.widget_shopping_cart,
.widget_shopping_cart_content,
.cart-contents,
.site-header-cart,
.wc-block-mini-cart,
.woocommerce-mini-cart,
ul.product_list_widget li a.remove {
  display: none !important;
}

body.hsur-no-scroll {
  overflow: hidden;
}

/*
 * Endast produktkort i butiks-/kategorigrid — INTE .product på enkelsidor
 * (där .product är hela produktwrapen; float där kollapsar layouten).
 */
.woocommerce ul.products li.product,
.qodef-woocommerce-page ul.products li.product {
  position: relative;
  text-align: left;
  border: 1px solid #e1e2e5;
  box-sizing: border-box;
  transition: box-shadow var(--hsur-transition), transform 0.35s ease;
}

.woocommerce ul.products,
.qodef-woocommerce-page ul.products {
  margin-top: 80px;
}

.woocommerce ul.products li.product:hover,
.qodef-woocommerce-page ul.products li.product:hover {
  box-shadow: 0 0 0 1px var(--hsur-gold), 0 18px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.hsur-view-btn {
  display: inline-block;
  background: var(--hsur-black) !important;
  color: var(--hsur-gold) !important;
  border: 1px solid var(--hsur-gold) !important;
  padding: 12px 28px !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--hsur-sans) !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
  border-radius: 0 !important;
}

.hsur-view-btn:hover,
.hsur-view-btn:focus {
  background: var(--hsur-gold) !important;
  color: var(--hsur-black) !important;
  border-color: var(--hsur-gold) !important;
}

.hsur-contact-btn {
  display: inline-block;
  background: var(--hsur-black);
  color: var(--hsur-gold);
  border: 1px solid var(--hsur-gold);
  padding: 16px 40px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--hsur-sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  border-radius: 0;
  line-height: 1.4;
}

.hsur-contact-btn:hover,
.hsur-contact-btn:focus {
  background: var(--hsur-gold);
  color: var(--hsur-black);
  outline: none;
}

.hsur-sidebar-heading {
  font-family: var(--hsur-font);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--hsur-white);
  letter-spacing: 0.05em;
  margin: 0 40px 0 0;
  line-height: 1.25;
}

.hsur-sidebar-product {
  background: var(--hsur-gray);
  border-left: 3px solid var(--hsur-gold);
  padding: 16px 20px;
  margin: 24px 0;
}

.hsur-sidebar-product-label,
.hsur-sidebar-sku-label {
  font-family: var(--hsur-sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 245, 240, 0.55);
  margin: 0 0 4px;
}

.hsur-sidebar-sku-label {
  margin-top: 12px;
}

.hsur-sidebar-product-name {
  font-family: var(--hsur-font);
  font-size: 1.1rem;
  color: var(--hsur-gold);
  margin: 0;
}

.hsur-sidebar-product-sku {
  font-family: var(--hsur-sans);
  font-size: 0.8rem;
  color: rgba(245, 245, 240, 0.75);
  margin: 0;
}

.hsur-sidebar-admin-notice {
  font-family: var(--hsur-sans);
  font-size: 0.85rem;
  color: var(--hsur-white);
  border: 1px solid var(--hsur-gold);
  padding: 12px 16px;
}

.hsur-contact-sidebar {
  position: fixed;
  top: 0;
  right: calc(-1 * var(--hsur-sidebar-width, 440px));
  width: var(--hsur-sidebar-width, 440px);
  max-width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: var(--hsur-black);
  border-left: 1px solid var(--hsur-gold);
  padding: 48px 40px;
  overflow-y: auto;
  transition: right var(--hsur-transition);
  box-sizing: border-box;
}

.hsur-contact-sidebar.hsur-sidebar--open {
  right: 0;
}

.hsur-sidebar-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--hsur-gold);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.25s ease;
}

.hsur-sidebar-close:hover,
.hsur-sidebar-close:focus {
  color: var(--hsur-white);
}

.hsur-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hsur-overlay.hsur-overlay--active {
  opacity: 1;
  pointer-events: auto;
}

.hsur-sidebar-form .wpcf7 input[type="text"],
.hsur-sidebar-form .wpcf7 input[type="email"],
.hsur-sidebar-form .wpcf7 input[type="tel"],
.hsur-sidebar-form .wpcf7 input[type="url"],
.hsur-sidebar-form .wpcf7 input[type="number"],
.hsur-sidebar-form .wpcf7 select,
.hsur-sidebar-form .wpcf7 textarea {
  background: var(--hsur-gray);
  border: 1px solid var(--hsur-border);
  color: var(--hsur-white);
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--hsur-sans);
  font-size: 0.9rem;
  border-radius: 0;
}

.hsur-sidebar-form .wpcf7 input:focus,
.hsur-sidebar-form .wpcf7 select:focus,
.hsur-sidebar-form .wpcf7 textarea:focus {
  border-color: var(--hsur-gold);
  outline: none;
}

.hsur-sidebar-form .wpcf7 input[type="submit"],
.hsur-sidebar-form .wpcf7 button[type="submit"] {
  display: inline-block;
  background: var(--hsur-black);
  color: var(--hsur-gold);
  border: 1px solid var(--hsur-gold);
  padding: 16px 40px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--hsur-sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  border-radius: 0;
  width: auto;
}

.hsur-sidebar-form .wpcf7 input[type="submit"]:hover,
.hsur-sidebar-form .wpcf7 button[type="submit"]:hover {
  background: var(--hsur-gold);
  color: var(--hsur-black);
}

.hsur-sidebar-form .wpcf7 label {
  color: var(--hsur-white);
  font-family: var(--hsur-sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.hsur-sidebar-form .wpcf7-not-valid-tip {
  color: #e8b4b4;
  font-family: var(--hsur-sans);
  font-size: 0.75rem;
}

.hsur-sidebar-form .wpcf7-response-output {
  border-color: var(--hsur-gold) !important;
  color: var(--hsur-white) !important;
  font-family: var(--hsur-sans);
}

@media (max-width: 600px) {
  :root {
    --hsur-sidebar-width: 100vw;
  }

  .hsur-contact-sidebar {
    padding: 32px 24px;
  }
}

/* Custom overrides (Hagströms UR) ------------------------------- */
.hsur-contact-sidebar {
  background: #030f19;
}

.hsur-sidebar-product {
  background: #020a12;
}

.hsur-sidebar-heading {
  font-family: Catamaran, sans-serif;
  font-size: 1.3rem;
}

/*
 * Qode Bridge / Qode Core m.fl. — preloader som kan ligga kvar om sidan
 * inte når temats “loaded”-hook (t.ex. vid PHP-fel eller konflikter).
 * Döljer overlay + ser till att innehållet inte stannar dolt.
 */
#qodef-page-cpreloader,
#qodef-top-cpreloader,
.qodef-page-cpreloader,
.qodef-m-spinner.qodef--preloader,
#qodef-page-cpreloader.qodef--preloader,
.preloader,
#preloader {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Undvik att peta på body/html — temat styr synlighet tills “loaded”; att
   tvinga visibility här kan ge halvtrasiga tillstånd tillsammans med
   avstängd preloader. */
