:root {
  --vm-primary: #3f7378;
  --vm-primary-dark: #264e54;
  --vm-primary-soft: #dcebec;
  --vm-text: #243338;
  --vm-muted: #68777c;
  --vm-bg: #eef4f5;
  --vm-card: #ffffff;
  --vm-border: #cddbdd;
  --vm-shadow: 0 12px 30px rgba(31, 55, 60, .12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--vm-text);
  background:
    radial-gradient(circle at top left, rgba(95, 145, 150, .20), transparent 28rem),
    linear-gradient(135deg, #0e2a32 0%, #123540 100%);
}
a { color: #1f5f87; text-decoration: none; }
a:hover { text-decoration: underline; }

.vm-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.vm-hero {
  min-height: clamp(170px, 26vw, 285px);
  background-size: cover;
  background-position: center center;
  position: relative;
  overflow: hidden;
}
.vm-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.56), rgba(0,0,0,.12) 46%, rgba(0,0,0,.28));
}
.vm-hero-inner {
  position: relative;
  min-height: clamp(170px, 26vw, 285px);
}
.vm-branding {
  position: absolute;
  left: 0;
  bottom: 28px;
  color: #fff;
  text-shadow: 0 3px 12px rgba(0,0,0,.65);
}
.vm-site-title {
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  font-weight: 700;
  line-height: .95;
}
.vm-subtitle {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.1rem, 2.4vw, 2rem);
  font-weight: 700;
  margin-top: .35rem;
}

.vm-header-contact {
  position: absolute;
  right: 0;
  top: 20px;
  width: min(310px, 46vw);
  padding: 16px 18px;
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.24);
  text-align: right;
  font-size: .95rem;
  line-height: 1.35;
}
.vm-contact-line + .vm-contact-line { margin-top: 6px; }

