/* =============================================
   VARAVARASTO PUBLIC WEBSITE – STYLES
   ============================================= */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0c4a6e;
  --primary-light: #0e7490;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --green: #059669;
  --green-light: #d1fae5;
  --yellow: #d97706;
  --yellow-light: #fef3c7;
  --red: #dc2626;
  --bg: #f0f4f8;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }

.shell { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -999px; top: auto;
  background: var(--accent); color: #fff; padding: 8px 16px; z-index: 999;
}
.skip-link:focus { left: 8px; top: 8px; }

main {
  min-height: calc(100vh - 200px); /* Push footer down */
  padding-top: 72px; /* Offset for fixed header */
}

/* === HEADER === */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand img { height: 36px; width: auto; }

.main-nav { display: flex; gap: 8px; }
.nav-link {
  padding: 8px 18px; border-radius: 8px; font-weight: 500; font-size: 15px;
  color: var(--text-secondary); transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary); background: rgba(12,74,110,0.06);
}
.nav-link.active { font-weight: 600; }

.cta-phone {
  display: flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  padding: 10px 20px; border-radius: 50px;
  font-weight: 600; font-size: 14px;
  transition: background 0.2s;
}
.cta-phone:hover { background: var(--primary-light); }

.nav-toggle { display: none; width: 32px; height: 24px; position: relative; }
.nav-toggle span {
  display: block; width: 100%; height: 2px; background: var(--text);
  position: absolute; left: 0; transition: all 0.3s;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 0; }
