/*
 * RC-Batteri.no - modern look (polar/rcmodern)
 * Loaded after Polar's styles.css, retail.css and custom.css; only overrides.
 * Colours are set once here as variables.
 */
:root {
  --rc-green: #12925a;
  --rc-green-dark: #0c7346;
  --rc-green-tint: #e8f5ee;
  --rc-ink: #1d2733;
  --rc-muted: #667085;
  --rc-line: #e4e9e6;
  --rc-bg: #f4f6f5;
  --rc-card: #ffffff;
  --rc-sale: #d6453d;
  --rc-radius: 12px;
  --rc-radius-sm: 8px;
  --rc-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --rc-shadow-hover: 0 6px 18px rgba(16, 24, 40, .10);
}

/* ---------- Base ---------- */
body {
  background: #fff;
  color: var(--rc-ink);
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rc-green); transition: color .15s; }
a:hover, a:focus { color: var(--rc-green-dark); }
h1, h2, h3, h4 { color: var(--rc-ink); letter-spacing: -0.01em; }

/* ---------- Buttons ---------- */
.button, button.button, a.button,
.btn-cart, .btn-checkout, .btn-proceed-checkout, .header-cart .cart-link {
  background-color: var(--rc-green) !important;
  background-image: none !important;
  border: 0;
  border-radius: var(--rc-radius-sm);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
  transition: background-color .15s, box-shadow .15s, transform .05s;
}
.button:hover, .button:focus, button.button:hover, a.button:hover,
.btn-cart:hover, .btn-checkout:hover, .btn-proceed-checkout:hover, .header-cart .cart-link:hover {
  background-color: var(--rc-green-dark) !important;
  box-shadow: 0 4px 10px rgba(18, 146, 90, .25);
}
.button:active { transform: translateY(1px); }

/* ---------- Form fields ---------- */
input.input-text, select, textarea,
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"] {
  border: 1px solid #d0d7d3;
  border-radius: var(--rc-radius-sm);
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
input.input-text:focus, select:focus, textarea:focus,
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
  border-color: var(--rc-green);
  box-shadow: 0 0 0 3px rgba(18, 146, 90, .15);
  background: #fff;
}
select { padding-right: 1.6em; background-color: #fff; }

/* ---------- Top line + header ---------- */
.wrapper { background: #fff; }
.top-line {
  background: #fff;
  border-bottom: 1px solid var(--rc-line);
}
.top-line a, .top-line a:visited { color: var(--rc-muted); }
.top-line a:hover { color: var(--rc-green); }
/* White header area, light grey band behind the content */
.header-container { padding-top: 14px; padding-bottom: 4px; }
.nav-container { padding-bottom: 14px; }
.main-container {
  background: var(--rc-bg);
  border-top: 1px solid var(--rc-line);
  padding-top: 22px;
}
.header .logo img { max-height: 64px; width: auto; }

/* Search: one pill-shaped field with the button inside */
#search_mini_form .form-search {
  display: flex;
  align-items: stretch;
  border: 1px solid #d0d7d3;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
#search_mini_form .form-search:focus-within {
  border-color: var(--rc-green);
  box-shadow: 0 0 0 3px rgba(18, 146, 90, .15);
}
#search_mini_form .form-search input.input-text {
  min-width: 0;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0;
  margin: 0;
  padding-left: 18px;
  height: 40px;
  flex: 1;
}
#search_mini_form .form-search .button {
  border-radius: 999px;
  margin: 4px;
  padding: 0 18px;
  height: 32px;
  line-height: 32px;
  box-shadow: none;
}

/* Cart button in the header */
.header-cart .cart-link, .header-cart .content > a {
  border-radius: 999px !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
  font-weight: 600;
}
#mini-cart-wrapper {
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-shadow-hover);
  border: 1px solid var(--rc-line);
}

