/* DWS fixes (v20261018t). First section (loader) = all screens. The @media section below = phones only (< 768px wide).
   Also used inside the Android / iPhone apps (they show the website).
   To undo: remove the one <link ... dws-mobile.css> line from Views\Shared\_Layout.cshtml. */
/* ===== Premium loader - ALL screens (desktop, phone, app). Replaces the grey screen + DWS logo animation. =====
   The old #loading box is still shown/hidden by the site's own code exactly as before; only its look changes:
   a thin gold bar at the top at once, and a small gold ring only if the wait is longer than 0.6 s.
   Clicks are still blocked while it is showing (prevents double orders), as before. */
#loading.loadingmodal { background: transparent !important; }
#loading.loadingmodal .loadingcenter { display: none !important; }
#loading.loadingmodal::before {
  content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 2147483000;
  background: linear-gradient(90deg, rgba(201,169,110,0) 0%, #c9a96e 35%, #f0d9a6 50%, #c9a96e 65%, rgba(201,169,110,0) 100%);
  background-size: 45% 100%; background-repeat: no-repeat; animation: dwsBar 1.05s ease-in-out infinite;
}
#loading.loadingmodal::after {
  content: ""; position: fixed; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 2147483000;
  border-radius: 50%; border: 3px solid rgba(201,169,110,.22); border-top-color: #b8955a; background: rgba(255,255,255,.9);
  box-shadow: 0 4px 18px rgba(0,0,0,.12); opacity: 0; animation: dwsSpin .75s linear infinite, dwsShow .2s ease .6s forwards;
}
body:has(#loading:not([style*="none"])) .productGrid { opacity: .55; transition: opacity .2s; }
#dwsNavBar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2147483001; pointer-events: none;
  background: linear-gradient(90deg, #b8955a, #f0d9a6); box-shadow: 0 0 8px rgba(201,169,110,.7); opacity: 0; }
#dwsNavBar.go { opacity: 1; animation: dwsNav 8s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes dwsBar { 0% { background-position: -60% 0; } 100% { background-position: 160% 0; } }
@keyframes dwsSpin { to { transform: rotate(360deg); } }
@keyframes dwsShow { to { opacity: 1; } }
@keyframes dwsNav { 0% { width: 0; } 30% { width: 55%; } 100% { width: 92%; } }

/* ===== Side menu dimming layer + extra links (all screens) ===== */
#overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9999998; }
.dws-menu-extra { list-style: none; margin: 14px 0 90px; padding: 12px 0 0 15px; border-top: 1px solid #eee; }
.dws-menu-extra li a { display: block; padding: 9px 0; font: 500 13px Montserrat, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #333; }
@media (min-width: 970px) { .dws-menu-extra { display: none !important; } }

@media only screen and (max-width: 767px) {

  /* ---------- floating buttons: smaller, out of the way ---------- */
  .whatsappIconF { width: 48px !important; height: 48px !important; line-height: 48px !important; right: 12px !important; bottom: 14px !important; }
  .whatsappIconF i { font-size: 28px !important; }
  #myBtn { display: none !important; }               /* "back to top" circle: not needed on phones */
  footer { padding-bottom: 90px !important; }         /* last footer lines are never hidden behind buttons */

  /* ---------- product list: easier to read and tap ---------- */
  .trend-text div {                                   /* product name: 2 lines instead of 1 cut-off line */
    white-space: normal !important; overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-height: 1.3; min-height: 2.6em; font-size: 13px;
  }
  .list-page .product-box { padding-bottom: 50px !important; }
  .product-box .trend-text { margin-bottom: 2px !important; }
  .product-box .trend-text p { margin-bottom: 2px !important; }
  .product-box .tred-icons { bottom: 8px !important; display: flex; justify-content: space-between; padding: 0 4px; }
  .product-box .tred-icons a { width: 23% !important; height: 40px !important; line-height: 40px !important; margin: 0 !important; font-size: 16px; border-radius: 6px; }

  /* ---------- filter button: a clear "Filter" pill at the bottom centre ---------- */
  body:not(.mobileapp) .tittle-bar button.btn {
    left: 50% !important; transform: translateX(-50%); bottom: 14px !important;
    width: auto !important; height: 44px !important; padding: 0 22px !important; border-radius: 22px !important;
    text-indent: 0 !important; font-size: 0 !important; letter-spacing: 0 !important; white-space: nowrap;
  }
  body:not(.mobileapp) .tittle-bar button.btn i { display: none !important; }
  body:not(.mobileapp) .tittle-bar button.btn:before { content: "\f0b0"; font-family: FontAwesome; font-size: 15px; margin-right: 8px; }
  body:not(.mobileapp) .tittle-bar button.btn:after { content: "Filter"; font-family: Montserrat, sans-serif; font-size: 15px; letter-spacing: 1px; }
  body:not(.mobileapp) .tittle-bar button.btn:not(.collapsed):before { content: "\f00d"; }
  body:not(.mobileapp) .tittle-bar button.btn:not(.collapsed):after { content: "Close"; }

  /* ---------- open filter panel: full screen, "Show products" always visible ---------- */
  #collapseExample .card-body { max-height: none !important; overflow: visible !important; }
  #collapseExample .filter-box, #collapseExample .mCustomScrollBox { max-height: none !important; }
  #collapseExample .mCSB_scrollTools { display: none !important; }
  #collapseExample.show { padding-bottom: 140px !important; z-index: 98; }
  #collapseExample .dws-show-products {
    position: fixed; left: 16px; right: 16px; bottom: 70px; z-index: 99;
    width: auto; margin: 0 !important; padding: 13px 0 !important; font-size: 16px !important; border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
  }
  #collapseExample .dws-chip { padding: 8px 12px; font-size: 14px; }

  /* ---------- product page: sticky "Add to cart" bar ---------- */
  .products-detail .product-info .qty-row {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; margin: 0 !important;
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.15);
  }
  .products-detail .product-info .qty-row .quantity { position: static; display: flex; align-items: center; width: auto; margin: 0; flex: 0 0 auto; }
  .products-detail .product-info .qty-row .quantity label { display: none; }
  .products-detail .hongo-qtyminus, .products-detail .hongo-qtyplus {
    position: static !important; width: 40px !important; height: 44px !important; line-height: 42px !important;
    font-size: 22px; border: 1px solid #ccc !important; background: #f7f7f7 !important; user-select: none;
  }
  .products-detail .qty-row input.qty { width: 46px !important; height: 44px !important; text-align: center; border: 1px solid #ccc; border-left: 0; border-right: 0; margin: 0; padding: 0; font-size: 16px; }
  .products-detail .qty-row button.btn { flex: 1 1 auto; height: 44px; margin: 0 !important; font-size: 15px; letter-spacing: 1px; }
  body:has(.products-detail .qty-row) footer { padding-bottom: 150px !important; }
  body:has(.products-detail .qty-row) .whatsappIconF { bottom: 78px !important; }

  /* ---------- product page: clearer price box ---------- */
  .products-detail .price .price-left, .products-detail .price .price-calu { width: 100% !important; float: none !important; display: block; text-align: left; }
  .products-detail .price .price-left span { display: block; margin-bottom: 4px; }
  .products-detail .price .price-calu { margin: 8px 0 0 !important; padding: 8px 0 0 !important; border-left: 0 !important; border-top: 1px solid #d8ccc3; }
  .products-detail .price .price-calu > b { display: none; }
  .products-detail .price .price-calu > span { display: block; font-size: 15px; }
  .products-detail .price .price-calu > span:first-of-type:before { content: "Your price per piece: "; font-weight: 400; }
  .products-detail .price .price-calu > span:nth-of-type(2):before { content: "Total for this quantity: "; font-weight: 400; }
  .products-detail .price .price-plan { display: block; margin: 8px 0 0 !important; }

  /* ---------- inside the app (body.mobileapp): the orange app bar is fixed at the bottom (42px, above page content) ---------- */
  .mobileapp .products-detail .product-info .qty-row { bottom: 42px; }
  .mobileapp footer { padding-bottom: 160px !important; }
  #collapseExample:not(.show) .dws-show-products { display: none !important; }   /* never show it while the filter is closed */

  /* ---------- app: same "Filter" pill and full-screen filter as on the phone website ---------- */
  body.mobileapp .tittle-bar button.btn, body.mobileapp .tittle-bar button.btn.collapsed {
    position: fixed !important; top: auto !important; right: auto !important; left: 50% !important; bottom: 54px !important;
    transform: translateX(-50%); z-index: 99; width: auto !important; height: 44px !important; padding: 0 22px !important;
    border: 0 !important; border-radius: 22px !important; background: #b1ad7b !important; background-color: #b1ad7b !important; color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.25) !important; text-indent: 0 !important; font-size: 0 !important; letter-spacing: 0 !important; white-space: nowrap;
  }
  body.mobileapp .tittle-bar button.btn i { display: none !important; }
  body.mobileapp .tittle-bar button.btn:before, body.mobileapp .tittle-bar button.btn.collapsed:before {
    content: "\f0b0" !important; display: inline !important; position: static !important; transform: none !important; background: none !important;
    width: auto !important; height: auto !important; font-family: FontAwesome; font-size: 15px; margin-right: 8px; color: #fff;
  }
  body.mobileapp .tittle-bar button.btn:after { content: "Filter"; font-family: Montserrat, sans-serif; font-size: 15px; letter-spacing: 1px; color: #fff; }
  body.mobileapp .tittle-bar button.btn:not(.collapsed):before { content: "\f00d" !important; }
  body.mobileapp .tittle-bar button.btn:not(.collapsed):after { content: "Close"; }
  body.mobileapp .filter-section.collapse { width: 100% !important; }
  body.mobileapp #collapseExample.show { padding-bottom: 170px !important; }
  body.mobileapp #collapseExample .dws-show-products { bottom: 108px; }

  /* ---------- app: cart / wishlist numbers on the orange bar ---------- */
  .mobileapp .mobile-tab li { position: relative; }
  .mobileapp .mobile-tab li small { display: block !important; position: absolute; top: 3px; left: 54%; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: #fff; color: #e86a00; font: 700 11px/18px Montserrat, Arial, sans-serif; text-align: center; pointer-events: none; }
  .mobileapp .mobile-tab li small.dws-zero { display: none !important; }

  /* ---------- cart page: each product as a card, sticky Checkout bar ---------- */
  .wishlist-table:has(#txtCQty) { overflow: visible !important; border: 0; }
  .wishlist-table table:has(#txtCQty), .wishlist-table table:has(#txtCQty) tbody { display: block; width: 100%; }
  .wishlist-table table:has(#txtCQty) thead { display: none; }
  .wishlist-table table:has(#txtCQty) tr { display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; position: relative;
    padding: 12px 12px 10px; margin: 0 0 12px; border: 1px solid #e6dfd2; border-radius: 10px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
  .wishlist-table table:has(#txtCQty) td { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; width: auto !important; }
  .wishlist-table table:has(#txtCQty) td:nth-child(1) { position: absolute; top: 6px; left: 6px; z-index: 1; }
  .wishlist-table table:has(#txtCQty) td:nth-child(2) { grid-row: 1; grid-column: 1; }
  .wishlist-table table:has(#txtCQty) td:nth-child(2) img { width: 92px !important; height: auto; border-radius: 6px; }
  .wishlist-table table:has(#txtCQty) td:nth-child(3) { grid-row: 1; grid-column: 2; padding-right: 26px !important; font-size: 12px; }
  .wishlist-table table:has(#txtCQty) td:nth-child(3) .wishlist-product { display: block; }
  .wishlist-table table:has(#txtCQty) td:nth-child(9) { position: absolute; top: 8px; right: 10px; font-size: 20px; }
  .wishlist-table table:has(#txtCQty) td:nth-child(n+4):nth-child(-n+8) { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center;
    gap: 10px; border-top: 1px dashed #eee !important; padding-top: 6px !important; font-size: 13px; }
  .wishlist-table table:has(#txtCQty) td:nth-child(6) { flex-wrap: wrap; }
  .wishlist-table table:has(#txtCQty) td:nth-child(4)::before { content: "Retail price"; color: #777; }
  .wishlist-table table:has(#txtCQty) td:nth-child(5)::before { content: "Quantity"; color: #777; }
  .wishlist-table table:has(#txtCQty) td:nth-child(6)::before { content: "Your price"; color: #777; width: 100%; }
  .wishlist-table table:has(#txtCQty) td:nth-child(7)::before { content: "Total"; color: #777; }
  .wishlist-table table:has(#txtCQty) td:nth-child(7) { font-weight: 700; font-size: 15px; }
  .wishlist-table table:has(#txtCQty) td:nth-child(8)::before { content: "Comment"; color: #777; }
  .wishlist-table table:has(#txtCQty) td:nth-child(8) textarea { width: 65% !important; margin: 0 !important; }
  .wishlist-table table:has(#txtCQty) #txtCQty { width: 64px !important; height: 38px; font-size: 16px; }
  #dwsCartBar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.15); }
  #dwsCartBar .dws-cart-total { flex: 1; font: 700 17px Montserrat, Arial, sans-serif; color: #222; }
  #dwsCartBar .dws-cart-total small { display: block; font-weight: 400; font-size: 11px; color: #777; letter-spacing: .5px; }
  #dwsCartBar a { background: #000; color: #fff; padding: 12px 26px; border-radius: 4px; font: 500 15px Montserrat, Arial, sans-serif; letter-spacing: 1px; }
  .mobileapp #dwsCartBar { bottom: 42px; }
  body.dws-has-cartbar footer { padding-bottom: 160px !important; }
  body.dws-has-cartbar .whatsappIconF { bottom: 80px !important; }

  /* ---------- footer: tap a heading to open its links ---------- */
  footer .dws-acc h4 { cursor: pointer; position: relative; margin-bottom: 0; padding: 12px 0; border-bottom: 1px solid #ece6da; }
  footer .dws-acc h4::after { content: "+"; position: absolute; right: 6px; font-size: 18px; font-weight: 400; }
  footer .dws-acc.dws-open h4::after { content: "\2212"; }
  footer .dws-acc ul { display: none; padding-top: 6px !important; }
  footer .dws-acc.dws-open ul { display: block; }
  footer li.site-footer__linklist-item, footer .single-information-link { margin-bottom: 0 !important; }

  /* ---------- home page: long text folded behind "Read more" (text stays on the page for Google) ---------- */
  .content-section.dws-fold { position: relative; max-height: 420px; overflow: hidden; padding-bottom: 0 !important; }
  .content-section.dws-fold::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 130px; pointer-events: none;
    background: linear-gradient(rgba(255,255,255,0), #fff); }
  .content-section.dws-fold.dws-unfold { max-height: none; padding-bottom: 60px !important; }
  .content-section.dws-fold.dws-unfold::after { display: none; }
  .content-section .dws-more-btn { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); border: 1px solid #b1ad7b; background: #fff;
    color: #6b5a3a; padding: 8px 26px; border-radius: 20px; font: 500 13px Montserrat, Arial, sans-serif; letter-spacing: 1px; }
}
