/* hero section start  */
.sm-products-hero {
  width: 100%;
  max-width: 100%;

  background: #f4f6f8;
  box-sizing: border-box;
  overflow: clip;
}

.sm-products-hero *,
.sm-products-hero *::before,
.sm-products-hero *::after {
  box-sizing: border-box;
}

.sm-products-hero-container {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  background: #172638;
  box-shadow: 0 18px 45px rgba(23, 38, 56, 0.16);
}

.sm-products-hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.6s ease;
}

.sm-products-hero-container:hover .sm-products-hero-image {
  transform: scale(1.012);
}

/* Tablet */
@media (max-width: 768px) {
  .sm-products-hero {
    padding: 16px 12px;
  }

  .sm-products-hero-container {
    border-radius: 10px;
  }

  .sm-products-hero-image {
    transform: none;
  }

  .sm-products-hero-container:hover .sm-products-hero-image {
    transform: none;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .sm-products-hero {
    padding: 10px 8px;
  }

  .sm-products-hero-container {
    border-radius: 7px;
  }
}

/* hero section end */

/* products section start */

/* =====================================================
   1. MAIN SECTION
====================================================== */

.sm-products-section {
  --sm-products-navy: #153b68;
  --sm-products-dark: #172638;
  --sm-products-blue: #245184;
  --sm-products-orange: #ef762f;
  --sm-products-grey: #f0f2f5;
  --sm-products-border: #dfe4ea;
  --sm-products-text: #26384d;

  width: 100%;
  max-width: 100%;
  padding: 55px 3% 75px;
  background: #ffffff;
  box-sizing: border-box;
  overflow-x: clip;
  font-family: Arial, Helvetica, sans-serif;
}

.sm-products-section *,
.sm-products-section *::before,
.sm-products-section *::after {
  box-sizing: border-box;
}

.sm-products-heading {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.sm-products-heading h2 {
  margin: 0 0 12px;
  color: var(--sm-products-dark);
  font-size: clamp(30px, 3.3vw, 43px);
  font-weight: 800;
  letter-spacing: -1.1px;
  line-height: 1.2;
}

.sm-products-heading p {
  max-width: 600px;
  margin: 0 auto;
  color: #687587;
  font-size: 15px;
  line-height: 1.75;
}

/* =====================================================
   2. CATEGORY FILTER BUTTONS
====================================================== */

.sm-products-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 48px auto 44px;
}

.sm-products-filter {
  min-height: 39px;
  padding: 9px 22px;
  border: 1px solid #dce2e9;
  border-radius: 30px;
  background: #ffffff;
  color: #44546a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.sm-products-filter:hover {
  color: var(--sm-products-navy);
  border-color: var(--sm-products-navy);
  transform: translateY(-2px);
}

.sm-products-filter.is-active {
  background: var(--sm-products-navy);
  border-color: var(--sm-products-navy);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(21, 59, 104, 0.16);
}

.sm-products-filter:focus-visible,
.sm-products-details-btn:focus-visible,
.sm-products-viewer-close:focus-visible {
  outline: 3px solid var(--sm-products-orange);
  outline-offset: 3px;
}

/* =====================================================
   3. PRODUCT GRID
====================================================== */

.sm-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  align-items: stretch;
}

.sm-products-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--sm-products-border);
  border-radius: 19px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(24, 42, 62, 0.025);
  animation: smProductsCardIn 0.38s ease both;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.sm-products-card:hover {
  transform: translateY(-5px);
  border-color: #cad5e2;
  box-shadow: 0 14px 32px rgba(23, 48, 77, 0.11);
}

@keyframes smProductsCardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   4. PRODUCT IMAGE
====================================================== */

.sm-products-image-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 215px;
  padding: 10px 15px;
  overflow: hidden;
  background: #ffffff;
}

.sm-products-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.45s ease;
}

.sm-products-card:hover .sm-products-image {
  transform: scale(1.055);
}

.sm-products-image-fallback {
  display: none;
  width: 100%;
  padding: 25px 12px;
  color: #78879a;
  text-align: center;
  font-size: 13px;
}

/* =====================================================
   5. BLUE PRODUCT INFORMATION HEADER
====================================================== */

.sm-products-info {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 120px;
  padding: 19px 22px;
  overflow: hidden;
  background: linear-gradient(115deg, #153b68, #245184);
  color: #ffffff;
}

.sm-products-info::before {
  position: absolute;
  top: -45px;
  right: -18px;
  width: 105px;
  height: 175px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  content: "";
}

.sm-products-info-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
}

.sm-products-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  margin-bottom: 11px;
  padding: 5px 11px;
  border-radius: 6px;
  background: #ed4665;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35px;
}

.sm-products-name {
  margin: 0 0 5px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sm-products-subtitle {
  margin: 0;
  color: #d1deef;
  font-size: 11px;
  line-height: 1.5;
}

.sm-products-header-icon {
  position: absolute;
  z-index: 1;
  right: 18px;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.sm-products-header-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* =====================================================
   6. PRODUCT DETAILS
====================================================== */

.sm-products-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 19px 21px 20px;
  min-width: 0;
}

.sm-products-category-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #eef1f4;
  color: var(--sm-products-navy);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.55px;
  text-transform: uppercase;
}

