:root {
  --ad-hp-green: var(--ad-green, #1f8b4c);
  --ad-hp-green-dark: #176c3a;
  --ad-hp-yellow: var(--ad-yellow, #f7ca00);
  --ad-hp-navy: var(--ad-navy, #1f2a44);
  --ad-hp-cream: var(--ad-cream, #faf7f2);
}

/* Elementor flex containers can shrink widgets to their content width. */
.elementor-widget-amazdealz_top_categories,
.elementor-widget-amazdealz_top_categories > .elementor-widget-container,
.elementor-widget[data-widget_type="amazdealz_top_categories.default"],
.elementor-widget[data-widget_type="amazdealz_top_categories.default"] > .elementor-widget-container {
  width: 100% !important;
  max-width: none !important;
  flex: 1 1 100% !important;
  align-self: stretch !important;
  min-width: 0 !important;
}

.ad-hp-categories,
.ad-hp-categories *,
.ad-hp-categories *::before,
.ad-hp-categories *::after { box-sizing: border-box; }

.ad-hp-categories {
  position: relative;
  display: block;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 40px 0;
  background: transparent;
}

/* Optional true full-browser-width mode selected inside the widget. */
body:not(.elementor-editor-active) .ad-hp-categories--screen {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: clamp(16px, 3vw, 48px);
  padding-right: clamp(16px, 3vw, 48px);
}

.ad-hp-categories__inner {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.ad-hp-categories__heading {
  margin: 0 0 30px !important;
  text-align: center;
  color: #202020 !important;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.ad-hp-categories__heading span { color: #aabbb7; }

.ad-hp-categories__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(16px, 2vw, 24px);
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: stretch;
}

.ad-hp-category-card {
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.ad-hp-category-card__link {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-height: clamp(350px, 34vw, 500px);
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(31, 42, 68, .12);
  background: #dfe4e3;
  text-decoration: none !important;
  transform: translateY(0);
  transition: transform .28s ease, box-shadow .28s ease;
}
.ad-hp-category-card__media { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; transform: scale(1.001); transition: transform .45s ease; }
.ad-hp-category-card__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(17,17,17,.14) 0%, rgba(17,17,17,.22) 42%, rgba(17,17,17,.84) 100%); }
.ad-hp-category-card__content { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: clamp(22px, 2.4vw, 34px); }
.ad-hp-category-card__title { color: #fff; font-size: clamp(22px, 2.25vw, 34px); line-height: 1.08; font-weight: 800; text-shadow: 0 2px 16px rgba(0,0,0,.25); }
.ad-hp-category-card__subtitle { max-width: 34ch; color: rgba(255,255,255,.9); font-size: 15px; line-height: 1.5; }
.ad-hp-category-card__button { display: inline-flex; align-items: center; justify-content: center; margin-top: 6px; min-height: 44px; padding: 0 20px; border-radius: 9px; background: var(--ad-hp-green); color: #fff; font-size: 15px; font-weight: 800; box-shadow: 0 8px 18px rgba(0,0,0,.16); transition: background .22s ease, color .22s ease, transform .22s ease; }

@media (hover:hover) {
  .ad-hp-category-card__link:hover { transform: translateY(-5px); box-shadow: 0 18px 42px rgba(31, 42, 68, .18); }
  .ad-hp-category-card__link:hover .ad-hp-category-card__media { transform: scale(1.06); }
  .ad-hp-category-card__link:hover .ad-hp-category-card__button { background: var(--ad-hp-yellow); color: #111; transform: translateY(-1px); }
}

@media (max-width: 900px) {
  .ad-hp-categories { padding-top: 34px; padding-bottom: 34px; }
  .ad-hp-categories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px; }
  .ad-hp-category-card__link { min-height: 350px; }
}

@media (max-width: 620px) {
  body:not(.elementor-editor-active) .ad-hp-categories--screen {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0;
    padding-right: 0;
  }
  .ad-hp-categories { padding-top: 28px; padding-bottom: 28px; }
  .ad-hp-categories__heading { margin-bottom: 22px !important; }
  .ad-hp-categories__grid { grid-template-columns: 1fr !important; gap: 16px; }
  .ad-hp-category-card__link { min-height: 320px; border-radius: 16px; }
  .ad-hp-category-card__content { padding: 22px; }
  .ad-hp-category-card__subtitle { font-size: 14px; }
  .ad-hp-category-card__button { min-height: 46px; padding: 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .ad-hp-category-card__link,
  .ad-hp-category-card__media,
  .ad-hp-category-card__button { transition: none; }
}

/* v3 premium polish — scoped to AmazDealz widgets only. */
.ad-hp-category-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.ad-hp-category-card__button::after {
  content: "→";
  margin-left: 9px;
  font-size: 18px;
  line-height: 1;
  transition: transform .22s ease;
}
@media (hover:hover) {
  .ad-hp-category-card__link:hover .ad-hp-category-card__button::after { transform: translateX(3px); }
}

.elementor-widget-amazdealz_trust_bar,
.elementor-widget-amazdealz_trust_bar > .elementor-widget-container {
  width: 100% !important;
  max-width: none !important;
}
.ad-hp-trust,
.ad-hp-trust * { box-sizing: border-box; }
.ad-hp-trust {
  width: 100%;
  padding: 12px 0;
}
.ad-hp-trust__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.ad-hp-trust__item {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(31,42,68,.09);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31,42,68,.08);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.ad-hp-trust__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ad-hp-cream);
  color: var(--ad-hp-green);
  font-size: 21px;
}
.ad-hp-trust__icon svg { width: 21px; height: 21px; fill: currentColor; }
.ad-hp-trust__copy { display: flex; flex-direction: column; min-width: 0; }
.ad-hp-trust__copy strong { color: var(--ad-hp-navy); font-size: 16px; line-height: 1.25; font-weight: 800; }
.ad-hp-trust__copy small { margin-top: 4px; color: #65706f; font-size: 13px; line-height: 1.45; }
@media (hover:hover) {
  .ad-hp-trust__item:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(31,42,68,.12); border-color: rgba(31,139,76,.22); }
}
@media (max-width: 980px) {
  .ad-hp-trust__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ad-hp-trust__grid { grid-template-columns: 1fr; gap: 12px; }
  .ad-hp-trust__item { padding: 17px; }
}

/* v3.1 — homepage WooCommerce product card polish only. */
body.home .woocommerce ul.products,
body.home ul.products {
  align-items: stretch;
}

body.home .woocommerce ul.products li.product,
body.home ul.products li.product {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  padding-bottom: 18px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  transition: transform .24s ease, box-shadow .24s ease;
}

body.home .woocommerce ul.products li.product > a,
body.home ul.products li.product > a {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body.home .woocommerce ul.products li.product .woocommerce-loop-product__link,
body.home ul.products li.product .woocommerce-loop-product__link {
  flex: 1 1 auto;
}

body.home .woocommerce ul.products li.product img,
body.home ul.products li.product img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 14px;
  margin-bottom: 8px;
  background: #fff;
  transition: transform .28s ease;
}

body.home .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.home ul.products li.product .woocommerce-loop-product__title,
body.home .woocommerce ul.products li.product h2,
body.home ul.products li.product h2 {
  display: -webkit-box;
  min-height: 2.9em;
  margin-bottom: 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

body.home .woocommerce ul.products li.product .price,
body.home ul.products li.product .price {
  margin-top: auto;
  margin-bottom: 12px;
}

body.home .woocommerce ul.products li.product .button,
body.home ul.products li.product .button,
body.home .woocommerce ul.products li.product .added_to_cart,
body.home ul.products li.product .added_to_cart {
  width: calc(100% - 28px);
  min-height: 46px;
  margin: auto 14px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 9px;
  line-height: 1.2;
  white-space: normal;
}

/* Affiliate/Buy It Now links commonly added by WooCommerce extensions. */
body.home .woocommerce ul.products li.product a[href*="amazon"],
body.home ul.products li.product a[href*="amazon"],
body.home .woocommerce ul.products li.product .buy-now,
body.home ul.products li.product .buy-now,
body.home .woocommerce ul.products li.product .buy_it_now,
body.home ul.products li.product .buy_it_now {
  margin-top: auto;
}

@media (hover:hover) {
  body.home .woocommerce ul.products li.product:hover,
  body.home ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(31,42,68,.12);
  }

  body.home .woocommerce ul.products li.product:hover img,
  body.home ul.products li.product:hover img {
    transform: scale(1.025);
  }
}

@media (max-width: 767px) {
  body.home .woocommerce ul.products li.product,
  body.home ul.products li.product {
    border-radius: 13px;
    padding-bottom: 14px;
  }

  body.home .woocommerce ul.products li.product img,
  body.home ul.products li.product img {
    padding: 10px;
  }

  body.home .woocommerce ul.products li.product .button,
  body.home ul.products li.product .button,
  body.home .woocommerce ul.products li.product .added_to_cart,
  body.home ul.products li.product .added_to_cart {
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home .woocommerce ul.products li.product,
  body.home ul.products li.product,
  body.home .woocommerce ul.products li.product img,
  body.home ul.products li.product img {
    transition: none;
  }
}
