/* Dickies final presentation overrides — loaded last. */

/* Header */
.htw-site-header {
  --htw-header-bg: #101d25 !important;
  --htw-header-fg: #ffffff !important;
  --htw-promo-bg: #000000 !important;
  --htw-promo-fg: #ffffff !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
.htw-site-header__announcement {
  padding: 7px 20px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
.htw-site-header__main {
  min-height: 64px !important;
  padding: 0 24px !important;
}
.htw-site-header__logo {
  width: 66px !important;
}
.htw-site-header__logo img {
  width: auto !important;
  max-width: 66px !important;
  max-height: 44px !important;
}
.htw-site-header__primary-list {
  gap: 18px !important;
}
.htw-site-header__desktop-nav .htw-site-header__menu li > a {
  min-height: 64px !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}
.htw-site-header__menu .sub-menu {
  background: #101d25 !important;
  color: #ffffff !important;
  border-top: 2px solid #91bfe3 !important;
}
.htw-site-header__actions {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}
.htw-site-header__cart-count {
  background: #ffffff !important;
  color: #101d25 !important;
}

/* Footer */
body .dks-footer {
  background: #f4f4f2 !important;
  color: #1b1b1b !important;
  padding: 48px 20px 20px !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
body .dks-footer a {
  color: #1b1b1b !important;
}
body .dks-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
}
body .dks-footer__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 40px !important;
}
body .dks-footer__col h3 {
  margin: 0 0 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
body .dks-footer__col ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body .dks-footer__col li a {
  display: block !important;
  padding: 5px 0 !important;
  font-size: 13px !important;
  letter-spacing: .03em !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
}
body .dks-footer__col li a:hover {
  text-decoration: underline !important;
}
body .dks-footer__bottom {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-top: 36px !important;
  padding-top: 16px !important;
  border-top: 1px solid #d4d4d0 !important;
  font-size: 11px !important;
  color: #555 !important;
}
@media (max-width: 767px) {
  body .dks-footer { padding: 36px 16px 18px !important; }
  body .dks-footer__grid { grid-template-columns: 1fr !important; gap: 26px !important; }
  body .dks-footer__bottom { flex-direction: column !important; align-items: flex-start !important; }
}

/* Equal-height product cards */
body .products.row,
body .products,
body .ux-products {
  align-items: stretch !important;
}
body .product-small.col,
body .product-small.col > .col-inner,
body .product-small.wgm-native-card__box,
body .product-small .wgm-native-card__box {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}
body .product-small .wgm-native-card__media {
  align-self: stretch !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  flex: 0 0 auto !important;
}
body .product-small .wgm-native-card__info {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: stretch !important;
  min-width: 0 !important;
}
body .product-small .title-wrapper {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: flex-start !important;
  min-height: 44px !important;
  max-height: 66px !important;
  overflow: hidden !important;
}
body .product-small .title-wrapper .name,
body .product-small .title-wrapper .name a {
  display: -webkit-box !important;
  max-width: 100% !important;
  overflow: hidden !important;
  white-space: normal !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
}
body .product-small .price-wrapper {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  min-height: 24px !important;
  margin-top: auto !important;
  padding-top: 6px !important;
}
body .product-small .price {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  margin: 0 !important;
  flex-wrap: nowrap !important;
}
body .product-small .price del,
body .product-small .price del .amount {
  color: #777777 !important;
  opacity: 1 !important;
  text-decoration: line-through !important;
}
body .product-small .price ins,
body .product-small .price ins .amount,
body .single-product .summary .price ins,
body .single-product .summary .price ins .amount {
  color: #e60023 !important;
  text-decoration: none !important;
}

/* Range prices: desktop side-by-side, mobile stacked */
body .wgm-price-range {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 8px !important;
}
body .wgm-price-range del,
body .wgm-price-range ins {
  display: inline-block !important;
  white-space: nowrap !important;
}
@media (max-width: 767px) {
  body .wgm-price-range {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }
}

/* One-row product sections */
body #dickies-bestsellers,
body #dickies-m07 {
  padding: 34px 20px !important;
}
body #dickies-bestsellers h2,
body #dickies-m07 h2 {
  margin: 0 0 20px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-align: center !important;
  text-transform: uppercase !important;
}
body #dickies-bestsellers .dks-bestsellers-grid,
body #dickies-m07 ul.products {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}
body #dickies-bestsellers .dks-bestsellers-grid > .product-small.col,
body #dickies-m07 ul.products > li.product {
  flex: 0 0 calc((100% - 36px) / 4) !important;
  width: auto !important;
  max-width: calc((100% - 36px) / 4) !important;
  margin: 0 !important;
  float: none !important;
}
body #dickies-m07 .denim-controls {
  display: none !important;
}
@media (max-width: 767px) {
  body #dickies-bestsellers,
  body #dickies-m07 { padding: 24px 12px !important; }
  body #dickies-bestsellers .dks-bestsellers-grid,
  body #dickies-m07 ul.products { gap: 6px !important; }
  body #dickies-bestsellers .dks-bestsellers-grid > .product-small.col,
  body #dickies-m07 ul.products > li.product {
    flex-basis: calc((100% - 18px) / 4) !important;
    max-width: calc((100% - 18px) / 4) !important;
  }
  body .product-small .title-wrapper { min-height: 34px !important; max-height: 50px !important; }
  body .product-small .title-wrapper .name,
  body .product-small .title-wrapper .name a { font-size: 12px !important; }
}

/* Keep mobile compact add buttons aligned in the same row as price */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  body .product-small .wgm-native-card__info:has(.wgm-native-card__mobile-add),
  body .product-small .wgm-native-card__info:has(.wgm-native-card__mobile-purchase) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 36px !important;
    grid-template-rows: auto minmax(36px, auto) !important;
  }
  body .product-small .wgm-native-card__info:has(.wgm-native-card__mobile-add) .title-wrapper,
  body .product-small .wgm-native-card__info:has(.wgm-native-card__mobile-purchase) .title-wrapper {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }
  body .product-small .wgm-native-card__info:has(.wgm-native-card__mobile-add) .price-wrapper,
  body .product-small .wgm-native-card__info:has(.wgm-native-card__mobile-purchase) .price-wrapper {
    grid-column: 1 !important;
    grid-row: 2 !important;
    margin-top: 0 !important;
    min-height: 36px !important;
  }
}
