/* ============================================================
   BP Shop by Sumaiya – Cart Page Custom CSS
   Gold & Black Theme | Mulish Font | Max-width 1660px
   ============================================================ */

/* ── Google Font: Mulish ── */
@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;500;600;700&display=swap');

/* ── Root Variables ── */
:root {
  --gold:        #c9a84c;
  --gold-light:  #e2c46e;
  --gold-dark:   #a0832e;
  --black:       #111111;
  --dark:        #1a1a1a;
  --dark-2:      #222222;
  --white:       #ffffff;
  --off-white:   #f9f6f0;
  --border:      #e8dfc8;
  --text-muted:  #888888;
  --row-hover:   #fffbf3;
  --font:        'Mulish', sans-serif;
}

/* ── Global font ── */
.woocommerce,
.woocommerce * {
  font-family: var(--font) !important;
}

/* ── Wrapper / Container ── */
.woocommerce {
  max-width: 1660px;
  margin: 40px auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ============================================================
   CART TABLE
   ============================================================ */

.woocommerce-cart-form {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  margin-bottom: 40px;
}

table.shop_table.cart {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--dark);
}

/* ── Header ── */
table.shop_table.cart thead tr {
  background: linear-gradient(135deg, var(--black) 0%, var(--dark-2) 100%);
}

table.shop_table.cart thead th {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 15px 20px;
  border: none;
  text-align: left;
}

table.shop_table.cart thead th.product-remove   { width: 50px; }
table.shop_table.cart thead th.product-thumbnail { width: 100px; }
table.shop_table.cart thead th.product-subtotal  { text-align: right; }

/* ── Body rows ── */
table.shop_table.cart tbody tr.cart_item {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

table.shop_table.cart tbody tr.cart_item:last-child { border-bottom: none; }

table.shop_table.cart tbody tr.cart_item:hover {
  background: var(--row-hover);
}

table.shop_table.cart tbody td {
  padding: 16px 20px;
  vertical-align: middle;
  border: none;
}

/* ── Remove button ── */
table.shop_table.cart .product-remove a.remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid #ddd;
  color: var(--text-muted) !important;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  transition: all 0.2s ease;
}

table.shop_table.cart .product-remove a.remove:hover {
  background: #e53935;
  border-color: #e53935;
  color: var(--white) !important;
  transform: scale(1.1);
}

/* ── Product thumbnail ── */
table.shop_table.cart .product-thumbnail a {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

table.shop_table.cart .product-thumbnail a:hover {
  box-shadow: 0 4px 14px rgba(201,168,76,0.3);
  transform: scale(1.05);
}

table.shop_table.cart .product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Product name ── */
table.shop_table.cart .product-name a {
  color: var(--dark);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s ease;
}

table.shop_table.cart .product-name a:hover {
  color: var(--gold-dark);
}

/* ── Price ── */
table.shop_table.cart .product-price,
table.shop_table.cart .product-price .woocommerce-Price-amount {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Subtotal ── */
table.shop_table.cart .product-subtotal { text-align: right; }

table.shop_table.cart .product-subtotal .woocommerce-Price-amount {
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 14px;
}

/* ── Quantity input ── */
table.shop_table.cart .quantity input.qty {
  width: 68px;
  height: 40px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  text-align: center;
  background: var(--off-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -moz-appearance: textfield;
}

table.shop_table.cart .quantity input.qty:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

table.shop_table.cart .quantity input.qty::-webkit-outer-spin-button,
table.shop_table.cart .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── Actions row ── */
table.shop_table.cart .actions {
  background: var(--off-white);
  padding: 18px 20px !important;
}

table.shop_table.cart .actions .coupon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  float: left;
}

table.shop_table.cart .actions .coupon input#coupon_code {
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--dark);
  background: var(--white);
  min-width: 200px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

table.shop_table.cart .actions .coupon input#coupon_code:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

table.shop_table.cart .actions .coupon input#coupon_code::placeholder {
  color: #bbb;
  font-weight: 400;
}

/* Apply coupon button */
table.shop_table.cart .actions .coupon button[name="apply_coupon"] {
  height: 42px;
  padding: 0 20px;
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font) !important;
  letter-spacing: 0.3px;
  text-transform: capitalize;
  cursor: pointer;
  transition: all 0.25s ease;
}

table.shop_table.cart .actions .coupon button[name="apply_coupon"]:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--white);
}