.nav-toggle.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* === HERO === */
.hero {
  padding: 68px 0 80px;
  background: linear-gradient(135deg, #0c4a6e 0%, #164e63 40%, #155e75 100%);
  color: #fff;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(37,99,235,0.15) 0%, transparent 60%);
}
.hero::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 60px;
  background: linear-gradient(transparent, var(--bg));
}
.hero-inner { position: relative; z-index: 1; display: flex; gap: 60px; align-items: center; }
.hero-text { flex: 1; }
.hero-text h1 {
  font-family: var(--font-display); font-size: 44px; font-weight: 800;
  line-height: 1.15; margin-bottom: 20px;
}
.hero-text h1 span { color: #67e8f9; }
.hero-text p {
  font-size: 18px; color: rgba(255,255,255,0.8); max-width: 520px;
  margin-bottom: 32px; line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 50px; font-weight: 600; font-size: 15px;
  transition: all 0.2s; cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: #fff; color: var(--primary); }
.btn-primary:hover { background: #f0f4f8; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #047857; }
.btn-sm { padding: 10px 20px; font-size: 14px; }

.hero-visual { flex: 0 0 400px; }

/* === FEATURES STRIP === */
.features-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: -40px; position: relative; z-index: 2;
}
.feature-card {
  background: var(--bg-card); border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow-md); text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 24px;
}
.feature-icon.blue { background: rgba(37,99,235,0.1); color: var(--accent); }
.feature-icon.green { background: rgba(5,150,105,0.1); color: var(--green); }
.feature-icon.orange { background: rgba(217,119,6,0.1); color: var(--yellow); }
.feature-icon.primary { background: rgba(12,74,110,0.1); color: var(--primary); }
.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.feature-card p { font-size: 13px; color: var(--text-secondary); }

/* === LOCATIONS SECTION === */
.section { padding: 80px 0; }
.section-title {
  font-family: var(--font-display); font-size: 32px; font-weight: 700;
  text-align: center; margin-bottom: 12px; color: var(--primary);
}
.section-subtitle {
  text-align: center; color: var(--text-secondary); font-size: 16px;
  margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto;
}

.locations-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.location-card {
  background: var(--bg-card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}
.location-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.location-card-img {
  height: 200px; background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.15); font-size: 80px; font-weight: 800;
  font-family: var(--font-display);
}
.location-card-body { padding: 28px; }
.location-card-body h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.location-card-body .address { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }
.location-card-body .meta {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.meta-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
}
.meta-item .dot { width: 8px; height: 8px; border-radius: 50%; }
.meta-item .dot.green { background: var(--green); }

/* === VARASTOT PAGE === */
.varastot-header { padding: 120px 0 40px; background: var(--primary); color: #fff; }
.varastot-header h1 {
  font-family: var(--font-display); font-size: 36px; font-weight: 800;
  margin-bottom: 8px;
}
.varastot-header p { color: rgba(255,255,255,0.7); font-size: 16px; }

.location-tabs {
  display: flex; gap: 8px; margin-bottom: 32px; padding-top: 32px;
}
.location-tab {
  padding: 12px 28px; border-radius: 50px; font-weight: 600; font-size: 15px;
  background: var(--bg-card); color: var(--text-secondary);
  border: 2px solid var(--border); cursor: pointer; transition: all 0.2s;
}
.location-tab:hover { border-color: var(--accent); color: var(--accent); }
.location-tab.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

.map-section {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px;
}
.map-container {
  height: 320px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.map-info {
  background: var(--bg-card); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center;
}
.map-info h3 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.map-info-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.map-info-item:last-child { border-bottom: none; }
.map-info-item .icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.directions-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  background: var(--accent); color: #fff; padding: 12px 24px;
  border-radius: 50px; font-weight: 600; font-size: 14px;
  transition: background 0.2s; border: none; cursor: pointer;
}
.directions-btn:hover { background: var(--accent-hover); }

.units-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.unit-card {
  background: var(--bg-card); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.unit-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.unit-badge {
  display: inline-block; padding: 4px 12px; border-radius: 50px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  margin-bottom: 12px;
}
.unit-badge.available { background: var(--green-light); color: var(--green); }
.unit-badge.reserved { background: var(--yellow-light); color: var(--yellow); }
.unit-size { font-size: 24px; font-weight: 800; font-family: var(--font-display); margin-bottom: 4px; }
.unit-volume { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.unit-price {
  font-size: 28px; font-weight: 800; color: var(--primary);
  font-family: var(--font-display); margin-bottom: 4px;
}
.unit-price-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; }
.unit-features { list-style: none; margin-bottom: 16px; }
.unit-features li {
  padding: 3px 0; font-size: 13px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.unit-features li::before {
  content: none;
}

.unit-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  line-height: 1.4;
}

.unit-features .unit-feature-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #009b72;
}

.unit-features li span {
  min-width: 0;
}
.unit-actions { display: flex; gap: 8px; }
.unit-actions .btn { flex: 1; justify-content: center; }

.no-units {
  text-align: center; padding: 60px 20px; color: var(--text-secondary);
  font-size: 16px;
}

/* === TIETOA PAGE === */
.tietoa-header { padding: 120px 0 40px; background: var(--primary); color: #fff; }
.tietoa-header h1 {
  font-family: var(--font-display); font-size: 36px; font-weight: 800;
  margin-bottom: 8px;
}
.tietoa-content { padding: 48px 0; }
.tietoa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.tietoa-text {
  background: var(--bg-card); border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.tietoa-text h2 {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--primary); margin-bottom: 16px;
}
.tietoa-text p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.8; }
.tietoa-text ul { list-style: none; margin-bottom: 16px; }
.tietoa-text ul li {
  padding: 8px 0; font-size: 15px; display: flex; align-items: center; gap: 10px;
}
.tietoa-text ul li::before { content: '✓'; color: var(--green); font-weight: 700; font-size: 18px; }

.contact-form {
  background: var(--bg-card); border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.contact-form h2 {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--primary); margin-bottom: 24px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font);
  transition: border-color 0.2s; background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* === SVG FLOOR PLAN === */
.floor-plan-section {
  margin-bottom: 40px;
}
.floor-plan-wrapper {
  background: var(--bg-card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-md); border: 1px solid var(--border);
  overflow: hidden; position: relative;
}
.floor-plan-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 16px; flex-wrap: wrap; gap: 12px;
}
.floor-plan-toolbar h3 {
  font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 0;
}
.floor-plan-legend {
  display: flex; gap: 16px; align-items: center; font-size: 13px;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot {
  width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.1);
}
.legend-dot.available { background: rgba(5, 150, 105, 0.45); }
.legend-dot.rented { background: rgba(239, 68, 68, 0.35); }
.legend-dot.reserved { background: rgba(217, 119, 6, 0.45); }

.floor-plan-svg-container {
  width: 100%; overflow-x: auto; overflow-y: hidden;
  cursor: grab; position: relative;
}
.floor-plan-svg-container:active { cursor: grabbing; }
.floor-plan-svg-container svg {
  max-width: 100%; height: auto; display: block;
}

.floor-plan-svg-container svg rect[data-unit-id] {
  cursor: pointer;
  transition: all 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.floor-plan-svg-container svg rect[data-unit-id] + g {
  transition: all 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.floor-plan-svg-container svg rect[data-unit-id]:hover {
  stroke-width: 3 !important;
  filter: brightness(1.2) drop-shadow(0px 4px 8px rgba(0,0,0,0.3));
  transform: scale(1.05);
}
.floor-plan-svg-container svg rect[data-unit-id]:hover + g {
  transform: scale(1.05);
}
.floor-plan-svg-container svg rect[data-unit-id].unit-available {
  fill: rgba(5, 150, 105, 0.45) !important;
  stroke: #059669 !important;
}
.floor-plan-svg-container svg rect[data-unit-id].unit-rented {
  fill: rgba(239, 68, 68, 0.25) !important;
  stroke: #ef4444 !important;
  cursor: default;
}
.floor-plan-svg-container svg rect[data-unit-id].unit-reserved {
  fill: rgba(217, 119, 6, 0.35) !important;
  stroke: #d97706 !important;
}
.floor-plan-svg-container svg rect[data-unit-id].unit-selected {
  fill: rgba(37, 99, 235, 0.5) !important;
  stroke: #2563eb !important;
  stroke-width: 3 !important;
}

/* Tooltip */
.svg-tooltip {
  position: fixed; z-index: 200;
  background: #1e293b; color: #fff;
  padding: 12px 16px; border-radius: 10px;
  font-size: 13px; pointer-events: none;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  max-width: 240px; line-height: 1.5;
  opacity: 0; transition: opacity 0.15s;
}
.svg-tooltip.visible { opacity: 1; }
.svg-tooltip .tt-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.svg-tooltip .tt-price { font-weight: 700; color: #67e8f9; font-size: 16px; }
.svg-tooltip .tt-badge {
  display: inline-block; padding: 2px 8px; border-radius: 50px;
  font-size: 11px; font-weight: 600; margin-top: 4px;
}
.svg-tooltip .tt-badge.available { background: rgba(5,150,105,0.3); color: #6ee7b7; }
.svg-tooltip .tt-badge.rented { background: rgba(239,68,68,0.3); color: #fca5a5; }
.svg-tooltip .tt-badge.reserved { background: rgba(217,119,6,0.3); color: #fcd34d; }

/* Selected unit detail card */
.selected-unit-card {
  background: var(--bg-card); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-md); border: 2px solid var(--accent);
  margin-top: 20px; display: flex; align-items: center; gap: 24px;
  animation: fadeInUp 0.3s ease;
}
.selected-unit-card .suc-info { flex: 1; }
.selected-unit-card .suc-info h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 8px;
}
.selected-unit-card .suc-details {
  display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 12px;
  font-size: 14px; color: var(--text-secondary);
}
.selected-unit-card .suc-price {
  font-size: 28px; font-weight: 800; color: var(--primary);
  font-family: var(--font-display);
}
.selected-unit-card .suc-price small { font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.selected-unit-card .suc-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* === FOOTER === */
.site-footer {
  background: #0f172a; color: rgba(255,255,255,0.7); padding: 60px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px;
}
.footer-col h4 {
  color: #fff; font-weight: 600; font-size: 15px; margin-bottom: 16px;
}
.footer-col p { font-size: 14px; margin-bottom: 12px; line-height: 1.6; }
.footer-col a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-desc { font-size: 14px; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0;
}
.footer-bottom p { font-size: 13px; text-align: center; }

/* === LOADING === */
.loading {
  display: flex; align-items: center; justify-content: center;
  padding: 60px; color: var(--text-secondary);
}
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin-right: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-text h1 { font-size: 32px; }
  .hero-text p { margin: 0 auto 32px; }
  .hero-cta { justify-content: center; }
  .hero-visual { display: none; }
  .features-strip { grid-template-columns: repeat(2, 1fr); }
  .locations-grid { grid-template-columns: 1fr; }
  .map-section { grid-template-columns: 1fr; }
  .tietoa-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 640px) {
  .main-nav { 
    display: none; position: fixed; top: 72px; left: 0; right: 0;
    background: #fff; padding: 20px; flex-direction: column;
    box-shadow: var(--shadow-lg); border-bottom: 1px solid var(--border);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .cta-phone span { display: none; }
  .cta-phone { padding: 10px; border-radius: 50%; }
  .features-strip { grid-template-columns: 1fr; margin-top: -20px; }
  .hero { padding: 120px 0 60px; }
  .hero-text h1 { font-size: 28px; }
  .section-title { font-size: 26px; }
  .units-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .location-tabs { flex-wrap: wrap; }
}

/* === VARASTOKOON SUODATINVALIKKO === */

.storage-size-filter {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px;
  margin: 22px 0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.storage-size-filter h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 18px;
}

.storage-size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.storage-size-option {
  background: #f8fafc;
  border: 1px solid #dce1e7;
  border-radius: 9px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.storage-size-option:hover {
  border-color: #c81e32;
  color: #c81e32;
}

.storage-size-option.active {
  background: #c81e32;
  border-color: #c81e32;
  color: #fff;
}

#storage-custom-range[hidden] {
  display: none;
}

.storage-range-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.storage-range-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.storage-range-form input {
  width: 155px;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.storage-range-form input:focus {
  outline: 2px solid #c81e32;
  outline-offset: 1px;
}

.storage-range-form button {
  background: #c81e32;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.storage-range-form button:hover {
  background: #a81829;
}

.size-filter-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  font-size: 14px;
  color: #475569;
}

.size-filter-info strong {
  color: #111827;
}

#clear-size-filter {
  border: 1px solid #dce1e7;
  border-radius: 7px;
  background: #fff;
  color: #c81e32;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

#clear-size-filter:hover {
  background: #fff1f2;
}

@media (max-width: 640px) {
  .storage-size-filter {
    padding: 18px 14px;
  }

  .storage-size-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .storage-size-option {
    padding: 11px 8px;
    font-size: 13px;
  }

  .storage-range-form label {
    flex: 1 1 120px;
  }

  .storage-range-form input {
    width: 100%;
  }

  .storage-range-form button {
    width: 100%;
  }
}


/* Kokoluokkien kaksiriviset painikkeet */
.storage-size-option {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 54px;
  line-height: 1.25;
}

.size-option-name {
  font-weight: 700;
}

.size-option-detail {
  font-size: 11px;
  font-weight: 400;
  color: #8490a1;
  white-space: nowrap;
}

.storage-size-option.active .size-option-detail {
  color: rgba(255,255,255,0.85);
}


/* Varastokortin kuvapaikka */
.unit-card {
  position: relative;
}
.unit-media {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 125px;
  height: 115px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid var(--border);
}
.unit-media-image {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.unit-media-image.active {
  display: block;
}
.unit-media-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #777;
  font-size: 25px;
}
.unit-media-empty small {
  font-size: 11px;
}
.unit-card .unit-number,
.unit-card .unit-size,
.unit-card .unit-volume {
  max-width: calc(100% - 140px);
}

/* Varastokuvien selaus */
.unit-media-nav {
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 5px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.unit-media-nav button {
  pointer-events: auto;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #222;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.unit-media-nav button:hover {
  background: #fff;
}

/* Suurempi varastokuva ja kuvan alapuoliset nuolet */
.unit-media {
  width: 145px;
  height: 168px;
  top: 24px;
  right: 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.unit-media-image,
.unit-media-empty {
  width: 100%;
  height: 140px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f3f4f6;
  overflow: hidden;
}

.unit-media-nav {
  position: absolute;
  top: 144px;
  bottom: auto;
  left: 0;
  right: 0;
  justify-content: center;
  gap: 16px;
  pointer-events: auto;
}

.unit-media-nav button {
  width: 24px;
  height: 24px;
  font-size: 20px;
}

.unit-card .unit-number,
.unit-card .unit-size,
.unit-card .unit-volume {
  max-width: calc(100% - 160px);
}

/* Varastolistan Näytä lisää -painike */
.unit-list-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 28px 0 12px;
}

.unit-list-pagination span {
  font-size: 13px;
  color: var(--text-secondary);
}

.unit-list-pagination button {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: #222;
  padding: 12px 24px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.unit-list-pagination button:hover {
  border-color: #c62828;
  color: #c62828;
}


/* STORAGE MOBILE POLISH 20261129 */

.storage-common-features {
  display: none;
}

@media (max-width: 767px) {

  .storage-common-features {
    display: flex;
    flex-direction: column;
    gap: 5px;
    list-style: none;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #f5f7f6;
    border-radius: 10px;
  }

  .storage-common-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
  }

  .storage-common-features .unit-feature-icon {
    flex: 0 0 16px;
    color: #369675;
  }

  #units-list .unit-common-feature {
    display: none !important;
  }

  #units-list {
    display: flex;
    flex-direction: column;
  }

  #units-list .storage-results-heading {
    order: -2;
    margin: 20px 0 12px !important;
  }

  #units-list .size-filter-info {
    order: -1;
    margin: 0 0 12px;
    gap: 4px 12px;
    justify-content: space-between;
    font-size: 13px;
  }

  #units-list #clear-size-filter {
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #c81e32;
    padding: 6px 0;
    min-height: 32px;
    font-size: 13px;
    font-weight: 600;
  }

  #units-list #clear-size-filter:hover {
    background: transparent;
    text-decoration: underline;
  }

  #units-list .units-grid {
    gap: 14px;
  }

  #units-list .unit-features {
    margin-bottom: 12px;
  }

  .storage-map-panel .floor-plan-section {
    margin-bottom: 0 !important;
  }

  #units-list .unit-list-pagination {
    margin: 20px 0 0;
    gap: 10px;
  }
}


