/*
 * Charoal card polish v14 — 2026-08-20
 * Three-line card descriptions, readable header controls, account menu and
 * tightly framed tobacco photography.
 */

/* Every native product card keeps its real Shoptet short description. */
html.charoal-redesign body.type-category .products-block .product .p-desc.charoal-card-description-v14,
html.charoal-redesign body:not(.type-category) .products-block .product .p-desc.charoal-card-description-v14,
html.charoal-redesign #productsTop .product .p-desc.charoal-card-description-v14,
html.charoal-redesign .products-related .product .p-desc.charoal-card-description-v14,
html.charoal-redesign .products-alternative .product .p-desc.charoal-card-description-v14 {
  display: -webkit-box !important;
  width: 100% !important;
  height: calc(1.45em * 3) !important;
  min-height: calc(1.45em * 3) !important;
  max-height: calc(1.45em * 3) !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: #5f5861 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  text-align: left !important;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* The full text stays available to assistive technology through aria-label. */
html.charoal-redesign .product .p-desc.charoal-card-description-v14::before,
html.charoal-redesign .product .p-desc.charoal-card-description-v14::after {
  content: none !important;
}

/* Search CTA: full label, comfortably centred and still compact. */
html.charoal-redesign .search-form .search-input {
  padding-right: 96px !important;
}

html.charoal-redesign .search-form [data-testid="searchBtn"],
html.charoal-redesign .search-form .btn[type="submit"] {
  top: 5px !important;
  right: 5px !important;
  display: inline-flex !important;
  width: 78px !important;
  min-width: 78px !important;
  max-width: 78px !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  overflow: visible !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
  text-align: center !important;
  text-indent: 0 !important;
  white-space: nowrap !important;
}

/* Desktop cart: keep the complete status text centred beside the icon. */
@media (min-width: 992px) {
  html.charoal-redesign .header-top .navigation-buttons > .cart-count {
    display: inline-flex !important;
    width: auto !important;
    min-width: 160px !important;
    max-width: none !important;
    min-height: 50px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    padding: 0 16px !important;
    overflow: visible !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  html.charoal-redesign .header-top .navigation-buttons > .cart-count .cart-price {
    display: inline-block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: visible !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
}

/* Logged-in account drop-down. URLs are cloned from Shoptet's native menu. */
html.charoal-redesign .header-top .navigation-buttons {
  position: relative !important;
}

.charoal-account-menu-v14[hidden] {
  display: none !important;
}

.charoal-account-menu-v14 {
  position: absolute;
  z-index: 2500;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(270px, calc(100vw - 24px));
  padding: 10px;
  color: #171217;
  background: #fff;
  border: 1px solid #e8dfe7;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(48, 21, 47, .18);
}

.charoal-account-menu-v14::before {
  position: absolute;
  top: -7px;
  right: 174px;
  width: 13px;
  height: 13px;
  content: "";
  background: #fff;
  border-top: 1px solid #e8dfe7;
  border-left: 1px solid #e8dfe7;
  transform: rotate(45deg);
}

.charoal-account-menu-title-v14 {
  display: block;
  padding: 8px 10px 10px;
  color: #241d25;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.charoal-account-menu-item-v14 {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 12px;
  color: #322a33 !important;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
}

.charoal-account-menu-item-v14:hover,
.charoal-account-menu-item-v14:focus-visible {
  color: #75278d !important;
  background: #fbf3f9;
  outline: none;
}

.charoal-account-menu-logout-v14 {
  margin-top: 4px;
  color: #a32668 !important;
  border-top: 1px solid #efe7ee;
  border-radius: 0 0 11px 11px;
}

html.charoal-redesign .charoal-account-button[aria-expanded="true"] {
  color: #75278d !important;
  background: #fbf3f9 !important;
  border-color: #e3d8e2 !important;
}

/* Tobacco packs use measured real subject bounds, never a blind fixed zoom. */
html.charoal-redesign .product .image img[data-charoal-tobacco-framed-v14],
html.charoal-redesign .charoal-smart-results-image img[data-charoal-tobacco-framed-v14] {
  transform: var(--charoal-tobacco-transform-v14) !important;
  transform-origin: 50% 50% !important;
  will-change: transform;
  transition: transform .24s ease !important;
}

html.charoal-redesign .product > .p:hover .image img[data-charoal-tobacco-framed-v14],
html.charoal-redesign .charoal-smart-results-card:hover .charoal-smart-results-image img[data-charoal-tobacco-framed-v14] {
  transform: var(--charoal-tobacco-transform-hover-v14) !important;
}

@media (max-width: 991px) {
  html.charoal-redesign .search-form .search-input {
    padding-right: 87px !important;
  }

  html.charoal-redesign .search-form [data-testid="searchBtn"],
  html.charoal-redesign .search-form .btn[type="submit"] {
    width: 69px !important;
    min-width: 69px !important;
    max-width: 69px !important;
    font-size: 12px !important;
  }

  .charoal-account-menu-v14::before {
    right: 60px;
  }
}

@media (max-width: 767px) {
  html.charoal-redesign body.type-category .products-block .product .p-desc.charoal-card-description-v14,
  html.charoal-redesign body:not(.type-category) .products-block .product .p-desc.charoal-card-description-v14,
  html.charoal-redesign #productsTop .product .p-desc.charoal-card-description-v14,
  html.charoal-redesign .products-related .product .p-desc.charoal-card-description-v14,
  html.charoal-redesign .products-alternative .product .p-desc.charoal-card-description-v14 {
    margin-top: 10px !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
    height: calc(1.4em * 3) !important;
    min-height: calc(1.4em * 3) !important;
    max-height: calc(1.4em * 3) !important;
  }

  html.charoal-redesign .search-form .search-input {
    padding-right: 78px !important;
  }

  html.charoal-redesign .search-form [data-testid="searchBtn"],
  html.charoal-redesign .search-form .btn[type="submit"] {
    top: 5px !important;
    width: 63px !important;
    min-width: 63px !important;
    max-width: 63px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 7px !important;
    border-radius: 11px !important;
    font-size: 11px !important;
  }

  .charoal-account-menu-v14 {
    top: calc(100% + 8px);
    right: 0;
    width: min(258px, calc(100vw - 20px));
    border-radius: 14px;
  }

  .charoal-account-menu-v14::before {
    right: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.charoal-redesign .product .image img[data-charoal-tobacco-framed-v14],
  html.charoal-redesign .charoal-smart-results-image img[data-charoal-tobacco-framed-v14] {
    transition: none !important;
  }
}
