/* Global Reset & Variables */
:root {
  /* Industrial Theme Colors */
  --primary: #F97316;
  /* Safety Orange - Highlight/Action */
  --primary-dark: #ea580c;
  --primary-light: #fdba74;
  --secondary: #1A1A1A;
  /* Dark Slate - Footer/Headings */
  --secondary-light: #333333;
  --text-main: #1F2937;
  --text-light: #6B7280;
  --white: #FFFFFF;
  --off-white: #F9FAFB;
  --border: #E5E7EB;
  --price-green: #166534;

  /* Spacing & Layout */
  --container-width: 1400px;
  --header-height: 80px;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Roboto', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--white);
  line-height: 1.6;
}

/* Theme Variations */
body.theme-laser {
  --primary: #EF4444;
  /* Red for Laser/Heat */
  --primary-dark: #B91C1C;
  --primary-light: #FCA5A5;
}

body.theme-cnc {
  --primary: #0EA5E9;
  /* Sky Blue for Precision/Metal */
  --primary-dark: #0284C7;
  --primary-light: #7DD3FC;
}

body.theme-eco {
  --primary: #10B981;
  /* Emerald for Eco/Green */
  --primary-dark: #059669;
  --primary-light: #6EE7B7;
}

body.theme-corp {
  --primary: #F97316;
  /* Default Orange for Brand */
  --primary-dark: #EA580C;
  --primary-light: #FDBA74;
}

body.theme-dark {
  --primary: #6366F1;
  /* Indigo for Corporate/Info */
  --primary-dark: #4F46E5;
  --primary-light: #A5B4FC;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.active-link {
  color: var(--primary);
}

/* --- Header --- */
header {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--secondary);
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 30px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary);
  transition: color 0.3s;
}

.header-icons {
  display: flex;
  gap: 20px;
  align-items: center;
}

.cart-icon-wrapper {
  position: relative;
  cursor: pointer;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Hero Section --- */
.hero {
  height: 600px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?q=80&w=2070&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.btn-cta {
  background: var(--primary);
  color: white;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  transition: transform 0.2s, background 0.3s;
}

.btn-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* --- Categories Strip --- */
.categories-strip {
  padding: 40px 0;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.cat-list {
  display: flex;
  gap: 40px;
  justify-content: center;
  min-width: max-content;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.cat-item:hover {
  opacity: 1;
}

.cat-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.cat-name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
}

/* --- Product Cards --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  /* Softer border */
  background: white;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  /* Rounded corners */
  overflow: hidden;
  /* Contain children */
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

.p-img-container {
  height: 250px;
  width: 100%;
  background: #f8f9fa;
  /* Lighter gray */
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s;
}

.product-card:hover .p-img-container {
  transform: scale(1.02);
}

.p-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  /* Better blending with background */
}

.p-details {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.p-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--secondary);
  line-height: 1.4;
}

.p-price {
  color: var(--primary);
  /* Primary color for price looks better */
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.p-buttons {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-enquiry {
  background: transparent;
  color: var(--secondary);
  text-align: center;
  padding: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  border: 2px solid var(--secondary);
  border-radius: 6px;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-enquiry:hover {
  background: var(--secondary);
  color: white;
}

.btn-cart {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  border: none;
  width: 100%;
  border-radius: 6px;
  transition: background 0.3s;
  cursor: pointer;
}

.btn-cart:hover {
  background: var(--primary-dark);
}

/* --- Company Layout --- */
.company-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.info-item {
  display: flex;
  gap: 15px;
}

.info-icon {
  color: var(--primary);
  font-size: 2rem;
}

/* --- Cart Sidebar --- */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 200;
  transition: right 0.4s ease;
  display: flex;
  flex-direction: column;
}

.cart-open {
  right: 0;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: 1px solid var(--border);
}

.cart-footer {
  padding: 20px;
  background: var(--off-white);
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.close-cart {
  cursor: pointer;
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .company-info {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  /* Mobile menu simplified */
  .cart-sidebar {
    width: 100%;
  }
}

/* --- new Footer Styles --- */
.main-footer {
  background-color: black;
  color: white;
  padding-top: 60px;
  margin-top: 60px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 60px;
}

.footer-col h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 25px;
  font-weight: 700;
}

.footer-links li,
.contact-list li {
  margin-bottom: 15px;
}

.footer-links a {
  opacity: 0.8;
  transition: opacity 0.3s, color 0.3s;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary);
}

.contact-list li {
  display: flex;
  gap: 15px;
  opacity: 0.9;
  align-items: flex-start;
}

.contact-list i {
  margin-top: 4px;
  /* Align icon with first line of text */
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px 0;
  text-align: center;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-icons a {
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s;
}

.social-icons a:hover {
  background: var(--primary);
}

.bottom-links {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

.bottom-links a:hover {
  color: white;
}

.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: white;
  color: black;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 90;
  transition: transform 0.3s;
}

.scroll-top:hover {
  transform: translateY(-5px);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Contact Page Styles --- */
.contact-hero {
  height: 300px;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1542744173-8e7e53415bb0?q=80&w=2070&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 60px;
}

.contact-hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-form-container {
  background: var(--off-white);
  padding: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--secondary);
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-body);
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-details h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--secondary);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.c-info-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.c-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.c-text h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.c-text p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr;
  }
}

/* --- Blog Page Styles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.blog-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-content {
  padding: 20px;
}

.blog-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
  display: block;
}

.blog-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--secondary);
  line-height: 1.4;
}

.blog-excerpt {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.6;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.read-more:hover {
  text-decoration: underline;
}


/* --- Enhanced Aesthetic Improvements --- */

/* Premium Buttons */
.btn-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
  border: none;
  color: white;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  transition: transform 0.3s, box-shadow 0.3s;
  letter-spacing: 0.5px;
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.6);
}

/* Feature Cards (for generated pages) */
.feature-card {
  background: white;
  padding: 35px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--primary-light));
  opacity: 0.7;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--secondary);
  font-family: var(--font-heading);
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.7;
  font-size: 1.05rem;
}

/* Page Hero (for generated pages) */
.page-hero {
  position: relative;
  padding: 120px 0;
  text-align: center;
  color: white;
  background-size: cover;
  background-position: center;
  margin-bottom: 60px;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  font-family: var(--font-heading);
  letter-spacing: -1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
}

/* Article/Blog Styling */
.blog-post-content {
  max-width: 900px;
  margin: 0 auto 100px;
  background: white;
  padding: 60px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  margin-top: -60px;
  /* Overlap with hero */
  position: relative;
  z-index: 10;
}

.blog-featured-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 50px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.blog-post-meta {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 15px;
  display: inline-block;
}

.article-body {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #374151;
}

.article-body h3 {
  margin: 40px 0 20px;
  font-size: 1.8rem;
  color: var(--secondary);
  font-family: var(--font-heading);
}

.article-body p {
  margin-bottom: 25px;
}

.article-body ul {
  background: #f8fafc;
  padding: 30px 30px 30px 50px;
  border-radius: 8px;
  margin-bottom: 30px;
  border-left: 4px solid var(--primary);
}

.article-body li {
  margin-bottom: 10px;
  position: relative;
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .page-hero h1 {
    font-size: 2.5rem;
  }

  .blog-post-content {
    padding: 30px;
    margin-top: -30px;
  }

  .blog-featured-image {
    height: 300px;
  }
}