/* STORAGE MOBILE SPACING 20261129 */

@media (max-width: 767px) {

  /* Pohjakartan ja hakutulosten väli */
  .storage-map-panel {
    margin-bottom: 0 !important;
  }

  #units-list {
    margin-top: 24px !important;
    padding-top: 0 !important;
    gap: 0 !important;
  }

  /* Saatavuusotsikko */
  #units-list .storage-results-heading {
    margin: 0 0 12px !important;
  }

  #units-list .storage-results-heading:has(+ .storage-common-features) {
    margin-bottom: 12px !important;
  }

  /* Valittu kokoluokka */
  #units-list .size-filter-info {
    margin: 0 0 12px !important;
    padding: 0 !important;
  }

  #units-list:has(.size-filter-info) .storage-results-heading {
    margin-bottom: 8px !important;
  }

  /* Varastojen yhteiset ominaisuudet */
  #units-list .storage-common-features {
    margin: 0 0 16px !important;
    padding: 12px !important;
  }

  /* Varastokorttien väli */
  #units-list .units-grid {
    gap: 12px !important;
  }

}


/* STORAGE DESKTOP COMMON FEATURES 20261129 */

@media (min-width: 768px) {

  /* Varastojen yhteiset ominaisuudet */
  #units-list .storage-common-features {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    list-style: none;
    margin: 0 0 24px;
    padding: 16px 24px;
    background: #f5f7f6;
    border-radius: 10px;
  }

  #units-list .storage-common-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
  }

  #units-list .storage-common-features .unit-feature-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: #369675;
  }

  /* Piilotetaan korteissa toistuvat ominaisuudet */
  #units-list .unit-common-feature {
    display: none !important;
  }

}


