/* HomeBerry mobile product-card and basket-to-checkout improvements, 18 Oct 2026.
   Presentation only; uses existing shop buttons and validation. */
@media (max-width:650px) {
 body.storefront-homeberry .product-grid:has(.card-basket-controls),
 body.storefront-homeberry .hb-category-page .category-results>.seo-category-stream>.product-grid:has(.card-basket-controls),
 body.storefront-homeberry .hb-town-products .product-grid:has(.card-basket-controls),
 body.storefront-homeberry .hb-retired-products .product-grid:has(.card-basket-controls) {
   grid-template-columns:minmax(0,1fr)!important;
   gap:11px!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) {
   display:grid!important;
   grid-template-columns:130px minmax(0,1fr)!important;
   grid-template-rows:auto auto 1fr auto!important;
   column-gap:12px!important;
   row-gap:4px!important;
   align-items:start!important;
   min-width:0!important;
   padding:10px!important;
   border:1px solid #ead6df!important;
   border-radius:15px!important;
   background:#fff!important;
   box-shadow:none!important;
   overflow:hidden!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-image {
   grid-column:1!important;grid-row:1/4!important;
   width:130px!important;height:137px!important;min-height:0!important;
   margin:0!important;padding:0!important;
   border-radius:10px!important;
   aspect-ratio:auto!important;overflow:hidden!important;
   background:#faf7f8!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-image img {
   width:100%!important;height:100%!important;
   display:block!important;object-fit:contain!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-image .card-saving {
   position:absolute!important;left:4px!important;top:4px!important;
   font-size:9px!important;padding:4px 5px!important;
   max-width:calc(100% - 8px)!important;line-height:1.2!important;
   white-space:normal!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-body {display:contents!important}
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-body>.brand {display:none!important}
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-body>h3 {
   grid-column:2!important;grid-row:1!important;
   align-self:start!important;min-width:0!important;
   padding:1px 0 0!important;margin:0!important;
   color:#583145!important;
   font-family:Georgia,'Times New Roman',serif!important;
   font-size:15px!important;line-height:1.22!important;
   display:-webkit-box!important;-webkit-box-orient:vertical!important;
   -webkit-line-clamp:3!important;overflow:hidden!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-body>h3 a {
   display:inline!important;color:inherit!important;
   font-size:inherit!important;line-height:inherit!important;
   text-decoration:none!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-body>.card-price-line {
   grid-column:2!important;grid-row:2!important;
   display:flex!important;flex-wrap:wrap!important;align-items:baseline!important;
   gap:5px 8px!important;min-width:0!important;
   padding:1px 0!important;margin:0!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-body>.card-price-line .price {
   font-size:20px!important;line-height:1.2!important;font-weight:900!important;
   color:#603447!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-body>.card-price-line .rrp {
   font-size:11px!important;line-height:1.2!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-body>.compare-card-button {
   grid-column:2!important;grid-row:3!important;align-self:end!important;
   width:max-content!important;max-width:100%!important;
   min-height:31px!important;margin:0!important;
   padding:5px 10px!important;border-radius:8px!important;
   color:#603447!important;font-size:11px!important;
   background:#fff!important;border:1px solid #e6ced8!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-body>.card-basket-controls {
   grid-column:1/-1!important;grid-row:4!important;min-width:0!important;
   padding:8px 0 0!important;margin:3px 0 0!important;
   border-top:1px solid #f0e6e9!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-buy-row {
   display:grid!important;
   grid-template-columns:38px 48px 38px minmax(0,1fr)!important;
   align-items:center!important;gap:7px!important;width:100%!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-qty-step {
   width:38px!important;min-width:38px!important;height:44px!important;
   background:#f6eff2!important;color:#603447!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) input[data-card-qty] {
   width:48px!important;height:44px!important;
   border:1px solid #dec5d0!important;border-radius:8px!important;
   font-size:16px!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-add-button {
   min-height:45px!important;min-width:0!important;
   padding:9px 12px!important;border-radius:10px!important;
   background:#e7214c!important;color:#fff!important;
   font-size:14px!important;font-weight:850!important;
   white-space:normal!important;line-height:1.14!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-add-button.added {
   background:#286b45!important;color:#fff!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-basket-status {
   border-radius:9px!important;padding:9px!important;
   gap:6px!important;flex-wrap:wrap!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-basket-status a {
   color:#603447!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) a:focus-visible,
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) button:focus-visible,
 body.storefront-homeberry .hb-basket-sticky button:focus-visible {
   outline:3px solid #603447!important;outline-offset:2px!important;
 }
 body.storefront-homeberry .basket-page-rich,
 body.storefront-homeberry .checkout-page-rich{padding-top:12px!important}
 body.storefront-homeberry .basket-page-rich .page-head-rich,
 body.storefront-homeberry .checkout-head-rich{margin-bottom:11px!important;gap:8px!important}
 body.storefront-homeberry .basket-page-rich .page-head-rich h1,
 body.storefront-homeberry .checkout-head-rich h1 {
   font-size:clamp(28px,8vw,33px)!important;line-height:1.09!important;
   letter-spacing:-.035em!important;margin:0 0 5px!important;
 }
 body.storefront-homeberry .checkout-head-rich p {
   font-size:13px!important;line-height:1.4!important;
 }
 body.storefront-homeberry .checkout-head-rich .secure-chip{display:none!important}
 body.storefront-homeberry .checkout-steps,
 body.storefront-homeberry .checkout-steps.hb-three-steps {
   display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
   gap:5px!important;margin:8px 0 12px!important;
 }
 body.storefront-homeberry .checkout-step,
 body.storefront-homeberry .checkout-steps.hb-three-steps .checkout-step {
   min-width:0!important;min-height:70px!important;
   display:flex!important;flex-direction:column!important;
   align-items:center!important;justify-content:center!important;
   gap:5px!important;padding:8px 3px!important;
   font-size:10px!important;line-height:1.15!important;text-align:center!important;
 }
 body.storefront-homeberry .checkout-step b,
 body.storefront-homeberry .checkout-steps.hb-three-steps .checkout-step b {
   width:25px!important;height:25px!important;flex:0 0 25px!important;
 }
 body.storefront-homeberry .hb-checkout-reassurance{display:none!important}
 body.storefront-homeberry .checkout-card-rich{padding:17px!important}
 body.storefront-homeberry .checkout-card-rich>.payment-box{
   padding:12px!important;font-size:12px!important;line-height:1.45!important;
   margin-bottom:13px!important;
 }
 body.storefront-homeberry .checkout-card-rich .form-section h2{font-size:21px!important;margin-bottom:9px!important}
 body.storefront-homeberry .checkout-card-rich .form-section+ .form-section{margin-top:18px!important;padding-top:16px!important}
 body.storefront-homeberry .basket-page-rich .page-head-rich .secure-chip {
   font-size:11px!important;padding:7px 9px!important;
 }
 body.storefront-homeberry .basket-page-rich .page-head-rich p {
   font-size:13px!important;line-height:1.4!important;
 }
 body.storefront-homeberry .basket-summary-rich{padding:17px!important}
 body.storefront-homeberry .hb-basket-sticky{
   position:fixed!important;z-index:47!important;left:0;right:0;bottom:0;
   display:grid;grid-template-columns:minmax(92px,1fr) minmax(180px,1.45fr);
   align-items:center;gap:11px;
   padding:10px 13px max(10px,env(safe-area-inset-bottom));
   background:rgba(255,255,255,.98);
   border-top:1px solid #e7ccd6;
   box-shadow:0 -5px 20px rgba(69,32,47,.15);
 }
 body.storefront-homeberry .hb-basket-sticky[hidden]{display:none!important}
 body.storefront-homeberry .hb-basket-sticky>span{display:grid;gap:3px}
 body.storefront-homeberry .hb-basket-sticky small{color:#795765;font-size:11px;font-weight:700}
 body.storefront-homeberry .hb-basket-sticky strong{
   color:#603447;font-size:clamp(17px,5vw,22px);white-space:nowrap
 }
 body.storefront-homeberry .hb-basket-sticky button{
   min-width:0;min-height:49px;padding:10px 7px;
   border-radius:999px;border:0;background:#e7214c;
   font-size:14px;font-weight:850;color:#fff;cursor:pointer;
 }
 body.storefront-homeberry.hb-basket-sticky-visible{padding-bottom:85px}
}
@media(max-width:365px){
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls){
   grid-template-columns:108px minmax(0,1fr)!important;column-gap:9px!important
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls)>.card-image {
   width:108px!important;height:126px!important
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-buy-row {
   grid-template-columns:35px 44px 35px minmax(0,1fr)!important;gap:5px!important
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-qty-step{
   width:35px!important;min-width:35px!important
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) input[data-card-qty]{width:44px!important}
}


/* Compact the footer into a single row: earlier shared mobile rules used
   two lines for quantity and add, wasting significant vertical space. */
@media(max-width:650px){
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls){
   grid-template-rows:auto auto auto auto!important;
   align-content:start!important;height:auto!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-buy-row {
   padding:3px 0 0!important;
   grid-template-rows:45px!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-buy-row>.card-add-button {
   grid-column:4!important;grid-row:1!important;
   width:100%!important;height:45px!important;
 }
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-buy-row>.card-qty-step:first-child {grid-column:1!important;grid-row:1!important}
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-buy-row>input[data-card-qty] {grid-column:2!important;grid-row:1!important}
 body.storefront-homeberry .product-grid .card:has(.card-basket-controls) .card-buy-row>.card-qty-step:nth-of-type(2) {grid-column:3!important;grid-row:1!important}
}
