/*
Theme Name: WC Minimal Table
Theme URI: https://example.local
Author: You
Description: Minimal WooCommerce-first theme: Home = login only; logged-in users see category/product tables with AJAX add-to-cart.
Version: 1.2.1
Text Domain: wc-minimal-table
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
*/

:root{
  --bg1:#f6f8fb;
  --bg2:#eef3f9;
  --card:#ffffff;
  --card2:#fbfcfe;
  --text:#0f172a;
  --muted:#475569;
  --line:#e2e8f0;
  --accent:#2563eb;
  --accent2:#16a34a;
  --danger:#dc2626;
  --shadow: 0 18px 55px rgba(2, 6, 23, 0.10);
  --shadow2: 0 10px 24px rgba(2, 6, 23, 0.08);
  --radius: 18px;
  --radius2: 12px;
  --maxw: 1100px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 15% 5%, rgba(37,99,235,0.10), transparent 60%),
    radial-gradient(900px 520px at 90% 15%, rgba(22,163,74,0.08), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

a{color:inherit; text-decoration:none;}
a:hover{opacity:.92;}

.wcmt-shell{min-height:100%; display:flex; flex-direction:column;}
.wcmt-container{width:100%; max-width:var(--maxw); margin:0 auto; padding:28px 18px 64px;}

.wcmt-card{
  background: linear-gradient(180deg, var(--card), var(--card2));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.wcmt-card-inner{padding: clamp(18px, 2.5vw, 26px);}

.wcmt-title{
  font-size: clamp(22px, 2.4vw, 32px);
  margin:0 0 10px;
  letter-spacing:-0.2px;
}
.wcmt-subtitle{
  margin:0 0 18px;
  color:var(--muted);
  line-height:1.5;
}

.wcmt-center{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: calc(100vh - 30px);
  padding:24px 18px;
}
.wcmt-login-wrap{width:min(520px, 100%);}

.wcmt-topbar{
  position:sticky;
  top:0;
  z-index:50;
  background: rgba(246,248,251,0.75);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(226,232,240,0.9);
}
.wcmt-topbar-inner{
  max-width:var(--maxw);
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.wcmt-brand{display:flex; flex-direction:column; line-height:1.1;}
.wcmt-brand strong{font-size:14px; letter-spacing:0.2px;}
.wcmt-brand span{font-size:12px; color:var(--muted);}

.wcmt-nav{display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end;}
.wcmt-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border-radius:999px;
  background: #ffffff;
  border:1px solid var(--line);
  box-shadow: var(--shadow2);
  font-size:13px;
  color:var(--text);
}
.wcmt-pill:hover{background:#f8fafc;}
.wcmt-pill--accent{
  border-color: rgba(37,99,235,0.25);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.10) inset, var(--shadow2);
}
.wcmt-pill--danger{ border-color: rgba(220,38,38,0.25); }

.wcmt-table{
  width:100%;
  border-collapse: collapse;
  border-radius: var(--radius2);
  overflow:hidden;
  border:1px solid var(--line);
  background: #fff;
}
.wcmt-table thead th{
  text-align:left;
  font-size:12px;
  color:var(--muted);
  letter-spacing:0.5px;
  text-transform:uppercase;
  padding:12px 14px;
  background: #f8fafc;
  border-bottom:1px solid var(--line);
}
.wcmt-table tbody td{
  padding:12px 14px;
  border-bottom:1px solid #eef2f7;
  vertical-align:middle;
}
.wcmt-table tbody tr:hover td{background:#f8fafc;}
.wcmt-rowlink{display:flex; align-items:center; justify-content:space-between; gap:14px;}
.wcmt-rowlink strong{font-weight:700;}
.wcmt-muted{color:var(--muted); font-size:13px;}

.wcmt-qty{
  width:90px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  outline:none;
}
.wcmt-qty:focus{border-color: rgba(37,99,235,0.45); box-shadow: 0 0 0 4px rgba(37,99,235,0.12);}

.wcmt-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(37,99,235,0.30);
  background: linear-gradient(180deg, rgba(37,99,235,0.12), rgba(37,99,235,0.06));
  color:var(--text);
  cursor:pointer;
  font-weight:700;
}
.wcmt-btn:hover{background: linear-gradient(180deg, rgba(37,99,235,0.16), rgba(37,99,235,0.08));}
.wcmt-btn-secondary{
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.wcmt-cat-toggle{cursor:pointer;}
.wcmt-cat-products{display:none;}
.wcmt-cat-products.is-open{display:block; margin-top:14px;}
.wcmt-chevron{opacity:.65;}
.wcmt-loading{color:var(--muted); font-size:13px; padding:10px 0;}

/* Toast / inline notice */
#wcmt-toast {
  display: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow2);
}
#wcmt-toast.is-show { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#wcmt-toast .wcmt-toast-left { display:flex; align-items:center; gap:10px; }
#wcmt-toast .wcmt-dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent2);
  box-shadow: 0 0 0 4px rgba(22,163,74,0.18);
}
#wcmt-toast .wcmt-toast-text { color: var(--text); font-size: 14px; }
#wcmt-toast a { color: var(--accent); font-weight: 700; }

