/* Global Reset and Base Styles */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #f0f2f5;
  background: #000000; /* Dark background */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal overflow */
}

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

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

/* Helpers */
.container { width: min(1120px, 92%); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: #a3aab7; }

/* Section visibility and transitions */
.section { display: none; opacity: 0; transform: translateY(4px); transition: opacity .25s ease, transform .25s ease; padding-block: 2rem 3rem; }
.section.active { display: block; opacity: 1; transform: translateY(0); }
#home.section.active { height: 100vh; padding-block: 0; }

/* Navigation Bar */
.navbar {
  justify-content: space-between;
  position: sticky; top: 0; z-index: 1000;
  background: rgba(12, 15, 20, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
header:has(+ main #products.active) .navbar {
  position: relative;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 50px 0.9rem 0; margin-left: 30px; }
.nav-inner nav {
  margin-left: 0;
}
.logo { font-weight: 800; letter-spacing: 0.3px; font-size: 1.5rem; }

.contact-info {
  font-size: 1.1rem !important;
  color: #cbd5e1;
  margin-top: 4px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 5rem;
  padding: 0;
  margin: 0 0px 0 0;
  justify-content: flex-end;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: #c8d0e0;
  transition: color 0.2s ease, background-color 0.2s ease;
  font-size: 2rem;
}
.nav-link:hover, .nav-link:focus-visible { background: rgba(16, 233, 12, 0.74); color: #ffffff; }
.nav-link.active { color: #ffffff; }

/* Hero Section */
.hero-grid { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); height: 100%; }
.hero-left { flex: 1 1 50%; padding-left: 1.5rem; }
.hero-grid img {
  height: auto;
  width: 40%;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
  object-position: center top;
  max-width: 100%;
  margin-right: 20px;
  background: transparent;
}

/* Typography */
.hero h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); margin-left:40px; line-height: 1.15; margin: 0 0 0.75rem; color: #ffffff; }
.subtitle { font-size: clamp(1rem, 1vw + 0.75rem, 1.25rem); color: #cbd5e1; margin: 0 0 1.5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.8rem 1.2rem; border-radius: 10px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease; }
.btn-accent { background: linear-gradient(135deg, #16a34a, #22c55e); color: #0a0f14; box-shadow: 0 6px 18px rgba(34, 197, 94, 0.25); }
.btn-accent:hover, .btn-accent:focus-visible { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(34, 197, 94, 0.35); }

/* Floating Action Button */
.fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 1200;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #0b0f14;
  border: none;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(34,197,94,0.35);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, filter .2s ease;
  /* Always visible on products page */
  display: none;
}
.fab.show { opacity: 1; transform: translateY(0); pointer-events: auto; display: block; }
.fab.show:hover { transform: scale(1.1); }
.fab:disabled { filter: grayscale(0.6) brightness(0.8); cursor: not-allowed; }

/* Search */
.search-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(12, 15, 20, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding: 1rem 0; margin-bottom: 0; }
.search { width: 100%; padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid #324155; background: #0f1520; color: #e6ebf2; outline: none; font-size: 1rem; }
.search::placeholder { color: #8fa0b3; }
.search:focus { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }

/* Products grid */
.products { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.25rem; padding: 4rem 0 2rem; }
#products { padding-left: 30px; padding-right: 30px; }
@media (max-width: 1100px) { .products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .products { grid-template-columns: 1fr; } }

/* Card */
.card { background: #0f1520; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(2, 6, 23, 0.25); }
/* Replace image with a name placeholder area */
.card-thumb { width: 100%; height: 80px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.03); color: #e6ebf2; font-weight: 800; font-size: 1.05rem; }
.card-body { padding: 0.9rem 1rem 1rem; display: grid; gap: 0.75rem; }
.title { margin: 0; font-size: 1.15rem; color: #ffffff; font-weight: 800; }
.controls { display: flex; flex-direction: column; gap: 0.5rem; align-items: stretch; }
.qty { width: 90px; height: 2.8rem; padding: 0.6rem; border-radius: 10px; border: 1px solid #324155; background: #0c1118; color: #e6ebf2; }
.qty:focus { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); outline: none; }
.btn.add { height: 2.8rem; padding: 0.6rem 0.8rem; border-radius: 10px; border: 1px solid transparent; font-weight: 600; cursor: pointer; background: linear-gradient(135deg, #16a34a, #22c55e); color: #0b0f14; transition: transform 0.2s ease; }
.btn.add:hover { filter: brightness(0.98); transform: scale(1.05); }
.card-price { color: #9ed9a9; font-weight: 700; }

/* Cart */
#cart { padding-left: 30px; padding-right: 30px; }
.cart-table-wrap { overflow-x: auto; margin-top: 1rem; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; }
.cart-table { width: 100%; border-collapse: collapse; min-width: 640px; background: #0f1520; }
.cart-table th, .cart-table td { padding: 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.06); text-align: left; }
.cart-table th { color: #cbd5e1; font-weight: 600; background: rgba(255,255,255,0.03); }
.cart-qty { width: 80px; padding: 0.5rem; border-radius: 10px; border: 1px solid #324155; background: #0c1118; color: #e6ebf2; }
.remove-btn { background: transparent; color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); padding: 0.45rem 0.7rem; border-radius: 8px; cursor: pointer; }
.remove-btn:hover { background: rgba(239, 68, 68, 0.08); }

.cart-summary { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; }
.summary-row { font-size: 1.1rem; display: flex; gap: 1rem; align-items: center; }
.summary-actions { display: flex; gap: 0.75rem; }
.hide-sm { display: table-cell; }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* Discount Section */
.discount-section {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  max-width: 600px;
}

.discount-section h3 {
  margin: 0 0 1rem 0;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
}

.discount-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.discount-type {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.discount-type label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.discount-type label:hover {
  color: #ffffff;
}

.discount-type input[type="radio"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: #22c55e;
}

.discount-value {
  display: flex;
  gap: 0.875rem;
  align-items: center;
}

#discountValue {
  flex: 1;
  min-width: 180px;
  height: 3.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #324155;
  background: #0c1118;
  color: #e6ebf2;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#discountValue:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

#discountValue::placeholder {
  color: #8fa0b3;
  font-size: 0.95rem;
  font-weight: 400;
}

.btn-secondary {
  background: linear-gradient(135deg, #64748b, #475569);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.25);
  transition: all 0.2s ease;
  min-width: 120px;
  height: 3.5rem;
  padding: 0.75rem 1.5rem;
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
}

/* Responsive tweaks */
@media (max-width: 820px) {
  .hero-grid { flex-direction: column; }
  .hero-right { order: -1; }
  .nav-links { gap: 0.5rem;display: grid; }
}

@media (max-width: 768px) {
  .hero-grid img {
    width: 100% !important;
    margin-right: 0 !important;
  }
}

/* Accessibility */
:focus-visible { outline: 2px solid #22c55e; outline-offset: 2px; }

/* Footer */
footer {
  text-align: center;
  padding: 0.5rem;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0rem;
  box-shadow: 0 -4px 12px rgba(34, 197, 94, 0.3);
  border-top: 2px solid #16a34a;
  position: relative;
  z-index: 10;
}

/* Print styles */
.print-only { display: none; }
@media print {
  body { width: 58mm; background: white; color: black; font-family: Inter, Arial, sans-serif; }
  .navbar, .section:not(#cart), .summary-actions, .search-wrap { display: none !important; }
  #cart { display: block; opacity: 1; transform: none; }
  #printArea { display: block; }

  /* Hide the cart table to avoid duplication */
  .cart-table-wrap { display: none !important; }

  /* Compress spacing and remove overflow for table */
  .cart-table { width: 100%; background: white; color: black; table-layout: fixed; }
  .cart-table th, .cart-table td { border-color: #e5e7eb; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cart-table thead th { font-size: 12px; color: #374151; }

  /* Column widths for on-screen table if printed directly */
  .cart-table .cart-thumb { width: 60px; height: auto; }

  /* Remove transitions, shadows, and effects for faster rendering */
  * {
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    animation: none !important;
  }

  /* Remove shadows and borders from cards and buttons */
  .card, .btn, .fab {
    box-shadow: none !important;
    border: none !important;
  }

  /* Compress images to small thumbnails */
  #printArea img.thumb {
    width: 60px !important;
    height: auto !important;
    object-fit: cover !important;
  }

  @page {
    size: 58mm auto;
    margin: 2mm;
    /* Hide browser's default URL display at bottom of page */
    @bottom-center { content: none; }
    @bottom-left { content: none; }
    @bottom-right { content: none; }
  }
}



