/* ==========================================================
   ATV-MOTO HOME V3 SAFE
   Scope: homepage only
   No PHP/controller changes required.
   ========================================================== */

#common-home.atv-home-v3 {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-top: 14px;
  padding-bottom: 34px;
  font-family: "Open Sans", Arial, sans-serif;
}

.atv-home-v3-row {
  margin-left: -9px;
  margin-right: -9px;
}

.atv-home-v3-row > [class*="col-"],
.atv-home-v3-row > aside {
  padding-left: 9px;
  padding-right: 9px;
}

/* ---------- LEFT CATEGORY MENU ---------- */
.atv-home-v3 #column-left .list-group,
.atv-home-v3 #column-left .atv-category-menu {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 9px;
  box-shadow: 0 4px 16px rgba(0,0,0,.065);
}

.atv-home-v3 #column-left .list-group-item {
  border-color: #e5e8eb;
}

.atv-home-v3 #column-left .list-group-item:hover {
  background: #fff5ed;
}

/* ---------- MAIN HERO ---------- */
.atv-home-v3-hero {
  position: relative;
  height: 245px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 10px;
  background:
    url('/image/catalog/home_atv/home-hero-v3.jpg?v=4')
    center center / cover no-repeat;
  box-shadow: 0 5px 18px rgba(0,0,0,.11);
}

.atv-home-v3-hero-link {
  position: absolute;
  inset: 0;
  display: block;
}

/* ---------- BENEFITS ---------- */
.atv-home-v3-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.atv-home-v3-benefit {
  min-height: 66px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  border: 1px solid #e3e7ea;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0,0,0,.035);
}

.atv-home-v3-benefit-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff6500;
  font-size: 27px;
}

.atv-home-v3-benefit-text {
  min-width: 0;
}

.atv-home-v3-benefit strong,
.atv-home-v3-benefit small {
  display: block;
}

.atv-home-v3-benefit strong {
  margin-bottom: 2px;
  color: #202930;
  font-size: 13px;
  font-weight: 700;
}

.atv-home-v3-benefit small {
  color: #737c83;
  font-size: 11px;
}

/* ---------- SECTION HEADINGS ---------- */
.atv-home-v3-section,
.atv-home-v3-modules > div,
.atv-home-v3-modules > section {
  margin-bottom: 20px;
}

.atv-home-v3-section-head,
.atv-home-v3-modules h2,
.atv-home-v3-modules h3 {
  color: #182128;
}

.atv-home-v3-section-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.atv-home-v3-section-head h2,
.atv-home-v3-modules > h2,
.atv-home-v3-modules > h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #172027;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  text-transform: uppercase;
}

.atv-home-v3-section-head h2 .fa {
  margin-right: 7px;
  color: #ff6500;
}

/* ---------- POPULAR CATEGORY CARDS ---------- */
.atv-home-v3-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}

.atv-home-v3-category-card {
  min-width: 0;
  min-height: 145px;
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1px solid #e3e7ea;
  border-radius: 9px;
  color: #20272d !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.035);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.atv-home-v3-category-card:hover {
  transform: translateY(-2px);
  border-color: #ffb17b;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.atv-home-v3-category-media {
  width: 100%;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff6500;
  font-size: 55px;
}

.atv-home-v3-category-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.atv-home-v3-category-card strong {
  max-width: 100%;
  height: 32px;
  overflow: hidden;
  color: #20272d;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.atv-home-v3-category-line {
  width: 42px;
  height: 3px;
  margin-top: 6px;
  border-radius: 3px;
  background: #ff6500;
}

/* ---------- EXISTING OPENCART MODULES ---------- */
.atv-home-v3-modules {
  margin-top: 17px;
}

.atv-home-v3-modules .row {
  margin-left: -5px;
  margin-right: -5px;
}

.atv-home-v3-modules .product-layout {
  padding-left: 5px;
  padding-right: 5px;
  margin-bottom: 10px;
}

