/* Coolmuster Order — brand styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
}
a { color: var(--brand-blue); text-decoration: none; }
a:hover { color: var(--brand-blue-dark); }
img { max-width: 100%; height: auto; }

.cm-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.cm-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.cm-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.cm-logo { display: flex; align-items: center; }
.cm-logo-img { height: 36px !important; max-height: 36px; width: auto !important; max-width: 180px; display: block; }
.cm-logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-blue) 0%, #4fc3f7 100%);
  color: #fff; font-size: 20px; font-weight: 700;
}
.cm-logo-text { font-size: 20px; font-weight: 700; color: var(--brand-blue); margin-left: 8px; letter-spacing: .5px; }
.cm-logo-sub { color: var(--text-muted); font-weight: 400; font-size: 14px; margin-left: 4px; }
.cm-nav { display: flex; gap: 24px; }
.cm-nav a { color: var(--text-dark); font-size: 14px; font-weight: 500; }
.cm-nav a:hover { color: var(--brand-blue); }
.cm-security-badges { display: flex; align-items: center; gap: 4px; }
.cm-security-badges img { height: 24px; width: auto; }
.cm-header-right { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.cm-header-right .cm-selectors { display: flex; gap: 6px; }
.cm-header-right select {
    padding: 4px 6px; border: 1px solid var(--border); border-radius: 4px;
    background: #fff; font-size: 12px; color: #333; max-width: 110px;
}
.cm-cart-count {
  display: inline-block; background: var(--brand-orange); color: #fff;
  border-radius: 10px; padding: 0 6px; font-size: 12px; margin-left: 4px;
}

/* Hero */
.cm-hero {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
  color: #fff; padding: 48px 0; text-align: center;
}
.cm-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.cm-hero-sub { font-size: 16px; opacity: .9; }

/* Product grid */
.cm-products { padding: 48px 0; }
.cm-cat-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cm-cat-tag {
  padding: 6px 16px; border-radius: 20px; background: #fff;
  border: 1px solid var(--border); font-size: 13px; color: var(--text-dark);
}
.cm-cat-tag.active, .cm-cat-tag:hover { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }

