:root{
  --pcs-bg: rgba(15,23,42,.55);
  --pcs-card: #ffffff;
  --pcs-text: #0f172a;
  --pcs-muted: rgba(15,23,42,.65);
  --pcs-border: rgba(15,23,42,.10);
  --pcs-shadow: 0 20px 60px rgba(2,6,23,.35);
  --pcs-radius: 18px;
}

.pcs-loop-wrap { margin-top: 10px; }

.pcs-modal{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}
.pcs-modal__backdrop{
  position:absolute;
  inset:0;
  background: var(--pcs-bg);
  backdrop-filter: blur(6px);
}
.pcs-modal__dialog{
  position: relative;
  width: min(980px, calc(100% - 28px));
  max-height: min(92vh, 980px);
  margin: 48px auto;
  background: var(--pcs-card);
  border: 1px solid var(--pcs-border);
  border-radius: var(--pcs-radius);
  box-shadow: var(--pcs-shadow);
  overflow: hidden;
  display:flex;
  flex-direction: column;
  transform: translateY(10px);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.pcs-modal.pcs-open .pcs-modal__dialog{
  transform: translateY(0);
  opacity: 1;
}
.pcs-modal__close{
  position: absolute;
  right: 12px;
  top: 10px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--pcs-border);
  background: rgba(255,255,255,.9);
  font-size: 24px;
  line-height: 1;
  cursor:pointer;
}
.pcs-modal__header{
  padding: 18px 18px 12px 18px;
  border-bottom: 1px solid var(--pcs-border);
  background: linear-gradient(180deg, rgba(15,23,42,.03), rgba(15,23,42,0));
}
.pcs-modal__title{
  font-size: 18px;
  font-weight: 800;
  color: var(--pcs-text);
}
.pcs-modal__subtitle{
  font-size: 13px;
  color: var(--pcs-muted);
  margin-top: 4px;
}
.pcs-modal__body{
  padding: 16px 16px 28px 16px;
  overflow: auto;
}
.pcs-skeleton{ display:grid; gap:10px; }
.pcs-skeleton__line{
  height: 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(15,23,42,.08), rgba(15,23,42,.03), rgba(15,23,42,.08));
  background-size: 200% 100%;
  animation: pcsShimmer 1.2s infinite linear;
}
.pcs-skeleton__line:nth-child(2){ width: 78%; }
.pcs-skeleton__line:nth-child(3){ width: 62%; }
@keyframes pcsShimmer{ 0%{ background-position:0 0 } 100%{ background-position:200% 0 } }

/* Woo checkout inside popup */
#pcs-popup-checkout-modal .woocommerce form .form-row input.input-text,
#pcs-popup-checkout-modal .woocommerce form .form-row textarea,
#pcs-popup-checkout-modal .select2-container .select2-selection--single{
  border: 1px solid rgba(15,23,42,.16) !important;
  border-radius: 12px !important;
  padding: 12px 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}
#pcs-popup-checkout-modal .woocommerce form .form-row label{
  font-weight: 700;
  color: rgba(15,23,42,.8);
  margin-bottom: 6px;
}
#pcs-popup-checkout-modal .woocommerce-checkout-review-order-table,
#pcs-popup-checkout-modal .woocommerce table.shop_table{
  border: 1px solid rgba(15,23,42,.10) !important;
  border-radius: 14px !important;
  overflow: hidden;
}
#pcs-popup-checkout-modal .woocommerce-checkout #place_order{
  border-radius: 14px !important;
  font-weight: 800 !important;
  padding: 14px 16px !important;
}
#pcs-popup-checkout-modal.pcs-fixed-place-order .woocommerce-checkout #place_order{
  position: sticky !important;
  bottom: 0 !important;
  z-index: 10 !important;
  box-shadow: 0 -10px 30px rgba(2,6,23,.10) !important;
}

/* Mobile */
@media (max-width: 640px){
  .pcs-modal__dialog{ margin: 18px auto; max-height: 94vh; }
  .pcs-modal__body{ padding: 12px 12px 18px 12px; }
}

/* Desktop popup width = 550px (mobile unchanged) */
@media (min-width: 641px){
  .pcs-modal__dialog{
    width: 550px !important;
    max-width: calc(100% - 28px) !important; /* small screens safe */
  }
}



.pcs-buy-now{
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 1;
  transition: all .2s ease;
}
.pcs-buy-now:hover{
  transform: translateY(-1px);
}



/* ===== Force full-width checkout fields inside popup ===== */
#pcs-popup-checkout-modal .woocommerce .col2-set,
#pcs-popup-checkout-modal .woocommerce .col-1,
#pcs-popup-checkout-modal .woocommerce .col-2{
  width: 100% !important;
  float: none !important;
  max-width: 100% !important;
}

#pcs-popup-checkout-modal .woocommerce form .form-row{
  width: 100% !important;
  float: none !important;
}

#pcs-popup-checkout-modal .woocommerce form .form-row-first,
#pcs-popup-checkout-modal .woocommerce form .form-row-last{
  width: 100% !important;
  float: none !important;
  margin-right: 0 !important;
}

