/* Ximsem ASP.NET storefront integration. Backend services, database settings and product image URLs are intentionally untouched. */
html,body{max-width:100%;overflow-x:hidden}
body.ximsem-store{min-height:100vh}
body.ximsem-store .ximsem-live-main{min-height:55vh}
body.ximsem-store .wrap{max-width:1240px;margin:0 auto;padding-left:32px;padding-right:32px}
body.ximsem-store.light-page{background:var(--noir)}
body.ximsem-store.light-page .ximsem-live-main{background:linear-gradient(135deg,var(--paper) 0%,var(--paper-2) 58%,var(--paper-3) 100%)}

/* Header / mobile */
.ximsem-header .brand-logo{width:38px;height:38px}
.ximsem-header .nav-actions{white-space:nowrap}
.ximsem-mobile-menu{display:none;border-top:1px solid var(--line);padding:10px 26px 18px;background:rgba(70,62,82,.98)}
.ximsem-mobile-menu.open{display:flex;flex-direction:column;gap:4px}
.ximsem-mobile-menu a{padding:10px 0;color:var(--ivory-dim);font-size:14px}
.menu-toggle{display:none}
.cart-tool{position:relative}
.cart-tool .count{position:absolute;top:-4px;right:-4px;background:var(--brass);color:var(--noir);font-size:10px;font-weight:700;width:17px;height:17px;border-radius:50%;display:flex;align-items:center;justify-content:center}

/* Homepage backend products */
.backend-product-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px}
.backend-product-grid.product-page-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.backend-product-grid .prod-card{height:100%}
.prod-card .prod-img>a{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
.prod-card .prod-img img{max-width:100%;max-height:132px;object-fit:contain}
.prod-card .product-title-link{display:block;color:inherit}
.prod-card .product-title-link:hover h3{color:#8E6231}
.prod-card .product-stock{font-size:11.5px;color:var(--paper-muted);margin-top:5px}
.prod-card .view-product{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--brass);color:var(--noir);font-size:18px;font-weight:700}
.prod-card .view-product:hover{transform:scale(1.06)}

/* Main category page / subcategories */
.backend-main-categories{display:flex;flex-wrap:wrap;justify-content:center;gap:22px;margin-top:28px}
.backend-main-categories .big-cat{flex:0 1 calc((100% - 44px)/3);max-width:390px}
.backend-subcategories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-top:28px}
.backend-subcategories .subcat-card{min-height:112px}
.category-page-section{padding-top:54px!important;padding-bottom:78px!important}

/* Product listing */
.catalog-pagination{margin-top:42px}
.catalog-pagination .pagination{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;padding:0;margin:0;list-style:none}
.catalog-pagination .page-link{min-width:38px;height:38px;padding:0 10px;border-radius:10px!important;border:1px solid var(--paper-line)!important;background:rgba(255,255,255,.58)!important;color:var(--paper-muted)!important;display:flex;align-items:center;justify-content:center;text-decoration:none}
.catalog-pagination .active>.page-link{background:var(--brass)!important;color:var(--paper-text)!important;border-color:var(--brass)!important}
.catalog-pagination .disabled>.page-link{opacity:.45;pointer-events:none}
.empty-state{grid-column:1/-1;background:rgba(255,255,255,.72);border:1px solid var(--paper-line);border-radius:24px;padding:36px;text-align:center;color:var(--paper-text);box-shadow:0 22px 44px -30px rgba(55,40,63,.36)}
.empty-state p{color:var(--paper-muted)}

/* Product details */
.backend-product-detail{padding:54px 0 80px;background:linear-gradient(135deg,var(--paper) 0%,var(--paper-2) 58%,var(--paper-3) 100%);color:var(--paper-text)}
.backend-product-detail .pd-layout{align-items:start}
.backend-product-detail .pd-gallery-main img{max-width:88%;max-height:330px;object-fit:contain}
.product-gallery-thumbs{display:flex;gap:12px;flex-wrap:wrap;margin-top:14px}
.product-gallery-thumb{width:76px;height:76px;border-radius:12px;background:rgba(255,255,255,.68);border:1px solid var(--paper-line);display:flex;align-items:center;justify-content:center;padding:7px;cursor:pointer}
.product-gallery-thumb.active{border-color:var(--brass)}
.product-gallery-thumb img{max-width:100%;max-height:100%;object-fit:contain}
.backend-product-detail .product-detail-copy h1{color:var(--paper-text);font-size:clamp(36px,4.7vw,58px);margin:12px 0 16px}
.backend-product-detail .detail-description{color:var(--paper-muted);line-height:1.75}
.backend-product-detail .product-attributes{margin-top:18px}
.backend-product-detail select,.backend-product-detail input[type=number],.backend-product-detail input[type=text]{border:1px solid var(--paper-line);border-radius:12px;padding:11px 12px;background:rgba(255,255,255,.72);color:var(--paper-text)}
.backend-product-detail .description-card{margin-top:34px;background:rgba(255,255,255,.72);border:1px solid var(--paper-line);border-radius:26px;padding:30px;color:var(--paper-muted);line-height:1.75}
.backend-product-detail .description-card h2{color:var(--paper-text);margin-bottom:12px}

