/* BuBu site theme: green — recoloured copy of assets/storefront.css (generated, do not edit) */
/* ==========================================================================
   BuBu Store - storefront UI fixes (2026-11-27)
   Loaded after rebuild.css on customer pages only (see includes/header.php).
   Layout/typography only: no change to prices, buttons, links or checkout.
   Remove this file (and its <link> in header.php) to roll back.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) Product card labels ("Code CDK Skins", "Tự động giao key"...)
      Each label stays on ONE line ("…" if too long) instead of breaking
      into 2-3 lines. On phones the two labels are stacked.
   -------------------------------------------------------------------------- */
.product-card .product-meta {
  flex-wrap: wrap;
  row-gap: 3px;
  min-width: 0;
}

.product-card .product-meta > span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .product-card .product-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 11px;
    line-height: 1.3;
  }

  .product-card .product-meta > span:last-child {
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   2) Product names on cards: up to 2 lines, then "…"
      (before: forced onto 1 line and cut off without "…").
      !important is needed because rebuild.js writes inline nowrap styles.
   -------------------------------------------------------------------------- */
body .product-card .product-body h3 {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: ellipsis !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

body .product-card .product-body h3 a {
  display: inline !important;
  white-space: normal !important;
  overflow: visible !important;
}

/* Keep 2 lines of room so prices line up across a row of cards */
.page-home .home-category-grid .product-body h3 {
  min-height: 2.5em;
}

/* --------------------------------------------------------------------------
   3) Home page product cards: show the price again (was hidden).
      The "Chi tiết" button stays hidden there to keep the cards compact;
      the whole card is still clickable through the image and the name.
   -------------------------------------------------------------------------- */
.page-home .home-category-grid .product-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.page-home .home-category-grid .price-line {
  display: flex;
}

.page-home .home-category-grid .product-actions .btn {
  display: none;
}

/* Tablets / small laptops (721-1120px): cards are only 170-250px wide, so the
   "Xem chi tiết" button was pushed outside the card and cut off. Stack the
   price above a full-width button, like on phones. */
@media (min-width: 721px) and (max-width: 1120px) {
  .product-card .product-actions {
    display: grid;
    gap: 10px;
  }

  .product-card .product-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* "Sản phẩm hết hàng" must not be cut off on narrow cards */
.product-card .product-actions > div > strong.stock-out {
  font-size: 14px;
  line-height: 1.25;
  white-space: normal;
}

/* --------------------------------------------------------------------------
   4) Home section titles on phones/tablets ("Khám phá nhanh" was split into
      2-3 lines, "Sản phẩm nổi bật" left "bật" alone on a 2nd line):
      title + button on one row, description underneath.
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .home-section-title-row,
  .home-category-head {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    column-gap: 10px;
  }

  /* let the title and its description take part in the row layout */
  .home-category-head > div:first-child {
    display: contents;
  }

  .home-section-title-row > h2,
  .home-category-head h2 {
    flex: 1 1 0;
    min-width: 0;
  }

  .home-section-title-row > p,
  .home-category-head .section-subtitle {
    order: 3;
    flex: 1 1 100%;
    margin: 0;
  }

  .home-section-title-row > a,
  .home-category-head > a {
    flex: 0 0 auto;
  }
}

@media (max-width: 720px) {
  .home-section-title-row > h2,
  .home-category-head h2 {
    font-size: 21px;
  }

  .home-section-title-row > a,
  .home-category-head > a {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (max-width: 359px) {
  .home-section-title-row > h2,
  .home-category-head h2 {
    font-size: 19px;
  }
}

/* --------------------------------------------------------------------------
   5) Floating "Liên hệ" button
      a) The closed menu left an invisible 130x270px box above the button
         that swallowed taps on the page underneath. Only the button (and the
         links once opened) now receive taps.
      b) On phones it becomes a round icon button so it covers less text.
   -------------------------------------------------------------------------- */
.floating-socials {
  pointer-events: none;
}

.floating-contact-toggle {
  pointer-events: auto;
}

@media (max-width: 720px) {
  .floating-contact-toggle {
    width: 48px;
    height: 48px;
    min-height: 48px;
    justify-content: center;
    gap: 0;
    padding: 0;
  }

  .floating-contact-toggle .social-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* Tagline "PUBG: BATTLEGROUNDS" under the logo stays on one line on phones
   (very small phones < 360px keep the old 2-line wrap rather than cutting it) */
@media (min-width: 360px) and (max-width: 720px) {
  .bubu-brand-copy small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0;
  }
}

@media (min-width: 360px) and (max-width: 400px) {
  .bubu-brand-copy small {
    font-size: 10px;
  }
}

/* --------------------------------------------------------------------------
   6) Logo text "BuBu Store": the white text-shadow was painted on top of the
      green gradient and made the name look washed out.
   -------------------------------------------------------------------------- */
body .bubu-brand-copy strong,
body .bubu-mobile-menu__brand strong {
  text-shadow: none;
}
