/* Digilog storefront – mobile-first layer (loaded after style.css).
   90%+ of visitors are on phones: everything below 768px is tuned for one-hand use. */

/* ---------- all sizes: fixes ---------- */
ul.products{list-style:none;padding:0!important;margin:0}
html{-webkit-text-size-adjust:100%}
img{max-width:100%;height:auto}

/* Product gallery: swipe/arrow slider instead of a thumbnail strip */
.woocommerce-product-gallery .flex-viewport{border-radius:10px;position:relative}
.woocommerce-product-gallery .flex-direction-nav{list-style:none;margin:0;padding:0}
.woocommerce-product-gallery .flex-direction-nav a{position:absolute;top:50%;z-index:4;width:38px;height:38px;margin-top:-19px;border-radius:50%;background:rgba(255,255,255,.92);border:1px solid var(--line);box-shadow:0 2px 8px rgba(0,0,0,.08);font-size:0;color:transparent;overflow:hidden}
.woocommerce-product-gallery .flex-direction-nav a::after{content:'';position:absolute;top:13px;width:10px;height:10px;border:solid var(--ink);border-width:0 2px 2px 0}
.woocommerce-product-gallery .flex-prev{left:8px}
.woocommerce-product-gallery .flex-prev::after{left:15px;transform:rotate(135deg)}
.woocommerce-product-gallery .flex-next{right:8px}
.woocommerce-product-gallery .flex-next::after{left:11px;transform:rotate(-45deg)}
.woocommerce-product-gallery .flex-direction-nav .flex-disabled{opacity:0;pointer-events:none}
.dg-gallery-count{position:absolute;left:10px;bottom:10px;z-index:4;background:rgba(20,44,37,.72);color:#fff;font-size:12px;line-height:1;padding:5px 8px;border-radius:20px;pointer-events:none}

/* Checkout header: long store names stay on one line */
.dg-co-header .brand{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.dg-co-header-in{min-width:0;gap:12px}

.dg-no-results{margin:6px 0 20px;color:var(--muted);font-size:14px}
.dg-no-results .button{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;background:var(--green);color:#fff;border-radius:8px;text-decoration:none;font-weight:600}

/* Search */
.dg-search-fixed,.dg-suggest-fixed{background:#fff8e6;border:1px solid #f5dfa6;border-radius:8px;padding:8px 12px;font-size:14px;margin:0 0 12px}
.dg-suggest-fixed{margin:6px;font-size:13px}
.dg-suggest-box .t{flex:1;min-width:0}
.dg-suggest-box .t b{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-weight:600;font-size:14px}
.dg-suggest-box .p{flex:none;font-weight:700;color:var(--green);font-size:14px;white-space:nowrap}
@media (max-width:768px){.dg-suggest-box{max-height:70vh;overflow:auto}.dg-suggest-box li a{padding:10px 12px}}

/* Wholesale: log in / apply in place of the buy buttons */
.summary:has(.dg-b2b-cta)>p.price{display:none}
.dg-b2b-cta{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 16px}
.dg-b2b-cta .button{flex:1 1 180px;display:flex;align-items:center;justify-content:center;min-height:48px;border-radius:8px;font-weight:600;font-size:15px;text-decoration:none;padding:0 14px}
.dg-b2b-cta .dg-cta-main{background:var(--green);color:#fff;border:1px solid var(--green)}
.dg-b2b-cta .dg-cta-alt{background:#fff!important;color:var(--ink)!important;border:1.5px solid var(--ink)!important}
.dg-b2b-cta p{flex-basis:100%;margin:2px 0 0;font-size:13px;color:var(--muted)}

/* Buy now */
.woocommerce div.product form.cart .dg-buy-now{background:var(--green)!important;color:#fff!important;border-color:var(--green)!important}
.woocommerce div.product form.cart .single_add_to_cart_button{background:#fff!important;color:var(--ink)!important;border:1.5px solid var(--ink)!important}

/* Bottom app bar + install banner: hidden on desktop */
.dg-appbar,.dg-install{display:none}

@media (max-width:768px){
  body{overflow-x:clip;font-size:15px;padding-bottom:calc(62px + env(safe-area-inset-bottom))}
  .wrap{width:auto;margin-inline:12px}

  /* Header: compact + sticky */
  .topbar{display:none}
  .header{position:sticky;top:0;z-index:50;background:#fff;margin:0;padding:8px 12px 10px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px!important;box-shadow:0 1px 0 var(--line)}
  .header .brand{min-width:0;font-size:20px!important;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
  .header .brand img,.header .dg-logo{max-height:34px;width:auto}
  .header .brand small{font-size:8px;letter-spacing:2px}
  .header-actions{gap:14px!important;font-size:13px!important;align-items:center}
  .header-actions a{padding:6px 0}
  .header form.search{grid-column:1/-1;order:3;max-width:none!important;width:100%}
  form.search input{font-size:16px!important;height:44px;padding:0 12px}
  form.search button{height:44px;padding:0 16px}

  /* Category chips */
  .nav-shell{background:#fff}
  .nav{min-height:0!important;padding:8px 0;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .nav::-webkit-scrollbar{display:none}
  .nav ul{gap:8px!important}
  .nav li a{display:block;padding:7px 12px;border:1px solid var(--line);border-radius:20px;font-size:13px;font-weight:600;background:#fff;white-space:nowrap}
  .nav .trade-label{display:none}

  /* Page body: edge to edge, no floating white box */
  .content{margin:0!important;padding:14px 12px 24px!important;border-radius:0;min-height:50vh}
  .content h1,.woocommerce-products-header__title,.page-title{font-size:22px!important;line-height:1.25;margin:4px 0 10px}
  .woocommerce-breadcrumb{font-size:12px;margin-bottom:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .woocommerce-result-count{font-size:12px;margin:0 0 8px}
  .woocommerce-ordering{margin:0 0 12px}
  .woocommerce-ordering select{width:100%;height:42px;font-size:15px}

  /* Product grid: 2 columns, compact cards */
  .woocommerce ul.products,ul.products{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  ul.products li.product{padding:8px!important;border-radius:8px!important}
  ul.products li.product a img{margin-bottom:6px!important;border-radius:6px}
  ul.products li.product .woocommerce-loop-product__title{font-size:13px!important;line-height:1.35!important;margin:0 0 4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em}
  ul.products li.product .price{font-size:14px!important;line-height:1.35;display:block;margin-bottom:4px}
  ul.products li.product .price del{font-size:12px}
  ul.products li.product .button{min-height:40px;display:flex!important;align-items:center;justify-content:center;font-size:13px!important;padding:8px!important;margin-top:auto}
  .onsale{font-size:11px;padding:2px 6px}

  /* Single product: image → title → price → BUY on the first screen */
  .single-product .nav-shell,.single-product .content>.woocommerce-breadcrumb{display:none}
  .single-product .content{padding-top:10px!important}
  .woocommerce div.product .summary .stock{font-size:13px;margin:-4px 0 4px}
  .woocommerce div.product{display:flex;flex-direction:column}
  .woocommerce div.product .woocommerce-product-gallery{width:100%!important;float:none!important;margin:0 0 12px!important}
  .woocommerce-product-gallery .flex-viewport,.woocommerce-product-gallery__wrapper{max-height:min(86vw,48vh)}
  .woocommerce-product-gallery__image img{width:100%;max-height:min(86vw,48vh);object-fit:contain}
  .flex-control-thumbs,.flex-control-nav{display:none!important}
  .woocommerce div.product .summary{width:100%!important;float:none!important;margin:0!important}
  .woocommerce div.product .product_title{font-size:19px!important;letter-spacing:-.2px;margin:0 0 6px!important}
  .woocommerce div.product p.price{font-size:22px!important;margin:0 0 10px!important}
  .woocommerce div.product form.cart{margin:10px 0 14px!important;gap:8px!important}
  .woocommerce div.product form.cart .quantity input{height:48px;width:72px;font-size:16px}
  .woocommerce div.product form.cart .quantity{flex:0 0 auto}
  .woocommerce div.product form.cart:not(.variations_form) .button,.woocommerce div.product form.cart .woocommerce-variation-add-to-cart .button{flex:1 1 0}
  .woocommerce div.product form.cart .button{min-width:0!important;height:48px;font-size:16px!important;border-radius:8px}
  .woocommerce div.product form.cart .variations select{height:44px;font-size:16px}
  .woocommerce-product-details__short-description{font-size:14px}
  .woocommerce-tabs ul.tabs{display:flex;overflow-x:auto;gap:6px;padding:0;white-space:nowrap}
  .related.products h2,.upsells.products h2{font-size:18px}

  /* Nothing may be wider than the screen */
  html{overflow-x:clip}
  .woocommerce-pagination ul,ul.page-numbers{display:flex!important;flex-wrap:wrap;gap:6px;justify-content:center;padding:0;border:0!important}
  .woocommerce-pagination ul li,ul.page-numbers li{border:0!important}
  .woocommerce-pagination a,.woocommerce-pagination span,ul.page-numbers a,ul.page-numbers span{display:flex;align-items:center;justify-content:center;min-width:40px;height:40px;padding:0 10px;border:1px solid var(--line);border-radius:8px}
  .dg-footer-cols,.dg-footer-cols>*,.dg-col{min-width:0!important;max-width:100%;overflow-wrap:anywhere}
  .dg-footer-cols{grid-template-columns:1fr 1fr!important;gap:18px!important}
  .dg-col-brand{grid-column:1/-1}
  .dg-col-brand .brand{display:block;font-size:22px;overflow-wrap:anywhere}

  /* Footer clears the app bar */
  .site-footer,footer{font-size:14px}
  .dg-trust .wrap{gap:10px!important}

  /* Bottom app bar */
  .dg-appbar{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:90;background:#fff;border-top:1px solid var(--line);box-shadow:0 -2px 10px rgba(0,0,0,.05);padding-bottom:env(safe-area-inset-bottom)}
  .dg-appbar a,.dg-appbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:58px;font:600 11px/1 system-ui,sans-serif;color:var(--muted);background:none;border:0;text-decoration:none;position:relative;padding:0}
  .dg-appbar svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .dg-appbar .is-active{color:var(--green)}
  .dg-appbar .dg-cart-count{position:absolute;top:7px;left:calc(50% + 5px);min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#d92d20;color:#fff;font-size:10px;line-height:17px;text-align:center}

  /* Install banner */
  .dg-install{position:fixed;left:10px;right:10px;bottom:calc(68px + env(safe-area-inset-bottom));z-index:91;background:var(--ink);color:#fff;border-radius:12px;padding:10px 12px;align-items:center;gap:10px;font-size:13px;box-shadow:0 6px 24px rgba(0,0,0,.2)}
  .dg-install.show{display:flex}
  .dg-install img{width:36px;height:36px;border-radius:8px}
  .dg-install span{flex:1;line-height:1.35}
  .dg-install button{border:0;border-radius:8px;font:600 13px system-ui,sans-serif;padding:9px 12px}
  .dg-install .dg-install-yes{background:#fff;color:var(--ink)}
  .dg-install .dg-install-no{background:transparent;color:#fff;font-size:18px;padding:4px 6px}
}

/* Installed app (standalone): no browser chrome, so keep the header tidy */
@media (display-mode:standalone){
  .topbar{display:none}
}