.sm-products-category-label svg {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.sm-products-description {
  min-height: 62px;
  margin: 12px 0 13px;
  color: #687587;
  font-size: 12px;
  line-height: 1.65;
}

.sm-products-height {
  min-height: 65px;
  margin-top: auto;
  padding: 12px 13px;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  background: #f8f9fa;
}

.sm-products-height-label {
  display: block;
  margin-bottom: 8px;
  color: #758296;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.sm-products-height-value {
  display: block;
  color: var(--sm-products-navy);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.sm-products-details-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid var(--sm-products-navy);
  border-radius: 9px;
  background: #ffffff;
  color: var(--sm-products-navy);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.sm-products-details-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.sm-products-details-btn:hover {
  background: var(--sm-products-navy);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(21, 59, 104, 0.16);
}

/* =====================================================
   7. EMPTY CATEGORY MESSAGE
====================================================== */

.sm-products-empty {
  grid-column: 1 / -1;
  padding: 45px 20px;
  border: 1px dashed #cbd4df;
  border-radius: 12px;
  color: #687587;
  text-align: center;
  font-size: 14px;
}

/* =====================================================
   8. FULL-SCREEN IMAGE VIEWER
====================================================== */

.sm-products-viewer {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 65px 35px 35px;
  background: rgba(8, 17, 29, 0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.sm-products-viewer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sm-products-viewer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 1100px;
  max-height: 100%;
}

.sm-products-viewer-content img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 15px 55px rgba(0, 0, 0, 0.28);
  transform: scale(0.92);
  transition: transform 0.35s ease;
}

.sm-products-viewer.is-open .sm-products-viewer-content img {
  transform: scale(1);
}

.sm-products-viewer-close {
  position: absolute;
  top: 22px;
  right: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: #ffffff;
  color: #172638;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.sm-products-viewer-close svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.sm-products-viewer-close:hover {
  transform: scale(1.1) rotate(90deg);
  background: #e53935;
  border-color: #e53935;
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(229, 57, 53, 0.4);
}

/* =====================================================
   9. TABLET RESPONSIVENESS
====================================================== */

@media (max-width: 1100px) {
  .sm-products-section {
    padding-right: 3%;
    padding-left: 3%;
  }

  .sm-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  .sm-products-image-area {
    height: 230px;
  }
}

/* =====================================================
   10. MOBILE RESPONSIVENESS
====================================================== */

@media (max-width: 767px) {
  .sm-products-section {
    padding: 42px 16px 55px;
  }

  .sm-products-heading h2 {
    font-size: 30px;
  }

  .sm-products-heading p {
    max-width: 480px;
    font-size: 13px;
  }

  .sm-products-filters {
    justify-content: center;
    gap: 8px;
    margin: 30px auto 28px;
  }

  .sm-products-filter {
    min-height: 36px;
    padding: 8px 13px;
    font-size: 11px;
  }

  .sm-products-grid {
    gap: 24px;
  }

  .sm-products-image-area {
    height: 190px;
    padding: 9px;
  }

  .sm-products-info {
    min-height: 112px;
    padding: 14px 13px;
  }

  .sm-products-name {
    font-size: 12px;
  }

  .sm-products-subtitle {
    font-size: 10px;
  }

  .sm-products-header-icon {
    right: 9px;
    width: 32px;
    height: 32px;
  }

  .sm-products-details {
    padding: 13px 12px 14px;
  }

  .sm-products-description {
    min-height: 72px;
    font-size: 11px;
  }

  .sm-products-height {
    padding: 10px;
  }

  .sm-products-height-value {
    font-size: 11px;
  }

  .sm-products-details-btn {
    gap: 6px;
    padding: 9px 5px;
    font-size: 10px;
  }

  .sm-products-viewer {
    padding: 65px 12px 20px;
  }

  .sm-products-viewer-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
}

/* Narrow mobile: one card per row */
@media (max-width: 480px) {
  .sm-products-section {
    padding-right: 13px;
    padding-left: 13px;
  }

  .sm-products-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 29px;
  }

  .sm-products-image-area {
    height: 235px;
    padding: 12px;
  }

  .sm-products-info {
    min-height: 115px;
    padding: 17px 19px;
  }

  .sm-products-name {
    font-size: 14px;
  }

  .sm-products-subtitle {
    font-size: 11px;
  }

  .sm-products-details {
    padding: 16px 17px 18px;
  }

  .sm-products-description {
    min-height: auto;
    margin-bottom: 16px;
    font-size: 12px;
  }

  .sm-products-height-value {
    font-size: 12px;
  }

  .sm-products-details-btn {
    min-height: 41px;
    font-size: 12px;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .sm-products-section *,
  .sm-products-section *::before,
  .sm-products-section *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* products section end */
