/*
 * Tshirt Garden — eCommerce CSS
 * Styles WooCommerce Cart, Checkout, My Account pages.
 * These pages use WordPress page.php + WC shortcodes.
 * We target WooCommerce's own CSS classes directly.
 */

/* =============================================
   PAGE WRAPPER
   ============================================= */
.tg-page-inner { padding-top: 32px; padding-bottom: 60px; }

/* WC breadcrumb in page header */
.tg-breadcrumb-bar { background: var(--tg-gray); border-bottom: 1px solid var(--tg-border); padding: 10px 0; }
.tg-wc-breadcrumb,
.woocommerce-breadcrumb {
  font-size: 13px; color: var(--tg-text-muted); display: block;
}
.woocommerce-breadcrumb a { color: var(--tg-text-muted); transition: color .2s; }
.woocommerce-breadcrumb a:hover { color: var(--tg-green); }

/* =============================================
   WooCommerce NOTICES
   ============================================= */
.woocommerce-message,
.woocommerce-info {
  background: var(--tg-green-xlight);
  border-left: 4px solid var(--tg-green);
  border-radius: 8px; padding: 12px 16px;
  font-size: 14px; color: var(--tg-green-dark);
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; list-style: none; margin-bottom: 20px;
}
.woocommerce-error {
  background: #FEE2E2; border-left: 4px solid #DC2626;
  border-radius: 8px; padding: 12px 16px; font-size: 14px; color: #991B1B;
  list-style: none; margin-bottom: 20px;
}
.woocommerce-error li { padding: 4px 0; }
.woocommerce-message .button,
.woocommerce-info .button {
  margin-left: auto; background: var(--tg-green); color: #fff;
  padding: 7px 16px; border-radius: 6px;
  font-size: 12px; font-family: var(--font-heading); font-weight: 500;
  white-space: nowrap; transition: background .2s;
}
.woocommerce-message .button:hover { background: var(--tg-green-dark); }

/* =============================================
   CART PAGE
   WooCommerce outputs these classes on cart page:
   - table.shop_table.cart (the cart items table)
   - .cart-collaterals > .cart_totals (the totals box)
   ============================================= */
.woocommerce-cart .woocommerce { display: block; width: 100%; }