/* ---------- Main menu ---------- */
.nav-container { margin-top: 0; padding-top: 6px; }
.nav-container #nav {
  background: var(--rc-green) !important;
  filter: none;
  border-radius: var(--rc-radius) !important;
  padding: 4px;
  margin-bottom: 0;
  box-shadow: none;
}
.nav-container #nav > li > a {
  border-radius: var(--rc-radius-sm) !important;
  padding: 7px 18px;
  letter-spacing: .02em;
  font-size: 14px;
}
.nav-container #nav li a:hover, .nav-container #nav li a:focus,
.nav-container #nav li.over > a, .nav-container #nav li.active > a {
  background-color: rgba(255, 255, 255, .16) !important;
}
.nav-container #nav ul {
  background: #fff;
  border-radius: var(--rc-radius-sm);
  box-shadow: var(--rc-shadow-hover);
  padding: 6px;
  min-width: 220px;
  border: 1px solid var(--rc-line);
}
.nav-container #nav ul li > a {
  background: #fff !important;
  color: var(--rc-ink) !important;
  border-radius: 6px !important;
  font-weight: 600;
}
.nav-container #nav ul li > a:hover, .nav-container #nav ul li.over > a {
  background: var(--rc-green-tint) !important;
  color: var(--rc-green-dark) !important;
}
.nav-container #nav ul li.parent > a:after { color: var(--rc-muted); }

/* ---------- Content area as a white card ---------- */
.main-container .main, .row.main {
  max-width: calc(70.5rem - 12px);
  margin-left: auto !important;
  margin-right: auto !important;
  background: var(--rc-card);
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-shadow);
  padding-top: 18px;
  padding-bottom: 28px;
  margin-bottom: 0;
}
nav.breadcrumbs { background: transparent; padding: 0 15px 12px; }
nav.breadcrumbs a { color: var(--rc-muted); }

/* Sidebar ("Handle etter") */
.col-left .block .block-title, .sidebar .block .block-title { border: 0; padding: 0 0 6px; }
.col-left .block .block-title strong, .col-left .block .block-title span { font-weight: 700; }
.col-left .block .block-content, .sidebar .block .block-content {
  background: #fff !important;
  border: 1px solid var(--rc-line) !important;
  border-radius: var(--rc-radius) !important;
}
.block-layered-nav dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rc-muted);
  border-bottom: 0 !important;
}
.block-layered-nav dd ol li a { display: inline-block; padding: 2px 0; }
.block-layered-nav .currently ol { border-radius: var(--rc-radius-sm); background: var(--rc-green-tint); border-color: transparent; }

/* Mobile "Left menu"/filter toggle */
.polar-toggle-trigger {
  background-color: var(--rc-green) !important;
  border-radius: var(--rc-radius-sm);
}
.polar-toggle-trigger:not(.collapsed) { border-radius: var(--rc-radius-sm) var(--rc-radius-sm) 0 0; }

