/* Products Page Specific Styles */

/* Search Input */
.search-wrapper {
  width: 100%;
  max-width: 300px;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--accent-gold, #d4a017);
  font-size: 0.9rem;
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
  transition: all 0.3s;
  background: #fff;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-gold, #d4a017);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.2);
}

.search-input::placeholder {
  color: #999;
}

.no-results {
  text-align: center;
  padding: 3rem 2rem;
  color: #666;
  font-size: 1rem;
  display: none;
}

.no-results.visible {
  display: block;
}

/* Products Hero */
.products-hero {
  background: var(--primary-color, #164670);
  color: #fff;
  padding: 6rem 2rem;
  text-align: center;
}

.products-hero-content h1 {
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: #fff;
}

.products-hero-content p {
  font-size: 1.1rem;
  opacity: 0.8;
  font-weight: 300;
  letter-spacing: 1px;
}

/* Category Filter */
.category-filter {
  background: #fff;
  padding: 2rem;
  padding-top: 6rem;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 60px;
  z-index: 100;
  max-width: 100%;
}

.filter-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 2px solid var(--accent-gold, #d4a017);
  color: var(--primary-color, #164670);
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-gold, #d4a017);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 160, 23, 0.3);
}

/* Product Sections */
.product-section {
  padding: 5rem 2rem;
  max-width: 100%;
}

.product-section > h2,
.product-section > .section-subtitle,
.product-section > .products-grid {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.product-section.alt-bg {
  background: #f0f4f8;
}

.product-section h2 {
  text-align: left;
  margin-bottom: 0.5rem;
  color: var(--primary-color, #164670);
}

.product-section .section-subtitle {
  text-align: left;
  margin-bottom: 2.5rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Product Card */
.product-card {
  background: #fff;
  border: 1px solid #eee;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold, #d4a017), var(--primary-color, #164670));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(22, 70, 112, 0.2);
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.product-card.hidden {
  display: none;
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(22, 70, 112, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}

.product-overlay .quick-inquiry {
  background: #fff;
  color: var(--primary-color, #164670);
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
  transition: all 0.3s;
}

.product-overlay .quick-inquiry:hover {
  background: var(--primary-color, #164670);
  color: #fff;
}

.product-image {
  aspect-ratio: 1;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Placeholder for missing images */
.product-image img[src$=".jpg"]:not([src^="data"]) {
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.product-info {
  padding: 1.25rem;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color, #164670);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-gold, #d4a017);
}

.product-price span {
  font-size: 0.8rem;
  font-weight: 400;
  color: #888;
}

/* Products CTA Section */
.products-cta {
  background: linear-gradient(135deg, var(--primary-color, #164670) 0%, var(--primary-dark, #0e2d4a) 100%);
  color: #fff;
  text-align: center;
  padding: 5rem 2rem;
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

.products-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(212, 160, 23, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(212, 160, 23, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.cta-content h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-content p {
  opacity: 0.8;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  margin-top: 0;
}

.cta-buttons .btn-primary {
  background: var(--accent-gold, #d4a017);
  color: #fff;
  border-color: var(--accent-gold, #d4a017);
}

.cta-buttons .btn-primary:hover {
  background: var(--accent-gold-light, #e8b82a);
  border-color: var(--accent-gold-light, #e8b82a);
  color: #fff;
}

.cta-buttons .btn-outline {
  border-color: #fff;
  color: #fff;
}

.cta-buttons .btn-outline:hover {
  background: #fff;
  color: var(--primary-color, #164670);
}

/* Contact Info Section */
.contact-info-section {
  background: #fff;
  padding: 4rem 2rem;
  max-width: 100%;
}

.contact-info-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.contact-info-item {
  text-align: center;
  padding: 1.5rem;
}

.contact-info-item h3 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary-color, #164670);
  margin-bottom: 0.75rem;
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
}

.contact-info-item p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-info-item a {
  color: var(--primary-color, #164670);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-info-item a:hover {
  color: #1e5a8f;
}

/* Active nav link */
nav a.active {
  color: var(--primary-color, #164670);
  border-bottom: 2px solid var(--primary-color, #164670);
}

/* Responsive */
@media (max-width: 768px) {
  /* Search on Mobile */
  .search-wrapper {
    max-width: 100%;
    margin-bottom: 0.75rem;
  }

  .search-input {
    padding: 0.6rem 0.75rem;
    font-size: 16px; /* Prevents iOS zoom */
    border-radius: 4px;
  }

  /* Product overlay on mobile - tap to show */
  .product-overlay {
    opacity: 0;
    pointer-events: none;
  }

  .product-card:active .product-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .product-overlay .quick-inquiry {
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
  }

  /* Products Hero */
  .products-hero {
    padding: 3rem 1.25rem;
  }

  .products-hero-content h1 {
    font-size: 1.6rem;
    letter-spacing: 1.5px;
    line-height: 1.3;
  }

  .products-hero-content p {
    font-size: 0.95rem;
  }

  /* Category Filter - Scrollable on mobile */
  .category-filter {
    padding: 1rem 0.75rem;
    padding-top: 4.5rem;
    top: 52px;
  }

  .filter-container {
    gap: 0.5rem;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0.5rem 0.5rem;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .filter-container::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    padding: 0.6rem 1rem;
    font-size: 0.72rem;
    border-radius: 4px;
    flex-shrink: 0;
    white-space: nowrap;
    transition: all 0.2s ease;
  }

  .filter-btn:active {
    transform: scale(0.95);
  }

  /* Product Sections */
  .product-section {
    padding: 2.5rem 1.25rem;
  }

  .product-section h2 {
    font-size: 1.3rem;
    text-align: center;
  }

  .product-section .section-subtitle {
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  /* Products Grid - 2 columns on mobile */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Product Cards */
  .product-card {
    border-radius: 8px;
    overflow: hidden;
  }

  .product-card:active {
    transform: scale(0.98);
  }

  .product-image {
    padding: 0.75rem;
    aspect-ratio: 1;
  }

  .product-info {
    padding: 0.85rem 0.75rem;
    min-height: 65px;
  }

  .product-info h3 {
    font-size: 0.75rem;
    line-height: 1.25;
    margin-bottom: 0.35rem;
  }

  .product-price {
    font-size: 0.9rem;
  }

  .product-price span {
    font-size: 0.7rem;
  }

  /* CTA Section */
  .products-cta {
    padding: 2.5rem 1.25rem;
  }

  .cta-content h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
  }

  .cta-content p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
    padding: 0.9rem 1.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
  }

  /* Contact Info Section */
  .contact-info-section {
    padding: 3rem 1.25rem;
  }

  .contact-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .contact-info-item {
    padding: 1rem 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
  }

  .contact-info-item h3 {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .contact-info-item p {
    font-size: 0.85rem;
    line-height: 1.5;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .products-hero-content h1 {
    font-size: 1.4rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .product-info h3 {
    font-size: 0.7rem;
  }

  .product-price {
    font-size: 0.85rem;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
  }

  .contact-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Extra small phones */
@media (max-width: 360px) {
  .products-grid {
    gap: 0.5rem;
  }

  .product-image {
    padding: 0.5rem;
  }

  .product-info {
    padding: 0.7rem 0.5rem;
  }

  .product-info h3 {
    font-size: 0.65rem;
  }

  .filter-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.68rem;
  }
}

/* Image Lightbox Styles */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.image-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.image-lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: -10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: transform 0.2s, color 0.2s;
  z-index: 2;
}

.lightbox-close:hover {
  transform: scale(1.1);
  color: var(--accent-gold, #d4a017);
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: #fff;
}

.lightbox-caption {
  color: #fff;
  margin-top: 1rem;
  font-size: 1.1rem;
  text-align: center;
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Mobile lightbox */
@media (max-width: 768px) {
  .lightbox-content {
    max-width: 95vw;
    max-height: 85vh;
  }

  .lightbox-close {
    top: -40px;
    right: 0;
    font-size: 2.5rem;
  }

  .lightbox-caption {
    font-size: 0.9rem;
    padding: 0 1rem;
  }
}

/* Product image zoom cursor */
.product-image img {
  cursor: zoom-in;
}
