/* ============================================================
   AutoHub Pro — WooCommerce Overrides
   ============================================================ */

/* Shop Grid */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Product Card matching AutoHub style */
.woocommerce ul.products li.product .woocommerce-loop-product__link img {
  border-radius: 12px 12px 0 0;
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #111;
  padding: 12px 16px 4px;
  margin: 0;
}

.woocommerce ul.products li.product .price {
  padding: 0 16px;
  color: #CC0000;
  font-size: 1.1rem;
  font-weight: 800;
}

/* Our custom part card inside woo */
.autohub-part-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: transform .25s, box-shadow .25s;
}
.autohub-part-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.autohub-part-card .part-img-wrap { position: relative; display: block; height: 200px; overflow: hidden; }
.autohub-part-card .part-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.autohub-part-card .part-img-placeholder { display: flex; align-items: center; justify-content: center; height: 200px; background: #f3f4f6; font-size: 3rem; }
.autohub-part-card .stock-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.autohub-part-card .stock-badge.in  { background: #d1fae5; color: #065f46; }
.autohub-part-card .stock-badge.out { background: #fee2e2; color: #991b1b; }
.autohub-part-card .part-card-body  { padding: 16px; }
.autohub-part-card .part-title      { font-size: 1rem; font-weight: 700; margin: 0 0 8px; }
.autohub-part-card .part-title a    { color: #111; text-decoration: none; }
.autohub-part-card .part-price      { font-size: 1.1rem; font-weight: 800; color: #CC0000; margin-bottom: 12px; }
.autohub-part-card .part-card-actions { display: flex; gap: 8px; }

/* Add to cart button */
.autohub-add-cart-btn.button,
.woocommerce a.button.autohub-add-cart-btn {
  background: #CC0000 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  flex: 1;
  text-align: center;
  text-decoration: none;
  display: block;
}
.autohub-add-cart-btn.button:hover { background: #aa0000 !important; }

.btn-wa {
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  font-size: .85rem;
  cursor: pointer;
}
.btn-wa:hover { background: #1ebe5a; color: #fff; }

/* Cart & Checkout */
.woocommerce-cart table.cart,
.woocommerce-checkout form.checkout {
  font-family: 'Cairo', sans-serif;
}

.woocommerce .button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background-color: #CC0000 !important;
  color: #fff !important;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  border-radius: 8px;
  padding: 12px 24px;
}
.woocommerce .button.alt:hover { background-color: #aa0000 !important; }

/* Place order */
#place_order {
  background: #CC0000 !important;
  color: #fff !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  width: 100%;
  padding: 16px !important;
  border-radius: 10px !important;
}

/* Order review */
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  font-family: 'Cairo', sans-serif;
}

/* Single product page */
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: #CC0000;
  border-bottom-color: #CC0000;
}

.woocommerce div.product form.cart .single_add_to_cart_button {
  background: #CC0000;
  color: #fff;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
}
.woocommerce div.product form.cart .single_add_to_cart_button:hover {
  background: #aa0000;
}

/* Price color */
.woocommerce .price,
.woocommerce span.price,
.woocommerce ins .amount {
  color: #CC0000 !important;
  font-weight: 800;
}

/* RTL WooCommerce fix */
[dir="rtl"] .woocommerce ul.products {
  direction: rtl;
}
[dir="rtl"] .woocommerce .quantity input[type="number"] {
  direction: ltr;
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top-color: #CC0000;
  font-family: 'Cairo', sans-serif;
}
.woocommerce-message::before { color: #CC0000; }

/* My Account */
.woocommerce-MyAccount-navigation li.is-active a {
  color: #CC0000;
  font-weight: 700;
}
