/**
 * WP Beautiful Tables - Frontend Stylesheet
 * High-performance, modern aesthetic table styles
 */

:root {
  --bt-radius: 12px;
  --bt-header-bg: #1e293b;
  --bt-header-color: #ffffff;
  --bt-primary: #3b82f6;
  --bt-primary-hover: #2563eb;
  --bt-border: #e2e8f0;
  --bt-bg-light: #f8fafc;
  --bt-text-main: #1e293b;
  --bt-text-muted: #64748b;
  --bt-row-hover: #f1f5f9;
  --bt-row-striped: #f8fafc;
  --bt-col-divider: rgba(226, 232, 240, 0.75);
  --bt-header-divider: rgba(255, 255, 255, 0.12);
  --bt-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* Container */
.wp-bt-container {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  margin: 1.75rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bt-text-main);
  background: #ffffff;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  box-shadow: var(--bt-card-shadow);
  box-sizing: border-box !important;
  overflow: hidden;
  transition: all 0.25s ease;
}

.wp-bt-container *,
.wp-bt-container *::before,
.wp-bt-container *::after {
  box-sizing: border-box !important;
}

/* Top Controls */
.wp-bt-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--bt-border);
}

.wp-bt-controls-left,
.wp-bt-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Action Tools (Export / Copy / Print) */
.wp-bt-action-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wp-bt-btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--bt-text-muted);
  background: var(--bt-bg-light);
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.wp-bt-btn-tool:hover {
  color: var(--bt-primary);
  background: #ffffff;
  border-color: var(--bt-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.wp-bt-btn-tool svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.wp-bt-btn-tool:hover svg {
  transform: translateY(-1px);
}

/* Search Box */
.wp-bt-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wp-bt-search-wrap .search-icon {
  position: absolute;
  left: 10px;
  color: var(--bt-text-muted);
  pointer-events: none;
}

.wp-bt-search-input {
  width: 220px;
  padding: 7px 28px 7px 32px;
  font-size: 13px;
  color: var(--bt-text-main);
  background: var(--bt-bg-light);
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  outline: none;
  transition: all 0.2s ease;
}

.wp-bt-search-input:focus {
  width: 260px;
  background: #ffffff;
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.wp-bt-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--bt-text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.wp-bt-search-clear:hover {
  color: #ef4444;
}

/* Table Wrapper & Table */
.wp-bt-table-wrapper {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wp-bt-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  text-align: left;
  margin: 0;
  table-layout: auto;
}

/* TH Styling */
.wp-bt-table thead tr {
  background: var(--bt-header-bg);
}

.bt-th {
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bt-header-color);
  border: none;
  border-right: 1px solid var(--bt-header-divider);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
  vertical-align: middle;
  user-select: none;
}

.bt-th:last-child {
  border-right: none;
}

.bt-th[role="button"] {
  cursor: pointer;
}

.bt-th[role="button"]:hover {
  background: rgba(255, 255, 255, 0.1);
}

.th-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.th-title {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.sort-icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.4;
  transition: all 0.2s ease;
}

.bt-th:hover .sort-icon {
  opacity: 0.8;
}

.bt-th.sort-asc .sort-icon {
  opacity: 1;
  transform: rotate(180deg);
  color: #38bdf8;
}

.bt-th.sort-desc .sort-icon {
  opacity: 1;
  color: #38bdf8;
}

/* Alignments */
.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }

.align-center .th-content { justify-content: center; }
.align-right .th-content { justify-content: flex-end; }

/* TD Styling */
.bt-td {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--bt-text-main);
  border-bottom: 1px solid var(--bt-border);
  border-right: 1px solid var(--bt-col-divider);
  vertical-align: middle;
  transition: background-color 0.15s ease;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
}

.bt-td:last-child {
  border-right: none;
}

.bt-row:last-child .bt-td {
  border-bottom: none;
}

/* Striped Rows */
.has-striped .bt-row:nth-child(even) {
  background-color: var(--bt-row-striped);
}

/* Hover Effect */
.has-hover .bt-row:hover {
  background-color: var(--bt-row-hover);
}

/* No data message */
.no-data-row td {
  padding: 32px 16px;
  color: var(--bt-text-muted);
  font-style: italic;
  font-size: 14px;
}

