/**
 * Cart, checkout and order received pages (Gunjan.store).
 * Loaded only on those pages, after WooCommerce's own stylesheets. Selectors carry the
 * .woocommerce prefix where they have to outweigh WooCommerce's defaults.
 */

.woocommerce-cart .site-content,
.woocommerce-checkout .site-content {
  padding-top: 12px;
}

.gj-flow {
  max-width: 1120px;
  margin: 0 auto;
}

/* ---------- Steps ---------- */
.gj-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 22px;
  padding: 0;
  list-style: none;
}

.gj-steps li,
.gj-steps a {
  display: flex;
  align-items: center;
}

.gj-steps li {
  color: var(--gj-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.gj-steps a {
  color: inherit;
}

.gj-steps li + li::before {
  content: "";
  width: 54px;
  height: 2px;
  margin: 0 12px;
  border-radius: 2px;
  background: var(--gj-line);
}

.gj-steps li.is-done + li::before {
  background: var(--gj-primary);
}

.gj-steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border: 2px solid var(--gj-line);
  border-radius: 50%;
  background: #fff;
  font-size: 0.85rem;
  line-height: 1;
}

.gj-steps .is-current {
  color: var(--gj-primary);
}

.gj-steps .is-current .gj-steps__num {
  border-color: var(--gj-primary);
  background: var(--gj-primary);
  color: #fff;
}

.gj-steps .is-done {
  color: var(--gj-ink);
}

.gj-steps .is-done .gj-steps__num {
  border-color: var(--gj-primary);
  background: var(--gj-primary-soft);
  color: var(--gj-primary);
}

/* ---------- Layout and panels ---------- */
.gj-flow__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: 26px;
}

.gj-checkout .gj-flow__grid {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.gj-thanks .gj-flow__grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}

.gj-cart .gj-flow__side {
  position: sticky;
  top: 168px;
}

.gj-panel {
  padding: 22px;
  border: 1px solid var(--gj-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(42, 6, 77, 0.05);
}

.gj-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gj-line);
}

.gj-panel__title {
  margin: 0;
  color: var(--gj-ink);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

.gj-panel__meta {
  flex-shrink: 0;
  color: var(--gj-muted);
  font-size: 0.88rem;
}

.gj-flow__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--gj-primary);
  font-size: 0.93rem;
  font-weight: 600;
}

.gj-flow__back:hover {
  color: var(--gj-secondary-dark);
}

/* ---------- Cart items ---------- */
.woocommerce .gj-cart table.gj-cart-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
}

.woocommerce .gj-cart table.gj-cart-table th,
.woocommerce .gj-cart table.gj-cart-table td {
  border: 0;
  background: none;
  line-height: 1.5;
}

.woocommerce .gj-cart table.gj-cart-table thead th {
  padding: 0 10px 10px 0;
  color: var(--gj-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
}

.woocommerce .gj-cart table.gj-cart-table thead th.product-subtotal {
  text-align: right;
}

.woocommerce .gj-cart table.gj-cart-table tbody td {
  padding: 16px 10px 16px 0;
  border-top: 1px solid var(--gj-line);
  vertical-align: middle;
}

/* WooCommerce hides cart photos at 768px and below with an ID-weighted rule; this layout keeps them. */
.woocommerce .gj-cart table.gj-cart-table .product-thumbnail {
  display: table-cell !important;
}

.woocommerce .gj-cart table.gj-cart-table td.product-thumbnail {
  width: 86px;
}

/* aspect-ratio keeps the photo square even where WooCommerce forces height: auto. */
.woocommerce .gj-cart table.cart td.product-thumbnail img {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.woocommerce .gj-cart table.gj-cart-table td.product-name a {
  color: var(--gj-ink);
  font-weight: 600;
}

.woocommerce .gj-cart table.gj-cart-table td.product-name a:hover {
  color: var(--gj-primary);
}

.gj-cart-unit {
  display: block;
  margin-top: 4px;
  color: var(--gj-muted);
  font-size: 0.88rem;
}

.gj-cart-unit del {
  margin-left: 4px;
  opacity: 0.7;
}

.woocommerce .gj-cart table.gj-cart-table td.product-subtotal {
  color: var(--gj-primary);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.woocommerce .gj-cart table.gj-cart-table td.product-remove {
  width: 44px;
  padding-right: 0;
  text-align: right;
}

.woocommerce .gj-cart a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fef3f2;
  color: #b42318 !important;
  font-size: 1rem;
}

.woocommerce .gj-cart a.remove:hover {
  background: #b42318;
  color: #fff !important;
}

/* Quantity stepper */
.gj-qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--gj-line);
  border-radius: 999px;
  background: #fff;
}

.gj-qty__btn {
  width: 34px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--gj-primary);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.gj-qty__btn:hover {
  background: var(--gj-primary-soft);
}

