/* ── Corporate Shop — Frontend Styles v2.1 ── */
/* Card design mirrors WC Category Filter plugin */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --cs-primary:  #030222;
  --cs-accent:   #3e1e46;
  --cs-bg:       #f8f8f8;
  --cs-border:   #e8e8e8;
  --cs-text:     #111111;
  --cs-muted:    #666666;
  --cs-font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Wrap ── */
.corp-shop-wrap {
  font-family: var(--cs-font);
}

/* ── Login Prompt Card ── */
.corp-shop-login-prompt {
  text-align: center;
  padding: 60px 20px;
  max-width: 420px;
  margin: 0 auto;
  font-family: var(--cs-font);
}
.corp-shop-login-prompt__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.corp-shop-login-prompt__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cs-primary);
  margin: 0 0 10px;
}
.corp-shop-login-prompt__text {
  font-size: 0.93rem;
  color: var(--cs-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}
.corp-shop-login-prompt__btn {
  display: inline-block;
  padding: 13px 32px !important;
  background: var(--cs-primary);
  color: #fff !important;
  border-radius: 8px;
  font-family: var(--cs-font);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.corp-shop-login-prompt__btn:hover {
  background: var(--cs-accent);
  color: #fff !important;
  transform: translateY(-1px);
}

/* ── Shop Header (logo on LHS, company/welcome on RHS) ── */
.corp-shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  border: 1px solid var(--cs-border);
  margin-bottom: 28px;
  background: #ffffff;
  border-radius: 12px;
  gap: 20px;
}

.corp-shop-header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.corp-shop-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}

.corp-shop-logo {
  max-height: 80px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border: 1px solid var(--cs-border);
}

.corp-shop-header-right {
  width: 50%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.corp-shop-products-title{
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--cs-primary);
  letter-spacing: -0.4px;
  width: 100%;
  text-align: center !important;
  font-family: var(--cs-font);
  line-height: 1.2;
  margin-top: 10px;
  margin-bottom: 10px;
}

.corp-shop-company-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cs-primary);
  letter-spacing: -0.4px;
  margin: 0;
  font-family: var(--cs-font);
  line-height: 1.2;
}

.corp-shop-welcome-msg {
  font-size: 0.92rem;
  color: var(--cs-muted);
  margin: 0;
  line-height: 1.4;
  font-family: var(--cs-font);
}

@media (max-width: 768px) {
  .corp-shop-header {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    align-items: center;
    gap: 15px;
  }
  .corp-shop-header-left {
    justify-content: center;
  }
  .corp-shop-header-right {
    width: 100%;
    text-align: center;
    align-items: center;
  }
}

/* ── Footer bar (logout) — below products ── */
.corp-shop-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding: 16px 20px;
  border-top: 1px solid var(--cs-border);
  background: rgba(3,2,34,0.025);
  border-radius: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
.corp-shop-footer-bar__greeting {
  font-size: 0.83rem;
  color: var(--cs-muted);
  font-weight: 500;
  font-family: var(--cs-font);
}
.corp-shop-logout-btn {
  display: inline-block;
  padding: 7px 18px;
  background: transparent;
  border: 1.5px solid var(--cs-primary);
  border-radius: 6px;
  color: var(--cs-primary);
  font-family: var(--cs-font);
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.corp-shop-logout-btn:hover {
  background: var(--cs-primary);
  color: #fff;
}

/* ── Product Grid ── */
.corp-shop-products {
  display: grid;
  gap: 20px;
}
.corp-shop-cols-1 { grid-template-columns: repeat(1, 1fr); }
.corp-shop-cols-2 { grid-template-columns: repeat(2, 1fr); }
.corp-shop-cols-3 { grid-template-columns: repeat(3, 1fr); }
.corp-shop-cols-4 { grid-template-columns: repeat(4, 1fr); }
.corp-shop-cols-5 { grid-template-columns: repeat(5, 1fr); }
.corp-shop-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1100px) {
  .corp-shop-cols-5,
  .corp-shop-cols-6 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .corp-shop-cols-4,
  .corp-shop-cols-5,
  .corp-shop-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .corp-shop-cols-3,
  .corp-shop-cols-4,
  .corp-shop-cols-5,
  .corp-shop-cols-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .corp-shop-products { grid-template-columns: 1fr !important; }
}