/* Elements Inside Cells */
.bt-cell-sub {
  font-size: 12px;
  color: var(--bt-text-muted);
  margin-top: 3px;
  font-weight: normal;
}

.bt-price-highlight {
  font-weight: 700;
  font-size: 15px;
  color: #2563eb;
}

/* Badges */
.bt-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.4;
  white-space: nowrap;
}

.bt-badge-green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.bt-badge-blue { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.bt-badge-purple { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.bt-badge-orange { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.bt-badge-red { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.bt-badge-gold { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.bt-badge-gray { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Buttons */
.bt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.bt-btn-primary {
  background: #3b82f6;
  color: #ffffff !important;
  border: 1px solid #2563eb;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.bt-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.bt-btn-outline {
  background: transparent;
  color: #3b82f6 !important;
  border: 1.5px solid #3b82f6;
}

.bt-btn-outline:hover {
  background: #3b82f6;
  color: #ffffff !important;
}

.bt-btn-dark {
  background: #0f172a;
  color: #ffffff !important;
  border: 1px solid #1e293b;
}

.bt-btn-dark:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* Rating Stars */
.bt-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bt-stars-gold {
  color: #f59e0b;
  font-size: 14px;
  letter-spacing: 1px;
}

.bt-rating-score {
  font-size: 12px;
  font-weight: 600;
  color: var(--bt-text-muted);
}

/* Footer / Pagination */
.wp-bt-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: #ffffff;
  border-top: 1px solid var(--bt-border);
}

.wp-bt-footer:empty {
  display: none !important;
}

.wp-bt-info {
  display: none !important;
}

.wp-bt-pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wp-bt-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--bt-text-main);
  background: #ffffff;
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.wp-bt-page-btn:hover:not(:disabled) {
  border-color: var(--bt-primary);
  color: var(--bt-primary);
}

.wp-bt-page-btn.active {
  background: var(--bt-primary);
  color: #ffffff;
  border-color: var(--bt-primary);
  font-weight: 600;
}

.wp-bt-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================================================
   THEMES
   ======================================================== */

/* 1. Modern Minimalist (Default) */
.theme-modern_minimalist {
  --bt-header-bg: #1e293b;
  --bt-header-color: #ffffff;
  --bt-primary: #3b82f6;
  --bt-border: #e2e8f0;
}

/* 2. Ocean Gradient */
.theme-ocean_gradient {
  --bt-header-bg: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  --bt-header-color: #ffffff;
  --bt-primary: #0284c7;
  --bt-border: #e0f2fe;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.12);
}
.theme-ocean_gradient .bt-price-highlight {
  color: #0284c7;
}

/* 3. Emerald Business */
.theme-emerald_business {
  --bt-header-bg: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --bt-header-color: #ffffff;
  --bt-primary: #059669;
  --bt-border: #d1fae5;
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.12);
}
.theme-emerald_business .bt-btn-primary {
  background: #059669;
  border-color: #047857;
}
.theme-emerald_business .bt-price-highlight {
  color: #059669;
}

/* 4. Dark Mode Cyber */
.theme-dark_mode {
  --bt-radius: 14px;
  --bt-header-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --bt-header-color: #38bdf8;
  --bt-primary: #38bdf8;
  --bt-border: #334155;
  --bt-bg-light: #1e293b;
  --bt-text-main: #f1f5f9;
  --bt-text-muted: #94a3b8;
  --bt-row-hover: #1e293b;
  --bt-row-striped: #162032;
  background: #0f172a;
  border-color: #334155;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}
.theme-dark_mode .wp-bt-controls,
.theme-dark_mode .wp-bt-footer {
  background: #0f172a;
  border-color: #334155;
}
.theme-dark_mode .wp-bt-search-input {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.theme-dark_mode .wp-bt-btn-tool {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
.theme-dark_mode .wp-bt-page-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.theme-dark_mode .wp-bt-page-btn.active {
  background: #38bdf8;
  color: #0f172a;
}
.theme-dark_mode .bt-price-highlight {
  color: #38bdf8;
}

/* 5. Warm Sunset */
.theme-warm_sunset {
  --bt-header-bg: linear-gradient(135deg, #f97316 0%, #db2777 100%);
  --bt-header-color: #ffffff;
  --bt-primary: #ea580c;
  --bt-border: #fed7aa;
  box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.15);
}
.theme-warm_sunset .bt-price-highlight {
  color: #ea580c;
}
.theme-warm_sunset .bt-btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #db2777 100%);
  border: none;
}

/* 6. Clean Bordered */
.theme-clean_bordered {
  --bt-header-bg: #2563eb;
  --bt-header-color: #ffffff;
  --bt-primary: #2563eb;
  --bt-border: #cbd5e1;
}
.theme-clean_bordered .bt-th,
.theme-clean_bordered .bt-td {
  border-right: 1px solid var(--bt-border);
}
.theme-clean_bordered .bt-th:last-child,
.theme-clean_bordered .bt-td:last-child {
  border-right: none;
}

/* 7. Luxury Champagne (Champagne & Vàng Kim Sang Trọng) */
.theme-luxury_champagne {
  --bt-header-bg: linear-gradient(135deg, #262220 0%, #3d3530 100%);
  --bt-header-color: #f7efe5;
  --bt-primary: #a37d4c;
  --bt-primary-hover: #8c6738;
  --bt-border: #e6ded3;
  --bt-bg-light: #faf7f2;
  --bt-text-main: #2b2623;
  --bt-text-muted: #786f66;
  --bt-row-striped: #faf7f2;
  --bt-row-hover: #f4ece2;
  box-shadow: 0 10px 30px -5px rgba(163, 125, 76, 0.12);
}
.theme-luxury_champagne .bt-th .th-title {
  color: #f3dfc6;
  letter-spacing: 0.03em;
}
.theme-luxury_champagne .bt-price-highlight {
  color: #a37d4c;
}
.theme-luxury_champagne .bt-btn-primary {
  background: linear-gradient(135deg, #a37d4c 0%, #bfa073 100%);
  border-color: #926d3d;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(163, 125, 76, 0.25);
}
.theme-luxury_champagne .bt-btn-outline {
  border-color: #a37d4c;
  color: #a37d4c !important;
}
.theme-luxury_champagne .bt-btn-outline:hover {
  background: #a37d4c;
  color: #ffffff !important;
}
.theme-luxury_champagne .wp-bt-page-btn.active {
  background: #a37d4c;
  border-color: #a37d4c;
  color: #ffffff;
}

/* 8. Gentle Pearl (Ngọc Trai & Lụa Dịu Nhẹ) */
.theme-gentle_pearl {
  --bt-header-bg: linear-gradient(135deg, #fdfbf7 0%, #f4ede4 100%);
  --bt-header-color: #4a3e35;
  --bt-primary: #8c7355;
  --bt-primary-hover: #735d42;
  --bt-border: #e8e1d7;
  --bt-bg-light: #faf8f5;
  --bt-text-main: #3d352e;
  --bt-text-muted: #82776c;
  --bt-row-striped: #faf7f2;
  --bt-row-hover: #f3ece1;
  box-shadow: 0 8px 24px rgba(140, 115, 85, 0.08);
}
.theme-gentle_pearl .bt-th {
  border-bottom: 2px solid #dfd3c3;
  color: #4a3e35;
  font-weight: 600;
}
.theme-gentle_pearl .bt-th .th-title {
  color: #4a3e35;
}
.theme-gentle_pearl .bt-th .sort-icon {
  color: #8c7355;
}
.theme-gentle_pearl .bt-price-highlight {
  color: #8c7355;
}
.theme-gentle_pearl .bt-btn-primary {
  background: linear-gradient(135deg, #8c7355 0%, #a89073 100%);
  border-color: #7b6347;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(140, 115, 85, 0.2);
}
.theme-gentle_pearl .bt-btn-outline {
  border-color: #8c7355;
  color: #8c7355 !important;
}
.theme-gentle_pearl .bt-btn-outline:hover {
  background: #8c7355;
  color: #ffffff !important;
}
.theme-gentle_pearl .wp-bt-page-btn.active {
  background: #8c7355;
  border-color: #8c7355;
  color: #ffffff;
}

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

/* Mobile Responsive Modes */
@media (max-width: 768px) {
  .wp-bt-container {
    margin: 1.25rem 0;
    border-radius: 8px;
  }

  .wp-bt-table {
    min-width: 100%;
  }

  .bt-th {
    padding: 10px 12px;
    font-size: 12.5px;
  }

  .bt-td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .responsive-card .wp-bt-table thead {
    display: none; /* Hide standard headers */
  }

  .responsive-card .wp-bt-table,
  .responsive-card .wp-bt-table tbody,
  .responsive-card .bt-row,
  .responsive-card .bt-td {
    display: block;
    width: 100%;
  }

  .responsive-card .bt-row {
    margin: 12px 14px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--bt-border);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  }

  .theme-dark_mode.responsive-card .bt-row {
    background: #1e293b;
    border-color: #334155;
  }

  .responsive-card .bt-td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--bt-border);
    border-right: none !important;
    text-align: right;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .responsive-card .bt-td:last-child {
    border-bottom: none;
  }

  .responsive-card .bt-td::before {
    content: attr(data-label);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bt-text-muted);
    text-align: left;
    flex-shrink: 0;
    max-width: 48%;
    white-space: normal;
    word-break: break-word;
  }

  .responsive-card .align-left,
  .responsive-card .align-center,
  .responsive-card .align-right {
    text-align: right;
  }

  .wp-bt-controls {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 10px;
  }

  .wp-bt-controls-left,
  .wp-bt-controls-right {
    width: 100%;
    justify-content: space-between;
  }

  .wp-bt-search-wrap,
  .wp-bt-search-input {
    width: 100% !important;
  }

  .wp-bt-search-input:focus {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .bt-th {
    padding: 8px 10px;
    font-size: 12px;
  }

  .bt-td {
    padding: 8px 10px;
    font-size: 12.5px;
  }

  .responsive-card .bt-row {
    margin: 8px 10px;
    padding: 8px 10px;
  }
}

/* Print Friendly */
@media print {
  .wp-bt-controls,
  .wp-bt-footer,
  .wp-bt-action-tools {
    display: none !important;
  }

  .wp-bt-container {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .wp-bt-table {
    border: 1px solid #000 !important;
  }

  .bt-th, .bt-td {
    border: 1px solid #ddd !important;
    color: #000 !important;
  }
}

/* ========================================================
   ALL TABLES DISPLAY (STACK & TABS)
   ======================================================== */
.wp-bt-all-tables-stack {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin: 2rem 0;
}

.wp-bt-table-item {
  width: 100%;
}

.wp-bt-table-item-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--bt-text-main, #1e293b);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-bt-tabs-container {
  margin: 2rem 0;
}

.wp-bt-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
  margin-bottom: 16px;
}

.wp-bt-tab-nav-btn {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.wp-bt-tab-nav-btn:hover {
  background: #ffffff;
  color: #1e293b;
}

.wp-bt-tab-nav-btn.active {
  background: #ffffff;
  color: #2563eb;
  border-color: #cbd5e1 #cbd5e1 #ffffff #cbd5e1;
  border-top: 2px solid #2563eb;
  margin-bottom: -2px;
}

.wp-bt-tab-pane {
  display: none;
}

.wp-bt-tab-pane.active {
  display: block;
}

/* ========================================================
   SPECIFICATIONS / ATTRIBUTES TABLES (WOOCOMMERCE & PRODUCTS)
   ======================================================== */
.wp-bt-specs-container {
  margin: 1.25rem 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.wp-bt-specs-table {
  width: 100% !important;
  min-width: 100% !important;
  border-collapse: collapse !important;
  margin: 0 !important;
}

.wp-bt-specs-table tr,
.wp-bt-specs-table .bt-spec-row {
  border-bottom: 1px solid var(--bt-border) !important;
  transition: background-color 0.15s ease;
}

.wp-bt-specs-table tr:last-child,
.wp-bt-specs-table .bt-spec-row:last-child {
  border-bottom: none !important;
}

.wp-bt-specs-table th,
.wp-bt-specs-table .bt-spec-label,
.wp-bt-specs-table .woocommerce-product-attributes-item__label {
  width: 30% !important;
  min-width: 120px;
  padding: 13px 18px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--bt-text-main) !important;
  background: var(--bt-bg-light, #faf8f5) !important;
  border: none !important;
  border-right: 1px solid var(--bt-col-divider) !important;
  vertical-align: middle !important;
  text-align: left !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

.wp-bt-specs-table td,
.wp-bt-specs-table .bt-spec-value,
.wp-bt-specs-table .woocommerce-product-attributes-item__value {
  padding: 13px 18px !important;
  font-size: 13.5px !important;
  color: var(--bt-text-main) !important;
  vertical-align: middle !important;
  border: none !important;
  border-right: none !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

.wp-bt-specs-table td p,
.wp-bt-specs-table .woocommerce-product-attributes-item__value p {
  margin: 0 !important;
  padding: 0 !important;
}

.has-hover .wp-bt-specs-table tr:hover {
  background-color: var(--bt-row-hover);
}

.has-striped .wp-bt-specs-table tr:nth-child(even) {
  background-color: var(--bt-row-striped);
}

/* Specs Table Mobile Line Stacking (Tự động lên xuống dòng theo màn hình) */
@media (max-width: 640px) {
  .wp-bt-specs-table,
  .wp-bt-specs-table tbody,
  .wp-bt-specs-table tr,
  .wp-bt-specs-table .bt-spec-row {
    display: block !important;
    width: 100% !important;
  }

  .wp-bt-specs-table tr,
  .wp-bt-specs-table .bt-spec-row {
    padding: 10px 14px !important;
    border-bottom: 1px solid var(--bt-border) !important;
  }

  .wp-bt-specs-table th,
  .wp-bt-specs-table .bt-spec-label,
  .wp-bt-specs-table .woocommerce-product-attributes-item__label {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 0 6px 0 !important;
    background: transparent !important;
    border: none !important;
    border-right: none !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    color: var(--bt-text-main) !important;
    line-height: 1.4 !important;
  }

  .wp-bt-specs-table td,
  .wp-bt-specs-table .bt-spec-value,
  .wp-bt-specs-table .woocommerce-product-attributes-item__value {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
  }
}

/* ========================================================
   EDGE-TO-EDGE / FULL-WIDTH TABLE DISPLAY (HIỂN THỊ TRÀN VIỀN)
   ======================================================== */
.wp-bt-container.is-edge-to-edge,
.wp-bt-container.wp-bt-edge-to-edge,
.wp-bt-container.is-fullwidth,
.wp-bt-container.wp-bt-fullwidth {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.wp-bt-container.is-edge-to-edge .wp-bt-table-wrapper,
.wp-bt-container.wp-bt-edge-to-edge .wp-bt-table-wrapper,
.wp-bt-container.is-fullwidth .wp-bt-table-wrapper,
.wp-bt-container.wp-bt-fullwidth .wp-bt-table-wrapper {
  width: 100% !important;
  border-radius: 0 !important;
}

.wp-bt-container.is-edge-to-edge .wp-bt-table,
.wp-bt-container.wp-bt-edge-to-edge .wp-bt-table,
.wp-bt-container.is-fullwidth .wp-bt-table,
.wp-bt-container.wp-bt-fullwidth .wp-bt-table {
  width: 100% !important;
  min-width: 100% !important;
}

.wp-bt-container.is-edge-to-edge .wp-bt-controls,
.wp-bt-container.wp-bt-edge-to-edge .wp-bt-controls,
.wp-bt-container.is-fullwidth .wp-bt-controls,
.wp-bt-container.wp-bt-fullwidth .wp-bt-controls {
  padding-left: 10px;
  padding-right: 10px;
  border-left: none;
  border-right: none;
}

.wp-bt-container.is-edge-to-edge .wp-bt-footer,
.wp-bt-container.wp-bt-edge-to-edge .wp-bt-footer,
.wp-bt-container.is-fullwidth .wp-bt-footer,
.wp-bt-container.wp-bt-fullwidth .wp-bt-footer {
  padding-left: 10px;
  padding-right: 10px;
  border-left: none;
  border-right: none;
}

/* Full Bleed Breakout (tràn viền toàn màn hình khi dùng alignfull hoặc .is-full-bleed) */
.wp-bt-container.is-full-bleed,
.wp-bt-container.alignfull,
.alignfull > .wp-bt-container {
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Reset figure in block editor so it never constrains width */
figure.wp-block-table:has(.wp-bt-container),
.wp-block-table:has(.wp-bt-container),
figure.wp-block-table:has(.wp-bt-specs-container) {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
}

