/* === RESET / BASE === */
body, p, a, h1, h2, h3, h4, ul, ol, li, div, td, tr, table, th, blockquote, nobr, input, textarea {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  margin: 0;
  color: #000;
}
a { color: #800000; text-decoration: none; }
a:hover { text-decoration: underline; }

input, textarea, select {
  border: 1px black solid;
  padding: 3px 6px;
  border-radius: 3px;
  margin: 3px;
  font-size: 12px;
  box-sizing: border-box;
}
input  { height: 22px; }
select { padding: 3px 2px; height: 22px; }

/* === BODY BACKGROUND (migrated from legacy inline style) === */
body {
  background: url(/images/scr_back2.png) #6b6969 center 65px repeat-y;
}

/* === BOX COMPONENT === */
.box {
  width: 191px;
  border-radius: 5px;
  background: #8c8989;
}
.box > tbody > tr > th,
.box .head {
  color: #fff;
  background: #000;
  font-weight: bold;
  padding: 5px 8px;
  border-radius: 5px 5px 0 0;
  text-align: center;
}
.box .head h1,
.box .head h2 { color: #fff; }
.box > tbody > tr > td { padding: 5px 8px; }

/* === UTILITY === */
.backgroundtext { color: #ffffff; }

/* === IMAGES === */
img {
  border: 0;
  border-image-width: 0;
  vertical-align: top;
  max-width: 100%;
}
.img-list {
  background: #fff;
  width: 50px;
  height: 50px;
  margin-bottom: 5px;
  box-shadow: 0 0 1px #fff;
}
.img-thumbnail {
  background: #fff;
  width: 50px;
  height: 50px;
  display: block;
  margin-top: 5px;
  box-shadow: 0 0 1px #fff;
}
.img-medium {
  background: #fff;
  width: 200px;
  height: 200px;
  box-shadow: 0 0 1px #fff;
}
img.map, map area { outline: none; }

/* === TABLE RESET === */
table { border-spacing: 0; border-collapse: separate; border: 0; }
td    { padding: 0; }

/* === INTERACTIVE === */
.goto { cursor: pointer; color: #800000; }
.goto:hover { text-decoration: underline; }

/* === BUTTONS === */
.btn {
  display: inline-block;
  cursor: pointer;
  border: 1px solid black;
  border-radius: 3px;
  background: #800;
  color: #fff;
  padding: 3px 6px;
  margin: 3px;
  font-weight: bold;
}
.btn:hover      { text-decoration: underline; }
.btn.active     { background: #400; color: #fbb; }
.btn.disabled   { cursor: default; background: #666; color: #888; }
.btn.white      { background: #eee; color: #000; }
.btn.grey       { background: #aaa; color: #000; }

/* === MESSAGE BOXES === */
.msgbox {
  width: 100%;
  box-sizing: border-box;
  border-radius: 5px;
  border: 1px solid #888;
  background: #ccc;
  color: #444;
  text-align: left;
  padding: 10px;
  margin: 10px 0;
}
.msgbox.yellow { border-color: #880; background: #cc8; color: #440; }
.msgbox.red    { border-color: #800; background: #c88; color: #400; }
.msgbox.green  { border-color: #080; background: #8c8; color: #040; }

/* === FOOTER === */
.footer {
  width: 800px;
  max-width: 100%;
  margin: 15px auto 0 auto;
  background: #181111;
  padding: 10px;
  box-sizing: border-box;
}

/* row of 3 equal-height boxes */
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.footer-row > .box {
  flex: 1 1 0;
  min-width: 200px;
  margin: 0;
}

/* base box reset (drop floats) */
.footer .box {
  background: #252222;
  box-shadow: 0 0 3px 0 #000;
  color: #666;
  padding: 8px;
  line-height: 1.5;
  width: auto;
  border-radius: 5px;
}
.footer .box .head {
  color: #666;
  margin: -8px -8px 8px -8px;
}
.footer .box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer .box a,
.footer .box .goto { color: #6a6666; white-space: nowrap; }

/* full-width social box below the 3-column row */
.footer-social {
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}
.footer-social .social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-social .social-list li {
  list-style: none;
}

.footer .copy {
  text-align: center;
  margin-top: 12px;
  color: #666;
}

@media (max-width: 600px) {
  .footer-row > .box { flex: 1 1 100%; }
}

/* === CHEVRONS === */
.chevronright:after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-width: 2px 2px 0 0;
  border-style: solid;
  transform: rotate(45deg);
  margin: 0 3px;
  position: relative;
  top: -1px;
}
.chevronleft:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-width: 2px 2px 0 0;
  border-style: solid;
  transform: rotate(-135deg);
  margin: 0 3px;
  position: relative;
  top: -1px;
}

/* === MODAL / LIGHTBOX === */
.modal {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  text-align: center;
  transition: 0.3s;
}
.modal-content {
  display: inline-block;
  background-color: #fff;
  box-shadow: 0 0 15px #000;
  margin: 3% auto;
  padding: 30px 0 0 0;
  position: relative;
  overflow: auto;
}
.modal-content .header {
  text-align: left;
  font-weight: bold;
  background-color: #eee;
  padding: 8px 35px 8px 10px;
  display: block;
  position: absolute;
  top: 0;
  width: 100%;
  height: 30px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.modal.imagezoom img {
  display: none;
  max-height: 85vh;
  cursor: pointer;
}
.modal.imagezoom[style*='visibility: visible'] img { display: block !important; }
.modal.imagezoom[style*='opacity: 0'] img          { display: block !important; }
.modal .close {
  position: absolute;
  height: 30px;
  width: 30px;
  top: 0;
  right: 0;
  transition: .3s;
  text-align: center;
  font-size: 28px;
  vertical-align: middle;
  display: table-cell;
  color: #aaa;
}
.modal .close:hover,
.modal .close:focus { color: #000; cursor: pointer; }

/* === SLIDESHOW === */
.slide {
  opacity: 0;
  border: 1px solid white;
  position: absolute;
  top: 0;
  max-width: 100%;
  transition: 1s;
  z-index: 0;
}
.slide.active { opacity: 1; z-index: 1; }

/* === PRODUCT TABLE (sidebar / list) === */
table.products td:not(:first-child) { word-break: break-all; }
table.products td:first-child        { width: 50px; text-align: center; }
table.products td                    { vertical-align: top; padding: 2px 0 0 5px; }

/* === SHOP ITEM CARD GRID (Phase A4: new card-based shop list) === */
.shop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 12px 0;
}
.shop-item-card {
  background: #222;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}
.shop-item-card a {
  color: #eee;
  text-decoration: none;
  display: block;
}
.shop-item-card a:hover { text-decoration: underline; }
.shop-item-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 4px;
}
.shop-item-card h3 {
  font-size: 13px;
  margin: 6px 0 2px;
  color: #eee;
}
.shop-item-card small { color: #aaa; display: block; margin-bottom: 2px; }
.shop-item-card .price { color: #a00; font-weight: bold; }

/* === PAGINATION === */
.pagination { margin: 10px 0; text-align: center; }
.pagination a, .pagination strong {
  display: inline-block;
  margin: 2px;
  padding: 3px 7px;
  border: 1px solid #800;
  border-radius: 3px;
}
.pagination a { color: #800; }
.pagination strong { background: #800; color: #fff; border-color: #800; }

/* === COOKIE BANNER (minimal, in case activated later) === */
.cookie-banner { position: fixed; top: 0; width: 100%; z-index: 9999; }
.cookie-banner div {
  margin: 0 auto;
  width: 480px;
  position: relative;
  padding: 20px;
  background: #eee;
  border: 1px solid #ddd;
  border-radius: 0 0 5px 5px;
  font-size: 14px;
  line-height: 20px;
  box-shadow: 0 0 5px 5px rgba(0,0,0,0.3);
}
.cookie-banner button {
  border: 1px solid #ccc;
  border-radius: 5px;
  display: inline-block;
  text-align: center;
  padding: 10px;
  background: #060;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}
.cookie-banner a { font-size: 14px; text-decoration: underline; }

/* === HEADER NAV === */
header { display: block; }
.lang-switch a { color: #ccc; margin: 0 2px; }
.lang-switch a.active { color: #fff; font-weight: bold; }

/* === WIDGET (Google reviews badge, kept harmless) === */
.widget_container_stars_badge {
  overflow: hidden;
  width: 175px;
  height: 110px;
  margin: 3px 0;
  border-radius: 5px;
}
.widget_container_stars_badge > iframe {
  transform: scale(0.9);
  margin: -12px -33px -30px -33px;
}

/* === MAIN CONTENT WRAPPER (matches footer width) === */
main {
  width: 800px;
  max-width: 100%;
  margin: 0 auto;
  padding-top: 20px;
  padding-bottom: 20px;
  box-sizing: border-box;
}

/* ===== Phase C — home / shop / shop_news pages ===== */
.hero { padding: 20px 0 30px; text-align: center; }
.hero h1 { font-size: 32px; margin-bottom: 8px; color: #fff; }
.hero .claim { color: #ccc; margin-bottom: 24px; }
.btn.white { background: transparent; border: 1px solid #ccc; color: #ccc; }
.btn.white:hover { background: rgba(255,255,255,0.1); }

.shop-page { display: block; padding: 20px; box-sizing: border-box; }
.shop-page .shop-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.shop-page .shop-header h1 { color: #fff; margin: 0; }
.shop-search { display: flex; gap: 6px; }
.shop-search input { padding: 6px 8px; background: #2a1a1a; color: #eee; border: 1px solid #555; border-radius: 3px; }

.shop-cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 8px; background: #181111; border-radius: 5px; }
.shop-cat-tab { color: #ccc; text-decoration: none; padding: 4px 10px; border-radius: 3px; font-size: 13px; line-height: 1.4; }
.shop-cat-tab:hover { color: #fff; background: rgba(255,255,255,0.06); }
.shop-cat-tab.active { color: #fff; background: #f80; font-weight: bold; }
.shop-cat-tab.active small { color: #fff; }
.shop-cat-tab small { color: #888; }

.shop-content { min-height: 300px; }
.shop-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.shop-item-card { background: #222; border-radius: 6px; padding: 8px; text-align: center; }
.shop-item-card a { color: #eee; text-decoration: none; display: block; }
.shop-item-card a:hover { color: #fff; }
.shop-item-card img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px; }
.shop-item-card h3 { font-size: 13px; margin: 6px 0 2px; min-height: 32px; line-height: 1.3; }
.shop-item-card small { display: block; color: #aaa; font-size: 11px; margin-bottom: 2px; }
.shop-item-card .price { color: #a00; font-weight: bold; font-size: 13px; }

.shop-result-count { color: #aaa; margin: 0 0 12px; font-size: 13px; }

.newest { padding: 20px; box-sizing: border-box; }
.newest h2 { color: #fff; margin-bottom: 16px; }
.shop-news { padding: 20px; box-sizing: border-box; }
.shop-news h1 { color: #fff; margin-bottom: 16px; }

@media (max-width: 900px) {
  .shop-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .shop-list { grid-template-columns: 1fr; }
  .shop-cat-tabs { gap: 4px; padding: 6px; }
  .shop-cat-tab { font-size: 12px; padding: 3px 8px; }
}
@media (max-width: 820px) {
  main { padding: 0 10px; }
}

/* Header top bar (lang switcher + main nav) — flexbox replacement for legacy <table> layout */
.scr-topbar {
  width: 100%;
  min-height: 80px;
  background: url(/images/scr_back1.png) no-repeat;
  background-position: center 0;
}
.scr-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 30px 70px 0 0;
  box-sizing: border-box;
}
.scr-langswitch {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scr-langswitch img {
  width: 31px;
  height: 17px;
  display: block;
}
.scr-mainnav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.scr-mainnav a { display: inline-flex; }
.scr-mainnav img { display: block; }

@media (max-width: 600px) {
  .scr-topbar-inner { padding-top: 16px; gap: 10px; }
}