/* Cart Table */
.woocommerce-cart table.shop_table {
  width: 100%; border-collapse: collapse;
  background: #fff; border-radius: 12px;
  border: 1px solid var(--tg-border);
  font-size: 14px; margin-bottom: 0;
  overflow: hidden;
}
.woocommerce-cart table.shop_table thead tr { background: var(--tg-gray); }
.woocommerce-cart table.shop_table th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 700; font-family: var(--font-heading);
  color: var(--tg-text-muted); text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 1px solid var(--tg-border);
}
.woocommerce-cart table.shop_table td {
  padding: 14px 16px; border-bottom: 1px solid var(--tg-gray2); vertical-align: middle;
}
.woocommerce-cart table.shop_table tr:last-child td { border-bottom: none; }
.woocommerce-cart table.shop_table tr:hover td { background: #fafafa; }
/* Product image */
.woocommerce-cart table.shop_table .product-thumbnail img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block;
}
/* Product name */
.woocommerce-cart table.shop_table .product-name a {
  font-weight: 600; color: var(--tg-black); font-size: 14px; transition: color .2s;
}
.woocommerce-cart table.shop_table .product-name a:hover { color: var(--tg-green); }
.woocommerce-cart table.shop_table .product-name .variation {
  font-size: 12px; color: var(--tg-text-muted); margin-top: 4px;
}
/* Price & Subtotal */
.woocommerce-cart table.shop_table .product-price,
.woocommerce-cart table.shop_table .product-subtotal {
  font-weight: 700; color: var(--tg-green); font-family: var(--font-heading);
}
/* Qty */
.woocommerce-cart table.shop_table .qty {
  width: 60px; text-align: center; padding: 8px;
  border: 1.5px solid var(--tg-border); border-radius: 7px;
  font-size: 14px; outline: none; transition: border-color .2s;
}
.woocommerce-cart table.shop_table .qty:focus { border-color: var(--tg-green); }
/* Remove × */
.woocommerce-cart table.shop_table .product-remove a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; background: #FEE2E2; color: #DC2626;
  border-radius: 50%; font-size: 14px; font-weight: 700; transition: all .2s;
}
.woocommerce-cart table.shop_table .product-remove a:hover { background: #DC2626; color: #fff; }
/* Actions row (coupon + update) */
.woocommerce-cart table.shop_table .actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--tg-gray); padding: 14px 16px;
  border-top: 1px solid var(--tg-gray2);
}
.woocommerce-cart .actions .coupon { display: flex; gap: 8px; }
.woocommerce-cart .actions .coupon #coupon_code {
  padding: 10px 14px; border: 1.5px solid var(--tg-border); border-radius: 8px;
  font-size: 13px; outline: none; width: 160px; transition: border-color .2s;
}
.woocommerce-cart .actions .coupon #coupon_code:focus { border-color: var(--tg-green); }
.woocommerce-cart .actions .coupon [name="apply_coupon"],
.woocommerce-cart .actions [name="apply_coupon"] {
  background: var(--tg-green); color: #fff; border: none;
  padding: 10px 18px; border-radius: 8px;
  font-size: 13px; font-family: var(--font-heading); font-weight: 500;
  cursor: pointer; transition: background .2s;
}
.woocommerce-cart .actions [name="apply_coupon"]:hover { background: var(--tg-green-dark); }
.woocommerce-cart .actions [name="update_cart"] {
  margin-left: auto; background: transparent; color: var(--tg-green);
  border: 1.5px solid var(--tg-green); padding: 10px 18px; border-radius: 8px;
  font-size: 13px; font-family: var(--font-heading); font-weight: 500;
  cursor: pointer; transition: all .2s;
}
.woocommerce-cart .actions [name="update_cart"]:hover { background: var(--tg-green); color: #fff; }

/* Cart Totals */
.woocommerce-cart .cart-collaterals { margin-top: 32px; }
.woocommerce-cart .cart_totals {
  background: #fff; border: 1px solid var(--tg-border);
  border-radius: 14px; padding: 24px;
  max-width: 400px; margin-left: auto;
}
.woocommerce-cart .cart_totals h2 {
  font-size: 1.1rem; font-family: var(--font-heading); font-weight: 700;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--tg-green-xlight);
}
.woocommerce-cart .cart_totals table.shop_table {
  border: none; border-radius: 0; background: transparent;
  overflow: visible;
}
.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
  padding: 10px 0; border-bottom: 1px solid var(--tg-gray2);
  background: transparent !important; font-size: 14px;
}
.woocommerce-cart .cart_totals table.shop_table tr:hover td { background: transparent !important; }
.woocommerce-cart .cart_totals table.shop_table th { font-weight: 500; color: var(--tg-text-muted); }
.woocommerce-cart .cart_totals table.shop_table td { text-align: right; font-weight: 600; }
.woocommerce-cart .cart_totals table.shop_table tr.order-total th,
.woocommerce-cart .cart_totals table.shop_table tr.order-total td {
  font-size: 16px; font-weight: 700; font-family: var(--font-heading);
  border-bottom: none; padding-top: 14px;
}
.woocommerce-cart .cart_totals table.shop_table tr.order-total td { color: var(--tg-green); }
.woocommerce-cart .cart_totals .wc-proceed-to-checkout { margin-top: 20px; }
.woocommerce-cart .cart_totals .checkout-button {
  display: block !important; width: 100%; text-align: center;
  background: var(--tg-green) !important; color: #fff !important;
  padding: 14px !important; border-radius: 8px !important;
  font-size: 15px; font-family: var(--font-heading); font-weight: 600;
  transition: background .2s;
}
.woocommerce-cart .cart_totals .checkout-button:hover { background: var(--tg-green-dark) !important; }
/* Empty cart */
.woocommerce-cart .cart-empty { text-align: center; padding: 48px 20px; color: var(--tg-text-muted); }
.woocommerce-cart .return-to-shop { text-align: center; margin-top: 16px; }
.woocommerce-cart .return-to-shop .button {
  display: inline-block; background: var(--tg-green); color: #fff;
  padding: 12px 28px; border-radius: 8px;
  font-family: var(--font-heading); font-weight: 500; font-size: 14px;
}
.woocommerce-cart .return-to-shop .button:hover { background: var(--tg-green-dark); color: #fff; }

/* =============================================
   CHECKOUT PAGE
   WooCommerce outputs:
   - .col2-set (billing + shipping columns)
   - #order_review + #payment
   ============================================= */
.woocommerce-checkout .woocommerce { display: block; width: 100%; }
.woocommerce-checkout .col2-set {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-bottom: 32px;
}
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 { width: 100%; float: none; }
/* Headings */
.woocommerce-checkout h3 {
  font-size: 1.1rem; font-family: var(--font-heading); font-weight: 700;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--tg-green-xlight);
}
/* Fields */
.woocommerce-checkout .form-row { margin-bottom: 14px; }
.woocommerce-checkout .form-row label {
  display: block; font-size: 13px; font-weight: 500;
  font-family: var(--font-heading); margin-bottom: 5px;
}
.woocommerce-checkout .form-row .required { color: #DC2626; }
.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--tg-border); border-radius: 8px;
  font-size: 14px; font-family: var(--font-body); outline: none;
  color: var(--tg-text); background: #fff; transition: border-color .2s;
}
.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus { border-color: var(--tg-green); }
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last { display: inline-block; width: calc(50% - 6px); }
.woocommerce-checkout .form-row-first { margin-right: 10px; }
/* Order review table */
.woocommerce-checkout #order_review_heading {
  font-size: 1.1rem; font-family: var(--font-heading); font-weight: 700;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--tg-green-xlight);
}
.woocommerce-checkout table.shop_table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 20px; }
.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td { padding: 9px 4px; border-bottom: 1px solid var(--tg-gray2); }
.woocommerce-checkout table.shop_table tfoot .order-total td,
.woocommerce-checkout table.shop_table tfoot .order-total th {
  font-weight: 700; font-size: 15px; border-bottom: none; padding-top: 12px;
}
.woocommerce-checkout table.shop_table tfoot .order-total td { color: var(--tg-green); text-align: right; }
/* Payment */
.woocommerce-checkout #payment {
  background: var(--tg-gray); border-radius: 12px; padding: 20px; margin-top: 20px;
}
.woocommerce-checkout #payment ul.payment_methods { list-style: none; padding: 0; margin-bottom: 16px; }
.woocommerce-checkout #payment ul.payment_methods li {
  border: 1.5px solid var(--tg-border); border-radius: 10px;
  margin-bottom: 8px; background: #fff; overflow: hidden; transition: border-color .2s;
}
.woocommerce-checkout #payment ul.payment_methods li label {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer; font-weight: 500; font-size: 14px;
}
.woocommerce-checkout #payment ul.payment_methods li label input[type="radio"] { accent-color: var(--tg-green); }
.woocommerce-checkout #payment ul.payment_methods li img { max-height: 24px; width: auto; }
.woocommerce-checkout #payment .payment_box {
  padding: 8px 14px 14px; font-size: 13px; color: var(--tg-text-muted); display: none;
}
.woocommerce-checkout #payment .payment_box.payment_method_cod { display: block; }
.woocommerce-checkout #payment #place_order {
  display: block; width: 100%; text-align: center;
  background: var(--tg-green); color: #fff; border: none;
  padding: 14px; border-radius: 8px;
  font-size: 15px; font-family: var(--font-heading); font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.woocommerce-checkout #payment #place_order:hover { background: var(--tg-green-dark); }

