/* Base styling and variables */
:root {
    --primary-color: #8a1c1c; /* rustic red */
    --dark-color: #0f0f0f;    /* almost black */
    --light-color: #ffffff;
    --muted-color: #f5f5f5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--muted-color);
}

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

img {
    max-width: 100%;
    display: block;
}

/* Containers */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* Header */
.site-header {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo styling */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-color);
    font-size: 1.4rem;
    font-weight: bold;
}

.logo-img {
    height: 40px;
    display: block;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--light-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.main-nav a {
    color: var(--light-color);
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

/* Hero sections */
.hero,
.page-hero {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 4rem 0;
    text-align: center;
}

/* Hero with background image */
.hero-image {
    background-image: url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-image::after {
    /* Overlay for readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.hero-image .container {
    position: relative;
    z-index: 1;
    color: var(--light-color);
}

/* Features section */
.features {
    /* Light section behind feature cards */
    background-color: var(--muted-color);
    padding: 3rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark-color);
}

.features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.feature-card {
    background-color: var(--light-color);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 2rem 1rem;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.feature-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.feature-card p {
    font-size: 0.95rem;
    color: #555;
}

/* Who We Are section */
.who-we-are {
    /* Light neutral background for our story section */
    background-color: var(--muted-color);
    padding: 4rem 0;
    text-align: center;
}

.who-we-are h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.who-we-are p {
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #555;
    line-height: 1.5;
}

.hero h1,
.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p,
.page-hero p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.btn-primary {
    display: inline-block;
    align-self: flex-start;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    margin-top: auto;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #701717;
}

/* Sections */
.product-section,
.about-content,
.contact-content,
.intro {
    padding: 3rem 0;
    /* Light background for readability */
    background-color: var(--muted-color);
}

.product-section:nth-of-type(even) {
    background-color: var(--muted-color);
}

.product-section:nth-of-type(odd) {
    background-color: #ffffff;
}

.product-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-section p {
    margin-bottom: 1rem;
    color: #333;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.custom-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.custom-grid img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.custom-grid img:hover {
    transform: scale(1.02);
}

.product-card {
    background-color: var(--light-color);
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px; /* Adjust as needed */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card model-viewer {
    width: 100%;
    height: 160px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.product-card p {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card h3 {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.placeholder-text {
    font-style: italic;
    color: #666;
}

.custom-swiper {
    width: 100%;
    height: 650px;
    position: relative;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide img {
    width: 100%;
    height: 100;
    object-fit: contain; 
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.swiper-pagination-bullet {
    background: #ffffff !important;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 1 !important;
    margin: 0 6px !important;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
    transform: scale(1.3);
}

.product-detail-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.product-model {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    background: #f9f9f9;
}

.product-description {
    font-size: 1.1rem;
    color: #333;
}

.inquiry-btn {
    margin-top: 1.5rem;
}

/* Make text legible on sections with decorative backgrounds */
/* Override all text in decorative sections to light color */
.product-section[style*="background-image"] {
    color: var(--light-color) !important;
}

/* Ensure nested elements adopt light colour */
.product-section[style*="background-image"] * {
    color: var(--light-color) !important;
}

/* Contact page */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    gap: 2rem;
    padding: 2rem 0;
}

/* Map container on contact page */
.map-container {
    margin-top: 2rem;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.contact-info,
.contact-form {
    flex: 1 1 45%;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-info p {
    margin-bottom: 0.75rem;
    color: #333;
}

.contact-info strong {
    display: inline-block;
    width: 140px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
    color: #333;
}

/* About page layout */
.about-overview {
    padding: 3rem 0;
    /* Light background to contrast the dark hero */
    background-color: var(--muted-color);
}
.overview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}
.overview-item {
    flex: 1;
    min-width: 280px;
}
.about-list {
    margin-left: 1.5rem;
    padding-left: 1rem;
    line-height: 1.6;
    list-style-type: disc;
}
/* History section */
.history-section {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 4rem 0;
    text-align: center;
}

.history-section h2 {
    margin-bottom: 2rem;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    position: relative;
    padding: 0 2rem;
}

.timeline::before,
.timeline::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #444;
}

.timeline::before {
    left: 0;
}

.timeline::after {
    right: 0;
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid #fff;
}

.timeline-year {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    color: #ddd;
    line-height: 1.5;
}

footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 1rem 0;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.modal-content label {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
    color: #333;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.25rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-buttons {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-secondary {
    background: #ccc;
    color: #000;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-secondary:hover {
    background: #aaa;
}

.dimensions-text {
    font-weight: bold;
    margin-top: 0.5rem;
    color: #333;
}

.product-summary {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
}

.section-nav {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
  padding: 1rem 0;
  text-align: center;
  position: sticky;
  top: 70px;
  z-index: 999;
}

.section-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.section-nav a {
  text-decoration: none;
  font-weight: bold;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.section-nav a:hover {
  background-color: var(--primary-color);
  color: white;
}

html {
  scroll-behavior: smooth;
}
