/* ArtVerse — ตะกร้าและหน้าชำระเงิน
   ไฟล์นี้เป็นส่วนหนึ่งของ css/parts/*.css โหลดตามลำดับเลขหน้าไฟล์ (ลำดับมีผล: ไฟล์หลังทับไฟล์ก่อน) */

/* =========================================================
   Reference cart + checkout (Friendii-inspired placement)
   ========================================================= */
body[data-page="cart"],
body[data-page="checkout"]{
  background:#f5f5f5;
  color:#111;
}
body[data-page="cart"] .site-header,
body[data-page="checkout"] .site-header{
  position:sticky;
  top:0;
  background:#fff;
  box-shadow:none;
  border-bottom:1px solid #ececec;
}
body[data-page="cart"] .site-header .wrap,
body[data-page="checkout"] .site-header .wrap{
  width:min(1290px,calc(100% - 32px));
}
body[data-page="cart"] .reference-topbar,
body[data-page="checkout"] .reference-topbar{
  min-height:64px;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:30px;
  border-bottom:0;
}
body[data-page="cart"] .reference-category-nav,
body[data-page="checkout"] .reference-category-nav{display:none}
body[data-page="cart"] .brand,
body[data-page="checkout"] .brand{gap:7px}
body[data-page="cart"] .brand-mark,
body[data-page="checkout"] .brand-mark{
  width:34px;height:34px;font-size:20px;background:#ffdc23;color:#151515;box-shadow:none;
}
body[data-page="cart"] .brand-name,
body[data-page="checkout"] .brand-name{font-size:27px;color:#171717;letter-spacing:-1.2px}
body[data-page="cart"] .reference-main-nav,
body[data-page="checkout"] .reference-main-nav{
  justify-content:flex-start;gap:27px;font-size:13px;color:#151515;font-weight:800;
}
body[data-page="cart"] .reference-main-nav a,
body[data-page="checkout"] .reference-main-nav a{opacity:1}
body[data-page="cart"] .reference-actions,
body[data-page="checkout"] .reference-actions{gap:7px}
body[data-page="cart"] .reference-actions .pill,
body[data-page="cart"] .reference-actions .icon-link,
body[data-page="cart"] .reference-actions .profile-drawer-btn,
body[data-page="checkout"] .reference-actions .pill,
body[data-page="checkout"] .reference-actions .icon-link,
body[data-page="checkout"] .reference-actions .profile-drawer-btn{
  height:34px;border:1px solid #ddd;background:#fff;color:#222;box-shadow:none;
}
body[data-page="cart"] .reference-actions .currency-pill,
body[data-page="checkout"] .reference-actions .currency-pill{min-width:66px;padding:0 12px;font-size:11px}
body[data-page="cart"] .reference-actions .icon-link,
body[data-page="checkout"] .reference-actions .icon-link{width:34px;font-size:14px}
body[data-page="cart"] .reference-actions .profile-drawer-btn,
body[data-page="checkout"] .reference-actions .profile-drawer-btn{min-width:58px;padding:0 8px}
body[data-page="cart"] .reference-actions .profile-drawer-avatar,
body[data-page="checkout"] .reference-actions .profile-drawer-avatar{width:22px;height:22px;font-size:12px}
body[data-page="cart"] .footer,
body[data-page="checkout"] .footer{display:none}
#cartApp.wrap{
  width:min(600px,calc(100% - 28px));
  padding:22px 0 80px;
}
#checkoutApp.wrap{
  width:min(430px,calc(100% - 28px));
  padding:16px 0 80px;
}
.reference-cart-page,.reference-checkout-page{width:100%}
.reference-page-heading{
  margin:0 0 24px;
  color:#101010;
  font-size:27px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:-.4px;
}
.reference-cart-stack,.checkout-reference-stack{display:grid;gap:10px}
.cart-seller-card,.cart-summary-card,.checkout-seller-card,.checkout-summary-card,.checkout-option-card,.reference-empty-card{
  background:#fff;
  border:1px solid #ececec;
  border-radius:8px;
  box-shadow:none;
  color:#111;
}
.cart-seller-card{overflow:hidden}
.cart-seller-head{
  min-height:52px;
  display:grid;
  grid-template-columns:20px 28px 1fr auto;
  gap:11px;
  align-items:center;
  padding:0 22px;
  border-bottom:1px solid #e9e9e9;
}
.cart-check-wrap{display:grid;place-items:center;width:18px;height:18px}
.cart-check{
  width:16px;height:16px;margin:0;accent-color:#2478ef;cursor:pointer;
}
.cart-seller-avatar{
  width:28px;height:28px;border-radius:50%;object-fit:cover;border:1px solid #e0e0e0;
}
.cart-seller-head strong{font-size:12px;font-weight:850;color:#181818;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.seller-remove{
  display:inline-flex;align-items:center;gap:5px;background:transparent;color:#777;font-size:12px;cursor:pointer;padding:8px 0;
}
.seller-remove:hover{color:#e5484d}
.cart-seller-products{display:grid}
.cart-reference-row{
  min-height:142px;
  display:grid;
  grid-template-columns:20px 76px minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:20px 22px;
}
.cart-product-thumb{
  width:76px;height:76px;border-radius:10px;object-fit:cover;background:#eee;
}
.cart-product-info{align-self:center;min-width:0;display:grid;gap:3px}
.cart-product-info strong{font-size:12px;line-height:1.45;font-weight:600;color:#202020}
.cart-product-info span{font-size:11px;color:#888}
.cart-product-info b{font-size:13px;color:#ff4b55;font-weight:500;margin-top:2px}
.cart-qty-area{min-width:100px;display:grid;justify-items:end;gap:5px}
.cart-qty-control{display:grid;grid-template-columns:28px 36px 28px;align-items:center;text-align:center}
.cart-qty-control button{
  width:28px;height:28px;border:1px solid #ddd;background:#fff;color:#333;border-radius:5px;cursor:pointer;font-size:15px;
}
.cart-qty-control span{font-size:12px;border-top:1px solid #ddd;border-bottom:1px solid #ddd;height:28px;display:grid;place-items:center}
.cart-qty-area small{color:#ff5656;font-size:10px}
.digital-qty{font-size:12px;color:#999}
.cart-summary-card{padding:22px 23px}
.cart-summary-card h2,.checkout-summary-card h2{margin:0 0 13px;font-size:16px;font-weight:900}
.cart-summary-row,.checkout-summary-line,.checkout-coin-balance{
  display:flex;align-items:center;justify-content:space-between;gap:18px;padding:7px 0;font-size:12px;
}
.cart-summary-row.muted,.checkout-summary-line.muted{color:#8a8a8a}
.cart-summary-row strong,.checkout-summary-line strong{color:#222}
.cart-summary-row.total{padding-top:12px;font-size:14px;font-weight:800}
.cart-summary-row.total strong{color:#ff4b55}
.reference-primary-btn,.reference-secondary-btn{
  min-height:38px;border-radius:7px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;cursor:pointer;text-decoration:none;
}
.reference-primary-btn{background:#2378ee;color:#fff;border:1px solid #2378ee}
.reference-primary-btn:hover{background:#176ce0}
.reference-primary-btn:disabled{background:#f0f0f0;border-color:#ddd;color:#b6b6b6;cursor:not-allowed}
.reference-secondary-btn{background:#fff;color:#222;border:1px solid #d8d8d8}
.reference-primary-btn.full{width:55%;margin:16px auto 0;display:flex}
.reference-empty-card{padding:36px 24px;text-align:center;display:grid;justify-items:center;gap:10px;color:#333}
.reference-empty-card p{margin:0 0 6px;color:#888;font-size:12px}
.reference-empty-icon{font-size:34px}
.checkout-reference-stack{gap:8px}
.checkout-option-card{
  width:100%;min-height:48px;padding:0 18px;display:grid;grid-template-columns:22px 1fr auto;align-items:center;gap:9px;text-align:left;cursor:pointer;
}
.checkout-option-card:hover{background:#fffefa}
.checkout-option-card strong,.checkout-option-card>span:not(.option-arrow):not(.coin-dot):not(.gift-icon):not(.option-icon){font-size:12px;color:#222}
.option-icon.plus{font-size:20px;color:#2478ef;font-weight:300}
.option-copy{display:grid;font-size:11px!important;font-weight:600;line-height:1.4}
.option-copy small{font-size:9px;color:#929292;font-weight:400;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}
.option-arrow{font-size:23px;color:#888;font-weight:300}
.coin-dot{
  width:18px;height:18px;border-radius:50%;display:inline-grid;place-items:center;background:#ffd326;color:#c69a00;border:1px solid #eabf10;font-size:11px;font-weight:900;
}
.coin-dot.mini{width:15px;height:15px;font-size:9px;vertical-align:-2px}
.checkout-seller-card{overflow:hidden}
.checkout-seller-head{
  min-height:42px;padding:0 16px;display:flex;align-items:center;gap:9px;border-bottom:1px solid #ededed;
}
.checkout-seller-head img{width:24px;height:24px;border-radius:50%;object-fit:cover}
.checkout-seller-head strong{font-size:11px;font-weight:800}
.checkout-product-list{display:grid}
.checkout-product-row{
  min-height:86px;display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:12px;align-items:center;padding:16px;
}
.checkout-product-row img{width:52px;height:52px;border-radius:7px;object-fit:cover}
.checkout-product-row>div{display:grid;gap:2px;min-width:0}
.checkout-product-row strong{font-size:10px;line-height:1.4;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.checkout-product-row span{font-size:9px;color:#8a8a8a}
.checkout-product-row b{font-size:11px;color:#ff4b55;font-weight:500;margin-top:1px}
.checkout-product-row em{font-style:normal;font-size:10px;color:#999}
.checkout-order-detail{padding:0 16px 12px;display:grid;gap:6px;font-size:10px}
.checkout-order-detail>div{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-height:17px}
.checkout-order-detail strong{font-size:10px;font-weight:700;text-align:right}
.checkout-order-detail strong b,.note-placeholder b{font-size:15px;color:#888;font-weight:300}
.checkout-order-detail .shipping-method{font-weight:600}
.note-placeholder{color:#aaa;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}
.checkout-order-detail .seller-total{margin-top:5px;font-size:10px}
.checkout-order-detail .seller-total strong{font-size:11px;color:#222}
.coupon-option{grid-template-columns:22px 1fr auto auto}
.gift-icon{font-size:15px;color:#333}
.coupon-value{color:#aaa!important;font-size:10px!important}
.checkout-summary-card{padding:18px 16px 16px}
.checkout-summary-line{padding:2px 0;font-size:10px}
.checkout-coin-balance{margin-top:10px;padding:5px 0 0;font-size:10px}
.checkout-coin-balance strong{font-weight:600;color:#333}
.checkout-summary-line.grand{padding:0 0 9px;font-size:11px;font-weight:900}
.checkout-summary-line.grand strong{font-size:13px;color:#ff4b55}
.checkout-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px}
.checkout-actions .reference-primary-btn,.checkout-actions .reference-secondary-btn{min-height:34px;font-size:11px}
.checkout-warning{
  margin-top:9px;border:1px solid #f1cf6f;background:#fff9e9;color:#806111;border-radius:6px;padding:7px 9px;font-size:9px;
}
.checkout-address-modal{
  position:fixed;inset:0;z-index:140;background:rgba(0,0,0,.30);display:grid;place-items:center;padding:18px;opacity:0;visibility:hidden;transition:.18s;
}
.checkout-address-modal.open{opacity:1;visibility:visible}
.checkout-address-dialog{
  width:min(440px,100%);background:#fff;border-radius:10px;border:1px solid #ddd;padding:18px;display:grid;gap:12px;box-shadow:0 22px 60px rgba(0,0,0,.18);
}
.checkout-address-head{display:flex;justify-content:space-between;align-items:center}
.checkout-address-head h2{font-size:17px;margin:0}
.checkout-address-head button{background:transparent;font-size:24px;color:#777;cursor:pointer}
.checkout-address-dialog label{display:grid;gap:6px;font-size:11px;font-weight:700;color:#444}
.checkout-address-dialog input,.checkout-address-dialog textarea{width:100%;border:1px solid #ddd;border-radius:6px;padding:9px 10px;font-size:12px;color:#222;background:#fff;outline:0}
.checkout-address-dialog textarea{min-height:72px;resize:vertical}
.checkout-address-dialog input:focus,.checkout-address-dialog textarea:focus{border-color:#2378ee;box-shadow:0 0 0 2px rgba(35,120,238,.10)}
.checkout-address-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:3px}
@media(max-width:900px){body[data-page="cart"] .reference-main-nav,
  body[data-page="checkout"] .reference-main-nav{display:none}}
@media(max-width:640px){body[data-page="cart"] .site-header,
  body[data-page="checkout"] .site-header{display:none}
#cartApp.wrap,#checkoutApp.wrap{width:calc(100% - 20px);padding:14px 0 46px}
#checkoutApp.wrap{width:100%;padding:14px 10px 40px}
.reference-page-heading{font-size:25px;margin-bottom:24px}
.cart-seller-head{padding-inline:14px}
.cart-reference-row{grid-template-columns:18px 68px minmax(0,1fr);gap:12px;padding:16px 14px;min-height:122px}
.cart-product-thumb{width:68px;height:68px}
.cart-qty-area{grid-column:3;min-width:0;justify-items:start;margin-top:-2px}
.cart-qty-control{grid-template-columns:26px 32px 26px}
.cart-qty-control button,.cart-qty-control span{height:26px}
.cart-qty-control button{width:26px}
.reference-primary-btn.full{width:100%}
.checkout-product-row{grid-template-columns:72px minmax(0,1fr) auto;min-height:116px;padding:20px 22px}
.checkout-product-row img{width:72px;height:72px}
.checkout-product-row strong{font-size:12px;white-space:normal}
.checkout-product-row span,.checkout-product-row b,.checkout-product-row em{font-size:11px}
.checkout-seller-head{min-height:48px;padding-inline:22px}
.checkout-order-detail{padding:0 22px 18px;font-size:12px;gap:10px}
.checkout-order-detail strong{font-size:12px}
.checkout-order-detail .seller-total{font-size:12px}
.checkout-order-detail .seller-total strong{font-size:12px}
.checkout-option-card{min-height:64px;padding:0 22px}
.checkout-option-card strong,.checkout-option-card>span:not(.option-arrow):not(.coin-dot):not(.gift-icon):not(.option-icon){font-size:13px}
.checkout-summary-card{padding:22px}
.checkout-summary-card h2{font-size:17px}
.checkout-summary-line,.checkout-coin-balance{font-size:12px;padding:3px 0}
.checkout-summary-line.grand{font-size:13px}
.checkout-summary-line.grand strong{font-size:14px}
.checkout-actions .reference-primary-btn,.checkout-actions .reference-secondary-btn{min-height:38px;font-size:12px}
.checkout-warning{font-size:11px;padding:9px 11px}}