.woocommerce .gj-cart .gj-qty .quantity {
  float: none;
  margin: 0;
}

.woocommerce .gj-cart .gj-qty .quantity input.qty {
  width: 40px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gj-ink);
  font: inherit;
  font-weight: 700;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.gj-qty input.qty::-webkit-outer-spin-button,
.gj-qty input.qty::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

/* Coupon row */
.gj-cart-actions {
  padding-top: 18px;
  border-top: 1px solid var(--gj-line);
}

.gj-cart-actions .coupon {
  display: flex;
  gap: 8px;
  max-width: 420px;
}

.woocommerce .gj-cart .gj-cart-actions .coupon .input-text {
  flex: 1;
  width: auto;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 1.5px solid #ddd3ea;
  border-radius: 999px;
  background: #fff;
  color: var(--gj-ink);
  font: inherit;
}

.woocommerce .gj-cart .gj-cart-actions .coupon .input-text:focus {
  border-color: var(--gj-primary-mid);
  outline: 0;
}

.woocommerce .gj-cart .gj-cart-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 44px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--gj-primary-soft);
  color: var(--gj-primary);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.woocommerce .gj-cart .gj-cart-actions .button:hover {
  background: var(--gj-primary);
  color: #fff;
}

.woocommerce .gj-cart .gj-cart-actions .gj-cart-update {
  margin-top: 10px;
}

/* Quantities update on their own once scripts run. */
.gj-js .woocommerce .gj-cart .gj-cart-actions .gj-cart-update {
  display: none;
}

/* ---------- Order summary (cart totals, checkout review, order received) ---------- */
.gj-summary .gj-panel__title {
  margin-bottom: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gj-line);
  font-size: 1.15rem;
}

.woocommerce .gj-flow .cart-collaterals .cart_totals {
  float: none;
  width: auto;
}

.woocommerce .gj-flow .gj-summary table.gj-totals {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
}

.woocommerce .gj-flow .gj-summary table.gj-totals th,
.woocommerce .gj-flow .gj-summary table.gj-totals td {
  width: auto;
  padding: 9px 0;
  border: 0;
  background: none;
  line-height: 1.5;
  vertical-align: top;
}

.woocommerce .gj-flow .gj-summary table.gj-totals th {
  padding-right: 12px;
  color: var(--gj-muted);
  font-weight: 500;
  text-align: left;
}

.woocommerce .gj-flow .gj-summary table.gj-totals td {
  color: var(--gj-ink);
  font-weight: 600;
  text-align: right;
}

.woocommerce .gj-flow .gj-summary table.gj-totals tr.order-total th,
.woocommerce .gj-flow .gj-summary table.gj-totals tr.order-total td {
  padding-top: 14px;
  border-top: 1px dashed #d9cdea;
  color: var(--gj-ink);
  font-size: 1.08rem;
  font-weight: 700;
}

.woocommerce .gj-flow .gj-summary table.gj-totals tr.order-total td .amount {
  color: var(--gj-primary);
  font-size: 1.4rem;
}

.woocommerce .gj-flow ul#shipping_method li {
  margin: 0 0 4px;
  line-height: 1.5;
  white-space: nowrap;
}

.woocommerce .gj-flow ul#shipping_method li:last-child {
  margin-bottom: 0;
}

/* The short checkout has no country or district field, so the destination line says nothing useful. */
.gj-flow .woocommerce-shipping-destination {
  display: none;
}

.woocommerce .gj-flow .cart_totals .wc-proceed-to-checkout {
  padding: 16px 0 0;
}

.woocommerce .gj-flow .cart_totals .wc-proceed-to-checkout a.checkout-button.button,
.woocommerce .gj-checkout #payment #place_order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  float: none;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--gj-grad);
  box-shadow: 0 8px 20px rgba(255, 80, 10, 0.3);
  color: #fff;
  font: inherit;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce .gj-flow .cart_totals .wc-proceed-to-checkout a.checkout-button.button:hover,
.woocommerce .gj-checkout #payment #place_order:hover {
  box-shadow: 0 10px 24px rgba(255, 80, 10, 0.4);
  transform: translateY(-2px);
}

.gj-trust {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--gj-line);
  list-style: none;
}

.gj-trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4a4358;
  font-size: 0.88rem;
}

.gj-trust svg {
  flex-shrink: 0;
  color: var(--gj-secondary-dark);
}

/* Items inside the summary */
.woocommerce .gj-flow .gj-review table.gj-totals thead {
  display: none;
}

.woocommerce .gj-flow .gj-review table.gj-totals tbody td {
  padding: 10px 0;
  border-bottom: 1px solid var(--gj-line);
  vertical-align: middle;
}

