/* ============================================================
   KARIRLUAR.ID — WooCommerce Styling
   Restyle shop, single product, cart, checkout agar konsisten
   dengan design system tema (jangan ubah file ini jika tidak
   paham CSS — cukup edit warna di karirluar-main.css :root)
   ============================================================ */

.kl-shop-page { padding: 0 0 56px; }
.kl-shop-content { display: block; }

/* ---------- PRODUCT GRID ---------- */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0; padding: 0;
}
@media (max-width: 900px) { ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { ul.products { grid-template-columns: 1fr; } }

/* ---------- PRODUCT CARD (custom override template) ---------- */
.kl-wc-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s;
  list-style: none;
}
.kl-wc-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.08); transform: translateY(-3px); }
.kl-wc-card-link { text-decoration: none; color: inherit; display: block; }
.kl-wc-thumb {
  height: 180px;
  background: var(--gray-50);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.kl-wc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kl-wc-thumb-fallback { font-size: 48px; opacity: 0.3; }
.kl-sale-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--danger, #DC2626); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; z-index: 2;
}
.kl-wc-body { padding: 14px; }
.kl-wc-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.kl-wc-title {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: var(--gray-900); line-height: 1.4; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kl-wc-rating { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gray-400); margin-bottom: 8px; }
.kl-wc-rating .star-rating { font-size: 12px; }
.kl-wc-footer { display: flex; align-items: center; justify-content: space-between; }
.kl-wc-price { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--navy); }
.kl-wc-price del { font-size: 13px; color: var(--gray-400); font-weight: 400; margin-right: 6px; }
.kl-wc-price ins { text-decoration: none; }
.kl-wc-actions { padding: 0 14px 14px; }
.kl-wc-actions .button {
  display: block; width: 100%; text-align: center;
  background: var(--navy); color: #fff;
  padding: 9px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  text-decoration: none; transition: background 0.15s;
  border: none; cursor: pointer; font-family: var(--font-display);
}
.kl-wc-actions .button:hover { background: var(--navy-mid, #1A3A6B); }
.kl-wc-actions .added_to_cart { display: block; text-align: center; font-size: 12px; margin-top: 6px; color: var(--teal); }

/* ---------- SINGLE PRODUCT PAGE ---------- */
.product .summary { padding: 0; }
.product .summary h1.product_title {
  font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--gray-900); margin-bottom: 10px;
}
.product .price {
  font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--navy); margin-bottom: 16px; display: block;
}
.product .price del { font-size: 16px; color: var(--gray-400); font-weight: 400; }
.product div.images { border-radius: 16px; overflow: hidden; }
.single_add_to_cart_button {
  background: var(--gold) !important; color: #fff !important;
  padding: 13px 32px !important; border-radius: 10px !important;
  font-weight: 700 !important; font-size: 15px !important;
  border: none !important; cursor: pointer;
  font-family: var(--font-display) !important;
}
.single_add_to_cart_button:hover { background: #E0A830 !important; }
.woocommerce-product-details__short-description { font-size: 14px; color: var(--gray-600); line-height: 1.7; margin-bottom: 20px; }
.quantity input.qty {
  border: 1.5px solid var(--gray-300); border-radius: 10px;
  padding: 11px 12px; font-size: 14px; width: 70px;
}
.woocommerce-tabs ul.tabs { border-bottom: 2px solid var(--gray-200); padding: 0; margin-bottom: 20px; }
.woocommerce-tabs ul.tabs li { display: inline-block; margin-right: 4px; }
.woocommerce-tabs ul.tabs li a {
  display: block; padding: 10px 18px; font-size: 14px; font-weight: 600;
  color: var(--gray-500); text-decoration: none; border-bottom: 2px solid transparent;
}
.woocommerce-tabs ul.tabs li.active a { color: var(--navy); border-bottom-color: var(--navy); }

/* ---------- CART PAGE ---------- */
.woocommerce-cart table.cart {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--gray-200); border-radius: 16px; overflow: hidden;
}
.woocommerce-cart table.cart th {
  background: var(--gray-50); padding: 14px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); text-align: left;
}
.woocommerce-cart table.cart td { padding: 14px; border-top: 1px solid var(--gray-100); }
.woocommerce-cart table.cart td.product-name a { color: var(--gray-900); font-weight: 600; text-decoration: none; }
.woocommerce-cart table.cart img { border-radius: 10px; width: 64px; }
a.remove {
  color: var(--danger, #DC2626) !important; font-size: 20px !important;
  text-decoration: none !important; display: inline-block;
}
.cart-collaterals .cart_totals {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; padding: 20px; margin-top: 20px;
}
.cart_totals h2 { font-family: var(--font-display); font-size: 17px; margin-bottom: 14px; }
.cart_totals table { width: 100%; }
.cart_totals table th, .cart_totals table td { padding: 8px 0; font-size: 14px; border-top: 1px solid var(--gray-100); }
.cart_totals .order-total .woocommerce-Price-amount { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--navy); }
.wc-proceed-to-checkout a.checkout-button {
  display: block; text-align: center; background: var(--gold); color: #fff !important;
  padding: 14px; border-radius: 10px; font-weight: 700; text-decoration: none;
  margin-top: 14px; font-family: var(--font-display);
}

/* ---------- CHECKOUT PAGE ---------- */
.woocommerce-checkout #customer_details { background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; padding: 24px; }
.woocommerce-checkout .form-row label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 5px; display: block; }
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-300);
  border-radius: 10px; font-size: 14px; outline: none;
}
#order_review { background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; padding: 24px; }
#order_review table.shop_table { width: 100%; }
#order_review table.shop_table th, #order_review table.shop_table td { padding: 10px 0; border-top: 1px solid var(--gray-100); font-size: 13px; }
.payment_methods { list-style: none; padding: 0; }
.payment_methods li {
  border: 1.5px solid var(--gray-200); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px;
}
.payment_methods li label { font-weight: 600; font-size: 14px; cursor: pointer; }
#place_order {
  background: var(--gold) !important; color: #fff !important; width: 100%;
  padding: 15px !important; border-radius: 10px !important; font-weight: 700 !important;
  font-size: 15px !important; border: none !important; font-family: var(--font-display) !important;
}

/* ---------- MY ACCOUNT (jika dipakai) ---------- */
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; }
.woocommerce-MyAccount-navigation li a {
  display: block; padding: 10px 14px; border-radius: 10px; color: var(--gray-700);
  text-decoration: none; font-size: 14px; margin-bottom: 4px;
}
.woocommerce-MyAccount-navigation li.is-active a { background: rgba(13,34,64,0.06); color: var(--navy); font-weight: 600; }

/* ---------- NOTICES ---------- */
.woocommerce-message, .woocommerce-info {
  background: var(--teal-light, #E1F5EE); color: var(--teal, #0F6E56);
  border-left: 4px solid var(--teal, #0F6E56); border-radius: 10px;
  padding: 14px 18px; font-size: 14px; list-style: none; margin-bottom: 20px;
}
.woocommerce-error {
  background: #FEE2E2; color: #991B1B; border-left: 4px solid #DC2626;
  border-radius: 10px; padding: 14px 18px; font-size: 14px; list-style: none; margin-bottom: 20px;
}

/* ---------- STAR RATING ---------- */
.star-rating { color: #F59E0B; }
.star-rating::before { color: var(--gray-200); }

/* ---------- BREADCRUMB WC ---------- */
.woocommerce-breadcrumb { font-size: 12px; color: var(--gray-400); margin-bottom: 16px; }
.woocommerce-breadcrumb a { color: var(--gray-500); }
