/*
 * Phone shop pages (Carl, 22 Nov 2026; spec docs/mockups/phone-shop-pages-22-Nov/SPEC.md).
 * Phones only (below 768px). At 768px and wider nothing here applies: the computer version is unchanged.
 * Goes to: public_html/themes/frontend_au/css/gi-phone-shop.css, linked from the view-all and category templates.
 * Undo: copy the two template backups back (this file then loads from nowhere).
 */
@media (max-width: 767.98px) { /* .98: a fractional 767.x screen still counts as a phone; 768 never does */
  /* 1. No filter row, no one/two column buttons */
  section.product_category .row.sahel-productlist-filter,
  section.product_category .listing.visible-xs { display: none !important; }

  /* The top text box shows on phones. Beats the CMS agent's 21 Nov block
     (.product_category .top-shop-option {display:none !important}) by specificity. */
  section.product_category > .container > .row.top-shop-option.sahel-shop-option.gi-ps-top {
    display: block !important;
    margin: 0;
    padding: 12px 20px 4px;
  }
  /* The lower text box is emptied into the top one by the script; its empty row stays hidden */
  section.product_category > .container > .row.top-shop-option.sahel-shop-option.gi-ps-low { display: none !important; }

  section.product_category .gi-ps-top .category-description { padding: 0; margin: 0; text-align: center; }

  /* 2. The page's own H1, in the product title look */
  section.product_category .gi-ps-top .category-description h1 {
    font-family: "Playfair Display", Georgia, serif !important;
    font-size: 20px !important;
    line-height: 24px !important;
    font-weight: 400 !important;
    color: #000 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
  }

  /* 3. The text under it: 14px, cut at 3 lines with an ellipsis */
  /* The id beats the theme's own text rule (.main-page .home .sahel-shop-option .category-description p, 18px !important) */
  #gi-ps-text, #gi-ps-text p {
    font-family: "Crimson Text", Georgia, serif !important;
    font-size: 14px !important;
    line-height: 20px !important;
    color: #898388 !important;
    text-align: center !important;
  }
  #gi-ps-text p { margin: 0 0 10px !important; padding: 0 !important; }
  #gi-ps-text.gi-ps-closed {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    max-height: 60px; /* 3 lines; stops a fourth line peeking where line-clamp isn't supported */
  }
  /* Closed: the paragraphs run on as one block so the 3 lines are all words */
  #gi-ps-text.gi-ps-closed p { display: inline; margin: 0 !important; }
  #gi-ps-text.gi-ps-closed br { display: none; }
  #gi-ps-text.gi-ps-closed p + p::before { content: " "; }

  /* 4. Read more / Read less */
  section.product_category .gi-ps-top .gi-ps-toggle {
    display: block;
    margin: 6px auto 12px;
    padding: 4px 8px;
    background: none;
    border: 0;
    font: 400 11px/1.4 Muli, Arial, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 3px;
    color: #4c4450;
    cursor: pointer;
  }

  /* 6. One design per row at every phone width (today 481 to 767px shows two) */
  section.product_category .sahel-listitems .listitempage .p-item,
  section.product_category .sahel-listitems .listitempage .p-item.first {
    width: 91.8% !important;
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* 7. Page numbers hidden on phones (still links in the HTML for Google); endless scroll loads the next page */
  section.product_category .pagination-holder.gi-ps-scrolling { display: none !important; }
  .gi-ps-loading { text-align: center; padding: 18px 0 30px; font: 400 11px/1.4 Muli, Arial, sans-serif;
    letter-spacing: .12em; text-transform: uppercase; color: #898388; clear: both; }
}
