/* Shared category/brand/search/featured product design. Source: verified category template. */
/* ==========================================================
   Gate Motor UAE - Modern Category Product Grid
   OpenCart 3.x / category.twig
   ========================================================== */
.category-page-modern {
  --gm-navy: #000000;
  --gm-navy-dark: #1b2b3a;
  --gm-green: #35a853;
  --gm-green-dark: #27843f;
  --gm-text: #17212b;
  --gm-muted: #000000;
  --gm-border: #e6ebef;
  --gm-bg: #f7f9fb;
  --gm-card: #ffffff;
  --gm-radius: 18px;
}

.category-page-modern .category-heading {
  margin: 0 0 8px;
  color: var(--gm-navy);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
}

.category-page-modern .category-subheading {
  margin: 0 0 24px;
  color: var(--gm-muted);
  font-size: 18px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  line-height: 1.5;
}

/* Modern sort / display toolbar */
.category-page-modern .category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 24px;
  padding: 10px 14px;
  background: var(--gm-navy);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(36, 56, 74, .10);
}

.category-page-modern .toolbar-left,
.category-page-modern .toolbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.category-page-modern .toolbar-label {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.category-page-modern .category-toolbar select {
  min-width: 135px;
  height: 38px;
  padding: 6px 34px 6px 12px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: var(--gm-text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.category-page-modern .category-view-buttons {
  display: flex;
  gap: 5px;
}

.category-page-modern .category-view-buttons .btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.12);
  color: #fff;
}

.category-page-modern .category-view-buttons .btn.active,
.category-page-modern .category-view-buttons .btn:hover {
  background: var(--gm-green);
  color: #fff;
}



/* Product grid: 4 desktop / 2 tablet / 1 mobile */
.category-page-modern .category-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}

.category-page-modern .category-products-grid > .product-layout {
  width: auto !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Product card */
.category-page-modern .modern-product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--gm-card);
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius);
  box-shadow: 0 5px 18px rgba(25, 39, 52, .07);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.category-page-modern .modern-product-card:hover {
  transform: translateY(-5px);
  border-color: #d6e0e7;
  box-shadow: 0 14px 32px rgba(25, 39, 52, .13);
}

/* Rounded product image area */
.category-page-modern .modern-product-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  margin: 10px 10px 0;
  padding: 14px;
  overflow: hidden;
  background: #fff;
  border-radius: 15px;
}

.category-page-modern .modern-product-image a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.category-page-modern .modern-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 15px;
  transition: transform .25s ease;
}

.category-page-modern .modern-product-card:hover .modern-product-image img {
  transform: scale(1.035);
}



.category-page-modern .modern-product-card:hover .modern-product-actions,
.category-page-modern .modern-product-actions:focus-within {
  opacity: 1;
  transform: translateX(0);
}

.category-page-modern .modern-product-actions button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--gm-border);
  border-radius: 50%;
  background: #fff;
  color: var(--gm-navy);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transition: all .18s ease;
}

.category-page-modern .modern-product-actions button:hover {
  background: var(--gm-green);
  border-color: var(--gm-green);
  color: #fff;
}

.category-page-modern .modern-product-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px 18px 18px;
}

.category-page-modern .modern-product-title {
  min-height: 43px;
  text-align: center;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 650;
}

.category-page-modern .modern-product-title a {
  color: var(--gm-text);
  text-decoration: none;
}

.category-page-modern .modern-product-title a:hover {
  color: var(--gm-green-dark);
}

.category-page-modern .modern-product-rating {
  min-height: 20px;
  margin: 0 0 6px;
  color: #f4b400;
  font-size: 12px;
}

.category-page-modern .modern-product-rating .fa-stack {
  width: 1em;
  height: 1em;
  line-height: 1em;
}

.category-page-modern .modern-product-price {
  margin: 0 0 14px;
  color: #d71920;
  text-align: center;
  font-size: 18px;
  font-weight: 750;
}

.category-page-modern .modern-product-price .price-new {
  color: #d71920;
}

