/* PRODUCTS PAGE SPECIFIC STYLES */

/* Prevent horizontal scroll */
html,
body {
  overflow-x: hidden;
  width: 100%;
}

/* PAGE HERO */
.page-hero {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 400px;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 80px;
}

.page-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 30% 50%,
      rgba(64, 142, 198, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(255, 199, 5, 0.1) 0%,
      transparent 50%
    );
  z-index: 1;
}

.page-hero-content {
  grid-column: 1 / -1;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

.page-breadcrumb {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  animation: fadeInUp 1s ease;
}

.page-breadcrumb a {
  color: var(--color-highlight);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-breadcrumb a:hover {
  color: #ffffff;
}

/* PRODUCTS SECTION */
.products-section {
  padding: 100px 0;
  background: #ffffff;
  overflow: hidden;
}

.products-section .container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 30px;
  width: 100%;
  max-width: 100%;
}

/* FILTER BAR */
.filter-bar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-bottom: 50px;
  padding: 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
}

.filter-left {
  flex: 1;
  min-width: 250px;
}

.filter-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.products-count {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-muted);
  margin: 0;
}

.products-count span {
  font-weight: 600;
  color: var(--color-accent);
}

.filter-right {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.filter-select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 16px;
  border: 2px solid rgba(30, 39, 97, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(64, 142, 198, 0.1);
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar input {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 40px 10px 16px;
  border: 2px solid rgba(30, 39, 97, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text);
  transition: all 0.3s ease;
  min-width: 250px;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(64, 142, 198, 0.1);
}

.search-bar svg {
  position: absolute;
  right: 12px;
  stroke: var(--color-muted);
  pointer-events: none;
}

/* PRODUCTS GRID */
.products-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.product-item {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
}

.product-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 aspect ratio */
  overflow: hidden;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

.product-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.product-image-wrapper img.loaded {
  opacity: 1;
}

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

/* Multiple Images Badge */
.images-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.images-badge svg {
  stroke: var(--color-accent);
}

.product-info {
  padding: 20px;
}

.product-category {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-primary);
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

/* NO RESULTS */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.no-results svg {
  stroke: var(--color-muted);
  opacity: 0.3;
  margin-bottom: 20px;
}

.no-results h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.no-results p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-muted);
  margin: 0;
}

/* PRODUCT MODAL */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
  background: var(--color-primary);
  transform: rotate(90deg);
}

.modal-close svg {
  stroke: var(--color-primary);
  transition: stroke 0.3s ease;
}

.modal-close:hover svg {
  stroke: #ffffff;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

/* MODAL GALLERY */
.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.main-image {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: 4/3;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumbnail-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 5px 0;
}

.thumbnail-strip::-webkit-scrollbar {
  height: 6px;
}

.thumbnail-strip::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 3px;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumbnail:hover {
  border-color: var(--color-accent);
  opacity: 0.8;
}

.thumbnail.active {
  border-color: var(--color-accent);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* MODAL INFO */
.modal-info {
  display: flex;
  flex-direction: column;
}

.modal-category {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--color-primary);
  margin-bottom: 20px;
  line-height: 1.3;
}

.modal-description {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 30px;
  flex: 1;
}

.modal-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  justify-content: center;
}

.modal-btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  flex: 1;
  min-width: 180px;
}

.modal-btn-primary:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(64, 142, 198, 0.3);
}

.modal-btn-secondary {
  background: #25D366;
  color: #ffffff;
  flex: 1;
  min-width: 180px;
}

.modal-btn-secondary:hover {
  background: #20BA5A;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.modal-btn svg {
  transition: transform 0.3s ease;
}

.modal-btn:hover svg {
  transform: translateX(3px);
}

/* RESPONSIVE DESIGN */

/* Large Tablets - 1200px and below */
@media (max-width: 1200px) {
  .page-title {
    font-size: 3rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }

  .modal-body {
    gap: 30px;
    padding: 30px;
  }
}