.atv-home-v3-modules .product-thumb,
.atv-home-v3-product-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid #e2e7ea !important;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 9px rgba(0,0,0,.04);
  transition: transform .16s ease, box-shadow .16s ease;
}

.atv-home-v3-modules .product-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 21px rgba(0,0,0,.085);
}

.atv-home-v3-modules .product-thumb .image {
  min-height: 170px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.atv-home-v3-modules .product-thumb .image img {
  max-height: 170px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.atv-home-v3-modules .product-thumb .caption {
  min-height: 125px;
  padding: 10px 11px !important;
  border-top: 1px solid #f0f1f2;
}

.atv-home-v3-modules .product-thumb h4 {
  height: 38px;
  margin: 0 0 7px;
  overflow: hidden;
  font-size: 13px;
  line-height: 19px;
  font-weight: 600;
}

.atv-home-v3-modules .product-thumb h4 a {
  color: #27323a;
  text-decoration: none;
}

.atv-home-v3-modules .product-thumb .caption > p:not(.price) {
  display: none;
}

.atv-home-v3-modules .product-thumb .price {
  margin: 5px 0;
  color: #ff5900;
  font-size: 18px;
  font-weight: 800;
}

.atv-home-v3-modules .product-thumb .price-new {
  color: #ff5900;
  font-weight: 800;
}

.atv-home-v3-modules .product-thumb .price-old {
  margin-left: 6px;
  color: #929aa0;
  font-size: 11px;
  font-weight: 400;
}

.atv-home-v3-modules .product-thumb .rating {
  margin-bottom: 5px;
}

.atv-home-v3-modules .product-thumb .rating .fa-star {
  color: #ff9d00;
}

.atv-home-v3-modules .product-thumb .button-group {
  display: flex;
  border-top: 0 !important;
  background: #fff !important;
}

.atv-home-v3-modules .product-thumb .button-group button {
  display: none !important;
}

.atv-home-v3-modules .product-thumb .button-group button:first-child {
  display: block !important;
  width: calc(100% - 20px) !important;
  height: 36px;
  margin: 0 10px 10px;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 5px;
  background: linear-gradient(180deg,#ff7417 0%,#ff5900 100%) !important;
  color: #fff !important;
  text-transform: none;
  font-size: 11px;
  font-weight: 700;
}

.atv-home-v3-modules .product-thumb .button-group button:first-child:hover {
  background: linear-gradient(180deg,#ff812b 0%,#e94f00 100%) !important;
}

/* Carousels / banners from existing modules */
.atv-home-v3-modules .swiper-viewport {
  border: 0;
  border-radius: 9px;
  box-shadow: 0 3px 13px rgba(0,0,0,.06);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1199px) {
  .atv-home-v3-benefits {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .atv-home-v3-category-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 767px) {
  #common-home.atv-home-v3 {
    padding-top: 8px;
  }

  .atv-home-v3-hero {
    height: 165px;
    border-radius: 7px;
  }

  .atv-home-v3-benefits {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 6px;
  }

  .atv-home-v3-benefit {
    min-height: 58px;
    padding: 7px;
  }

  .atv-home-v3-benefit-icon {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
    font-size: 21px;
  }

  .atv-home-v3-benefit strong {
    font-size: 11px;
  }

  .atv-home-v3-benefit small {
    font-size: 9px;
  }

  .atv-home-v3-category-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 7px;
  }

  .atv-home-v3-category-card {
    min-height: 120px;
  }

  .atv-home-v3-category-media {
    height: 75px;
    font-size: 42px;
  }

  .atv-home-v3-modules .product-layout {
    width: 50% !important;
    float: left;
  }

  .atv-home-v3-modules .product-thumb .image {
    min-height: 135px;
  }

  .atv-home-v3-modules .product-thumb .image img {
    max-height: 135px;
  }

  .atv-home-v3-modules .product-thumb .caption {
    min-height: 110px;
    padding: 8px !important;
  }

  .atv-home-v3-modules .product-thumb h4 {
    font-size: 12px;
  }

  .atv-home-v3-modules .product-thumb .price {
    font-size: 15px;
  }
}