.category-page-modern .modern-product-price .price-old {
  margin-left: 7px;
  color: #9aa3ab;
  font-size: 13px;
  font-weight: 500;
  text-decoration: line-through;
}

/* Add to Cart button - compact rectangular style matching reference */
.category-page-modern .modern-add-to-cart {
  display: block;
  width: 108px;
  min-height: 41px;
  margin: auto auto 0;
  padding: 9px 10px;
  border: 2px solid #d7dce1;
  border-radius: 10px;
  background: #0d4778;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  letter-spacing: .15px;
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(0,0,0,.10);
  transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.category-page-modern .modern-add-to-cart:hover,
.category-page-modern .modern-add-to-cart:focus {
  background: #123f63;
  border-color: #c7cdd3;
  color: #fff;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 9px rgba(13, 71, 120, .20);
}

/* Working grid / list view modes */
.category-page-modern.is-list-view .category-products-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px;
}

.category-page-modern.is-list-view .modern-product-card {
  min-height: 190px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
}

.category-page-modern.is-list-view .modern-product-image {
  height: 170px;
  margin: 10px;
}

.category-page-modern.is-list-view .modern-product-content {
  align-items: center;
  padding: 20px 28px;
}

.category-page-modern.is-list-view .modern-product-title {
  width: 100%;
}

.category-page-modern.is-list-view .modern-product-rating {
  text-align: center;
}

.category-page-modern.is-list-view .modern-product-price {
  width: 100%;
}

.category-page-modern.is-list-view .category-products-grid > .product-layout {
  width: 100% !important;
}

@media (max-width: 767px) {
  .category-page-modern.is-list-view .category-products-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .category-page-modern.is-list-view .modern-product-card {
    grid-template-columns: 125px minmax(0, 1fr);
    min-height: 160px;
  }
  .category-page-modern.is-list-view .modern-product-image {
    height: 135px;
    margin: 8px;
    padding: 8px;
  }
  .category-page-modern.is-list-view .modern-product-content {
    padding: 12px 10px 12px 4px;
  }
  .category-page-modern.is-list-view .modern-product-title {
    font-size: 14px;
  }
  .category-page-modern.is-list-view .modern-product-price {
    font-size: 16px;
  }
}

/* Pagination */
.category-page-modern .category-pagination {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--gm-border);
}

/* SEO category description */
.category-page-modern .category-seo-description {
  margin: 42px 0 10px;
  padding: 34px 0 10px;
  border-top: 1px solid var(--gm-border);
  color: #334155;
  font-size: 15px;
  line-height: 1.8;
}
.category-page-modern .category-seo-description__inner { width: 100%; }
.category-page-modern .category-seo-description h2,
.category-page-modern .category-seo-description h3 {
  margin: 28px 0 11px;
  color: var(--gm-navy);
  font-weight: 700;
  line-height: 1.35;
}
.category-page-modern .category-seo-description h2 { font-size: 24px; }
.category-page-modern .category-seo-description h3 { font-size: 20px; }
.category-page-modern .category-seo-description h2:first-child,
.category-page-modern .category-seo-description h3:first-child { margin-top: 0; }
.category-page-modern .category-seo-description p { margin: 0 0 15px; }
.category-page-modern .category-seo-description ul,
.category-page-modern .category-seo-description ol { margin: 0 0 18px; padding-left: 22px; }
.category-page-modern .category-seo-description li { margin-bottom: 6px; }
.category-page-modern .category-seo-description img { max-width: 100%; height: auto; border-radius: 14px; }

