/* ==========================================================================
   PATHSHALA WOOCOMMERCE CART, CHECKOUT, MY ACCOUNT & DRAWER STYLES
   ========================================================================== */

/* WooCommerce Notices */
.woocommerce-notices-wrapper {
  margin-bottom: 20px;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: 14px 20px;
  border-radius: var(--ps-radius-md);
  margin-bottom: 20px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background-color: var(--ps-primary-soft);
  border-left: 4px solid var(--ps-primary);
  color: var(--ps-text);
}

.woocommerce-error {
  background-color: #FEF2F2;
  border-left-color: #DC2626;
  color: #991B1B;
}

.woocommerce-message .button,
.woocommerce-info .button {
  background-color: var(--ps-primary);
  color: var(--ps-white) !important;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
}

/* ==========================================================================
   CART PAGE LAYOUT (FIGMA THEME)
   ========================================================================== */

.ps-cart-page,
.ps-checkout-page {
  padding: 40px 0 64px;
  background-color: var(--ps-bg-blush-light);
}

.ps-page-heading {
  font-family: var(--ps-font-serif);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 26px;
  color: var(--ps-text);
}

.ps-cart-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: 30px;
  align-items: start;
}

.ps-cart-card,
.ps-summary-card,
.ps-checkout-card {
  background-color: var(--ps-white);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  padding: 24px;
  box-shadow: var(--ps-shadow-sm);
}

.ps-cart-table {
  width: 100%;
  border-collapse: collapse;
}

.ps-cart-table th {
  text-align: left;
  font-family: var(--ps-font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--ps-text-muted);
  padding: 0 12px 14px;
  border-bottom: 1px solid var(--ps-border);
}

.ps-cart-table td {
  padding: 18px 12px;
  border-bottom: 1px solid var(--ps-border-light);
  vertical-align: middle;
}

.ps-cart-product {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ps-cart-product__thumb {
  width: 64px;
  height: 88px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ps-cart-product__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ps-cart-product__title {
  font-family: var(--ps-font-serif);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ps-text);
  margin-bottom: 4px;
  display: block;
}

.ps-cart-product__title:hover {
  color: var(--ps-primary);
}

.ps-cart-product__author {
  font-size: 12px;
  color: var(--ps-text-muted);
}

/* Quantity Stepper */
.ps-qty-box,
.woocommerce .quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--ps-white);
}

.ps-qty-btn {
  width: 32px;
  height: 34px;
  border: none;
  background: var(--ps-bg-blush-light);
  color: var(--ps-text);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ps-qty-btn:hover {
  background: var(--ps-primary);
  color: var(--ps-white);
}

.ps-qty-box input.qty,
.woocommerce .quantity input.qty {
  width: 46px;
  height: 34px;
  border: none;
  text-align: center;
  font-weight: 600;
  font-size: 13.5px;
  outline: none;
  -moz-appearance: textfield;
}

.ps-cart-remove {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FFF1F5;
  color: var(--ps-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.ps-cart-remove:hover {
  background: var(--ps-primary);
  color: var(--ps-white);
}

.ps-cart-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
}

/* Order Summary Card */
.ps-summary-card__title {
  font-family: var(--ps-font-serif);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ps-border-light);
}

.ps-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: var(--ps-text-secondary);
  border-bottom: 1px solid var(--ps-border-light);
}

.ps-summary-row--total {
  font-size: 18px;
  font-weight: 800;
  color: var(--ps-text);
  border-bottom: none;
  padding-top: 16px;
  margin-bottom: 18px;
}

.ps-summary-row--total .woocommerce-Price-amount {
  color: var(--ps-primary);
}

/* ==========================================================================
   CHECKOUT PAGE LAYOUT (FIGMA THEME)
   ========================================================================== */

.ps-checkout-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 30px;
  align-items: start;
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3,
#order_review_heading {
  font-family: var(--ps-font-serif);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ps-border-light);
}

.woocommerce form .form-row {
  margin-bottom: 16px;
}

.woocommerce form .form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-text);
  margin-bottom: 6px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single {
  width: 100%;
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  background-color: #FCFAFB;
  color: var(--ps-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--ps-primary);
  background-color: var(--ps-white);
  box-shadow: 0 0 0 3px rgba(232, 31, 99, 0.12);
}

/* Checkout Order Review Table & Payment Methods */
.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--ps-border-light);
  font-size: 13.5px;
  text-align: left;
}

.woocommerce-checkout-review-order-table th:last-child,
.woocommerce-checkout-review-order-table td:last-child {
  text-align: right;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
  font-size: 17px;
  font-weight: 800;
  color: var(--ps-primary);
  border-bottom: none;
  padding-top: 14px;
}

#payment.woocommerce-checkout-payment {
  background: var(--ps-bg-blush-light);
  border-radius: var(--ps-radius-md);
  padding: 18px;
}

#payment ul.payment_methods {
  border-bottom: 1px solid var(--ps-border);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

#payment ul.payment_methods li {
  margin-bottom: 10px;
  font-size: 13.5px;
}

#payment ul.payment_methods li label {
  font-weight: 600;
  cursor: pointer;
}

#payment div.payment_box {
  background-color: var(--ps-white);
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ps-text-secondary);
}

#place_order {
  width: 100%;
  background-color: var(--ps-primary);
  color: var(--ps-white);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(232, 31, 99, 0.28);
}

#place_order:hover {
  background-color: var(--ps-primary-hover);
}

/* ==========================================================================
   SLIDE-OUT MINI-CART DRAWER
   ========================================================================== */

.ps-minicart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 18, 0.55);
  z-index: 9998;
  display: none;
}

.ps-minicart-backdrop.is-open {
  display: block;
}

.ps-minicart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 390px;
  background: var(--ps-white);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.18);
}

.ps-minicart-drawer.is-open {
  transform: translateX(0);
}

.ps-minicart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ps-border);
  background: var(--ps-primary);
  color: var(--ps-white);
}

.ps-minicart-header h3 {
  font-family: var(--ps-font-serif);
  font-size: 17px;
  color: var(--ps-white);
  margin: 0;
}

.ps-minicart-close {
  background: none;
  border: none;
  color: var(--ps-white);
  font-size: 22px;
  cursor: pointer;
}

.ps-minicart-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

.ps-minicart-footer {
  padding: 18px 22px;
  border-top: 1px solid var(--ps-border);
  background: var(--ps-bg-blush-light);
}

/* My Account Navigation */
.woocommerce-account .woocommerce {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  align-items: start;
}

.woocommerce-MyAccount-navigation ul {
  background: var(--ps-white);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-md);
  overflow: hidden;
}

.woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ps-border-light);
  font-weight: 600;
  font-size: 13.5px;
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
  background: var(--ps-primary);
  color: var(--ps-white);
}

.woocommerce-MyAccount-content {
  background: var(--ps-white);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-md);
  padding: 24px;
}

@media (max-width: 900px) {
  .ps-cart-grid,
  .ps-checkout-grid,
  .woocommerce-account .woocommerce {
    grid-template-columns: 1fr;
  }
}
