/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hero Container */
.hero-container {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #CFEDFF;
  padding: 0;
}

.background-artifact {
  position: absolute;
  top: 200px;
  right: 0rem;
  width: 80%;
  height: 120%;
  background: url('/artifact.png') no-repeat center center;
  background-size: contain;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* Header */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4rem 4rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-image {
  width: 320px;
  height: auto;
}

.contact-info {
  text-align: right;
}

.tagline {
  font-size: 0.95rem;
  color: #0047AB;
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}

.phone {
  font-size: 1.75rem;
  color: #0047AB;
  font-weight: 900;
  text-decoration: none;
}

.phone:hover {
  text-decoration: underline;
}

/* Main Content */
.main {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 4rem 4rem;
}

.content {
  flex: 2;
  max-width: 700px;
}

.headline {
  font-size: 3rem;
  font-weight: 900;
  color: #0047AB;
  margin: 0 0 1rem 0;
  line-height: 1.1;
}

.subheadline {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0066CC;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.03rem;
}

.description {
  font-size: 1rem;
  color: #2c5282;
  line-height: 1.7;
  margin: 0 0 3rem 0;
}

/* Call to Action Buttons */
.ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  padding: 1rem 2rem;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Nunito', sans-serif;
}

.primary-button {
  background-color: #0066CC;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.primary-button:active {
  transform: translateY(0);
}

.secondary-button {
  background-color: white;
  color: #0066CC;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.secondary-button:active {
  transform: translateY(0);
}

.primary-button:hover, .secondary-button:hover  {
  transform: scale(105%);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Image Container */
.image-container {
  position: relative;
  display: flex;
  flex: 1;
  justify-content: flex-end;
}

.vending-machines {
  height: 620px;
  width: auto;
}

/* Tablet Responsive Styles */
@media (max-width: 1024px) {
  .main {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 2rem 3rem;
  }

  .header {
    padding: 2rem;
  }

  .content {
    max-width: 100%;
    text-align: left;
  }

  .image-container {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0.2rem;
  }

  .logo {
    width: 75%;
    flex-direction: column;
    text-align: center;
  }

  .logo-image {
    width: 100%;
    height: auto;
  }

  .contact-info {
    text-align: center;
  }

  .tagline {
    display: none;
  }

  .phone {
    font-size: 3rem;
  }

  .main {
    padding: 1.5rem;
    text-align: center;
  }

  .content {
    text-align: center;
  }

  .headline {
    font-size: 2.5rem;
    display: none;
  }

  .subheadline {
    font-size: 1.5rem;
    line-height: 1.75rem;
  }

  .description {
    font-size: 0.95rem;
  }

  .ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    padding: 1.25rem 2rem;
  }

  .background-artifact {
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
  }
}

/* ==================== PRODUCT CATALOG MODAL ==================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.catalog-modal {
  background: white;
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.catalog-header {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2.5rem;
  border-bottom: 2px solid #E5E7EB;
  flex-shrink: 0;
  gap: 1rem;
}

.catalog-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.catalog-header-bottom {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.catalog-header-left {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-shrink: 0;
}

.catalog-logo {
  height: 60px;
  width: auto;
}

.catalog-header h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0047AB;
  margin: 0;
  white-space: nowrap;
}

.catalog-header-right {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-shrink: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2.5rem;
  color: #6B7280;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-close:hover {
  background-color: #F3F4F6;
  color: #0047AB;
}

.catalog-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.catalog-tabs::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.tab-button {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  border: 2px solid #E5E7EB;
  background: white;
  color: #6B7280;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Nunito', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-button:hover {
  border-color: #0066CC;
  color: #0066CC;
  background-color: #EFF6FF;
}

.tab-button.active {
  background-color: #0066CC;
  color: white;
  border-color: #0066CC;
}

.search-container {
  position: relative;
  min-width: 250px;
}

.search-toggle {
  display: none;
}

.search-input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  font-size: 0.875rem;
  border: 2px solid #E5E7EB;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #0066CC;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.product-grid {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  align-content: start;
}

.product-card {
  background: white;
  border-bottom: 1px solid #E5E7EB;
  border-right: 1px solid #E5E7EB;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  padding: 0;
}

.product-card:nth-child(3n) {
  border-right: none;
}

.product-card:hover {
  background-color: #F9FAFB;
}

.product-image {
  display: none;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-placeholder {
  font-size: 4rem;
  font-weight: 900;
  color: #0066CC;
  opacity: 0.3;
}

.product-info {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.product-category {
  display: none;
}

.product-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1F2937;
  margin: 0;
  line-height: 1.4;
}

.product-description {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0047AB;
  margin-top: 0.5rem;
}

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  font-size: 1.25rem;
  color: #9CA3AF;
  font-weight: 600;
}

/* Scrollbar styling for product grid */
.product-grid::-webkit-scrollbar {
  width: 12px;
}

.product-grid::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 10px;
}

.product-grid::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 10px;
}

.product-grid::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Tablet responsive for modal */
@media (max-width: 1024px) {
  .catalog-header {
    padding: 1.5rem;
  }

  .catalog-header h2 {
    font-size: 1.35rem;
  }

  .catalog-logo {
    height: 50px;
  }

  .catalog-tabs {
    display: none;
  }

  .search-container {
    width: 100%;
    min-width: 0;
  }

  .catalog-header-bottom {
    width: 100%;
  }
}

/* Mobile responsive for modal */
@media (max-width: 768px) {
  .catalog-modal {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .catalog-header {
    padding: 1rem;
  }

  .catalog-logo {
    height: 35px;
  }

  .catalog-header h2 {
    font-size: 1.1rem;
  }

  .tab-button {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .search-toggle {
    display: none;
  }

  .modal-close {
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }

  .product-grid {
    padding: 1rem;
  }

  .product-info {
    padding: 0.875rem 1rem;
  }

  .product-name {
    font-size: 0.9375rem;
  }
}
