/*
Theme Name: AmiGarage
Theme URI: https://www.amigarage.fi
Description: AmiGarage - Amiga ja Commodore tuotteet
Author: AmiGarage
Version: 1.0
*/

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

:root {
  --bg-dark: #003A5E;
  --bg-darker: #032b47;
  --accent-cyan: #1fb3da;
  --accent-orange: #FF8A00;
  --accent-blue: #1FB3DA;
  --text-light: #f0f0f0;
  --header-bg: #F8F8F1;
  --stripe-green: #AEDE00;
  --stripe-orange: #FF8A00;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* === HEADER === */
.site-header {
  background: var(--header-bg);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 100;
  color-scheme: light;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: bold;
  color: #1a3a6c;
  font-family: 'Arial', sans-serif;
}

.logo .ami { font-weight: 900; letter-spacing: -1px; }
.logo .garage { font-family: 'Georgia', serif; font-style: italic; }

.logo img {
  height: 40px;
  width: auto;
}

/* === NAVIGATION === */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

.main-nav a {
  color: #444;
  font-size: 15px;
  font-family: Arial, sans-serif;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current_page_item a {
  color: #1a3a6c;
  border-bottom-color: #1a3a6c;
}

/* === HERO === */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  height: 400px;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: block;
  margin-bottom: -1px;
}

.hero-logo-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 1000px;
  width: 90%;
  height: auto;
  z-index: 2;
}

.hero::after {
  display: none;
}

/* Diagonal stripes - floating over page */
.page-stripes {
  position: absolute;
  left: 0;
  top: 230px;
  z-index: 10;
  pointer-events: none;
}

.page-stripes img {
  height: 25vw;
  max-height: 300px;
  min-height: 100px;
  width: auto;
  display: block;
}

.hero-logo-img {
  width: 100%;
  height: auto;
  display: block;
}

/* === CATEGORY CARDS === */
.categories {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 10px 20px 30px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.cat-card {
  width: 100%;
  max-width: 180px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.15);
}

.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.cat-card a { display: block; color: #fff; }

.cat-card-img {
  width: 100%;
}

.cat-card-img img {
  width: 100%;
  height: auto;
  display: block;
}

.cat-card-label {
  text-align: center;
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  background: rgba(0,0,0,0.3);
}

/* === CONTENT SECTION === */
.content-section {
  max-width: 800px;
  margin: 30px auto;
  padding: 20px 40px;
}

.content-section h2 {
  font-size: 28px;
  margin-bottom: 20px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  color: #fff;
}

.content-section p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
  color: #ddd;
}

/* === PRODUCT PAGE === */
.page-title {
  font-size: 42px;
  font-weight: 900;
  font-family: Arial, sans-serif;
  padding: 30px 40px 20px 140px;
  color: #fff;
}

.product-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px 30px;
}

.product-img {
  width: 100%;
  max-width: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* === PRODUCT TABLE === */
.product-table-wrap {
  max-width: 750px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.product-table {
  border-collapse: collapse;
  width: 100%;
}

.product-table thead th {
  background: var(--accent-cyan);
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: bold;
  padding: 10px 16px;
  text-align: left;
}

.product-table tbody tr {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.product-table tbody tr:nth-child(odd) { background: #f5f0e0; }
.product-table tbody tr:nth-child(even) { background: #ece7d5; }

.product-table td {
  padding: 10px 16px;
  color: #333;
  font-size: 14px;
  font-family: Arial, sans-serif;
}

.product-table a.product-link {
  color: #003A5E;
  text-decoration: underline;
  font-weight: bold;
}

.product-table a.product-link:hover {
  color: #FF8A00;
}

.product-table thead th:nth-child(2),
.product-table td:nth-child(2) {
  white-space: nowrap;
  min-width: 80px;
}

.product-table .no-products {
  text-align: center;
  padding: 20px;
  color: #888;
  font-style: italic;
}

/* === SUBCATEGORY TITLE === */
.subcategory-title {
  font-size: 28px;
  font-weight: 900;
  font-family: Arial, sans-serif;
  color: var(--accent-cyan);
  padding: 30px 40px 10px 140px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 20px;
}

/* === BACK BUTTON === */
.back-btn {
  display: inline-block;
  margin: 20px 0 0 140px;
  padding: 8px 20px;
  background: var(--accent-orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  transition: background 0.2s;
}

.back-btn:hover { background: #d4550f; }

/* === FOOTER === */
.site-footer {
  background: var(--bg-darker);
  text-align: center;
  padding: 25px;
  color: var(--accent-cyan);
  font-size: 14px;
  font-family: Arial, sans-serif;
  margin-top: 40px;
}

/* === CONTACT PAGE === */
.contact-content {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px 40px;
}

/* === RESPONSIVE === */

/* Tablet + pieni desktop: piilota raidat, pidä 4 korttia rivissä */
@media (max-width: 950px) {
  .page-stripes { display: none; }
  .product-img { max-width: 170px; }
}

/* Tablet: 2x2 ruudukko */
@media (max-width: 768px) {
  .logo img {
    height: 30px;
    width: auto;
  }

  .site-header {
    flex-direction: column;
    gap: 12px;
    padding: 15px;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .hero { height: 220px; }
  .hero-logo-overlay { max-width: 85%; }

  .page-stripes { display: none; }

  .categories { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
  }
  .cat-card { 
    max-width: none;
    width: 100%; 
  }

  .page-title { padding-left: 20px; font-size: 28px; }
  .back-btn { margin-left: 20px; }

  .content-section { padding: 15px 20px; }
  .content-section h2 { font-size: 22px; }

  .product-img { width: 140px; height: 170px; }
  .product-images { 
    gap: 8px;
    padding: 10px 15px 20px;
  }
  .product-img { max-width: 45%; }

  .product-table-wrap { padding: 0 10px; }
  .product-table td, .product-table thead th { padding: 8px 10px; font-size: 13px; }
}

/* Mobile */
@media (max-width: 480px) {
  .hero { height: 180px; }
  .hero-logo-overlay { max-width: 90%; }

  .categories {
    gap: 10px;
    padding: 15px;
  }

  .cat-card-label { 
    font-size: 14px; 
    padding: 8px 4px; 
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main-nav ul { gap: 10px; }
  .main-nav a { font-size: 12px; }

  .product-images { gap: 8px; }
  .product-img { max-width: 45%; }

  .page-title { font-size: 24px; }
}
