/* main.css */

/* Reset & Base */
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: #ffffff;
  color: #000000;
}

html {
  scroll-behavior: smooth;
}

/* Navbar logo */
.navbar-brand img {
  height: 60px;
  width: auto;
}

/* Navbar */
.navbar {
  background-color: #f15a24;
}

.navbar-brand img {
  height: 60px;
}

.nav-link,
.dropdown-item {
  color: black !important;
}

.dropdown-menu {
  background-color: #f9f9f9;
}

.dropdown-item:hover {
  background-color: #eaeaea;
}

.language-switcher {
  margin-left: auto;
  margin-right: 1rem;
}

/* Hero sections */
.hero-section {
  background: url('images/newbanner.PNG') center/cover no-repeat;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.hero-section h1 {
  font-size: 3rem;
}

.hero {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 5em 2em;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}

.hero p {
  font-size: 1.25rem;
  color: #ddd;
  max-width: 700px;
  margin: 0 auto;
}

.hero-section p {
  font-size: 1.25rem;
  color: #eee;
  max-width: 700px;
  margin: 0 auto;
}

.btn-primary {
  background-color: #000;
  border: none;
}

/* About & Contact content */
.container h2 {
  margin-top: 1em;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
  margin-bottom: 1em;
}

/* Team Section */
.team img {
  max-width: 200px;
}

/* Product grid */
.product-grid {
  padding: 2em 1em;
}

.product-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2em;
}

.product-card {
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  width: 200px;
  min-height: 280px;
  padding: 2em;
  text-align: center;
  border-radius: 8px;
  margin: 0.5em;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Footer */
.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 2em;
  padding: 2em;
  background-color: #cccccc;
  text-align: center;
}

.footer-column {
  flex: 1;
  min-width: 250px;
}

.footer-column h4 {
  margin-bottom: 0.5em;
}

.footer-column a {
  color: #000;
  text-decoration: none;
}

.footer-column form input,
.footer-column form button {
  width: 100%;
  padding: 0.5em;
  margin-top: 0.5em;
  font-size: 1em;
}

.footer-column form button {
  background-color: #f15a24;
  color: #fff;
  border: none;
  cursor: pointer;
}

.footer-social {
  margin-top: 1em;
  font-size: 0.9em;
}

.footer-social a {
  color: #000;
  text-decoration: none;
  margin: 0 0.5em;
}

/* Navbar link styles */
.navbar .nav-link {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-weight: 500;
  color: #000;
  transition: color 0.2s ease, border-bottom 0.2s ease;
}

.navbar-nav .nav-item {
  display: flex;
  align-items: center;
}

.navbar .nav-link:hover {
  color: #007bff;
  border-bottom: 2px solid #007bff;
}

.navbar .nav-link.active {
  color: #007bff;
  border-bottom: 2px solid #007bff;
}

/* Carousel controls: gas scooters */
#gasScooterCarousel .carousel-control-prev,
#gasScooterCarousel .carousel-control-next {
  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
  opacity: 1;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

#gasScooterCarousel .carousel-control-prev {
  left: -80px;
}

#gasScooterCarousel .carousel-control-next {
  right: -80px;
}

#gasScooterCarousel .carousel-control-prev-icon,
#gasScooterCarousel .carousel-control-next-icon {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#gasScooterCarousel .carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 16 16'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L6.707 7l4.647 4.646a.5.5 0 0 1-.708.708l-5-5a.5.5 0 0 1 0-.708l5-5a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

#gasScooterCarousel .carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 16 16'%3e%3cpath d='M4.646 1.646a.5.5 0 0 0 0 .708L9.293 7l-4.647 4.646a.5.5 0 0 0 .708.708l5-5a.5.5 0 0 0 0-.708l-5-5a.5.5 0 0 0-.708 0z'/%3e%3c/svg%3e");
}

/* Carousel controls: motorcycles */
#motorcyclesCarousel .carousel-control-prev,
#motorcyclesCarousel .carousel-control-next {
  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
  opacity: 1;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

#motorcyclesCarousel .carousel-control-prev {
  left: -80px;
}

#motorcyclesCarousel .carousel-control-next {
  right: -80px;
}