/* WooCommerce cohesive light */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error{
  background: #ffffff;
  border:1px solid var(--line);
  color:var(--text);
  border-radius: 14px;
  box-shadow: var(--shadow2);
}
.woocommerce-error{border-left:4px solid var(--danger);}
.woocommerce-message{border-left:4px solid var(--accent2);}
.woocommerce-info{border-left:4px solid var(--accent);}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="password"],
.woocommerce input[type="number"],
.woocommerce textarea,
.woocommerce select{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px 12px;
  box-shadow:none;
}
.woocommerce input:focus,
.woocommerce textarea:focus,
.woocommerce select:focus{
  outline:none;
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.woocommerce form .form-row label,
.woocommerce label{color:var(--muted); font-size:13px;}

.woocommerce table.shop_table{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  box-shadow: var(--shadow2);
}
.woocommerce table.shop_table thead th{
  background:#f8fafc;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0.4px;
  font-size:12px;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td{
  border-top:1px solid #eef2f7;
  color:var(--text);
}

.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce input.button{
  border-radius:12px;
  border:1px solid rgba(37,99,235,0.30);
  background: linear-gradient(180deg, rgba(37,99,235,0.12), rgba(37,99,235,0.06));
  color:var(--text);
  font-weight:700;
  padding:12px 14px;
}
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover{
  background: linear-gradient(180deg, rgba(37,99,235,0.16), rgba(37,99,235,0.08));
}

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  min-height:44px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
  color:var(--text);
  line-height:44px;
  padding-left:12px;
}
.select2-dropdown{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  box-shadow: var(--shadow2);
}
.select2-results__option{color:var(--text);}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{
  background: rgba(37,99,235,0.10);
}

/* My Account nav */
.woocommerce-MyAccount-navigation ul{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:10px;
}
.woocommerce-MyAccount-navigation a{
  display:inline-flex;
  padding:10px 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow: var(--shadow2);
  color:var(--text);
}
.woocommerce-MyAccount-navigation .is-active a{
  border-color: rgba(37,99,235,0.25);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.10) inset, var(--shadow2);
}

@media (max-width: 760px){
  .wcmt-topbar-inner{flex-direction:column; align-items:flex-start;}
  .wcmt-nav{justify-content:flex-start;}
  .wcmt-table thead{display:none;}
  .wcmt-table, .wcmt-table tbody, .wcmt-table tr, .wcmt-table td{display:block; width:100%;}
  .wcmt-table tr{border-bottom:1px solid var(--line);}
  .wcmt-table td{border-bottom:0;}
  .wcmt-table td[data-label]::before{
    content: attr(data-label);
    display:block;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:0.4px;
    font-size:11px;
    margin-bottom:6px;
  }
}