/* =============================================
   MY ACCOUNT PAGE
   WooCommerce outputs:
   - nav.woocommerce-MyAccount-navigation
   - div.woocommerce-MyAccount-content
   Both inside div.woocommerce
   ============================================= */
.woocommerce-account .woocommerce {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
  width: 100%;
}
/* CRITICAL: Remove WooCommerce floats */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Nav sidebar */
.woocommerce-account .woocommerce-MyAccount-navigation {
  background: #fff; border: 1px solid var(--tg-border);
  border-radius: 14px; overflow: hidden;
  position: sticky; top: 88px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid var(--tg-gray2);
  font-size: 13px; font-weight: 500; font-family: var(--font-heading);
  color: var(--tg-text); transition: all .2s;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child a { border-bottom: none; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li a::after { content: '›'; color: var(--tg-text-muted); }
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--active a {
  background: var(--tg-green-xlight); color: var(--tg-green);
}

/* Account content */
.woocommerce-account .woocommerce-MyAccount-content { min-width: 0; }

/* Welcome box (from our hook) */
.tg-account-welcome {
  background: linear-gradient(135deg, var(--tg-green-xlight), #F1F8E9);
  border-radius: 12px; padding: 18px 22px; margin-bottom: 24px;
}
.tg-account-welcome p { font-size: 15px; margin: 0 0 4px 0; }
.tg-account-welcome .tg-account-welcome__sub { font-size: 13px; color: var(--tg-text-muted); }

/* Orders table */
.woocommerce-account .woocommerce-orders-table,
.woocommerce-account table.shop_table {
  width: 100%; border-collapse: collapse; background: #fff;
  border-radius: 12px; border: 1px solid var(--tg-border);
  overflow: hidden; font-size: 14px; margin-bottom: 20px;
}
.woocommerce-account table.shop_table thead tr { background: var(--tg-gray); }
.woocommerce-account table.shop_table th {
  padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 700; font-family: var(--font-heading);
  color: var(--tg-text-muted); text-transform: uppercase;
  letter-spacing: .04em; border-bottom: 1px solid var(--tg-border);
}
.woocommerce-account table.shop_table td { padding: 12px 14px; border-bottom: 1px solid var(--tg-gray2); vertical-align: middle; }
.woocommerce-account table.shop_table tr:last-child td { border-bottom: none; }
.woocommerce-account table.shop_table tr:hover td { background: #fafafa; }
.woocommerce-account table.shop_table .woocommerce-orders-table__cell-order-number a { color: var(--tg-green); font-weight: 600; }

/* Order status */
.woocommerce-account mark.order-status {
  background: none; display: inline-block;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; font-family: var(--font-heading);
}
.woocommerce-account mark.order-status.processing { background: #E3F2FD; color: #1565C0; }
.woocommerce-account mark.order-status.completed  { background: var(--tg-green-xlight); color: var(--tg-green); }
.woocommerce-account mark.order-status.pending    { background: #FFF8E1; color: #F57F17; }
.woocommerce-account mark.order-status.cancelled  { background: #FEE2E2; color: #DC2626; }
.woocommerce-account mark.order-status.on-hold    { background: #F3E5F5; color: #7B1FA2; }

/* View button */
.woocommerce-account .woocommerce-MyAccount-content .button.view,
.woocommerce-account .woocommerce-button {
  display: inline-block; padding: 6px 14px;
  background: var(--tg-green-xlight); color: var(--tg-green);
  border-radius: 6px; font-size: 12px; font-weight: 600;
  font-family: var(--font-heading); transition: all .2s; border: none; cursor: pointer;
}
.woocommerce-account .woocommerce-MyAccount-content .button.view:hover,
.woocommerce-account .woocommerce-button:hover { background: var(--tg-green); color: #fff; }

/* Account forms (edit details, address) */
.woocommerce-account .woocommerce-MyAccount-content h2,
.woocommerce-account .woocommerce-MyAccount-content h3 {
  font-size: 1.1rem; font-family: var(--font-heading); font-weight: 700;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--tg-green-xlight);
}
.woocommerce-account .woocommerce-MyAccount-content .form-row { margin-bottom: 14px; }
.woocommerce-account .woocommerce-MyAccount-content .form-row label {
  display: block; font-size: 13px; font-weight: 500;
  font-family: var(--font-heading); margin-bottom: 5px;
}
.woocommerce-account .woocommerce-MyAccount-content input[type="text"],
.woocommerce-account .woocommerce-MyAccount-content input[type="email"],
.woocommerce-account .woocommerce-MyAccount-content input[type="password"],
.woocommerce-account .woocommerce-MyAccount-content input[type="tel"],
.woocommerce-account .woocommerce-MyAccount-content select,
.woocommerce-account .woocommerce-MyAccount-content textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--tg-border); border-radius: 8px;
  font-size: 14px; font-family: var(--font-body); outline: none;
  background: #fff; transition: border-color .2s;
}
.woocommerce-account .woocommerce-MyAccount-content input:focus,
.woocommerce-account .woocommerce-MyAccount-content select:focus { border-color: var(--tg-green); }
.woocommerce-account .woocommerce-MyAccount-content button[type="submit"],
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-account .woocommerce-MyAccount-content .button:not(.view):not(.woocommerce-button) {
  background: var(--tg-green); color: #fff; border: none;
  padding: 11px 24px; border-radius: 8px;
  font-family: var(--font-heading); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .2s; display: inline-block;
}
.woocommerce-account .woocommerce-MyAccount-content button[type="submit"]:hover,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button:hover { background: var(--tg-green-dark); }

/* Address boxes */
.woocommerce-account .woocommerce-Addresses {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.woocommerce-account .woocommerce-Address {
  background: var(--tg-gray); border-radius: 12px; padding: 20px;
}
.woocommerce-account .woocommerce-Address-title {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.woocommerce-account .woocommerce-Address-title h3 { border-bottom: none; margin-bottom: 0; padding-bottom: 0; font-size: 1rem; }
.woocommerce-account .woocommerce-Address-title a { font-size: 12px; color: var(--tg-green); font-weight: 500; }

/* =============================================
   WISHLIST PAGE
   ============================================= */
.tg-wishlist-wrap { padding: 40px 0 60px; }
.tg-wishlist-title { font-size: 1.8rem; font-family: var(--font-heading); font-weight: 700; margin-bottom: 28px; }
.tg-wishlist-list { display: flex; flex-direction: column; gap: 14px; }
.tg-wishlist-item {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--tg-border); border-radius: 12px;
  padding: 14px 18px; transition: box-shadow .2s;
}
.tg-wishlist-item:hover { box-shadow: 0 3px 16px rgba(0,0,0,.07); }
.tg-wishlist-item__img-wrap {
  width: 80px; height: 80px; flex-shrink: 0; border-radius: 10px;
  overflow: hidden; background: var(--tg-gray); display: flex; align-items: center; justify-content: center;
}
.tg-wishlist-item__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.tg-wishlist-item__info { flex: 1; }
.tg-wishlist-item__name { font-size: 15px; font-weight: 600; color: var(--tg-black); transition: color .2s; }
.tg-wishlist-item__name:hover { color: var(--tg-green); }
.tg-wishlist-item__price { font-size: 15px; font-weight: 700; color: var(--tg-green); font-family: var(--font-heading); margin-top: 4px; }
.tg-wishlist-item__actions { display: flex; align-items: center; gap: 12px; }
.tg-wishlist-empty { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tg-wishlist-empty__icon { font-size: 52px; }

/* =============================================
   FOOTER GLOBAL NAV
   ============================================= */
.tg-footer-global-nav { background: #163D18; border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; }
.tg-footer-global-nav__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.tg-footer-global-menu { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.tg-footer-global-menu li a {
  font-size: 12px; color: rgba(255,255,255,.7); padding: 4px 12px;
  border-right: 1px solid rgba(255,255,255,.15); transition: color .2s;
}
.tg-footer-global-menu li:last-child a { border-right: none; }
.tg-footer-global-menu li a:hover { color: #fff; }
.tg-footer-global-nav__social { display: flex; gap: 10px; }
.tg-footer-social-icon-sm {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.tg-footer-social-icon-sm:hover { background: var(--tg-green); border-color: var(--tg-green); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .woocommerce-checkout .col2-set { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 900px) {
  .woocommerce-account .woocommerce { grid-template-columns: 1fr !important; }
  .woocommerce-account .woocommerce-MyAccount-navigation { position: static; }
  .woocommerce-account .woocommerce-Addresses { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .woocommerce-cart table.shop_table .product-thumbnail,
  .woocommerce-cart table.shop_table th.product-thumbnail { display: none; }
  .woocommerce-cart .actions { flex-direction: column; align-items: flex-start; }
  .woocommerce-cart .actions [name="update_cart"] { margin-left: 0; }
  .woocommerce-cart .cart_totals { max-width: 100%; }
  .woocommerce-checkout .form-row-first,
  .woocommerce-checkout .form-row-last { display: block; width: 100%; }
  .tg-wishlist-item { flex-wrap: wrap; }
}