.woocommerce .gj-flow .gj-review table.gj-totals tbody td.product-name {
  padding-right: 12px;
  text-align: left;
}

.woocommerce .gj-flow .gj-review table.gj-totals tbody td.product-total {
  white-space: nowrap;
}

.woocommerce .gj-flow .gj-review table.gj-totals tfoot tr:first-child th,
.woocommerce .gj-flow .gj-review table.gj-totals tfoot tr:first-child td {
  padding-top: 14px;
}

/* The value column is only as wide as the prices above it, so keep each total on one line. */
.woocommerce .gj-flow .gj-review table.gj-totals tfoot td {
  white-space: nowrap;
}

.gj-review-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gj-review-item__thumb {
  position: relative;
  flex-shrink: 0;
}

.woocommerce .gj-review .gj-review-item__thumb img {
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.gj-review-item__thumb .product-quantity {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gj-primary);
  color: #fff;
  font-size: 0.72rem;
  line-height: 20px;
  text-align: center;
}

.gj-review-item__name {
  color: var(--gj-ink);
  font-size: 0.93rem;
  font-weight: 600;
}

/* ---------- Checkout fields ---------- */
.woocommerce .gj-checkout form .form-row {
  display: block;
  float: none;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
}

.woocommerce .gj-checkout form .form-row:last-child {
  margin-bottom: 0;
}

.woocommerce .gj-checkout form .form-row label {
  display: block;
  margin-bottom: 6px;
  color: var(--gj-ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.woocommerce .gj-checkout form .form-row .required {
  color: #d92d20;
  text-decoration: none;
}

.woocommerce .gj-checkout form .form-row .input-text {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 13px 14px;
  border: 1.5px solid #ddd3ea;
  border-radius: 12px;
  background: #fff;
  color: var(--gj-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce .gj-checkout form .form-row textarea.input-text {
  min-height: 96px;
  resize: vertical;
}

.woocommerce .gj-checkout form .form-row .input-text::placeholder {
  color: #a39bb0;
}

.woocommerce .gj-checkout form .form-row .input-text:focus {
  border-color: var(--gj-primary-mid);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(106, 31, 176, 0.12);
}

.woocommerce .gj-checkout form .form-row.woocommerce-invalid .input-text {
  border-color: #d92d20;
}

.gj-checkout .woocommerce-shipping-fields:empty,
.gj-checkout .woocommerce-additional-fields:empty {
  display: none;
}

/* ---------- Payment and place order ---------- */
.woocommerce .gj-checkout #payment {
  margin-top: 16px;
  border-radius: 0;
  background: none;
}

.woocommerce .gj-checkout #payment ul.payment_methods {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.woocommerce .gj-checkout #payment ul.payment_methods li {
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1.5px solid var(--gj-line);
  border-radius: 12px;
  background: #fff;
  line-height: 1.5;
}

.woocommerce .gj-checkout #payment ul.payment_methods li:has(input:checked) {
  border-color: var(--gj-primary);
  background: var(--gj-primary-soft);
}

.woocommerce .gj-checkout #payment ul.payment_methods li input {
  margin: 0 8px 0 0;
  accent-color: var(--gj-primary);
}

.woocommerce .gj-checkout #payment ul.payment_methods li label {
  display: inline;
  color: var(--gj-ink);
  font-weight: 700;
  cursor: pointer;
}

.woocommerce .gj-checkout #payment div.payment_box {
  margin: 4px 0 0;
  padding: 0 0 0 24px;
  background: none;
  color: var(--gj-muted);
  font-size: 0.88rem;
}

.woocommerce .gj-checkout #payment div.payment_box::before {
  display: none;
}

.woocommerce .gj-checkout #payment div.payment_box p {
  margin: 0;
}

.woocommerce .gj-checkout #payment div.form-row.place-order {
  margin: 14px 0 0;
  padding: 0;
}

.woocommerce .gj-checkout #payment .woocommerce-privacy-policy-text p {
  margin: 0 0 12px;
  color: var(--gj-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ---------- Order received ---------- */
.gj-thanks__card {
  margin-bottom: 24px;
  padding: 32px 22px;
  text-align: center;
}

.gj-thanks__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #e7f8ef;
  color: #12a150;
}

.gj-thanks__title {
  color: var(--gj-ink);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.gj-thanks .woocommerce-thankyou-order-received {
  margin: 6px 0 22px;
  color: #4a4358;
  font-size: 1.05rem;
}

.woocommerce .gj-thanks ul.gj-thanks__overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce .gj-thanks ul.gj-thanks__overview::before,
.woocommerce .gj-thanks ul.gj-thanks__overview::after {
  display: none;
}

.woocommerce .gj-thanks ul.gj-thanks__overview li {
  float: none;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--gj-line);
  border-radius: 12px;
  background: var(--gj-bg);
  color: var(--gj-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  text-transform: none;
}

.woocommerce .gj-thanks ul.gj-thanks__overview li strong {
  display: block;
  margin-top: 4px;
  color: var(--gj-ink);
  font-size: 1.02rem;
  line-height: 1.4;
}

.gj-thanks__address dl {
  margin: 0;
}

.gj-thanks__address .gj-panel__title {
  margin-bottom: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gj-line);
  font-size: 1.15rem;
}