/* STORAGE COMPACT DESKTOP FILTER 20261129 */

/* Kuvattoman varaston viivakuvake */
.unit-media-empty .unit-placeholder-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: #929292;
}

/* Desktopin matalampi kokosuodatin */
@media (min-width: 768px) {

  .storage-size-filter {
    padding: 16px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px 24px;
  }

  .storage-size-filter h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
  }

  .storage-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .storage-size-option {
    flex: 1 0 auto;
    min-height: 46px;
    padding: 6px 12px;
    font-size: 13px;
    gap: 2px;
    box-sizing: border-box;
  }

  .storage-size-option .size-option-detail {
    font-size: 11px;
  }

  #storage-custom-range {
    grid-column: 1 / -1;
  }

  #storage-custom-range[hidden] {
    display: none;
  }

  .storage-range-form {
    margin-top: 4px;
  }

}

/* Kapeammilla desktop- ja tablettinäytöillä */
@media (min-width: 768px) and (max-width: 1099px) {

  .storage-size-filter {
    grid-template-columns: 1fr;
    gap: 10px;
  }

}


/* COMPACT UNIT PREVIEW 20261129 */

#selected-unit-container .compact-unit-preview {
  display: block !important;
  padding: 12px 0 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  text-align: center;
}

.compact-unit-preview .suc-info {
  width: 100% !important;
  min-width: 0;
}