.vm-main-nav {
  background: linear-gradient(#fff, #edf4f5);
  border-top: 1px solid rgba(255,255,255,.5);
  border-bottom: 1px solid var(--vm-border);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.vm-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vm-menu li { margin: 0; }
.vm-menu a {
  display: block;
  padding: 15px 23px;
  color: #243e45;
  font-weight: 700;
  border-right: 1px solid var(--vm-border);
}
.vm-menu a:hover {
  background: var(--vm-primary-soft);
  text-decoration: none;
}

.vm-page {
  background: #f9fbfb;
  min-height: 620px;
  padding: 22px;
  box-shadow: var(--vm-shadow);
}
.vm-layout {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.vm-sidebar {
  display: grid;
  gap: 14px;
}
.vm-box, .vm-card, .vm-widget {
  background: var(--vm-card);
  border: 1px solid var(--vm-border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(31, 55, 60, .07);
  overflow: hidden;
}
.vm-card {
  padding: clamp(18px, 3vw, 30px);
}
.vm-box-title {
  margin: 0;
  padding: 12px 14px;
  background: linear-gradient(var(--vm-primary), var(--vm-primary-dark));
  color: #fff;
  font-size: .98rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.vm-cat-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.vm-cat-item {
  border-top: 1px solid var(--vm-border);
}
.vm-cat-row {
  display: flex;
  align-items: center;
  min-height: 42px;
  background: linear-gradient(#f8fbfb, #e8f0f1);
}
.vm-cat-row a {
  flex: 1;
  padding: 11px 12px;
  color: #263f6a;
  font-weight: 700;
}
.vm-cat-toggle {
  width: 42px;
  align-self: stretch;
  border: 0;
  border-left: 1px solid var(--vm-border);
  background: transparent;
  color: #233d68;
  font-size: 1.2rem;
  cursor: pointer;
}
.vm-subcats {
  display: none;
  background: #f7fafb;
}
.vm-cat-item.open > .vm-subcats { display: block; }
.vm-subcats .vm-cat-row {
  min-height: 36px;
  background: #f7fafb;
}
.vm-subcats .vm-cat-row a {
  padding-left: 26px;
  font-weight: 500;
  color: #55656a;
}
.vm-contact-sidebar {
  padding-bottom: 10px;
}
.vm-contact-sidebar p {
  margin: 12px 14px;
  line-height: 1.35;
}

.vm-content h1, .vm-content h2 {
  color: var(--vm-primary);
  font-family: Georgia, 'Times New Roman', serif;
}
.vm-welcome > h1 { margin-top: 0; }

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: #fff;
  border: 1px solid var(--vm-border);
  border-radius: 10px;
  padding: 14px !important;
  text-align: center;
  box-shadow: 0 5px 18px rgba(31,55,60,.06);
}
.woocommerce ul.products li.product .price {
  color: var(--vm-primary-dark);
  font-weight: 700;
  font-size: 1.05rem;
}
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--vm-primary);
  color: #fff;
  border-radius: 8px;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background: var(--vm-primary-dark);
  color: #fff;
}

.vm-footer {
  background: linear-gradient(135deg, var(--vm-primary-dark), var(--vm-primary));
  color: #fff;
  margin-top: 0;
}
.vm-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  padding: 30px 0;
}
.vm-footer a { color: #fff; }
.vm-footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}
.vm-footer-bottom {
  text-align: center;
  padding: 13px;
  background: rgba(0,0,0,.24);
  font-size: .9rem;
}

@media (max-width: 800px) {
  .vm-container { width: min(100% - 20px, 1180px); }
  .vm-hero { min-height: 310px; }
  .vm-hero-inner { min-height: 310px; }
  .vm-branding {
    left: 0;
    bottom: 24px;
  }
  .vm-header-contact {
    left: 0;
    right: auto;
    top: 14px;
    width: min(100%, 360px);
    text-align: left;
    font-size: .88rem;
  }
  .vm-menu a {
    padding: 12px 14px;
  }
  .vm-page {
    padding: 14px;
  }
  .vm-layout {
    grid-template-columns: 1fr;
  }
  .vm-sidebar {
    order: 1;
  }
  .vm-content {
    order: 2;
  }
  .vm-footer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .vm-site-title {
    font-size: 2.4rem;
  }
  .vm-subtitle {
    font-size: 1.15rem;
  }
  .vm-hero, .vm-hero-inner {
    min-height: 330px;
  }
  .vm-header-contact {
    width: 100%;
  }
}


/* Vanhamies 1.0.2: poistetaan vimpaimista tulevat hakualueet ja oikean reunan hakukenttä */
.vm-widget,
.widget_search,
.widget_product_search,
.search-form,
.woocommerce-product-search,
.vm-sidebar .wp-block-search {
  display: none !important;
}


/* Vanhamies 1.0.4: viimeistelty bannerin yhteystietolaatikko */
.vm-header-contact {
  position: absolute;
  right: 20px;
  top: 18px;
  width: auto;
  max-width: min(360px, calc(100% - 40px));
  min-width: 0;
  display: inline-block;
  padding: 10px 14px;
  background: rgba(22, 45, 50, .38);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  text-align: right;
  font-size: clamp(.82rem, 1vw, .94rem);
  line-height: 1.34;
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
}

.vm-contact-line {
  white-space: nowrap;
}

.vm-contact-line + .vm-contact-line {
  margin-top: 3px;
}

.vm-address,
.vm-hours {
  white-space: normal;
}

.vm-header-contact strong {
  color: #fff;
  font-weight: 700;
}

.vm-site-title {
  letter-spacing: .01em;
  text-shadow:
    0 2px 3px rgba(0,0,0,.55),
    0 8px 22px rgba(0,0,0,.45);
}

.vm-subtitle {
  text-shadow:
    0 2px 3px rgba(0,0,0,.55),
    0 8px 22px rgba(0,0,0,.45);
}

.vm-main-nav {
  background: rgba(248,252,252,.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.vm-menu a {
  transition: background .15s ease, color .15s ease;
}

.vm-menu a:hover {
  background: linear-gradient(#e5f2f3, #d7e8ea);
  color: var(--vm-primary-dark);
}

@media (max-width: 800px) {
  .vm-header-contact {
    left: auto;
    right: 12px;
    top: 12px;
    width: auto;
    max-width: calc(100% - 24px);
    text-align: right;
    font-size: .82rem;
    padding: 9px 12px;
  }

  .vm-contact-line {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .vm-header-contact {
    right: 10px;
    left: 10px;
    max-width: none;
    width: auto;
  }
}


/* Vanhamies 1.0.6 - Header keskitetty saman levyiseksi kuin muu sisältö */
.site-header{
    background: linear-gradient(135deg, #0e2a32 0%, #123540 100%);
}

.vm-hero,
.vm-main-nav{
    width:min(1180px, calc(100% - 32px));
    margin-left:auto;
    margin-right:auto;
}

.vm-main-nav{
    border-left:1px solid var(--vm-border);
    border-right:1px solid var(--vm-border);
}

@media (max-width:800px){
    .vm-hero,
    .vm-main-nav{
        width:min(100% - 20px, 1180px);
    }
}


/* Vanhamies 1.0.7 - Footer ja copyright samaan leveyteen kuin sisältö */
.vm-footer{
    background: transparent;
}

.vm-footer-grid,
.vm-footer-bottom{
    width:min(1180px, calc(100% - 32px));
    margin-left:auto;
    margin-right:auto;
}

.vm-footer-grid{
    background: linear-gradient(135deg, var(--vm-primary-dark), var(--vm-primary));
    padding-left:30px;
    padding-right:30px;
}

.vm-footer-bottom{
    background: rgba(0,0,0,.24);
}

@media (max-width:800px){
    .vm-footer-grid,
    .vm-footer-bottom{
        width:min(100% - 20px, 1180px);
    }
}


/* Vanhamies 1.0.8 - modernisoidut sivupalkit */
.vm-sidebar,
.vm-sidebar .vm-box,
.vm-sidebar .widget,
.vm-sidebar section {
    width: 100%;
}

.vm-box {
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg,#ffffff,#f7fbfb);
    border: 1px solid rgba(63,115,120,.18);
    box-shadow: 0 8px 22px rgba(0,0,0,.08);
}

.vm-box-title {
    background: linear-gradient(135deg,#456f75,#264e54);
    color:#fff;
    padding:14px 16px;
    font-weight:700;
    letter-spacing:.03em;
}

.vm-cat-list,
.vm-subcats {
    width:100%;
}

.vm-cat-row,
.vm-subcats a {
    display:block;
    width:100%;
}

.vm-cat-row a,
.vm-subcats a {
    padding:12px 14px;
    border-bottom:1px solid rgba(63,115,120,.10);
    transition:all .15s ease;
}

.vm-cat-row a:hover,
.vm-subcats a:hover {
    background:#e8f3f4;
    padding-left:18px;
    text-decoration:none;
}

.vm-contact-card {
    border-radius:12px;
    background:linear-gradient(135deg,#f7fbfb,#edf6f7);
    border:1px solid rgba(63,115,120,.15);
}