/* Tablets - 992px and below */
@media (max-width: 992px) {
  .page-hero {
    height: 45vh;
    min-height: 350px;
  }

  .page-title {
    font-size: 2.5rem;
  }

  .products-section {
    padding: 80px 0;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 25px;
  }

  .filter-left {
    text-align: center;
  }

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

  .filter-select,
  .search-bar input {
    width: 100%;
    min-width: auto;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 25px;
  }

  .modal-title {
    font-size: 1.8rem;
  }
}

/* Mobile Landscape - 768px and below */
@media (max-width: 768px) {
  .page-hero {
    height: 40vh;
    min-height: 280px;
    margin-top: 70px;
  }

  .page-title {
    font-size: 1.9rem;
    margin-bottom: 10px;
  }

  .page-breadcrumb {
    font-size: 0.85rem;
  }

  .products-section {
    padding: 70px 0;
  }

  .filter-bar {
    padding: 20px;
    margin-bottom: 35px;
  }

  .filter-title {
    font-size: 1.5rem;
  }

  .products-count {
    font-size: 0.9rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
  }

  .product-info {
    padding: 15px;
  }

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

  .modal-content {
    max-height: 95vh;
    border-radius: 16px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }

  .modal-title {
    font-size: 1.6rem;
  }

  .modal-description {
    font-size: 0.95rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-btn {
    width: 100%;
    min-width: auto;
  }
}

/* Mobile Portrait - 600px and below */
@media (max-width: 600px) {
  .page-hero {
    height: 35vh;
    min-height: 250px;
  }

  .page-title {
    font-size: 1.65rem;
  }

  .products-section {
    padding: 60px 0;
  }

  .filter-bar {
    padding: 18px;
    margin-bottom: 30px;
  }

  .filter-title {
    font-size: 1.35rem;
  }

  .products-count {
    font-size: 0.85rem;
  }

  .filter-group label {
    font-size: 0.9rem;
  }

  .filter-select,
  .search-bar input {
    font-size: 0.9rem;
    padding: 9px 14px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
  }

  .product-info {
    padding: 12px;
  }

  .product-category {
    font-size: 0.75rem;
  }

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

  .images-badge {
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  .modal-body {
    padding: 18px;
    gap: 20px;
  }

  .modal-category {
    font-size: 0.8rem;
  }

  .modal-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .modal-description {
    font-size: 0.9rem;
    margin-bottom: 25px;
  }

  .modal-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .thumbnail {
    width: 70px;
    height: 70px;
  }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
  .page-hero {
    height: 32vh;
    min-height: 230px;
  }

  .page-title {
    font-size: 1.45rem;
    margin-bottom: 8px;
  }

  .page-breadcrumb {
    font-size: 0.75rem;
  }

  .products-section {
    padding: 50px 0;
  }

  .filter-bar {
    padding: 16px;
    margin-bottom: 25px;
  }

  .filter-title {
    font-size: 1.2rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .product-info {
    padding: 10px;
  }

  .product-category {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }

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

  .images-badge {
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .modal-content {
    border-radius: 12px;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .modal-description {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .modal-btn {
    padding: 11px 20px;
    font-size: 0.9rem;
  }

  .thumbnail {
    width: 60px;
    height: 60px;
  }

  .no-results {
    padding: 60px 20px;
  }

  .no-results svg {
    width: 48px;
    height: 48px;
  }

  .no-results h3 {
    font-size: 1.4rem;
  }

  .no-results p {
    font-size: 0.9rem;
  }
}

/* Extra Small Mobile - 375px and below */
@media (max-width: 375px) {
  .page-hero {
    height: 30vh;
    min-height: 210px;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .products-section {
    padding: 45px 0;
  }

  .filter-title {
    font-size: 1.1rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .modal-title {
    font-size: 1.15rem;
  }

  .modal-description {
    font-size: 0.82rem;
  }
}