.compact-unit-preview .preview-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6b7280;
}

.compact-unit-preview .preview-heading .unit-badge {
  position: static !important;
  margin: 0;
  font-size: 11px;
  padding: 4px 8px;
}

.compact-unit-preview .preview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-unit-preview .preview-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #f5f6f7;
  border: 1px solid #eef0f2;
  border-radius: 10px;
  padding: 18px 8px;
}

.compact-unit-preview .preview-metric strong {
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
}

.compact-unit-preview .preview-metric span {
  font-size: 13px;
  color: var(--text-secondary);
}

.compact-unit-preview .preview-rent strong {
  color: #d32220;
}

.compact-unit-preview .preview-volume {
  grid-column: 1 / -1;
}

.compact-unit-preview .preview-box-estimate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 !important;
  font-size: 14px;
}

.compact-unit-preview .preview-box-estimate svg {
  color: #369675;
}

.compact-unit-preview .suc-actions {
  width: 100% !important;
  margin: 0 !important;
  gap: 10px !important;
}

.compact-unit-preview .suc-actions .btn {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 46px;
  padding: 12px !important;
  box-shadow: none !important;
  font-size: 15px !important;
}

.compact-unit-preview [data-purchase-unit] {
  background: #d32220 !important;
  border-color: #d32220 !important;
  color: #fff !important;
}

@media (min-width: 768px) {

  #checkout-modal-overlay > div:has(.compact-unit-preview) {
    width: 480px !important;
    max-width: calc(100vw - 40px) !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  #selected-unit-container:has(.compact-unit-preview) {
    padding: 24px !important;
  }

  #selected-unit-container .compact-unit-preview {
    margin: 0 !important;
    padding: 12px 0 0 !important;
  }

  .compact-unit-preview .suc-info .preview-heading {
    font-size: 18px !important;
    margin: 0 0 16px !important;
  }

  .compact-unit-preview .preview-metric {
    padding: 14px 8px;
  }

  .compact-unit-preview .preview-box-estimate {
    margin: 16px 0 !important;
  }

  .compact-unit-preview .suc-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 767px) {

  .compact-unit-preview .preview-metric strong {
    font-size: 22px;
  }

  .compact-unit-preview .suc-actions {
    display: flex !important;
    flex-direction: column !important;
  }

}
