/* ============================================================
   MOB3 — SRP mobile step-3 (<=991.98px unless stated otherwise)
   1) top nav select: undo the -125px centring offset
   2) bottom icon bar (markup injected by mob3.js)
   3) footer rebalance (copyright text + payment strip)
   5) archive cards: mobile FRONT/BACK toggle state
   6) search box: animated border (black + logo-red flow)
   Desktop is untouched except item 6's hover/focus state,
   which the owner explicitly asked for.
   ============================================================ */

/* animated-border angle (Chromium/modern browsers animate it;
   elsewhere the gradient simply rests as a static black border
   with a red segment — still the owner's clean black box) */
@property --mob3ang {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes mob3flow {
  to { --mob3ang: 360deg; }
}

@media (max-width: 991.98px) {

  /* ---------- 1) TOP NAV SELECT ----------
     responsive.css (<=767px) centres #navigation with
     left:50% + margin-left:-125px (built for a 250px select).
     MOB2 reset left/right/width but NOT the margin, so the whole
     nav box hangs 125px off the left edge: the select's label
     zone is off-screen and only an empty box + chevron shows.
     Reset the margin; MOB2's left:0/right:0 then centres it. */
  .mobile_navbox #navigation {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* ---------- 3) FOOTER REBALANCE ----------
     The copyright block's real markup varies (settings HTML),
     so cover the block and EVERY text descendant. Payment strip:
     stack it on its own line, centred, at a legible height. */
  footer#copyright .footer_copyright,
  footer#copyright .footer_copyright * {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }
  footer#copyright .footer_copyright table,
  footer#copyright .footer_copyright tbody,
  footer#copyright .footer_copyright tr,
  footer#copyright .footer_copyright td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  footer#copyright .footer_copyright td {
    text-align: center !important;
    padding: 6px 10px !important;
  }
  footer#copyright .footer_copyright img {
    float: none !important;
    display: block !important;
    margin: 4px auto 0 !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 24px !important;
  }

  /* ---------- 2) BOTTOM ICON BAR ---------- */
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }

  .mob3-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9990;
    display: flex;
    align-items: stretch;
    background: #fff;
    border-top: 2px solid #111;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
  }
  .mob3-cell {
    position: relative;
    flex: 1 1 0;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px 5px;
    background: none;
    border: 0;
    margin: 0;
    color: #111;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mob3-cell svg {
    width: 23px; height: 23px;
    fill: none;
    stroke: #111;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mob3-cell .mob3-lab {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1;
    color: #111;
  }
  .mob3-cell.mob3-active svg { stroke: #e53935; }
  .mob3-cell.mob3-active .mob3-lab { color: #e53935; }
  .mob3-badge {
    position: absolute;
    top: 5px;
    right: calc(50% - 21px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-sizing: border-box;
  }
  .mob3-pages {
    position: absolute;
    left: 0; right: 0;
    bottom: 100%;
    display: none;
    background: #fff;
    border-top: 2px solid #111;
    max-height: 46vh;
    overflow-y: auto;
  }
  .mob3-pages.mob3-open { display: block; }
  .mob3-pages a {
    display: block;
    padding: 13px 18px;
    color: #111;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid #eee;
  }
  .mob3-pages a:last-child { border-bottom: 0; }

  /* ---------- 5) ARCHIVE FRONT/BACK TOGGLE (mobile) ----------
     Desktop uses the cards' hover flip; on touch there is no
     hover, so mob3.js adds a small Front/Back pill pair under
     each archive card image and this class performs the flip. */
  .mob3-fb {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 8px auto 2px;
  }
  .mob3-fb button {
    min-height: 30px;
    padding: 4px 14px;
    background: #fff;
    color: #111;
    border: 1px solid #111;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mob3-fb button.mob3-on { background: #111; color: #fff; }
  #products li.product_item.mob3-showback .image_container .loop_product.front { transform: rotateY(180deg) !important; }
  #products li.product_item.mob3-showback .image_container .loop_products.back { transform: rotateY(0deg) !important; }

  /* ---------- 6) SEARCH: ANIMATED BORDER (mobile/tablet) ----------
     The visible box is .mobsearch (it carries the theme's 1px
     border). Resting read: a clean black box; a logo-red accent
     segment flows around its edges on a white inside. */
  .mobsearch {
    border: 2px solid transparent !important;
    background:
      linear-gradient(#fff, #fff) padding-box,
      conic-gradient(from var(--mob3ang, 0deg),
        #111 0deg, #111 248deg, #e53935 300deg, #f6d7d5 322deg, #111 360deg) border-box !important;
    animation: mob3flow 3.8s linear infinite;
  }
}

/* ---------- 6) SEARCH: ANIMATED BORDER (desktop) ----------
   Same flow, but ONLY while the desktop search is hovered or
   focused/open. The inputs are box-sizing:border-box, so the
   2px border reserves its own space: outer width never moves. */
@media (min-width: 992px) {
  .search-area input[type="text"]:hover,
  .search-area input[type="text"]:focus,
  .sticky-search-area input[type="text"]:hover,
  .sticky-search-area input[type="text"]:focus {
    border: 2px solid transparent !important;
    background:
      linear-gradient(#fff, #fff) padding-box,
      conic-gradient(from var(--mob3ang, 0deg),
        #111 0deg, #111 248deg, #e53935 300deg, #f6d7d5 322deg, #111 360deg) border-box !important;
    animation: mob3flow 3.8s linear infinite;
    outline: none;
  }
}

/* ---------- reduced motion: no flow, no rotation ----------
   Static clean black box instead (JS also checks this). */
@media (prefers-reduced-motion: reduce) {
  .mobsearch {
    animation: none !important;
    border: 2px solid #111 !important;
    background: #fff !important;
  }
}
@media (prefers-reduced-motion: reduce) and (min-width: 992px) {
  .search-area input[type="text"]:hover,
  .search-area input[type="text"]:focus,
  .sticky-search-area input[type="text"]:hover,
  .sticky-search-area input[type="text"]:focus {
    animation: none !important;
    border: 2px solid #111 !important;
    background: #fff !important;
  }
}

/* the bar and toggles are JS-injected only at <=991.98px;
   belt-and-braces: never let them show on desktop */
@media (min-width: 992px) {
  .mob3-bar, .mob3-pages, .mob3-fb { display: none !important; }
}

/* SRP finalise 2026-11-09: purane CMS panno ka frame (sirf un panno par jahan entry-title hai) + neeche ki patti ki hifazat */

@media (max-width: 991px){ body{padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;} }
