/* ==========================================================================
   RSQ Trading Co. — viewport centering + responsive layout
   --------------------------------------------------------------------------
   The site was built in Dreamweaver with "layers": every block is
   position:absolute on a fixed 1356px canvas, pinned to the left edge of the
   browser window. This stylesheet is loaded last in <head> and does two
   things:

     1) 1380px and wider  : keeps the original 1356px canvas untouched, but
                            centres it in the window instead of pinning it to
                            the left edge.
     2) narrower than 1380: converts every layer back into normal document
                            flow, so the page becomes a single centred column
                            that fits phones, tablets and small laptops with
                            no horizontal scrolling.

   No colours, fonts, images or links are changed.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html {
  background-color: #fff;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ==========================================================================
   1. DESKTOP — original fixed canvas, centred in the viewport
   ========================================================================== */
@media (min-width: 1380px) {

  body {
    position: relative;
    width: 1356px;
    min-width: 1356px;
    margin: 0 auto;
    padding: 0;
  }

}

/* ==========================================================================
   2. TABLET / MOBILE — layers reflow into one centred column
   ========================================================================== */
@media (max-width: 1379.98px) {

  html,
  body {
    width: auto;
    min-width: 0;
    margin: 0;
  }

  body {
    position: static;
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 16px 48px;
    background-color: #fff;
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  /* --- every Dreamweaver layer becomes a normal full-width block --------- */
  body > div[id^="apDiv"] {
    position: static !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    z-index: auto !important;
    float: none !important;
    margin: 0 0 14px !important;
    overflow: visible !important;
  }

  /* --- media never overflows the column --------------------------------- */
  body img {
    max-width: 100%;
    height: auto;
  }

  body > div[id^="apDiv"] > img {
    display: block;
    margin: 0 auto;
  }

  /* header logo / banner strip */
  #apDiv209 img,
  #apDiv221 img {
    display: block;
    width: 100%;
    height: auto;
  }

  /* --- main navigation: one wrapping row of icons ----------------------- */
  #apDiv240,
  #apDiv241,
  #apDiv242,
  #apDiv243,
  #apDiv244 {
    display: inline-block !important;
    vertical-align: middle;
    width: auto !important;
    margin: 0 6px 12px 0 !important;
  }

  #apDiv240 img,
  #apDiv241 img,
  #apDiv242 img,
  #apDiv243 img,
  #apDiv244 img {
    max-height: 46px;
    width: auto;
    height: auto;
  }

  /* the second navigation row duplicates the first one — hide it */
  #apDiv245,
  #apDiv246,
  #apDiv247,
  #apDiv248,
  #apDiv249 {
    display: none !important;
  }

  /* --- product page title (long product names) -------------------------- */
  .rsq-series #apDiv250 {
    font-size: clamp(20px, 6vw, 34px);
    line-height: 1.25;
  }

  /* --- previous / next pager -------------------------------------------- */
  .rsq-series #apDiv253 {
    float: right !important;
    text-align: right;
    margin: 0 0 10px 10px !important;
  }

  .rsq-series #apDiv254 {
    float: left !important;
    text-align: left;
    margin: 0 10px 10px 0 !important;
  }

  .rsq-series #apDiv271,
  .rsq-series #apDiv272 {
    clear: both;
  }

  #apDiv253 a,
  #apDiv254 a {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    background-color: #f2f2f2;
    color: #333;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none;
  }

  #apDiv253 a:hover,
  #apDiv254 a:hover {
    background-color: #e6e6e6;
  }

  /* --- "Page 1 of 3" style counters ------------------------------------- */
  #apDiv271,
  #apDiv272 {
    text-align: center;
    color: #666;
    font-size: 15px;
  }

  /* --- long text pages -------------------------------------------------- */
  .rsq-about #apDiv250,
  .rsq-services #apDiv251,
  .rsq-catalog #apDiv251,
  .rsq-contact #apDiv {
    font-size: 17px;
    line-height: 1.65;
  }

  .rsq-about #apDiv250 p,
  .rsq-services #apDiv251 p,
  .rsq-catalog #apDiv251 p,
  .rsq-contact #apDiv p {
    line-height: 1.65;
  }

  /* --- page headings ---------------------------------------------------- */
  .rsq-about #apDiv251,
  .rsq-services #apDiv250,
  .rsq-catalog #apDiv250,
  .rsq-query #apDiv254 {
    font-size: clamp(22px, 6vw, 34px);
    line-height: 1.25;
    margin-bottom: 16px !important;
  }

  /* --- home page cards -------------------------------------------------- */
  .rsq-home #apDiv240 {
    display: none !important;
  }

  .rsq-home #apDiv238,
  .rsq-home #apDiv250,
  .rsq-home #apDiv251 {
    text-align: center;
  }

  /* --- contact page ----------------------------------------------------- */
  .rsq-contact #apDiv h2 {
    font-size: clamp(20px, 5vw, 26px);
    line-height: 1.3;
  }

  .rsq-contact #apDiv h4 {
    font-size: clamp(17px, 4.5vw, 20px);
    line-height: 1.3;
  }

  /* --- enquiry form ----------------------------------------------------- */
  .rsq-query #apDiv253 form {
    margin: 0 0 12px;
  }

  .rsq-query #apDiv253 label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
  }

  .rsq-query #apDiv253 input[type="text"],
  .rsq-query #apDiv253 input[type="email"],
  .rsq-query #apDiv253 input[type="tel"],
  .rsq-query #apDiv253 textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 9px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
  }

  .rsq-query #apDiv253 textarea {
    resize: vertical;
  }

  .rsq-query #apDiv253 input[type="submit"] {
    padding: 11px 28px;
    border: 0;
    border-radius: 4px;
    background-color: #f7941d;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
  }

  .rsq-query #apDiv253 input[type="submit"]:hover {
    background-color: #e07f0b;
  }

  /* --- tables (if any ever appear) -------------------------------------- */
  body > div[id^="apDiv"] table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

}
