/* ItemToBasket site-wide styles: product cards, prices, product names */
:root{
  --itb-ink:#1b2a3a;
  --itb-name:#111;
  --itb-muted:#646f7b;
  --itb-accent:#e07a3f;
  --itb-accent-dark:#c4632b;
  --itb-soft:#f6f4f0;
  --itb-line:#e7e3dc;
}

/* ---------- Product grids (category, search, widgets, related, upsell) ---------- */
.products-grid .product-items{--listing-grid-gap:12px;--listing-grid-row-gap:16px}
@media (min-width:768px){.products-grid .product-items{--listing-grid-gap:20px;--listing-grid-row-gap:24px}}

.products-grid .product-item-info{border:1px solid var(--itb-line);border-radius:10px;padding:0!important;background:#fff;height:100%;display:flex;flex-direction:column;overflow:hidden;transition:box-shadow .2s,transform .2s}
.products-grid .product-item-info:hover{box-shadow:0 12px 30px -16px rgba(27,42,58,.4);transform:translateY(-2px)}
.products-grid .product-item-photo{display:block;margin:0!important;border-radius:0;overflow:hidden;background:var(--itb-soft)}
.products-grid .product-item-photo img{display:block;width:100%;transition:transform .4s}
.products-grid .product-item-info:hover .product-item-photo img{transform:scale(1.04)}

/* name on top, price underneath (Breeze puts them side by side 70/30) */
.products-grid .product-items .product-item-details{display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;flex:1;padding:12px 12px 14px}
.products-grid .product-items .product-item-details>*{width:100%!important;max-width:none!important}
.products-grid .product-items .product-item-details .product-item-name{order:1!important}
.products-grid .product-items .product-item-details .price-box{order:2!important;text-align:left!important;justify-content:flex-start}
.products-grid .product-items .product-item-details .product-reviews-summary{order:3!important}
.products-grid .product-items .product-item-details .product-item-inner{order:4!important;margin-top:auto}
@media (min-width:640px){.products-grid .product-items .product-item-details{padding:14px 16px 16px}}

.products-grid .product-item-actions{padding-top:12px}
.products-grid .action.tocart{border-radius:6px;font-weight:600}

/* ---------- Product names everywhere ---------- */
.product-item-name,.product-item-name a,.product-item-link{color:var(--itb-name)!important;font-weight:500}
.products-grid .product-item-name{font-size:14px;line-height:1.4;margin:0 0 8px!important}
.products-grid .product-item-name a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.product-item-name a:hover,.product-item-link:hover{color:var(--itb-accent)!important}

/* ---------- Prices everywhere ---------- */
.price-box{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;color:inherit}
.price-box .price-label{display:none!important}
.price-box .special-price{order:1;margin:0}
.price-box .old-price{order:2;margin:0}
.price-box .price,
.price-including-tax .price,.price-excluding-tax .price{color:var(--itb-accent);font-weight:700;letter-spacing:-.01em}
.price-box .old-price .price{color:#666!important;font-weight:500!important;text-decoration:line-through;font-size:.65em!important}

/* listing cards */
.products-grid .price-box .price{font-size:20px;line-height:1.2}
@media (min-width:640px){.products-grid .price-box .price{font-size:22px}}
.products-grid .price-box .old-price .price{font-size:13px!important}

/* product page */
.product-info-main .page-title{font-weight:700;color:var(--itb-ink);line-height:1.2}
.product-info-main .price-box{margin:.75rem 0}
.product-info-main .price-box .price{font-size:32px;line-height:1.1;font-weight:800}
.product-info-main .price-box .old-price .price{font-size:17px!important}
.product-info-main .action.tocart{background:var(--itb-accent);border-color:var(--itb-accent);border-radius:6px;font-weight:700}
.product-info-main .action.tocart:hover{background:var(--itb-accent-dark);border-color:var(--itb-accent-dark)}

/* minicart, cart, checkout */
.minicart-items .price,.cart.table-wrapper .price,.cart-summary .price,.opc-block-summary .price,.table-totals .price,.cart-totals .price{color:var(--itb-accent);font-weight:700}
.cart-summary .grand .price,.cart-totals .grand .price,.opc-block-summary .grand .price,.table-totals .grand .price{font-size:20px;font-weight:800}
.minicart-items .product-item-name a,.cart.table-wrapper .product-item-name a,.opc-block-summary .product-item-name{color:var(--itb-name)!important;font-weight:500}
.cart.table-wrapper .product-item-name{font-size:15px}
.action.primary.checkout,.checkout-methods-items .action.primary,#top-cart-btn-checkout,.action.primary.checkout-button{background:var(--itb-accent)!important;border-color:var(--itb-accent)!important;border-radius:6px;font-weight:700}
.action.primary.checkout:hover,.checkout-methods-items .action.primary:hover,#top-cart-btn-checkout:hover{background:var(--itb-accent-dark)!important;border-color:var(--itb-accent-dark)!important}

/* ---------- Newsletter band (footer, every page) ---------- */
.page-footer .footer-top{padding:0 16px!important;margin:0}
.page-footer .footer-top::after{display:none!important}
.page-footer .footer-top .block.newsletter{max-width:1240px;margin:0 auto;background:#fbefe6;border-radius:8px;padding:36px 20px 30px;text-align:center;float:none;width:auto}
.page-footer .footer-top .newsletter .title{margin:0 0 16px;display:block}
.page-footer .footer-top .newsletter .title strong{display:block;font-size:0;line-height:0}
.page-footer .footer-top .newsletter .title strong::after{content:"Get the latest deals on mattresses & packaging";display:block;font-size:20px;line-height:1.3;font-weight:700;color:var(--itb-ink)}
.page-footer .footer-top .newsletter .content{max-width:620px;margin:0 auto;width:auto}
.page-footer .footer-top .newsletter .form.subscribe{display:flex;align-items:stretch;width:100%;max-width:none;margin:0}
.page-footer .footer-top .newsletter .field.newsletter{flex:1;margin:0;max-width:none}
.page-footer .footer-top .newsletter .field.newsletter .label{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.page-footer .footer-top .newsletter .control,.page-footer .footer-top .newsletter .control label{display:block;margin:0}
.page-footer .footer-top .newsletter input[type=email]{width:100%;height:46px;margin:0;border:1px solid var(--itb-ink);border-right:0;border-radius:6px 0 0 6px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23646f7b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 6-10 7L2 6'/%3E%3C/svg%3E") no-repeat 14px center;padding:0 14px 0 44px;font-size:15px;color:var(--itb-ink);box-shadow:none}
.page-footer .footer-top .newsletter input[type=email]:focus{outline:2px solid var(--itb-accent);outline-offset:-2px}
.page-footer .footer-top .newsletter .actions{display:block;margin:0;width:auto}
.page-footer .footer-top .newsletter .action.subscribe{height:46px;margin:0;border-radius:0 6px 6px 0;background:var(--itb-accent);border:1px solid var(--itb-accent);color:#fff;font-weight:600;font-size:15px;padding:0 22px;white-space:nowrap;text-transform:none}
.page-footer .footer-top .newsletter .action.subscribe:hover{background:var(--itb-accent-dark);border-color:var(--itb-accent-dark)}
.page-footer .footer-top .newsletter .content::after{content:"By submitting your email address, you agree to receive offers from ItemToBasket. You can unsubscribe at any time.";display:block;margin:14px auto 0;max-width:520px;font-size:13px;line-height:1.5;color:var(--itb-muted)}
.page-footer .footer-top .newsletter .mage-error,.page-footer .footer-top .newsletter div.mage-error{text-align:left;font-size:13px}
@media (min-width:640px){
  .page-footer .footer-top .block.newsletter{padding:48px 32px 40px}
  .page-footer .footer-top .newsletter .title strong::after{font-size:24px}
}

/* remove large gap above footer (Breeze reserves 150px for a decoration we disabled) */
.page-footer,.page-footer:has(.footer-top),.page-footer:has(.footer-middle){padding-top:0!important}
.cms-index-index .page-main{padding-bottom:0!important}
.cms-index-index .column.main{min-height:0}
.page-footer .block.newsletter .title{padding:0!important}

/* ---------- Header: logo | search | account wishlist basket, menu on its own row (desktop) ---------- */
@media (max-width:1023px){
  .page-header .logo img{content:url(/media/logo/default/itemtobasket-logo.png);max-height:40px!important;max-width:112px!important;width:auto!important;height:auto!important}
}
@media (min-width:1024px){
  .page-header .header.content{flex-wrap:wrap;column-gap:28px;row-gap:0;padding-top:16px!important;padding-bottom:0!important;align-items:center}
  .page-header .header.content>.logo{order:1;margin:0!important;flex:0 0 auto}
  .page-header .header.content>.logo img{max-height:40px!important;max-width:310px!important;width:auto!important;height:auto!important}
  .page-header .header.content>.block-search{order:2;flex:1 1 auto;max-width:640px;width:auto!important;margin:0 auto!important;padding:0}
  .page-header .header.content>.block-search .block-content,.page-header .header.content>.block-search .form.minisearch{width:100%;max-width:none}
  .page-header .header.content>.block-search input{height:46px;border:1px solid #c9cfd6;border-radius:6px;background:#fff;font-size:15px;padding-left:16px}
  .page-header .header.content>.block-search input:focus{border-color:var(--itb-accent);outline:0;box-shadow:0 0 0 3px rgba(224,122,63,.15)}
  .page-header .header.content>.switcher-account{order:3;margin:0!important}
  .page-header .header.content>.switcher-wishlist{order:4;margin:0!important}
  .page-header .header.content>.minicart-wrapper{order:5;margin:0!important}
  .page-header .switcher-account .switcher-trigger,.page-header .switcher-wishlist .switcher-trigger,.page-header .minicart-wrapper .action.showcart{display:inline-flex!important;align-items:center;gap:8px;color:var(--itb-ink)!important;text-decoration:none}
  .page-header .switcher-account .switcher-trigger::after{content:"Account";font-size:15px;font-weight:500}
  .page-header .switcher-wishlist .switcher-trigger::after{content:"Wishlist";font-size:15px;font-weight:500}
  .page-header .minicart-wrapper .action.showcart::after{content:"Basket";font-size:15px;font-weight:500;order:5}
  .page-header .switcher-account .switcher-trigger:hover,.page-header .switcher-wishlist .switcher-trigger:hover,.page-header .minicart-wrapper .action.showcart:hover{color:var(--itb-accent)!important}
  .page-header .header.content>.navigation-wrapper{order:10;flex:0 0 100%;width:100%;margin:14px 0 0!important;border-top:1px solid var(--itb-line)}
  .page-header .header.content>.navigation-wrapper .navigation{width:auto;max-width:none;margin:0;padding:0}
  .page-header .header.content>.navigation-wrapper .navigation>ul{justify-content:flex-start;gap:4px 32px}
  .page-header .header.content>.navigation-wrapper .level-top{font-size:15px;font-weight:500;padding-top:12px;padding-bottom:12px}
}

/* ---------- Category & search pages: hide Compare / Wishlist / Recently Viewed sidebar ---------- */
.catalog-category-view .sidebar-additional,
.catalogsearch-result-index .sidebar-additional,
.catalogsearch-advanced-result .sidebar-additional{display:none!important}

/* newsletter clean-up: no wave above title, single mail icon, button attached */
.page-footer .block.newsletter .title::before{display:none!important;content:none!important}
.page-footer .block.newsletter .control>label::before{display:none!important;content:none!important}
.page-footer .block.newsletter .form.subscribe{gap:0!important;flex-wrap:nowrap!important}
.page-footer .block.newsletter .control>label input,
.page-footer .footer-top .newsletter input[type=email]{padding-left:46px!important;background-position:15px center!important;background-size:20px 20px!important}

/* wider header search box (desktop) */
@media (min-width:1024px){
  .page-header .minisearch .control .input-text{min-width:580px}
}

/* basket count badge */
.minicart-wrapper .action.showcart{position:relative}
.minicart-wrapper .action.showcart .counter.qty{top:-7px!important;right:auto!important;left:13px;min-width:19px;width:auto!important;height:19px!important;padding:0 5px;border-radius:999px;background:var(--itb-accent)!important;color:#fff;display:flex!important;align-items:center;justify-content:center;font-size:11px;font-weight:700;line-height:1;box-shadow:0 0 0 2px #fff}
.minicart-wrapper .action.showcart .counter.qty .counter-number{display:inline!important}
.minicart-wrapper .action.showcart .counter.qty .counter-label{display:none!important}
