:root {
  --primary-color: #d7d732;
  /* Strong Yellow */
  --accent-color: #dede7a;
  /* Light Yellow */
  --bg-navy: #212d45;
  /* Navy Blue Footer/Header bg */
  --text-dark: #3a3a38;
  /* Dark Gray for titles */
  --text-body: #4b4f58;
  /* Body text color */
  --bg-light: #F5F5F5;
  /* Light Gray background */
  --white: #FFFFFF;
  --black: #000101;
  --font-main: 'Open Sans', sans-serif;
  --font-headings: 'Playfair Display', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-body);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--text-dark);
}

a {
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: inherit;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

/* Header Styles */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.5s ease;
}

header.subpage {
  position: relative;
  background-color: var(--bg-navy);
}

.top-bar {
  padding: 20px 0;
  color: var(--white);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contacts p {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-bar {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  border-bottom: 3px solid var(--primary-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

header.subpage .nav-bar {
  background-color: var(--white);
}

.nav-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 40px;
}

nav ul li a {
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  font-size: 14px;
  position: relative;
  padding: 5px 0;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--primary-color);
}

/* Hamburger Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  z-index: 1100;
  position: relative;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 3px;
  transition: all 0.3s ease;
  position: relative;
}

.hamburger span:nth-child(1) {
  margin-bottom: 5px;
}

.hamburger span:nth-child(3) {
  margin-top: 5px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
}

.nav-overlay.active {
  display: block;
}

/* Page Headers */
.page-header {
  background-color: var(--bg-navy);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(215, 215, 50, 0.1) 0%, transparent 70%);
}

.page-header h1 {
  color: var(--white);
  font-size: 3rem;
  position: relative;
  z-index: 1;
}

.page-header p {
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  color: var(--white);
  text-align: center;
  padding-top: 100px;
  position: relative;
  background-image: url('../images/heavy-machinery.jpg');
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(33, 45, 69, 0.8) 0%, rgba(33, 45, 69, 0.4) 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h3 {
  color: var(--accent-color);
  margin-bottom: 20px;
  font-size: 1.5rem;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 30px;
  color: var(--white);
  line-height: 1.1;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.4rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Section Common */
.section-padding {
  padding: 100px 0;
}

/* Stats Section */
.stats {
  padding: 100px 0;
  background-color: var(--white);
  text-align: center;
}

.stats h3 {
  font-size: 2.5rem;
  margin-bottom: 60px;
  position: relative;
}

.stats h3::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.stat-item {
  padding: 20px;
}

.stat-item h2 {
  font-size: 4rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  font-family: var(--font-main);
  font-weight: 800;
}

.stat-item p {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Categories Section */
.categories {
  padding: 100px 0;
  background-color: var(--bg-light);
  text-align: center;
}

.categories h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.categories h2 {
  font-size: 3rem;
  margin-bottom: 60px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.category-item {
  background-color: var(--white);
  padding: 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
}

.category-item:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.category-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.category-item:hover img {
  transform: scale(1.1);
}

.category-item-content {
  padding: 30px;
}

.category-item h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

/* CTA & Algorithm */
.cta {
  padding: 120px 0;
  text-align: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

.cta>* {
  position: relative;
  z-index: 2;
}

.btn {
  display: inline-block;
  padding: 18px 50px;
  background-color: var(--primary-color);
  color: var(--bg-navy);
  border-radius: 50px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 20px rgba(215, 215, 50, 0.3);
}

.btn:hover {
  background-color: var(--white);
  color: var(--bg-navy);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.algorithm ul li {
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 25px;
  border-radius: 10px;
  border-left: 5px solid var(--primary-color);
}

/* Card Utility */
.card {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  border-left: 8px solid var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  height: 100%;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Footer Section */
footer {
  background-color: var(--bg-navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 100px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

footer h3 {
  color: var(--white);
  margin-bottom: 30px;
  font-size: 1.6rem;
}

footer .footer-item ul {
  list-style: none;
}

footer .footer-item ul li {
  margin-bottom: 12px;
}

footer .footer-item ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.copyright {
  text-align: center;
  padding-top: 50px;
  margin-top: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

/* Products Section */
.products {
  padding: 80px 0;
  background-color: #f9f9f9;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  border: 4px solid #f0f0f0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 15px;
  height: 48px;
  display: flex;
  align-items: center;
}

.product-price {
  font-size: 2rem;
  color: #FF7F32;
  font-weight: 800;
  margin-bottom: 15px;
}

.btn-order {
  background-color: #FF7F32;
  color: #fff;
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.3s;
  text-decoration: none;
}

.btn-order span {
  display: inline-block;
  width: 30px;
  height: 24px;
  background: white;
  mask: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTMgMThoMTh2LTNIM3Yzem0wLTVoMTh2LTNIM3Yzem0wLTdoMThWNHgzdjN6Ii8+PC9zdmc+") no-repeat center;
  -webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTMgMThoMTh2LTNIM3Yzem0wLTVoMTh2LTNIM3Yzem0wLTdoMThWNHgzdjN6Ii8+PC9zdmc+") no-repeat center;
  background-color: var(--white);
  transform: rotate(90deg);
}

.btn-order:hover {
  background-color: #e66e25;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.modal-content {
  background-color: #fff;
  position: relative;
  margin: 0 auto;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 30px;
  cursor: pointer;
  color: #aaa;
}

.modal-content h2 {
  margin-bottom: 25px;
  font-size: 1.8rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 25px;
  background: #f8f8f8;
  padding: 20px;
  border-radius: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.checkbox-item input {
  width: 20px;
  height: 20px;
}

.qty-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 25px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 30px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.btn-submit {
  width: 100%;
  background-color: #FF7F32;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover {
  background-color: #e66e25;
}

/* ========================================
   RESPONSIVE - Tablet (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .categories h2 {
    font-size: 2.2rem;
  }
}

/* ========================================
   RESPONSIVE - Small tablet (max-width: 900px)
   ======================================== */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   RESPONSIVE - Mobile (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {

  /* Hamburger visible */
  .hamburger {
    display: flex;
  }

  /* Nav bar layout */
  .nav-bar .container {
    justify-content: space-between;
  }

  /* Mobile nav */
  nav ul {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 80px 0 30px;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    transition: left 0.3s ease;
    overflow-y: auto;
  }

  nav ul.mobile-open {
    left: 0;
  }

  nav ul li {
    border-bottom: 1px solid #f0f0f0;
  }

  nav ul li a {
    display: block;
    padding: 16px 25px;
    font-size: 15px;
    color: var(--text-dark);
  }

  nav ul li a::after {
    display: none;
  }

  nav ul li a.active {
    background-color: var(--primary-color);
    color: var(--bg-navy);
  }

  nav ul li a:hover {
    background-color: #f5f5f5;
  }

  /* Top bar */
  .top-bar {
    padding: 12px 0;
  }

  .top-bar .container {
    flex-direction: row;
    gap: 10px;
    align-items: center;
  }

  .logo img {
    width: 90px !important;
    height: auto;
  }

  .contacts p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  /* Hero */
  .hero {
    min-height: 500px;
    height: auto;
    padding: 120px 0 60px;
    background-attachment: scroll;
  }

  .hero h3 {
    font-size: 1rem;
    letter-spacing: 2px;
  }

  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.25;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Page header */
  .page-header {
    padding: 50px 0;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  /* Stats */
  .stats {
    padding: 50px 0;
  }

  .stats h3 {
    font-size: 1.5rem;
    margin-bottom: 40px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .stat-item h2 {
    font-size: 2.2rem;
  }

  .stat-item p {
    font-size: 0.9rem;
  }

  /* Products */
  .products {
    padding: 40px 0;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 25px;
  }

  .product-card {
    padding: 8px;
    border-width: 2px;
  }

  .product-card h3 {
    font-size: 0.9rem;
    height: auto;
    min-height: 36px;
  }

  .product-price {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .btn-order {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  /* Categories */
  .categories {
    padding: 50px 0;
  }

  .categories h4 {
    font-size: 0.85rem;
  }

  .categories h2 {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-item img {
    height: 200px;
  }

  .category-item h3 {
    font-size: 1.4rem;
  }

  .category-item-content {
    padding: 20px;
  }

  /* CTA */
  .cta {
    padding: 60px 0;
  }

  .cta h2 {
    font-size: 1.5rem !important;
  }

  .cta h4 {
    font-size: 1rem;
  }

  .btn {
    padding: 14px 30px;
    font-size: 0.9rem;
  }

  .algorithm ul {
    font-size: 1rem !important;
  }

  /* Grid 2 */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .card {
    padding: 25px;
  }

  /* Section padding */
  .section-padding {
    padding: 50px 0;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  footer {
    padding: 50px 0 30px;
  }

  footer h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }

  .copyright {
    padding-top: 25px;
    margin-top: 25px;
  }

  /* Contact-info (contacts page) */
  .contact-info {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  /* Modal */
  .modal-content {
    margin: 15px auto !important;
    padding: 15px !important;
    width: 92% !important;
    max-width: none !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  .modal-content h2 {
    font-size: 1.1rem !important;
    padding-right: 25px;
    margin-bottom: 12px !important;
    line-height: 1.2 !important;
  }

  .close-modal {
    right: 12px;
    top: 8px;
    font-size: 26px;
  }

  .form-row {
    display: block !important;
    margin-bottom: 0 !important;
  }

  .form-row>div {
    margin-bottom: 10px !important;
  }

  .form-row label,
  .modal-content label {
    font-size: 0.85rem !important;
    margin-bottom: 4px !important;
    display: block !important;
    font-weight: 700 !important;
  }

  .modal-content input[type="text"] {
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px !important;
    font-size: 16px !important;
    /* Force 16px to prevent zoom on mobile */
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    display: block !important;
  }

  .qty-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
  }

  .qty-controls {
    gap: 10px;
  }

  .qty-btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .total-row {
    font-size: 1rem;
    margin-bottom: 15px;
    padding-top: 10px;
  }

  .btn-submit {
    padding: 12px;
    font-size: 0.95rem;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}

/* ========================================
   RESPONSIVE - Small Mobile (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 100px 0 40px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero h3 {
    font-size: 0.85rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .page-header {
    padding: 35px 0;
  }

  .stats h3 {
    font-size: 1.25rem;
  }

  .stat-item h2 {
    font-size: 1.8rem;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .product-card h3 {
    font-size: 0.8rem;
  }

  .product-price {
    font-size: 1.2rem;
  }

  .btn-order {
    padding: 7px 12px;
    font-size: 0.75rem;
    gap: 5px;
  }

  .btn-order span {
    width: 20px;
    height: 16px;
  }

  .categories h2 {
    font-size: 1.3rem;
  }

  footer p,
  footer li {
    font-size: 0.9rem;
  }

  /* Modal - extra compact for small phones */
  .modal-content {
    padding: 10px !important;
    width: 92% !important;
  }

  .modal-content h2 {
    font-size: 1rem !important;
    margin-bottom: 8px !important;
  }

  .modal-content input[type="text"] {
    padding: 6px !important;
    font-size: 14px !important;
  }

  .qty-row {
    padding: 6px !important;
    margin-bottom: 8px !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
  }

  .qty-controls {
    gap: 8px !important;
  }

  .qty-btn {
    width: 28px !important;
    height: 28px !important;
  }

  .total-row {
    font-size: 0.9rem !important;
    margin-bottom: 10px !important;
    padding-top: 6px !important;
  }

  .btn-submit {
    padding: 10px !important;
    font-size: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}