/* Large desktop: 4 columns */
@media (min-width: 1200px) {
  .category-page-modern .category-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Medium desktop: 4 columns */
@media (min-width: 992px) and (max-width: 1199px) {
  .category-page-modern .category-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .category-page-modern .modern-product-image { height: 225px; }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
  .category-page-modern .category-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .category-page-modern .modern-product-image { height: 245px; }
}

/* Mobile: 1 column, touch-friendly */
@media (max-width: 767px) {
  .category-page-modern .category-heading { font-size: 24px; margin-bottom: 7px; }
  .category-page-modern .category-subheading { font-size: 17px; margin-bottom: 20px; line-height: 1.45; }

  .category-page-modern .category-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 10px;
    border-radius: 13px;
  }

  .category-page-modern .toolbar-left,
  .category-page-modern .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .category-page-modern .category-toolbar select {
    flex: 1;
    min-width: 0;
    height: 42px;
    font-size: 14px;
  }

  .category-page-modern .category-view-buttons { display: none; }

  .category-page-modern .category-products-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .category-page-modern .modern-product-image {
    height: min(72vw, 360px);
    margin: 9px 9px 0;
    padding: 12px;
    border-radius: 15px;
  }

  .category-page-modern .modern-product-content { padding: 15px; }
  .category-page-modern .modern-product-title { min-height: 0; font-size: 15px; }
  .category-page-modern .modern-product-price { font-size: 18px; }

  /* Keep action icons visible/touchable on mobile */
  .category-page-modern .modern-product-actions {
    opacity: 1;
    transform: none;
  }

  .category-page-modern .modern-product-actions button {
    width: 40px;
    height: 40px;
  }

  .category-page-modern .modern-add-to-cart {
    width: 108px;
    min-height: 44px;
    font-size: 11px;
  }

  .category-page-modern .category-seo-description {
    margin-top: 28px;
    padding-top: 25px;
    font-size: 14px;
    line-height: 1.7;
  }
  .category-page-modern .category-seo-description h2 { font-size: 20px; margin-top: 24px; }
  .category-page-modern .category-seo-description h3 { font-size: 18px; margin-top: 21px; }
}
/* Keep featured cards visually identical without modifying their parent columns. */
.gm-featured-modern { margin-bottom: 20px; }

/* Product card fit on four-column desktop layouts */
@media (min-width: 992px) {
  .category-page-modern .category-products-grid { gap: 18px; }
  .category-page-modern .modern-product-image { height: 205px; }
  .category-page-modern .modern-product-content { padding: 14px 11px 17px; }
  .category-page-modern .modern-product-title { font-size: 14px; line-height: 1.4; }
}

/* Search introduction panel - four-column catalogue theme */
.category-page-modern .gm-search-intro {
  margin: 12px 0 28px;
  padding: 19px 22px 21px;
  border: 1px solid #d5e4f5;
  border-radius: 13px;
  background: #f7faff;
  text-align: center;
}
.category-page-modern .gm-search-intro h1 {
  font-size: 26px;
  font-weight: 700;
  color: #12253a;
  margin: 0 0 10px;
  line-height: 1.3;
}
.category-page-modern .gm-search-intro p {
  max-width: 860px;
  margin: 0 auto 15px;
  color: #44556c;
  font-size: 14px;
  line-height: 1.55;
}
.category-page-modern .gm-search-shortcuts {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 19px;
}
.category-page-modern .gm-search-shortcuts a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 25px;
  background: #263d51;
  color: white;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}
.category-page-modern .gm-search-shortcuts a:hover,
.category-page-modern .gm-search-shortcuts a:focus {
  background: #162b3d;
  transform: translateY(-2px);
  color: #fff;
}
.category-page-modern .gm-search-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 22px;
  min-height: 42px;
  border-radius: 26px;
  background: #00ae5c;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.category-page-modern .gm-search-whatsapp:hover,
.category-page-modern .gm-search-whatsapp:focus { background: #008f4d; color: #fff; }
.category-page-modern .gm-search-form-title { margin: 0 0 13px; font-size: 21px; }
@media (max-width: 767px) {
  .category-page-modern .gm-search-intro { padding: 18px 12px; }
  .category-page-modern .gm-search-intro h1 { font-size: 22px; }
  .category-page-modern .gm-search-shortcuts { gap: 7px; }
  .category-page-modern .gm-search-shortcuts a { font-size: 12px; min-height: 37px; padding: 8px 12px; }
}