/* ── Product Card ── */
.corp-shop-product-card {
  background: #fff;
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.corp-shop-product-card:hover {
  box-shadow: 0 6px 24px rgba(3,2,34,0.13);
  transform: translateY(-2px);
}

/* ── Product Image ── */
.corp-shop-product-img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--cs-bg);
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
}
.corp-shop-product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
  transition: transform 0.35s ease;
}
.corp-shop-product-card:hover .corp-shop-product-img-wrap img {
  transform: scale(1.04);
}

/* ── Badges ── */
.corp-shop-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  pointer-events: none;
}
.corp-shop-badge--sale       { background: #c0392b; }
.corp-shop-badge--outofstock { background: #999; }
.corp-shop-badge--private    { background: var(--cs-accent); }

/* ── Private Corp Product card variant ── */
.corp-shop-product-card--private .corp-shop-product-img-wrap {
  background: #f8f4fb;
}

/* ── Product price line ── */
.corp-shop-product-price {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--cs-primary);
  font-family: var(--cs-font);
}
.corp-shop-product-price em {
  font-style: italic;
  font-weight: 400;
  color: var(--cs-muted);
  font-size: 13px;
}

/* ── Request/enquiry text ── */
.corp-shop-product-enquiry {
  font-size: 12px;
  color: var(--cs-muted);
  font-style: italic;
  margin: 0;
  font-family: var(--cs-font);
}

/* ── Product Info ── */
.corp-shop-product-info {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.corp-shop-product-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cs-text);
}
.corp-shop-product-title a {
  color: inherit;
  text-decoration: none;
}
.corp-shop-product-title a:hover { color: var(--cs-accent); }

.corp-shop-product-sku {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--cs-muted);
}

.corp-shop-product-inventory {
  margin: 0;
  font-size: 13px;
  color: var(--cs-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.corp-shop-product-inventory__label {
  font-weight: 700;
  color: var(--cs-primary);
}

.corp-shop-stock {
  font-weight: 600;
  color: #444;
}

.corp-shop-stock.is-low-stock {
  color: #c0392b;
}

.corp-shop-stock.is-out-of-stock {
  color: #999;
}

.corp-shop-simple-inventory-wrap {
  margin: 0 0 12px;
}

.corp-shop-simple-inventory-wrap .corp-shop-product-inventory {
  margin: 0;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1px solid var(--cs-border);
  border-radius: 8px;
}

/* ── Cart Row (simple products) ── */
.corp-shop-cart-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
}
.corp-shop-qty {
  width: 70px !important;
  flex-shrink: 0;
  padding: 0 8px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  color: #222;
  background: #fff;
  height: 42px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
  appearance: textfield;
}
.corp-shop-qty:focus { border-color: var(--cs-primary); }
.corp-shop-qty::-webkit-inner-spin-button,
.corp-shop-qty::-webkit-outer-spin-button { opacity: 1; }

.corp-shop-add-btn {
  flex: 1;
  height: 42px;
  padding: 0 12px;
  background: var(--cs-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--cs-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s;
  white-space: nowrap;
}
.corp-shop-add-btn:hover    { background: var(--cs-accent); }
.corp-shop-add-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.corp-shop-add-btn.added    { background: #27ae60; }

/* ── Options Button (variable / out-of-stock) ── */
.corp-shop-options-btn {
  display: block;
  width: 100%;
  height: 42px;
  line-height: 42px;
  text-align: center;
  background: var(--cs-primary);
  color: #fff;
  border-radius: 6px;
  font-family: var(--cs-font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
  margin-top: auto;
  box-sizing: border-box;
}
.corp-shop-options-btn:hover { background: var(--cs-accent); color: #fff; }

/* ── Toast ── */
.corp-shop-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--cs-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: var(--cs-font);
  font-size: 14px;
  font-weight: 500;
  z-index: 99999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.corp-shop-toast.is-visible { opacity: 1; transform: translateY(0); }
.corp-shop-toast.is-error   { background: #c0392b; }

/* ── Pagination ── */
.corp-shop-pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 36px;
  justify-content: center;
}
.corp-shop-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  color: var(--cs-text);
  font-family: var(--cs-font);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--cs-border);
  transition: background 0.2s, color 0.2s;
}
.corp-shop-page-link.is-active,
.corp-shop-page-link:hover {
  background: var(--cs-primary);
  color: #fff;
  border-color: var(--cs-primary);
}

/* ── Notices ── */
.corp-shop-notice {
  background: #fff8e1;
  border-left: 4px solid #c9a84c;
  border-radius: 8px;
  padding: 16px 20px;
  font-family: var(--cs-font);
  color: var(--cs-text);
}
.corp-shop-notice a { color: var(--cs-primary); font-weight: 600; }
.corp-shop-empty {
  font-family: var(--cs-font);
  color: var(--cs-muted);
  text-align: center;
  padding: 60px 0;
}

/* ── Section headers (private items / catalogue) ── */
.corp-shop-section {
  margin-bottom: 32px;
}
.corp-shop-section-title {
  font-family: var(--cs-font);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cs-primary);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--cs-border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.corp-shop-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--cs-accent);
  border-radius: 2px;
}

/* ── Size Matrix Feature ── */
.corp-size-matrix-active .corp-size-matrix-hidden-row {
  display: none !important;
}

.corp-size-matrix-active .single_variation_wrap {
  display: none !important;
}

.corp-size-matrix-container {
  margin: 14px 0;
}

.corp-size-matrix-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cs-primary);
  margin: 0 0 16px;
  border-bottom: 2px solid var(--cs-border);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.corp-size-matrix-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--cs-accent);
  border-radius: 2px;
}