/* Spacing improve */
#pcs-popup-checkout-modal .woocommerce form .form-row{
  margin-bottom: 14px !important;
}

/* Select2 full width fix */
#pcs-popup-checkout-modal .select2-container{
  width: 100% !important;
}


/* ===== Place Order button full width ===== */
#pcs-popup-checkout-modal .woocommerce-checkout #place_order{
  width: 100% !important;
  display: block !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Sticky / fixed mode থাকলেও full width থাকবে */
#pcs-popup-checkout-modal.pcs-fixed-place-order 
.woocommerce-checkout #place_order{
  left: 0;
  right: 0;
  width: 100% !important;
}

/*----------------------------*/


/* ===== Make checkout blocks feel like cards ===== */
#pcs-popup-checkout-modal .woocommerce-billing-fields,
#pcs-popup-checkout-modal .woocommerce-shipping-fields,
#pcs-popup-checkout-modal #order_review,
#pcs-popup-checkout-modal .woocommerce-checkout-payment{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(2,6,23,.06);
  margin-bottom: 14px;
}

/* headings cleaner */
#pcs-popup-checkout-modal h3,
#pcs-popup-checkout-modal #order_review_heading{
  font-size: 15px !important;
  font-weight: 900 !important;
  color: rgba(15,23,42,.90) !important;
  margin: 0 0 10px 0 !important;
}

#pcs-popup-checkout-modal .woocommerce-checkout #place_order:hover{
  filter: brightness(1.02);
  box-shadow: 0 12px 30px rgba(2,6,23,.18) !important;
}


/* Popup checkout: theme checkout layout normalize */
#pcs-popup-checkout-modal .woocommerce,
#pcs-popup-checkout-modal .woocommerce * {
	box-sizing: border-box;
}

#pcs-popup-checkout-modal .woocommerce,
#pcs-popup-checkout-modal .woocommerce-checkout,
#pcs-popup-checkout-modal .woocommerce form.checkout {
	width: 100% !important;
	max-width: 100% !important;
}

/* Force single column in popup (fix Astra/Storefront col2-set) */
#pcs-popup-checkout-modal .woocommerce-checkout .col2-set,
#pcs-popup-checkout-modal .woocommerce-checkout .col2-set .col-1,
#pcs-popup-checkout-modal .woocommerce-checkout .col2-set .col-2,
#pcs-popup-checkout-modal #customer_details,
#pcs-popup-checkout-modal #order_review {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
}

/* Fix half-width fields used by many themes */
#pcs-popup-checkout-modal .woocommerce form .form-row-first,
#pcs-popup-checkout-modal .woocommerce form .form-row-last {
	float: none !important;
	width: 100% !important;
}

/* Inputs full width */
#pcs-popup-checkout-modal .woocommerce form .form-row input.input-text,
#pcs-popup-checkout-modal .woocommerce form .form-row textarea,
#pcs-popup-checkout-modal .woocommerce form .form-row select,
#pcs-popup-checkout-modal .select2-container {
	width: 100% !important;
	max-width: 100% !important;
}

/* Prevent theme container constraints */
#pcs-popup-checkout-modal .woocommerce-checkout .woocommerce-NoticeGroup,
#pcs-popup-checkout-modal .woocommerce-checkout .woocommerce-checkout-review-order,
#pcs-popup-checkout-modal .woocommerce-checkout .woocommerce-billing-fields,
#pcs-popup-checkout-modal .woocommerce-checkout .woocommerce-shipping-fields {
	margin-left: 0 !important;
	margin-right: 0 !important;
}


#pcs-popup-checkout-modal .woocommerce form .form-row {
	display: block !important;
}



/* Close button (safe override, no all:unset) */
#pcs-popup-checkout-modal .pcs-modal__close{
	position: absolute !important;
	top: 14px !important;
	right: 14px !important;

	width: 38px !important;
	height: 38px !important;

	display: flex !important;
	align-items: center !important;
	justify-content: center !important;

	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;

	background: rgba(0,0,0,0.45) !important;
	color: #fff !important;

	font-size: 0 !important;          /* 🔥 theme যদি text mess করে, আমরা 0 করে pseudo element ব্যবহার করবো */
	line-height: 1 !important;

	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;

	border-radius: 999px !important;
	cursor: pointer !important;

	box-shadow: none !important;
	text-decoration: none !important;
	outline: none !important;

	z-index: 999999 !important;
}

/* Force the X icon via CSS (theme-proof) */
#pcs-popup-checkout-modal .pcs-modal__close::before{
	content: "\00D7"; /* × */
	font-size: 22px !important;
	line-height: 1 !important;
	color: #fff !important;
	font-weight: 400 !important;
	font-family: Arial, sans-serif !important;
}

/* Hover */
#pcs-popup-checkout-modal .pcs-modal__close:hover{
	background: rgba(0,0,0,0.65) !important;
	transform: translateY(-1px);
}




