/* ------------------------------------------------------------------
   Re-skins WooCommerce's default (light) markup to match the theme's
   dark charcoal / ember-saffron design so checkout, my-account, and
   product pages don't look like a plain white WordPress box dropped
   into a dark site.
------------------------------------------------------------------ */

.woocommerce, .woocommerce-page {
  color: #f5efe6; /* cream-50-ish */
}

/* Checkout wrapper */
.center-woo-checkout .woocommerce-checkout,
.center-woo-checkout .woocommerce {
  color: inherit;
}

.center-woo-checkout h3,
.woocommerce-account h3 {
  color: #f5efe6;
  font-weight: 800;
  margin-bottom: 1rem;
}

/* Inputs */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-account .woocommerce-MyAccount-content input.input-text,
.select2-container .select2-selection--single {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0.75rem !important;
  color: #f5efe6 !important;
  padding: 0.75rem 1rem !important;
  height: auto !important;
}
.select2-container .select2-selection__rendered { color: #f5efe6 !important; }
.select2-dropdown { background: #1f1613; border-color: rgba(255,255,255,.12); color: #f5efe6; }

.woocommerce form .form-row label {
  color: rgba(245, 239, 230, 0.7);
}

/* Order review table */
.woocommerce-checkout-review-order-table,
.woocommerce table.shop_table {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td,
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f5efe6;
}
.woocommerce-checkout-review-order-table .order-total .amount,
.woocommerce table.shop_table .amount {
  color: #f0b429; /* saffron-400 */
  font-weight: 800;
}

/* ------------------------------------------------------------------
   Sticky cart drawer: +/- and remove buttons need instant, visible
   feedback on click (a press animation immediately, then a dimmed/
   disabled state while the AJAX request is in flight) so the user
   never wonders whether the click registered.
------------------------------------------------------------------ */
.center-cart-add,
.center-cart-decrease,
.center-cart-remove {
  transition: transform 0.12s ease, background-color 0.15s ease;
}
.center-cart-add:active,
.center-cart-decrease:active,
.center-cart-remove:active {
  transform: scale(0.82);
}

.center-cart-line--loading {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.center-cart-line--loading .center-cart-add,
.center-cart-line--loading .center-cart-decrease {
  animation: center-cart-pulse 0.9s ease-in-out infinite;
}
@keyframes center-cart-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ------------------------------------------------------------------
   Checkout: overall two-column page layout.
   Left column  = customer details (billing form + delivery notes).
   Right column = order summary (cart review + payment + place order).
   WooCommerce renders these as separate, stacked blocks by default;
   this grid pulls them side by side using their existing ids/classes,
   no markup changes needed beyond our custom form-billing.php.
------------------------------------------------------------------ */
.center-woo-checkout form.woocommerce-checkout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-areas:
    "details heading"
    "details review";
  column-gap: 2.5rem;
  align-items: start;
}
.center-woo-checkout form.woocommerce-checkout #customer_details {
  grid-area: details;
}
.center-woo-checkout form.woocommerce-checkout #order_review_heading {
  grid-area: heading;
}
.center-woo-checkout form.woocommerce-checkout #order_review {
  grid-area: review;
  position: sticky;
  top: 6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

/* Inside the left column: billing form + delivery-notes block stack
   full width instead of WooCommerce's default 48%/48% side-by-side. */
.center-woo-checkout #customer_details.col2-set {
  display: block;
}
.center-woo-checkout #customer_details .col-1,
.center-woo-checkout #customer_details .col-2 {
  width: 100% !important;
  float: none !important;
}
.center-woo-checkout #customer_details .col-2 {
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .center-woo-checkout form.woocommerce-checkout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "details"
      "heading"
      "review";
  }
  .center-woo-checkout form.woocommerce-checkout #order_review {
    position: static;
  }
}

/* ------------------------------------------------------------------
   Merged name field, +98 phone widget, privacy-text removal
------------------------------------------------------------------ */
.center-hidden-field {
  display: none !important;
}

.center-phone-row label {
  display: block;
  margin-bottom: 0.4rem;
}
.center-phone-input {
  display: flex;
  direction: ltr;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}
.center-phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  font-weight: 800;
  color: #f0b429;
  background: rgba(240, 180, 41, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.center-phone-input input.input-text {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left;
  direction: ltr;
}

/* Belt-and-suspenders: the privacy-policy blurb hook is also removed in
   PHP, but hide it via CSS too in case another plugin re-adds it. */
.woocommerce-privacy-policy-text {
  display: none !important;
}

/* ------------------------------------------------------------------
   Checkout: two-column billing grid + map location picker
------------------------------------------------------------------ */
.center-checkout-grid__fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 1.25rem;
}
.center-checkout-grid__fields .form-row {
  width: 100% !important;
  float: none !important;
  margin: 0 0 1.1rem !important;
}
.center-checkout-grid__fields .form-row-wide,
.center-checkout-grid__fields .center-location-row {
  grid-column: 1 / -1;
}
.center-checkout-grid__fields textarea {
  min-height: 6rem;
  resize: vertical;
}
@media (max-width: 640px) {
  .center-checkout-grid__fields {
    grid-template-columns: 1fr;
  }
}