.corp-size-matrix-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.corp-size-matrix-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  text-align: center;
  margin-bottom: 0;
}

.corp-size-matrix-table th,
.corp-size-matrix-table td {
  padding: 5px;
  border: 1px solid var(--cs-border);
  vertical-align: middle;
  transition: background-color 0.2s ease;
}

.corp-size-matrix-table th {
  text-align: left;
  font-weight: 700;
  color: var(--cs-primary);
  background-color: #fafafa;
  font-size: 0.9rem;
  width: 120px;
  position: sticky;
  left: 0;
  z-index: 2;
  border-right: 2px solid var(--cs-border);
}

.corp-size-matrix-col-header {
  background-color: #f6f6f8;
  color: var(--cs-primary);
  font-size: 0.95rem;
}

.corp-size-matrix-inventory-cell {
  background-color: #f9fafb;
}

.corp-size-matrix-inventory {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  line-height: 1.3;
}

.corp-size-matrix-inventory-cell.is-low-stock .corp-size-matrix-inventory {
  color: #c0392b;
}

.corp-size-matrix-inventory-cell.is-out-of-stock .corp-size-matrix-inventory,
.out-of-stock-col .corp-size-matrix-inventory {
  color: #999;
}

.corp-size-matrix-qty-cell {
  background-color: #fdfdfd;
}

.corp-size-matrix-qty {
  width: 80px !important;
  padding: 8px 10px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  color: var(--cs-text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
  margin: 0 auto;
  display: block;
}

.corp-size-matrix-qty:focus {
  border-color: var(--cs-primary);
  box-shadow: 0 0 0 3px rgba(3, 2, 34, 0.1);
}

.corp-size-matrix-qty:disabled {
  background-color: #f1f1f1;
  border-color: #ddd;
  color: #999;
  cursor: not-allowed;
}

.corp-size-matrix-qty-cell.has-qty {
  background-color: rgba(39, 174, 96, 0.08);
}

.out-of-stock-col {
  opacity: 0.55;
  background-color: #fafafa;
}

.corp-size-matrix-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.corp-size-matrix-add-btn {
  padding: 12px 32px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  background-color: var(--cs-primary) !important;
  color: #fff !important;
  border: none !important;
  cursor: pointer !important;
  transition: background-color 0.2s, transform 0.1s, opacity 0.2s !important;
  box-shadow: 0 4px 12px rgba(3, 2, 34, 0.15);
}

.corp-size-matrix-add-btn:hover:not(:disabled) {
  background-color: var(--cs-accent) !important;
  transform: translateY(-1px);
}

.corp-size-matrix-add-btn:active:not(:disabled) {
  transform: translateY(0);
}

.corp-size-matrix-add-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