#motorcyclesCarousel .carousel-control-prev-icon,
#motorcyclesCarousel .carousel-control-next-icon {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#motorcyclesCarousel .carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 16 16'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L6.707 7l4.647 4.646a.5.5 0 0 1-.708.708l-5-5a.5.5 0 0 1 0-.708l5-5a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

#motorcyclesCarousel .carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 16 16'%3e%3cpath d='M4.646 1.646a.5.5 0 0 0 0 .708L9.293 7l-4.647 4.646a.5.5 0 0 0 .708.708l5-5a.5.5 0 0 0 0-.708l-5-5a.5.5 0 0 0-.708 0z'/%3e%3c/svg%3e");
}

/* Modal image styling */
#imageModal img {
  max-height: 85vh;
  object-fit: contain;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
}

/* Modal nav arrows */
#modalPrev,
#modalNext {
  font-size: 2rem;
  line-height: 1;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  opacity: 0.85;
}

#modalPrev:hover,
#modalNext:hover {
  opacity: 1;
}

/* =========================
   POS TOUCHSCREEN UI
========================= */

.pos-container {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: #0f172a;
  color: white;
  align-items: flex-start;
}

.pos-products {
  flex: 3;
  min-width: 0;
}

.pos-cart {
  flex: 1;
  min-width: 0;
  background: #1e293b;
  padding: 15px;
  border-radius: 10px;
}

/* CATEGORY BUTTONS */
.category-btn {
  background: #1e293b;
  border: none;
  padding: 15px 20px;
  margin: 5px;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  min-width: 120px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.category-btn:hover {
  background: #334155;
}

.category-btn.active {
  background: #f15a24;
  color: #000;
}

/* PRODUCT GRID */
#productGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
  min-height: 500px;
  align-content: start;
}

/* PRODUCT TILE */
.product-tile {
  background: #1e293b;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  will-change: transform;
  border: none;
  color: white;
}

.product-tile:hover {
  transform: scale(1.03);
  background: #334155;
}

.product-tile img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  image-rendering: auto;
}

.product-name {
  font-size: 14px;
  min-height: 48px;
  line-height: 1.25;
  display: block;
  writing-mode: horizontal-tb !important;
  transform: none !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  text-align: center;
}

.product-price {
  font-size: 18px;
  font-weight: bold;
  color: #22c55e;
  writing-mode: horizontal-tb !important;
  transform: none !important;
  white-space: nowrap !important;
  text-align: center;
}

.stock-text,
.stock-in,
.stock-low,
.stock-out {
  writing-mode: horizontal-tb !important;
  transform: none !important;
  white-space: nowrap !important;
  text-align: center;
}

.stock-in {
  color: #22c55e;
  font-weight: 700;
}

.stock-low {
  color: #facc15;
  font-weight: 700;
}

.stock-out {
  color: #ef4444;
  font-weight: 700;
}

/* OUT OF STOCK BADGE */
.out {
  position: absolute;
  top: 8px;
  right: 8px;
  background: red;
  color: white;
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 5px;
}

/* CART */
.cart-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.cart-item-left {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  line-height: 1.25;
  margin-bottom: 6px;
}

.cart-item-price {
  white-space: nowrap;
  font-weight: 700;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.qty-btn {
  border: none;
  background: #0f172a;
  color: #fff;
  border-radius: 6px;
  padding: 2px 10px;
  margin: 0 4px;
}

#total {
  font-size: 24px;
  font-weight: bold;
  margin-top: 10px;
}

/* CHECKOUT BUTTONS */
.pos-cart button {
  width: 100%;
  padding: 12px;
  background: #f15a24;
  border: none;
  color: black;
  font-weight: bold;
  border-radius: 8px;
  margin-top: 10px;
}

#barcodeInput {
  position: sticky;
  top: 12px;
  z-index: 5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.2rem;
  }

  .contact-form {
    padding: 0 1em;
  }

  .footer-columns {
    flex-direction: column;
    gap: 1em;
  }

  .product-row {
    flex-direction: column;
    align-items: center;
  }

  .pos-container {
    flex-direction: column;
  }

  #productGrid {
  display: grid; /* ✅ REQUIRED */
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
  min-height: 500px;
  align-content: start;
}

  .product-tile {
    min-height: 240px;
  }
}