/* Cart */
.backend-cart{padding:20px 0 80px;background:linear-gradient(135deg,var(--paper) 0%,var(--paper-2) 58%,var(--paper-3) 100%)}
.backend-cart .cart-item{grid-template-columns:84px minmax(0,1fr) auto auto}
.backend-cart .cart-item .thumb img{max-width:70px;max-height:62px;object-fit:contain}
.backend-cart .cart-item .item-title{font-weight:600;color:var(--paper-text);display:block;margin-bottom:5px}
.backend-cart .cart-item .attr{display:block;font-size:12px;color:var(--paper-muted);margin-top:3px}
.backend-cart .qty-box input{width:48px;text-align:center;border:0;background:transparent;color:var(--paper-text);outline:none}
.backend-cart .summary-card .btn{width:100%;margin-top:18px}

/* Forms / checkout / account pages */
.ximsem-store .form-control,.ximsem-store .form-select{border:1px solid var(--paper-line);border-radius:12px;min-height:44px;box-shadow:none}
.ximsem-store .card{border-radius:20px}
.ximsem-store .text-primary{color:#8E6231!important}
.ximsem-store .btn-primary{background:var(--brass);border-color:var(--brass);color:var(--paper-text)}
.ximsem-store .btn-primary:hover{background:var(--brass-light);border-color:var(--brass-light);color:var(--paper-text)}
.checkout-backend,.account-page-wrap{padding:44px 0 80px;background:linear-gradient(135deg,var(--paper) 0%,var(--paper-2) 58%,var(--paper-3) 100%);color:var(--paper-text)}
.checkout-backend .checkout-form,.account-surface{background:rgba(255,255,255,.72);border:1px solid var(--paper-line);border-radius:24px;padding:26px;box-shadow:0 22px 44px -30px rgba(55,40,63,.36)}

/* Contact modal / validation */
.help-block,.field-validation-error{color:#b14b52;font-size:12px}
.modal-content{color:#352D3D;border-radius:20px}

/* Empty contact details */
.contact-empty{display:block;width:100%;height:auto;border:0;margin-top:3px;line-height:1.55;overflow-wrap:anywhere;word-break:normal}
.inline-blank{display:inline;min-width:0;width:auto;height:auto;border:0;vertical-align:baseline}
.long-blank{min-width:0!important;width:auto!important;max-width:none!important}

/* Old authenticated utility screens still inherit the Ximsem shell without changing their backend behavior. */
.ximsem-store .container,.ximsem-store .container-fluid{--bs-gutter-x:1.5rem}
.ximsem-store.light-page .ximsem-live-main>.container,.ximsem-store.light-page .ximsem-live-main>.container-fluid,.ximsem-store.light-page .ximsem-live-main>.row{color:var(--paper-text)}

@media(max-width:1180px){
  .backend-product-grid{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:1000px){
  .backend-product-grid,.backend-product-grid.product-page-grid{grid-template-columns:repeat(3,1fr)}
  .backend-main-categories .big-cat{flex-basis:calc((100% - 22px)/2)}
  .backend-subcategories{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:980px){
  .menu-toggle{display:flex}
}
@media(max-width:760px){
  body.ximsem-store .wrap{padding-left:20px;padding-right:20px}
  .backend-product-grid,.backend-product-grid.product-page-grid{grid-template-columns:repeat(2,1fr)}
  .backend-subcategories{grid-template-columns:repeat(2,1fr)}
  .backend-cart .cart-item{grid-template-columns:76px minmax(0,1fr) auto}
  .backend-cart .cart-item .qty-box{grid-column:2}
  .backend-cart .cart-item .price{grid-column:3;grid-row:1}
  .backend-cart .cart-item .remove-x{grid-column:3;grid-row:2}
}
@media(max-width:520px){
  .backend-main-categories .big-cat{flex-basis:100%;max-width:none}
  .backend-product-grid,.backend-product-grid.product-page-grid,.backend-subcategories{grid-template-columns:1fr}
  .nav-actions .profile-label{display:none}
}


/* ===== Ximsem final QA pass: catalogue actions, account/checkout readability, liquid-glass ticker ===== */
/* Product cards: keep metadata readable and price/action locked to the bottom. */
.backend-product-grid .prod-card{display:flex;flex-direction:column;min-height:100%}
.backend-product-grid .prod-card .prod-img{flex:0 0 auto}
.backend-product-grid .prod-card .product-title-link{margin-top:0}
.backend-product-grid .prod-card .product-stock{color:#d9cfdd;margin-bottom:2px}
body.ximsem-store.light-page .backend-product-grid .prod-card .product-stock{color:#5f5665}
.backend-product-grid .prod-card .prod-foot{margin-top:auto!important;padding-top:18px;min-height:58px;gap:12px}
.quick-add-form{margin:0;padding:0;flex:0 0 auto}
.quick-add-btn{border:0;cursor:pointer;font-family:inherit;line-height:1}
.quick-add-disabled{opacity:.48;cursor:not-allowed}
.product-page-grid .prod-card h3{min-height:0}

/* Frosted / liquid-glass running line on the home page. */
.ximsem-glass-ticker{padding:0 0 8px;background:linear-gradient(135deg,var(--paper) 0%,var(--paper-2) 58%,var(--paper-3) 100%);overflow:hidden}
.glass-ticker-shell{position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.52);border-radius:999px;background:linear-gradient(115deg,rgba(255,255,255,.48),rgba(246,232,245,.32));box-shadow:0 16px 36px -24px rgba(58,43,67,.44),inset 0 1px 0 rgba(255,255,255,.72);backdrop-filter:blur(18px) saturate(130%);-webkit-backdrop-filter:blur(18px) saturate(130%)}
.glass-ticker-shell:before,.glass-ticker-shell:after{content:"";position:absolute;top:0;bottom:0;width:70px;z-index:2;pointer-events:none}
.glass-ticker-shell:before{left:0;background:linear-gradient(90deg,rgba(250,243,237,.94),rgba(250,243,237,0))}
.glass-ticker-shell:after{right:0;background:linear-gradient(270deg,rgba(244,232,240,.92),rgba(244,232,240,0))}
.glass-ticker-track{display:flex;align-items:center;gap:22px;width:max-content;min-width:200%;padding:13px 28px;color:#514657;font-size:12.5px;font-weight:600;letter-spacing:.025em;white-space:nowrap;animation:ximsemTicker 34s linear infinite}
.glass-ticker-track i{font-style:normal;color:#b27a3b;font-size:12px}
@keyframes ximsemTicker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){.glass-ticker-track{animation:none}}

/* Authenticated account surfaces need dark readable text on the off-white/purple wash. */
.live-account{padding-top:54px;padding-bottom:82px;color:var(--paper-text)}
.live-account h1,.live-account h2,.live-account h3,.live-account h4,.live-account h5,.live-account h6{color:var(--paper-text)!important}
.live-account .text-body,.live-account .text-body-highlight,.live-account .text-body-emphasis{color:var(--paper-text)!important}
.live-account .text-body-secondary,.live-account .text-body-tertiary{color:#625a68!important}
.live-account .btn-link,.live-account a.fw-semibold{color:#81562f}

/* Order history: contrast + breathable card grid. */
.orders-polished{padding-top:48px}
.orders-polished .orders-toolbar h2{color:var(--paper-text)!important;margin:0}
.orders-polished .orders-toolbar .mb-5{margin-bottom:24px!important}
.orders-polished .list{--bs-gutter-x:1.5rem;--bs-gutter-y:1.6rem;margin-bottom:12px}
.orders-polished .card{background:rgba(255,255,255,.78);border:1px solid var(--paper-line);box-shadow:0 20px 42px -31px rgba(55,40,63,.42);overflow:hidden}
.orders-polished .card-body{padding:22px 22px 20px}
.orders-polished .title{color:#5d3e27!important}
.orders-polished .shipfrom,.orders-polished .shipaddress,.orders-polished .date{color:#625a68!important}
.orders-polished .total{color:var(--paper-text)!important;margin-top:13px!important;padding-top:12px;border-top:1px solid var(--paper-line)}
.orders-polished .row.g-1.g-sm-3{margin-top:12px!important;padding-top:2px}
.orders-polished .search-input{background:rgba(255,255,255,.82);color:var(--paper-text)}
.orders-polished .search-input::placeholder{color:#7a7180}

/* Billing + shipping forms: clean columns, labels and summary. */
.checkout-polished{padding-top:50px;padding-bottom:82px;color:var(--paper-text)}
.checkout-polished>h2{font-size:38px;margin-bottom:34px!important;color:var(--paper-text)!important}
.checkout-polished form{background:rgba(255,255,255,.52);border:1px solid var(--paper-line);border-radius:26px;padding:30px;box-shadow:0 22px 46px -34px rgba(55,40,63,.42)}
.checkout-polished form>h3{font-size:28px;margin-bottom:28px!important;color:var(--paper-text)!important}
.checkout-polished form .row.g-4{--bs-gutter-x:1.35rem;--bs-gutter-y:1.35rem}
.checkout-polished .form-label{display:block;color:#5f5665!important;font-weight:600;margin-bottom:7px!important;line-height:1.25}
.checkout-polished .form-control,.checkout-polished .form-select{background:rgba(255,255,255,.88)!important;color:var(--paper-text)!important;border-color:rgba(72,58,82,.18)!important;min-height:48px;padding:11px 13px}
.checkout-polished .same-address-column{margin-top:2px}
.checkout-polished .same-address-check{display:flex;align-items:center;gap:10px;min-height:30px;padding-left:0}
.checkout-polished .same-address-check .form-check-input{position:static;float:none;margin:0;width:17px;height:17px;flex:0 0 auto}
.checkout-polished .same-address-check .form-label{margin:0!important;display:inline-block}
.checkout-polished>.row{--bs-gutter-x:2rem;align-items:flex-start}
.checkout-polished>.row>.col-lg-5 .card,.checkout-polished>.row>.col-xl-4 .card{background:rgba(255,255,255,.82);border:1px solid var(--paper-line);box-shadow:0 22px 46px -34px rgba(55,40,63,.42)}
.checkout-polished>.row>.col-lg-5 .card-body,.checkout-polished>.row>.col-xl-4 .card-body{padding:24px}
.checkout-polished .order-summary-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:12px 0;border-top:1px solid rgba(72,58,82,.09)}
.checkout-polished .order-summary-item:first-child{border-top:0}
.checkout-polished .order-summary-product h6,.checkout-polished .order-summary-qty h6,.checkout-polished .order-summary-price h6{color:var(--paper-text)!important;margin:0}
.checkout-polished .border-translucent{border-color:var(--paper-line)!important}

/* Order confirmation / payment: improve spacing, contrast and wallet panel. */
.checkout-confirm form{padding:30px 32px}
.checkout-confirm form>.d-flex.align-items-end{align-items:center!important;margin-bottom:4px}
.checkout-confirm .table{color:var(--paper-text);margin-bottom:0}
.checkout-confirm .table td{vertical-align:top;border:0;color:var(--paper-text)!important}
.checkout-confirm .table h5{color:var(--paper-text)!important;margin-bottom:0;font-size:16px}
.checkout-confirm .table .text-body-secondary{color:#5f5665!important}
.checkout-confirm hr{border-color:rgba(72,58,82,.15);opacity:1;margin:30px 0!important}
.checkout-confirm h3{color:var(--paper-text)!important}
.checkout-confirm .form-check{display:flex;align-items:center;gap:8px;padding:10px 14px 10px 36px;border:1px solid rgba(72,58,82,.13);border-radius:999px;background:rgba(255,255,255,.62);min-height:44px}
.checkout-confirm .form-check-label{color:var(--paper-text)!important;margin:0}
.checkout-confirm #wallet{margin-top:6px}
.checkout-confirm #wallet>.col-md-6{width:100%;max-width:540px}
.checkout-confirm #wallet .card{background:rgba(255,255,255,.86);border:1px solid rgba(72,58,82,.14);box-shadow:0 18px 36px -30px rgba(55,40,63,.42)}
.checkout-confirm #wallet .card-body{padding:22px 24px}
.checkout-confirm #wallet .deals-items-head{min-height:34px;padding:5px 0;border-bottom:1px solid rgba(72,58,82,.08)}
.checkout-confirm #wallet .deals-items-head:last-child{border-bottom:0}
.checkout-confirm #wallet span{color:#625a68!important}
.checkout-confirm #wallet .deals-revenue{color:var(--paper-text)!important;font-size:14px!important}
.checkout-confirm #divpaymentbutton,.checkout-confirm #divotherpaymentbutton{margin-top:8px}
.checkout-confirm .btn-phoenix-secondary{border:1px solid rgba(72,58,82,.18);background:rgba(255,255,255,.66);color:var(--paper-text)}

@media(max-width:760px){
  .live-account,.checkout-polished{padding-top:38px;padding-bottom:62px}
  .checkout-polished form,.checkout-confirm form{padding:22px 18px}
  .checkout-polished>h2{font-size:32px}
  .orders-polished .card-body{padding:19px}
  .glass-ticker-track{font-size:12px;gap:16px;padding:12px 20px}
}


/* ===== Ximsem final responsive pass: checkout fields, 3x3 orders and phone fitting ===== */
/* Country / State / City use their own grid so selects can never overlap. */
.checkout-location-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1.35rem;
  width:100%;
}
.checkout-location-field{min-width:0}
.checkout-location-field .form-select{display:block;width:100%!important;max-width:100%!important;min-width:0!important}

/* Order history: 9 per page on desktop, with equal-height cards and clean pagination. */
.orders-polished .orders-grid{align-items:stretch}
.orders-polished .order-grid-item{display:flex;min-width:0}
.orders-polished .order-grid-item>.card{width:100%;min-width:0}
.orders-polished .card-body{display:flex;flex-direction:column;width:100%}
.orders-polished .card-body>.border-bottom{flex:1}
.orders-polished .orders-pagination-row{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:14px 2px 4px;color:var(--paper-muted)
}
.orders-polished .orders-pagination-controls{display:flex;align-items:center;gap:8px;min-width:0}
.orders-polished .orders-pagination-controls .pagination{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:0;margin:0}
.orders-polished .orders-pagination-controls .page-link{
  min-width:38px;height:38px;padding:0 10px;border-radius:11px!important;
  display:grid;place-items:center;border:1px solid var(--paper-line)!important;
  background:rgba(255,255,255,.72)!important;color:var(--paper-text)!important
}
.orders-polished .orders-pagination-controls .active .page-link{
  background:var(--brass)!important;border-color:var(--brass)!important
}
.orders-polished .orders-page-info{color:#625a68!important}

/* Keep common controls within their columns on every screen size. */
.ximsem-store input,.ximsem-store select,.ximsem-store textarea{max-width:100%}
.checkout-polished .row>[class*="col-"]{min-width:0}
.checkout-polished .form-control,.checkout-polished .form-select{width:100%;max-width:100%}
.checkout-polished>.row{row-gap:26px}

@media(max-width:991.98px){
  .checkout-polished>.row>.col-lg-7,
  .checkout-polished>.row>.col-lg-5,
  .checkout-polished>.row>.col-xl-4{width:100%;max-width:100%}
  .orders-polished .orders-toolbar-inner{width:100%}
  .backend-product-detail .pd-layout{gap:28px}
}

@media(max-width:767.98px){
  body.ximsem-store .wrap{width:100%;padding-left:18px;padding-right:18px}
  .ximsem-header .nav-row{gap:10px;min-height:74px}
  .ximsem-header .brand{font-size:20px;gap:8px}
  .ximsem-header .brand-logo{width:34px;height:34px;flex-basis:34px}
  .ximsem-header .nav-actions{gap:8px}
  .ximsem-header .icon-btn{flex:0 0 auto}
  .ximsem-mobile-menu{padding-left:18px;padding-right:18px}

  .checkout-location-grid{grid-template-columns:1fr;gap:18px}
  .checkout-polished form{padding:22px 18px}
  .checkout-polished form .row.g-4{--bs-gutter-x:1rem;--bs-gutter-y:1.15rem}
  .checkout-polished .col-6,.checkout-polished .col-md-6,.checkout-polished .col-md-4{width:100%}
  .checkout-polished .same-address-check{align-items:flex-start}
  .checkout-polished>.row{--bs-gutter-x:1rem}
  .checkout-polished .order-summary-item{grid-template-columns:minmax(0,1fr) auto;gap:8px 10px}
  .checkout-polished .order-summary-price{grid-column:2;grid-row:1 / span 2}

  .orders-polished{padding-top:34px}
  .orders-polished .list{--bs-gutter-x:1rem;--bs-gutter-y:1rem}
  .orders-polished .orders-pagination-row{align-items:flex-start;flex-direction:column}
  .orders-polished .orders-pagination-controls{width:100%;overflow-x:auto;padding-bottom:4px}
  .orders-polished .orders-pagination-controls .pagination{flex-wrap:nowrap}

  .backend-cart .cart-item{gap:12px}
  .backend-product-detail{padding-top:38px}
  .backend-product-detail .description-card{padding:22px 18px}
  footer .foot-grid{grid-template-columns:1fr!important;gap:28px}
  footer .foot-bottom{flex-direction:column;align-items:flex-start;gap:8px}
}

@media(max-width:575.98px){
  body.ximsem-store .wrap{padding-left:14px;padding-right:14px}
  .ximsem-header .nav-row{padding-top:12px;padding-bottom:12px}
  .ximsem-header .brand{font-size:19px}
  .ximsem-header .nav-actions{gap:6px}
  .ximsem-header .btn.btn-outline{padding:9px 11px}
  .ximsem-header .profile-btn{min-width:44px}

  .checkout-polished{padding-top:30px;padding-bottom:54px}
  .checkout-polished>h2{font-size:30px;margin-bottom:24px!important}
  .checkout-polished form>h3{font-size:25px;margin-bottom:22px!important}
  .checkout-polished form{border-radius:20px;padding:20px 15px}
  .checkout-polished .form-control,.checkout-polished .form-select{min-height:46px;font-size:15px}

  .orders-polished .orders-toolbar .mb-5{margin-bottom:18px!important}
  .orders-polished .search-box{width:100%}
  .orders-polished .search-input{width:100%}
  .orders-polished .card-body{padding:18px 16px}

  .backend-product-grid,.backend-product-grid.product-page-grid{gap:16px}
  .backend-product-grid .prod-card{min-width:0}
  .backend-product-grid .prod-card h3{overflow-wrap:anywhere}
  .backend-product-grid .prod-card .prod-foot{gap:8px}
  .backend-product-grid .prod-card .price{min-width:0}

  .backend-cart .cart-item{grid-template-columns:64px minmax(0,1fr) auto;padding:14px 0}
  .backend-cart .cart-item .thumb{width:64px;height:64px}
  .backend-cart .cart-item .thumb img{max-width:56px;max-height:56px}
  .backend-cart .cart-item .qty-box{grid-column:2;justify-self:start}
  .backend-cart .cart-item .price{grid-column:3;grid-row:1;white-space:nowrap}
  .backend-cart .cart-item .remove-x{grid-column:3;grid-row:2}

  .catalog-pagination .pagination{gap:6px}
  .catalog-pagination .page-link{min-width:34px;height:34px}
  .contact-empty{min-width:0;width:100%;max-width:100%}
  .inline-blank,.long-blank{min-width:0;width:auto;max-width:none}
}

@media(max-width:380px){
  .ximsem-header .brand{font-size:18px}
  .ximsem-header .brand-logo{width:31px;height:31px;flex-basis:31px}
  .ximsem-header .nav-actions{gap:5px}
  .ximsem-header .icon-btn{width:38px;height:38px}
  .backend-product-grid,.backend-product-grid.product-page-grid{grid-template-columns:1fr}
  .orders-polished .orders-pagination-controls .page-link{min-width:34px;height:34px}
}


/* ===== Ximsem verified UI fixes: deterministic 3x3 orders, checkout fit and branded loader ===== */
.checkout-location-grid{
  display:flex!important;
  align-items:flex-start!important;
  gap:20px!important;
  width:100%!important;
  min-width:0!important;
}
.checkout-location-field{
  flex:1 1 0!important;
  width:0!important;
  min-width:0!important;
  max-width:none!important;
  overflow:hidden!important;
}
.checkout-location-field .form-select,
.checkout-location-field select{
  display:block!important;
  inline-size:100%!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;
}

/* Do not depend on Bootstrap column widths or List.js for the customer order grid. */
.orders-polished .orders-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:22px!important;
  margin:0!important;
  width:100%!important;
}
.orders-polished .order-grid-item{
  display:flex!important;
  width:auto!important;
  max-width:none!important;
  padding:0!important;
  margin:0!important;
  min-width:0!important;
}
.orders-polished .order-grid-item[hidden]{display:none!important}
.orders-polished .order-card-main{flex:1}
.orders-polished .order-card-footer{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  margin-top:14px;padding-top:3px;min-width:0
}
.orders-polished .order-card-footer>a,.orders-polished .order-card-footer>p{min-width:0}
.orders-polished .orders-page-buttons{display:flex;align-items:center;gap:7px}
.orders-polished .orders-page-buttons .page-link.active{
  background:var(--brass)!important;border-color:var(--brass)!important;color:#302637!important
}
.orders-polished .orders-pagination-controls .page-link:disabled{opacity:.38;cursor:not-allowed}
.orders-polished .orders-empty{
  padding:34px 24px;text-align:center;border:1px solid var(--paper-line);border-radius:20px;
  background:rgba(255,255,255,.62);color:#625a68
}

/* The checkout action is always visible when the basket contains items. */
.backend-cart .summary-card .checkout-cta{display:flex;align-items:center;justify-content:center;min-height:48px}

/* Ximsem X-mark AJAX/page loader. */
.ximsem-loading-overlay{
  background:rgba(47,37,54,.28)!important;
  backdrop-filter:blur(8px) saturate(120%);
  -webkit-backdrop-filter:blur(8px) saturate(120%);
}
.ximsem-loader{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  min-width:96px;min-height:96px;padding:16px;border-radius:26px;
  background:rgba(255,249,244,.78);border:1px solid rgba(255,255,255,.64);
  box-shadow:0 22px 55px -28px rgba(35,25,42,.62),inset 0 1px 0 rgba(255,255,255,.8)
}
.ximsem-loader img{width:54px;height:54px;display:block;animation:ximsemLoaderMark 1.1s ease-in-out infinite}
.ximsem-loader span{font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#564a5d}
@keyframes ximsemLoaderMark{
  0%,100%{transform:translateY(0) scale(1) rotate(-2deg);filter:drop-shadow(0 5px 7px rgba(72,55,82,.16))}
  50%{transform:translateY(-4px) scale(1.07) rotate(2deg);filter:drop-shadow(0 9px 12px rgba(72,55,82,.24))}
}
@media(prefers-reduced-motion:reduce){.ximsem-loader img{animation:none}}

@media(max-width:991.98px){
  .orders-polished .orders-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important}
}
@media(max-width:767.98px){
  .checkout-location-grid{display:flex!important;flex-direction:column!important;gap:16px!important}
  .checkout-location-field{width:100%!important;flex:0 0 auto!important;overflow:visible!important}
  .orders-polished .order-card-footer{align-items:flex-start;flex-direction:column;gap:8px}
}
@media(max-width:575.98px){
  .orders-polished .orders-grid{grid-template-columns:1fr!important;gap:14px!important}
  .orders-polished .orders-page-buttons{gap:5px;overflow-x:auto;max-width:calc(100vw - 135px)}
  .ximsem-loader{min-width:86px;min-height:86px;border-radius:22px}
  .ximsem-loader img{width:48px;height:48px}
}

/* ===== Ximsem checkout micro-fixes: shipping action spacing + payment balance alignment ===== */
.checkout-polished .checkout-actions{
  margin-top:8px!important;
  padding-top:10px!important;
}
.checkout-polished .checkout-actions .btn{
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.checkout-confirm #wallet .deals-items-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) max-content!important;
  align-items:center!important;
  column-gap:28px!important;
}
.checkout-confirm #wallet .deals-items-head>span{
  min-width:0;
  padding-right:8px;
  line-height:1.35;
}
.checkout-confirm #wallet .deals-items-head .deals-revenue{
  margin-left:0!important;
  min-width:92px;
  text-align:right;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
@media(max-width:575.98px){
  .checkout-polished .checkout-actions{margin-top:6px!important;padding-top:8px!important}
  .checkout-polished .checkout-actions .btn{width:100%;margin-right:0!important}
  .checkout-confirm #wallet .card-body{padding:19px 18px}
  .checkout-confirm #wallet .deals-items-head{column-gap:14px!important}
  .checkout-confirm #wallet .deals-items-head .deals-revenue{min-width:76px}
}