.cm-product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
}
.cm-product-card {
  background: #fff; border-radius: 12px; padding: 24px;
  border: 1px solid var(--border); display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.cm-product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.cm-product-icon { margin-bottom: 16px; }
.cm-product-icon img { border-radius: 8px; }
.cm-icon-placeholder {
  width: 56px; height: 56px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  color: #fff; font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cm-product-name { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.cm-product-desc { font-size: 13px; color: var(--text-muted); flex-grow: 1; margin-bottom: 16px; }
.cm-product-bottom { display: flex; align-items: center; justify-content: space-between; }
.cm-price { font-size: 20px; font-weight: 700; color: var(--text-dark); }
.cm-price .woocommerce-Price-amount { color: var(--brand-red); }
.cm-buy-btn {
  background: var(--brand-orange); color: #fff; padding: 10px 20px;
  border-radius: 6px; font-size: 14px; font-weight: 600; transition: background .2s;
}
.cm-buy-btn:hover { background: var(--brand-blue-dark); color: #fff; }

/* Trust bar */
.cm-trust { background: #fff; border-top: 1px solid var(--border); padding: 32px 0; }
.cm-trust-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.cm-trust-item { display: flex; align-items: center; gap: 12px; }
.cm-trust-icon { font-size: 28px; }
.cm-trust-item strong { display: block; font-size: 14px; }
.cm-trust-item span { font-size: 12px; color: var(--text-muted); }

/* Footer — UUMart dark style (matches uumart.com) */
.cm-footer { background: var(--bg-dark); padding: 36px 0 28px; margin-top: 48px; text-align: center; }
.cm-footer-about { max-width: 720px; margin: 0 auto 20px; font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.6); }
.cm-footer-links-row { margin-bottom: 18px; font-size: 13px; }
.cm-footer-links-row a { color: rgba(255,255,255,.65); }
.cm-footer-links-row a:hover { color: #fff; }
.cm-dot { color: rgba(255,255,255,.35); margin: 0 8px; }
.cm-copyright { font-size: 12px; color: rgba(255,255,255,.4); padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }

/* WooCommerce — clean simple checkout */
.cm-wc-wrap { max-width: 900px; }
.woocommerce ul.products { display: none; }
.woocommerce .related.products,
.woocommerce .upsells.products,
.woocommerce .comment-reply-title,
.woocommerce #reviews,
.woocommerce .woocommerce-tabs,
.woocommerce .product_meta,
.woocommerce .woocommerce-breadcrumb { display: none !important; }

/* Single product */
.single-product .product { display: flex; gap: 40px; align-items: flex-start; }
.single-product .woocommerce-product-gallery { flex: 0 0 300px; }
.single-product .summary { flex: 1; }
.single-product .product_title { font-size: 28px; margin-bottom: 12px; }
.single-product .price { font-size: 24px; color: var(--brand-blue); font-weight: 700; margin-bottom: 16px; }
.single-product .woocommerce-product-details__short-description { margin-bottom: 24px; color: #555; line-height: 1.7; }
.single-product form.cart { display: flex; align-items: center; gap: 12px; }
.single-product .quantity input.qty { width: 60px; padding: 8px; border: 1px solid var(--border); border-radius: 4px; }
.single-product .single_add_to_cart_button {
  background: var(--brand-blue); color: #fff; border: none;
  padding: 12px 32px; border-radius: 4px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.single-product .single_add_to_cart_button:hover { background: var(--brand-blue-dark); }

/* Cart page */
.woocommerce-cart .cart { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.woocommerce-cart .cart th { text-align: left; padding: 12px; border-bottom: 2px solid var(--border); font-weight: 600; }
.woocommerce-cart .cart td { padding: 12px; border-bottom: 1px solid var(--border); }
.woocommerce-cart .quantity input.qty { width: 60px; padding: 6px; border: 1px solid var(--border); border-radius: 4px; }
.woocommerce-cart .button {
  background: var(--brand-blue); color: #fff; border: none;
  padding: 10px 24px; border-radius: 4px; cursor: pointer;
}
.woocommerce-cart .button:hover { background: var(--brand-blue-dark); }
.woocommerce-cart .cart_totals { max-width: 400px; margin-left: auto; }
.woocommerce-cart .checkout-button {
  display: block; text-align: center; background: var(--brand-blue); color: #fff;
  padding: 14px; border-radius: 4px; font-weight: 600; margin-top: 12px;
}
.woocommerce-cart .checkout-button:hover { background: var(--brand-blue-dark); }

/* Checkout */
.woocommerce-checkout h3 { font-size: 18px; margin: 24px 0 12px; }
.woocommerce-checkout .form-row { margin-bottom: 12px; }
.woocommerce-checkout .input-text, .woocommerce-checkout select {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 4px;
}
.woocommerce-checkout #place_order {
  background: var(--brand-blue); color: #fff; border: none;
  padding: 14px 32px; border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.woocommerce-checkout #place_order:hover { background: var(--brand-blue-dark); }

/* Notices — hide add-to-cart messages */
.woocommerce-message, .woocommerce-info, .woocommerce-error,
.woocommerce-notices-wrapper {
  display: none !important;
}
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; list-style: none;
}
.woocommerce-message { background: #e8f5e9; color: #2e7d32; }
.woocommerce-info { background: #e3f2fd; color: #1565c0; }
.woocommerce-error { background: #ffebee; color: #c62828; }

/* WooCommerce overrides */
.woocommerce .products ul, .woocommerce ul.products { margin: 0; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--brand-blue); }
.woocommerce a.button, .woocommerce button.button {
  background: var(--brand-orange) !important; color: #fff !important;
  border-color: var(--brand-orange) !important; border-radius: 6px;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--brand-blue-dark) !important; }
.woocommerce table.shop_table { border-radius: 8px; overflow: hidden; }
.woocommerce-checkout #payment { background: #fff; border-radius: 8px; }

/* Responsive */
@media (max-width: 768px) {
  .cm-nav { display: none; }
  .cm-hero h1 { font-size: 26px; }
  .cm-product-grid { grid-template-columns: 1fr; }
  .cm-header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
}

/* Empty cart page */
.cm-empty-cart { padding: 80px 0; text-align: center; }
.cm-empty-cart-icon { font-size: 64px; margin-bottom: 16px; }
.cm-empty-cart-inner h2 { font-size: 28px; margin-bottom: 8px; }
.cm-empty-cart-sub { color: var(--text-muted); margin-bottom: 24px; }

/* ===== Checkout: left order summary, right billing+payment ===== */
.woocommerce-checkout-wrapper { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
form.woocommerce-checkout {
  display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap;
}
form.woocommerce-checkout #customer_details {
  flex: 1 1 58%; min-width: 320px; background: #fff; padding: 28px; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  order: 2; width: 100%;
}
form.woocommerce-checkout #customer_details .col2-set,
form.woocommerce-checkout #customer_details .col-1 { width: 100%; float: none; }
form.woocommerce-checkout #order_review {
  flex: 1 1 36%; min-width: 360px; background: #fff; padding: 28px;
  border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  order: 1;
}
form.woocommerce-checkout #order_review_heading { display: none; }
.woocommerce-billing-fields h3, .woocommerce-additional-fields h3, #payment h3, #payment div > h3, form.woocommerce-checkout h3 {
  font-size: 20px; font-weight: 400; margin: 24px 0 12px; color: #444;
}
.entry-title, .woocommerce-checkout h1, .woocommerce h1 {
  font-size: 25px !important; font-weight: 400 !important; color: #333 !important;
  margin: 0 0 12px !important; text-transform: none !important;
}
#billing_email_field { width: 48% !important; display: block; float: none; }
#billing_first_name_field { display: inline-block !important; vertical-align: top; width: 48% !important; margin-right: 4% !important; }
#billing_last_name_field { display: inline-block !important; vertical-align: top; width: 48% !important; margin-right: 0 !important; }
#billing_country_field { display: inline-block !important; vertical-align: top; width: 48% !important; margin-right: 4% !important; margin-top: 10px; float: none; clear: none; }
#billing_first_name_field label, #billing_last_name_field label, #billing_country_field label { white-space: nowrap; }
#billing_first_name_field::after, #billing_last_name_field::after, #billing_country_field::after { content: none !important; }
@media (max-width: 800px) {
  #billing_first_name_field, #billing_last_name_field, #billing_country_field { width: 100% !important; margin-right: 0 !important; }
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px;
  box-sizing: border-box; background: #fff;
}
#billing_country_field select#billing_country,
#billing_country_field .select2-container .select2-selection {
  border: 1px solid #ddd !important; background: #fff !important; color: #333 !important;
  -webkit-appearance: none; -moz-appearance: none; appearance: none; outline: none; box-shadow: none !important;
  border-radius: 6px !important; min-height: 44px !important; height: 44px !important;
}
#billing_country_field .select2-container .select2-selection--single { height: 44px !important; display: flex; align-items: center; }
#billing_country_field .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 44px !important; color: #333 !important; display: flex; align-items: center; }
#billing_country_field .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px !important; }
#payment { background: #fff !important; border: none !important; padding: 0 !important; }
#payment ul.payment_methods {
  list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid #eee;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start;
}
#payment ul.payment_methods li {
  border: 2px solid #e0e0e0; border-radius: 10px; padding: 4px 6px;
  cursor: pointer; position: relative; overflow: visible;
  display: flex; align-items: center; justify-content: center;
  width: 150px; min-height: 50px;
}
#payment ul.payment_methods li:hover { border-color: #aaa; }
#payment ul.payment_methods li:hover label img { transform: scale(1.05); }
#payment ul.payment_methods li.chosen {
  border: 3px solid var(--brand-blue);
}
#payment ul.payment_methods .payment_box,
#payment .payment_box { display: none !important; }
#payment ul.payment_methods li.chosen::after {
  content: ""; position: absolute; bottom: -8px; right: -8px;
  background: var(--brand-blue) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center/16px no-repeat;
  border-radius: 50%;
  width: 26px; height: 26px;
  box-shadow: 0 0 0 2px #fff; z-index: 10;
}
#payment ul.payment_methods li input { position: absolute; opacity: 0; }
#payment ul.payment_methods label { cursor: pointer; font-weight: 500; margin: 0; display: flex; align-items: center; justify-content: center; min-height: 40px; }
#payment ul.payment_methods label img,
#payment ul.payment_methods label .payment_method_image,
#payment ul.payment_methods label img[src*="payssion"] {
  height: 40px !important; max-height: 40px !important;
  max-width: 134px !important; width: auto !important; object-fit: contain;
  transition: transform .15s;
}
#payment ul.payment_methods label > span:not(.payment_method_image),
#payment ul.payment_methods label > :not(img) { display: none !important; }
#payment ul.payment_methods .payment_box { display: none; }
#payment ul.payment_methods li { box-sizing: border-box; }
.cm-email-hint { color: #666; font-size: 14px; margin: 0 0 16px; }
.cm-email-hint-inline { color: #888; font-size: 13px; font-weight: normal; margin-left: 8px; }
.cm-order-summary-heading { font-size: 20px; font-weight: 400; margin: 0 0 16px; color: #444; }
.cm-qty { display: inline-flex; align-items: center; gap: 4px; }
.cm-qty-btn { width: 24px; height: 24px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }
.cm-qty-btn:hover { background: #f5f5f5; }
.cm-qty-input { width: 36px; height: 26px; border: 1px solid #ddd; border-radius: 4px; text-align: center; padding: 0; -moz-appearance: textfield; -webkit-appearance: none; appearance: none; margin: 0 2px; }
.cm-qty-input::-webkit-inner-spin-button, .cm-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cm-remove-item { margin-right: 6px; border: none; background: none; color: #999; cursor: pointer; padding: 0; vertical-align: middle; line-height: 1; display: inline-flex; }
.cm-remove-item:hover { color: #d32f2f; }
.cm-remove-item svg { display: block; }
#order_review .cart_item td { vertical-align: middle; word-break: break-word; }
#order_review .cart_item .product-name { max-width: 100%; width: 100%; display: block; }
#order_review .cart_item .product-name a { display: block; }
#order_review .cart_item .product-quantity,
#order_review .cart_item .product-price { width: auto; }
#order_review .cart_item .product-total { white-space: nowrap; text-align: right; width: 80px; }
#order_review .product-quantity, #order_review .cm-qty { display: inline-flex; align-items: center; margin-top: 8px; }
#payment #place_order, form.woocommerce-checkout #place_order {
  display: block !important; margin: 20px auto 0 !important; background: var(--brand-blue) !important; color: #fff !important;
  border: none !important; padding: 16px 80px; font-size: 18px !important; font-weight: 600; border-radius: 6px;
  width: auto !important; float: none !important;
}
#payment .form-row-place-order, #payment #place_order_field {
  text-align: center !important; clear: both; float: none !important;
}
#place_order:hover { background: var(--brand-blue-dark) !important; }
#order_review .shop_table { width: 100%; border-collapse: collapse; }
#order_review .shop_table th, #order_review .shop_table td {
  padding: 10px 0; border-bottom: 1px solid #f0f0f0; text-align: left; font-size: 14px;
}
#order_review .cart_item .product-total { text-align: left; padding-left: 8px; }
#order_review .cart-subtotal td:last-child, #order_review .order-total td:last-child { text-align: left !important; }
#order_review .order-total { color: #d32f2f !important; font-size: 18px !important; font-weight: 700 !important; }
@media (max-width: 800px) {
  form.woocommerce-checkout { flex-direction: column; }
  form.woocommerce-checkout #order_review { max-width: 100%; width: 100%; }
}
@media (max-width: 768px) {
  .cm-footer-about { padding: 0 12px; }
}