/* ---------- Toolbar ---------- */
.toolbar .limiter + .limiter { display: none; }
.toolbar {
  border: 0;
  background: var(--rc-bg);
  border-radius: var(--rc-radius-sm);
  padding: 8px 14px;
  margin-bottom: 18px;
}
.toolbar .sorter, .toolbar .pager { border: 0 !important; }
.toolbar select { height: 30px; padding: 0 1.6em 0 .6em; border-radius: 6px; margin: 0 4px; }
.view-mode strong, .view-mode a { border-radius: 6px; padding: 2px 8px; }
.view-mode strong { background: #fff; box-shadow: var(--rc-shadow); }

/* ---------- Product list (list mode) ---------- */
.products-list { margin-left: 0; }
.products-list > li.item {
  background: #fff;
  border: 1px solid var(--rc-line) !important;
  border-radius: var(--rc-radius);
  padding: 18px !important;
  margin-bottom: 16px;
  transition: box-shadow .2s, border-color .2s;
}
.products-list > li.item:hover { box-shadow: var(--rc-shadow-hover); border-color: transparent !important; }
.products-list .product-image img, .products-grid .product-image img { border-radius: var(--rc-radius-sm); }
.products-list .product-name, .products-grid .product-name { font-weight: 700; line-height: 1.25; }
.products-list .product-name a, .products-grid .product-name a { color: var(--rc-ink); }
.products-list .product-name a:hover, .products-grid .product-name a:hover { color: var(--rc-green); }
.product-sku { color: var(--rc-muted); font-size: 13px; }

/* ---------- Product grid (grid mode) ---------- */
.products-grid > li.item { padding-bottom: 18px; }
.products-grid .item-wrapper {
  background: #fff;
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-radius);
  padding: 14px;
  height: 100%;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.products-grid .item-wrapper:hover {
  box-shadow: var(--rc-shadow-hover);
  border-color: transparent;
  transform: translateY(-2px);
}
.products-grid .product-name { font-size: 15px; min-height: 2.6em; margin-top: 10px; }
.products-grid .actions .button { width: 100%; }

/* ---------- Prices + stock ---------- */
.price-box .price { font-weight: 700; color: var(--rc-ink); }
.price-box .old-price, .price-box .old-price .price-label {
  text-decoration: none !important;   /* Polar strikes the whole line incl. the label */
  color: var(--rc-muted);
  font-weight: 400;
  margin-bottom: 0;
}
.price-box .old-price .price {
  display: inline-block;
  text-decoration: line-through !important;
  text-decoration-thickness: 1px;
  color: var(--rc-muted) !important;
  font-weight: 400 !important;
}
.price-box .old-price .price-label { font-size: 13px; }
.price-box .special-price .price { color: var(--rc-sale); }
.price-box .special-price .price-label { color: var(--rc-sale); font-weight: 600; }
.availability.in-stock span {
  display: inline-block;
  background: var(--rc-green-tint);
  color: var(--rc-green-dark) !important;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 13px;
}
.availability.in-stock.order span { background: #fdf3e2; color: #9a6110 !important; }
.availability.out-of-stock span {
  display: inline-block; background: #fde8e7; color: var(--rc-sale); border-radius: 999px; padding: 1px 10px; font-size: 13px;
}

/* ---------- Product page ---------- */
.product-view .product-img-box .product-image {
  background: #fff;
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-radius);
  padding: 12px;
}
.product-view .product-img-box .product-image img { border-radius: var(--rc-radius-sm); }
.product-view .more-views li img { border-radius: var(--rc-radius-sm); border: 1px solid var(--rc-line); }
.product-view .product-name h1 { text-transform: none; font-weight: 700; font-size: 26px; }
.product-view .product-shop .price-box .price { font-size: 26px; }
.product-view .product-shop .price-box .old-price .price { font-size: 16px; }
.product-view .product-shop .price-box .special-price { margin-top: 2px; }
.product-view .add-to-box {
  background: var(--rc-bg) !important;
  border-radius: var(--rc-radius);
  padding: 12px !important;
}
.product-view .add-to-cart .qty { border-radius: var(--rc-radius-sm); text-align: center; }
.product-view .add-to-cart .btn-cart { border-radius: var(--rc-radius-sm); padding-left: 28px; padding-right: 28px; }

/* Tabs (Detaljer / Produktomtaler) */
.product-tabs > .section > .title, .product-tabs .title {
  border-radius: var(--rc-radius-sm) var(--rc-radius-sm) 0 0;
}
.product-tabs .content {
  border-radius: 0 var(--rc-radius) var(--rc-radius) var(--rc-radius);
  border-color: var(--rc-line) !important;
}
.section-container.auto > section.active > .title, .section-container.auto > .section.active > .title {
  background: #fff;
  box-shadow: inset 0 -3px 0 var(--rc-green);
}

/* ---------- Messages ---------- */
.messages, ul.messages { margin-left: 0; }
.messages li li, .success-msg, .error-msg, .notice-msg {
  border-radius: var(--rc-radius-sm);
}
.success-msg, .messages .success-msg { background: var(--rc-green-tint) !important; color: var(--rc-green-dark) !important; border: 0; }
.success-msg *, .messages .success-msg * { color: var(--rc-green-dark) !important; }

/* ---------- Cart ---------- */
.cart-table, #shopping-cart-table { border-radius: var(--rc-radius); overflow: hidden; }
.cart .totals, .cart-totals, #shopping-cart-totals-table {
  background: var(--rc-bg);
  border-radius: var(--rc-radius);
}
.cart .totals { padding: 14px; }
.btn-proceed-checkout, .checkout-types .button { border-radius: var(--rc-radius-sm); }