.center-location-row {
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
  margin-top: 0.25rem !important;
}
.center-location-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px dashed rgba(240, 180, 41, 0.5);
  background: rgba(240, 180, 41, 0.08);
  color: #f0b429;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.1rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.center-location-btn:hover {
  background: rgba(240, 180, 41, 0.16);
  transform: scale(1.02);
}
.center-location-hint {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: rgba(245, 239, 230, 0.5);
}
.center-location-status {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4ade80;
}

/* Map modal */
.center-map-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 6, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 1rem;
}
.center-map-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.center-map-card {
  width: 100%;
  max-width: 640px;
  background: #1f1613;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.center-map-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.center-map-card__header h4 {
  margin: 0;
  color: #f5efe6;
  font-weight: 800;
}
.center-map-close {
  color: rgba(245, 239, 230, 0.6);
  background: transparent;
  border: none;
  cursor: pointer;
}
.center-map-close:hover {
  color: #f5efe6;
}
.center-map-canvas {
  width: 100%;
  height: 340px;
}
.center-map-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}
.center-map-locate,
.center-map-confirm {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 9999px;
  padding: 0.65rem 1.1rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
}
.center-map-locate {
  background: rgba(255, 255, 255, 0.08);
  color: #f5efe6;
}
.center-map-locate:hover {
  background: rgba(255, 255, 255, 0.14);
}
.center-map-confirm {
  background: linear-gradient(to right, #e5533d, #f0b429);
  color: #fff;
}
.center-map-confirm:hover {
  transform: scale(1.02);
}
.center-map-confirm:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* Payment methods box */
#payment {
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 1rem !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
#payment ul.payment_methods li {
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f5efe6;
}
#payment .payment_box {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(245, 239, 230, 0.8) !important;
}

/* Buttons */
.woocommerce #place_order,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: linear-gradient(to right, #e5533d, #f0b429) !important;
  border: none !important;
  border-radius: 9999px !important;
  color: #fff !important;
  font-weight: 800 !important;
  padding: 0.9rem 1.75rem !important;
  transition: transform .2s ease;
}
.woocommerce #place_order:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  transform: scale(1.02);
  color: #fff !important;
}

/* Notices */
.woocommerce-error, .woocommerce-info, .woocommerce-message {
  background: rgba(255, 255, 255, 0.06) !important;
  border-top-color: #f0b429 !important;
  color: #f5efe6 !important;
  border-radius: 0.75rem;
}
.woocommerce-error a, .woocommerce-message a { color: #f0b429 !important; }

/* Coupon box */
.woocommerce-form-coupon-toggle, .checkout_coupon {
  background: transparent;
}
.checkout_coupon {
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 1rem;
  padding: 1rem !important;
}

/* My Account */
.woocommerce-MyAccount-navigation ul {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 1rem;
  padding: 0.5rem;
}
.woocommerce-MyAccount-navigation li a {
  color: rgba(245, 239, 230, 0.75);
  padding: 0.6rem 1rem;
  display: block;
  border-radius: 0.6rem;
}
.woocommerce-MyAccount-navigation li.is-active a {
  background: linear-gradient(to right, #e5533d, #f0b429);
  color: #fff;
}
.woocommerce-MyAccount-content {
  color: #f5efe6;
}

/* Blog / archive / single post core WP elements */
.entry-content, .entry-summary { color: rgba(245, 239, 230, 0.75); line-height: 2; }
.wp-pagenavi, .pagination, .nav-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}
.pagination a, .pagination span, .nav-links a, .nav-links span {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  padding: 0.5rem 1.1rem;
  color: #f5efe6;
}
.pagination .current, .nav-links .current {
  background: linear-gradient(to right, #e5533d, #f0b429);
  color: #fff;
}

#comments { color: #f5efe6; }
#comments .comment-form input,
#comments .comment-form textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  color: #f5efe6;
  padding: 0.75rem 1rem;
  width: 100%;
}
#comments .comment-form #submit {
  background: linear-gradient(to right, #e5533d, #f0b429);
  border: none;
  border-radius: 9999px;
  color: #fff;
  font-weight: 800;
  padding: 0.75rem 1.75rem;
  cursor: pointer;
}