.gj-thanks__address dt {
  margin-top: 12px;
  color: var(--gj-muted);
  font-size: 0.82rem;
}

.gj-thanks__address dd {
  margin: 2px 0 0;
  color: var(--gj-ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.gj-thanks__note {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--gj-secondary-soft);
  color: #7a3306;
}

.gj-thanks__note p {
  margin: 0;
}

.gj-thanks__actions {
  margin-top: 22px;
  text-align: center;
}

/* ---------- Notices ---------- */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  max-width: 1120px;
  margin: 0 auto 16px;
  padding: 12px 16px 12px 46px;
  border: 1px solid var(--gj-line);
  border-left: 4px solid var(--gj-primary);
  border-radius: 12px;
  background: #fff;
  color: var(--gj-ink);
  font-size: 0.93rem;
}

.woocommerce-error::before,
.woocommerce-info::before,
.woocommerce-message::before {
  top: 12px;
  left: 16px;
  color: var(--gj-primary);
}

.woocommerce-error {
  border-left-color: #d92d20;
}

.woocommerce-error::before {
  color: #d92d20;
}

.woocommerce-error li {
  list-style: none;
}

/* ---------- Empty cart ---------- */
.empty-cart-icon-box {
  color: var(--gj-primary);
}

.birazy-empty-cart-container .return-to-shop a.birazy-primary-btn {
  gap: 8px;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .gj-flow__grid,
  .gj-checkout .gj-flow__grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
  }

  .gj-cart .gj-flow__side {
    position: static;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .gj-flow__grid,
  .gj-checkout .gj-flow__grid,
  .gj-thanks .gj-flow__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .gj-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .gj-panel__title {
    font-size: 1.15rem;
  }

  .gj-steps {
    margin-bottom: 16px;
  }

  .gj-steps li {
    font-size: 0.85rem;
  }

  .gj-steps li + li::before {
    width: 28px;
    margin: 0 8px;
  }
}

/* ---------- Cart on small tablets and phones ---------- */
@media (max-width: 900px) {
  /* Beside a summary column the item list gets too narrow, so the cart stacks earlier than the checkout. */
  .gj-cart .gj-flow__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /* Cart rows become compact cards: photo, name and bin on top; quantity and total below. */
  .woocommerce .gj-cart table.gj-cart-table thead {
    display: none;
  }

  .woocommerce .gj-cart table.gj-cart-table,
  .woocommerce .gj-cart table.gj-cart-table tbody,
  .woocommerce .gj-cart table.gj-cart-table tbody tr,
  .woocommerce .gj-cart table.gj-cart-table tbody td {
    display: block;
  }

  .woocommerce .gj-cart table.gj-cart-table tbody tr.cart_item {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb name remove"
      "thumb qty total";
    align-items: center;
    gap: 8px 12px;
    padding: 14px 0;
    border-top: 1px solid var(--gj-line);
  }

  .woocommerce .gj-cart table.gj-cart-table tbody tr.cart_item:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .woocommerce .gj-cart table.gj-cart-table tbody tr.cart_item td {
    width: auto;
    padding: 0;
    border: 0;
  }

  .woocommerce .gj-cart table.gj-cart-table td.product-thumbnail {
    display: block !important;
    grid-area: thumb;
    align-self: start;
  }

  .woocommerce .gj-cart table.cart td.product-thumbnail img {
    width: 70px;
    height: 70px;
  }

  .woocommerce .gj-cart table.gj-cart-table td.product-name {
    grid-area: name;
    align-self: start;
    font-size: 0.93rem;
  }

  .woocommerce .gj-cart table.gj-cart-table td.product-remove {
    grid-area: remove;
    align-self: start;
  }

  .woocommerce .gj-cart table.gj-cart-table td.product-quantity {
    grid-area: qty;
  }

  .woocommerce .gj-cart table.gj-cart-table td.product-subtotal {
    grid-area: total;
  }

  .gj-cart-actions {
    margin-top: 14px;
    padding-top: 14px;
  }

  .gj-cart-actions .coupon {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .woocommerce .gj-thanks ul.gj-thanks__overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gj-thanks__title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  /* Only the current step keeps its label on narrow phones. */
  .gj-steps li:not(.is-current) .gj-steps__label {
    display: none;
  }

  .gj-steps li:not(.is-current) .gj-steps__num {
    margin-right: 0;
  }
}