/* ---------- Checkout steps ---------- */
.opc > li { margin-bottom: 10px; }
.opc > li .step-title {
  background-color: #e8ecea !important;
  color: var(--rc-muted);
  border-radius: var(--rc-radius-sm);
  padding: 4px 14px;
  transition: background-color .15s;
}
.opc > li .step-title h2, .opc > li .step-title h2 a,
.opc > li .step-title h2 .number { color: var(--rc-muted) !important; font-size: 18px; }
.opc > li.allow .step-title { background-color: var(--rc-green-tint) !important; }
.opc > li.allow .step-title h2, .opc > li.allow .step-title h2 a,
.opc > li.allow .step-title h2 .number { color: var(--rc-green-dark) !important; }
.opc > li.active .step-title {
  background-color: var(--rc-green) !important;
  border-radius: var(--rc-radius-sm) var(--rc-radius-sm) 0 0;
}
.opc > li.active .step-title h2, .opc > li.active .step-title h2 a,
.opc > li.active .step-title h2 .number { color: #fff !important; }
.opc > li .step {
  background: #fff;
  border: 1px solid var(--rc-line);
  border-top: 0;
  border-radius: 0 0 var(--rc-radius) var(--rc-radius);
  padding: 20px;
}
#checkout-review-table { border-radius: var(--rc-radius-sm); overflow: hidden; }

/* ---------- Footer ---------- */
.footer-container { background: #fff; }
.main-container { padding-bottom: 28px; }
.footer-container > .footer {
  max-width: 70.5rem;
  margin: 0 auto;
  float: none;
  border-top: 0 !important;
  padding: 28px 15px 18px;
  color: var(--rc-muted);
}
.footer h2 { border-bottom-color: var(--rc-line); color: var(--rc-ink); }
.footer a { color: var(--rc-muted); }
.footer a:hover { color: var(--rc-green); }
.footer .theme-by { opacity: .6; }

/* ---------- Mobile ---------- */
@media only screen and (max-width: 640px) {
  .main-container .main, .row.main { border-radius: 0; box-shadow: none; padding-top: 10px; }
  .top-line { background: #fff; }
  .products-list > li.item { padding: 14px !important; }
  /* Polar hides the header search on phones; show it full width instead */
  .header #search_mini_form { float: none; width: 100%; margin: 6px 0 4px; }
  .header .form-search { float: none; width: 100% !important; }
  .header .form-search input.input-text { min-width: 0 !important; }
  .top-cart .cart-link { color: var(--rc-ink) !important; }
  .opc > li .step { padding: 14px; }
  .product-view .product-name h1 { font-size: 22px; }
}

/* ---------- Focused checkout page (Polar's 1column-checkout.phtml) ----------
 * Same look as the rest of the shop: grey page, one white card holding logo + steps. */
body.checkout-onepage-index, body.checkout-onepage-index #page { background: var(--rc-bg); }
.one-column-checkout {
  max-width: 960px;
  margin-top: 28px !important;
  margin-bottom: 40px !important;
  background: #fff !important;
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-shadow);
  padding: 22px 12px 18px;
}
.one-column-checkout .header-container {
  float: none;
  background: transparent;
  padding: 0 0 6px;
  text-align: center;
  border-bottom: 1px solid var(--rc-line);
  margin-bottom: 18px;
}
.one-column-checkout .header-container .header .logo { display: inline-block; float: none; margin: 0; line-height: 1; padding: 0; }
.one-column-checkout .header-container .header { min-height: 0; padding: 0; }
.one-column-checkout .header-container .header .logo img { max-height: 56px; width: auto; }
.one-column-checkout .main-container { clear: both; background: transparent; border-top: 0; padding: 0; }
.one-column-checkout .main-container .main {
  max-width: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}
.one-column-checkout .page-title h1 { font-size: 20px; text-transform: none; font-weight: 700; }
@media only screen and (max-width: 640px) {
  .one-column-checkout { margin-top: 0 !important; border-radius: 0; box-shadow: none; }
}