/* Update cart button */
table.shop_table.cart .actions button[name="update_cart"] {
  float: right;
  height: 42px;
  padding: 0 22px;
  background: var(--black);
  border: none;
  border-radius: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font) !important;
  letter-spacing: 0.3px;
  text-transform: capitalize;
  cursor: pointer;
  transition: all 0.25s ease;
}

table.shop_table.cart .actions button[name="update_cart"]:hover:not([disabled]) {
  background: var(--gold-dark);
  color: var(--white);
}

table.shop_table.cart .actions button[name="update_cart"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

table.shop_table.cart .actions::after {
  content: "";
  display: table;
  clear: both;
}

/* ============================================================
   CART TOTALS
   ============================================================ */

.cart-collaterals {
  display: flex;
  justify-content: flex-end;
}

.cart_totals {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  overflow: hidden;
  min-width: 360px;
  max-width: 420px;
  width: 100%;
  transition: box-shadow 0.2s ease;
}

.cart_totals:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.cart_totals h2 {
  background: linear-gradient(135deg, var(--black) 0%, var(--dark-2) 100%);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0;
  padding: 16px 24px;
}

.cart_totals table.shop_table {
  width: 100%;
  border-collapse: collapse;
}

.cart_totals table.shop_table tr {
  border-bottom: 1px solid var(--border);
}

.cart_totals table.shop_table tr:last-child { border-bottom: none; }

.cart_totals table.shop_table th {
  padding: 15px 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  background: transparent;
  width: 40%;
}

.cart_totals table.shop_table td {
  padding: 15px 24px;
  text-align: right;
  color: var(--dark);
  font-size: 14px;
  font-weight: 400;
}

.cart_totals .cart-subtotal td .woocommerce-Price-amount {
  color: var(--dark);
  font-weight: 500;
}

.cart_totals .order-total {
  background: var(--off-white);
}

.cart_totals .order-total th {
  color: var(--dark);
  font-size: 14px;
  font-weight: 600;
}

.cart_totals .order-total td .woocommerce-Price-amount {
  color: var(--gold-dark);
  font-size: 20px;
  font-weight: 700;
}

/* ── Proceed to checkout ── */
.wc-proceed-to-checkout {
  padding: 18px 24px;
  background: var(--off-white);
  border-top: 1px solid var(--border);
}

.woocommerce .wc-proceed-to-checkout a.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body .wc-proceed-to-checkout a.checkout-button,
.wc-proceed-to-checkout a.checkout-button,
a.checkout-button.button,
.woocommerce a.checkout-button.button,
.woocommerce-cart a.checkout-button.button,
button.checkout-button,
.woocommerce button.checkout-button {
  display: block !important;
  width: 100% !important;
  padding: 14px 24px !important;
  background: var(--gold) !important;
  background-color: var(--gold) !important;
  background-image: none !important;
  color: var(--black) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  font-family: var(--font) !important;
  letter-spacing: 0.5px !important;
  text-transform: capitalize !important;
  text-align: center !important;
  text-decoration: none !important;
  border-radius: 8px !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: 0 3px 14px rgba(201,168,76,0.3) !important;
  transition: all 0.25s ease !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body .wc-proceed-to-checkout a.checkout-button:hover,
.wc-proceed-to-checkout a.checkout-button:hover,
a.checkout-button.button:hover,
.woocommerce a.checkout-button.button:hover,
.woocommerce-cart a.checkout-button.button:hover,
button.checkout-button:hover,
.woocommerce button.checkout-button:hover {
  background: var(--gold-dark) !important;
  background-color: var(--gold-dark) !important;
  background-image: none !important;
  color: var(--white) !important;
  box-shadow: 0 6px 20px rgba(160,131,46,0.4) !important;
  transform: translateY(-1px) !important;
}

/* ============================================================
   MISC
   ============================================================ */

.woocommerce-Price-currencySymbol {
  font-size: 0.85em;
  opacity: 0.8;
}

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info {
  background: var(--off-white);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 8px 8px;
  color: var(--dark);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 20px;
}

.woocommerce-notices-wrapper .woocommerce-error {
  background: #fff5f5;
  border-top: 3px solid #e53935;
  border-radius: 0 0 8px 8px;
  color: #c62828;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 20px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
  .woocommerce {
    max-width: 100%;
    padding: 0 20px;
  }

  .cart_totals {
    min-width: 320px;
    max-width: 380px;
  }
}

@media (max-width: 991px) {
  .woocommerce { padding: 0 16px; }

  table.shop_table.cart thead { display: none; }

  table.shop_table.cart tbody tr.cart_item {
    display: grid;
    grid-template-columns: 40px 80px 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  table.shop_table.cart tbody td { padding: 6px 10px; }

  table.shop_table.cart .product-remove {
    grid-column: 1; grid-row: 1;
    display: flex; align-items: flex-start; padding-top: 10px;
  }

  table.shop_table.cart .product-thumbnail { grid-column: 2; grid-row: 1 / 3; }
  table.shop_table.cart .product-name      { grid-column: 3; grid-row: 1; }

  table.shop_table.cart .product-price,
  table.shop_table.cart .product-quantity,
  table.shop_table.cart .product-subtotal  { grid-column: 3; font-size: 13px; }

  table.shop_table.cart .product-subtotal  { text-align: left; }

  table.shop_table.cart td[data-title]::before {
    content: attr(data-title) ": ";
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    display: inline;
  }

  table.shop_table.cart .product-name::before,
  table.shop_table.cart .product-thumbnail::before,
  table.shop_table.cart .product-remove::before { content: none; }

  .cart-collaterals { justify-content: center; }
  .cart_totals { max-width: 100%; }

  table.shop_table.cart .actions .coupon {
    float: none; flex-wrap: wrap; margin-bottom: 10px;
  }

  table.shop_table.cart .actions .coupon input#coupon_code {
    width: 100%; min-width: unset;
  }

  table.shop_table.cart .actions button[name="update_cart"] {
    float: none; width: 100%;
  }
}

@media (max-width: 768px) {
  .woocommerce { margin: 30px auto; padding: 0 16px; }

  .woocommerce-cart-form { margin-bottom: 30px; }

  table.shop_table.cart tbody tr.cart_item {
    grid-template-columns: 35px 70px 1fr;
    padding: 12px 0;
  }

  table.shop_table.cart .product-thumbnail a {
    width: 60px;
    height: 60px;
  }

  table.shop_table.cart .product-name a {
    font-size: 13px;
  }

  .cart_totals table.shop_table th,
  .cart_totals table.shop_table td {
    padding: 12px 18px;
    font-size: 13px;
  }

  .cart_totals .order-total td .woocommerce-Price-amount {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .woocommerce { margin: 24px auto; padding: 0 12px; }

  table.shop_table.cart tbody tr.cart_item {
    grid-template-columns: 30px 60px 1fr;
    padding: 10px 0;
  }

  table.shop_table.cart tbody td { padding: 4px 8px; }

  table.shop_table.cart .product-thumbnail a {
    width: 50px;
    height: 50px;
  }

  table.shop_table.cart .product-name a {
    font-size: 12px;
  }

  table.shop_table.cart .product-price,
  table.shop_table.cart .product-quantity,
  table.shop_table.cart .product-subtotal {
    font-size: 12px;
  }

  table.shop_table.cart .quantity input.qty {
    width: 60px;
    height: 36px;
    font-size: 13px;
  }

  table.shop_table.cart .actions {
    padding: 14px 16px !important;
  }

  table.shop_table.cart .actions .coupon input#coupon_code {
    height: 38px;
    font-size: 12px;
  }

  table.shop_table.cart .actions .coupon button[name="apply_coupon"],
  table.shop_table.cart .actions button[name="update_cart"] {
    height: 38px;
    font-size: 12px;
    padding: 0 16px;
  }

  .cart_totals h2 {
    font-size: 11px;
    padding: 14px 18px;
  }

  .cart_totals table.shop_table th,
  .cart_totals table.shop_table td {
    padding: 12px 18px;
    font-size: 12px;
  }

  .cart_totals .order-total td .woocommerce-Price-amount {
    font-size: 16px;
  }

  .wc-proceed-to-checkout {
    padding: 14px 18px;
  }

  .wc-proceed-to-checkout a.checkout-button {
    padding: 12px 18px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .woocommerce { padding: 0 10px; }

  table.shop_table.cart tbody tr.cart_item {
    grid-template-columns: 25px 50px 1fr;
  }

  table.shop_table.cart .product-thumbnail a {
    width: 45px;
    height: 45px;
  }

  table.shop_table.cart .product-name a {
    font-size: 11px;
  }

  table.shop_table.cart .quantity input.qty {
    width: 50px;
    height: 34px;
    font-size: 12px;
  }

  .cart_totals {
    min-width: unset;
  }

  .cart_totals .order-total td .woocommerce-Price-amount {
    font-size: 15px;
  }
}
