/**
 * GunPrime Dokan Pro Styles
 * Bootstrap 5 integration for vendor stores and dashboards
 *
 * @package GunPrime
 * @since 1.0.0
 */

/* ==========================================================================
   VENDOR STORE PAGE
   ========================================================================== */

/* Store Header */
.dokan-store-page .profile-frame {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-800) 100%);
  border-radius: var(--radius-3);
  padding: 2rem;
  margin-bottom: 2rem;
  color: #fff;
}

.dokan-store-page .profile-info-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.dokan-store-page .profile-img {
  flex-shrink: 0;
}

.dokan-store-page .profile-img img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

.dokan-store-page .profile-info {
  flex: 1;
  min-width: 200px;
}

.dokan-store-page .store-name {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #fff;
}

.dokan-store-page .store-name a {
  color: #fff;
  text-decoration: none;
}

.dokan-store-page .seller-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dokan-store-page .seller-rating .star-rating {
  color: #ffc107;
}

.dokan-store-page .seller-rating .rating-count {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

/* Store Info Cards */
.dokan-store-page .store-info-card {
  background: var(--bg-card);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-1);
  padding: 1rem;
  margin-bottom: 1rem;
}

.dokan-store-page .store-info-card h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.dokan-store-page .store-info-card p,
.dokan-store-page .store-info-card address {
  margin: 0;
  color: var(--ink-700);
  font-style: normal;
}

/* Store Contact Info */
.dokan-store-page .store-info li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-100);
}

.dokan-store-page .store-info li:last-child {
  border-bottom: none;
}

.dokan-store-page .store-info li i {
  color: var(--brand-500);
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
}

/* Store Tabs */
.dokan-store-page .dokan-store-tabs {
  background: var(--bg-card);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-1);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.dokan-store-page .dokan-store-tabs ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-200);
}

.dokan-store-page .dokan-store-tabs ul li {
  margin: 0;
}

.dokan-store-page .dokan-store-tabs ul li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  color: var(--ink-500);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.dokan-store-page .dokan-store-tabs ul li a:hover {
  color: var(--brand-500);
  background: var(--bg-soft);
}

.dokan-store-page .dokan-store-tabs ul li.active a,
.dokan-store-page .dokan-store-tabs ul li a.active {
  color: var(--brand-500);
  border-bottom-color: var(--brand-500);
}

/* Store Products Grid */
.dokan-store-page .seller-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1200px) {
  .dokan-store-page .seller-items {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .dokan-store-page .seller-items {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .dokan-store-page .seller-items {
    grid-template-columns: 1fr;
  }
}

/* Store Sidebar */
.dokan-store-page .dokan-store-sidebar {
  position: sticky;
  top: 1rem;
}

.dokan-store-page .dokan-store-sidebar .widget {
  background: var(--bg-card);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-1);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.dokan-store-page .dokan-store-sidebar .widget-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-800);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-200);
}

/* Store Badges */
.store-badges .badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
}

/* Store Powered By */
.store-powered-by {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ==========================================================================
   VENDOR DASHBOARD
   ========================================================================== */

/* Dashboard Layout */
.dokan-dashboard-page .dokan-dashboard {
  display: flex;
  gap: 1.5rem;
  min-height: 80vh;
}

.dokan-dashboard-page .dokan-dash-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-1);
  padding: 1rem 0;
  height: fit-content;
  position: sticky;
  top: 1rem;
}

.dokan-dashboard-page .dokan-dashboard-content {
  flex: 1;
  min-width: 0;
}

/* Dashboard Navigation */
.dokan-dashboard-page .dokan-dash-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dokan-dashboard-page .dokan-dash-sidebar ul li {
  margin: 0;
}

.dokan-dashboard-page .dokan-dash-sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--ink-600);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.dokan-dashboard-page .dokan-dash-sidebar ul li a:hover {
  background: var(--bg-soft);
  color: var(--brand-500);
}

.dokan-dashboard-page .dokan-dash-sidebar ul li.active a,
.dokan-dashboard-page .dokan-dash-sidebar ul li a.dokan-active {
  background: rgba(45, 109, 246, 0.08);
  color: var(--brand-500);
  border-left-color: var(--brand-500);
}

.dokan-dashboard-page .dokan-dash-sidebar ul li a i {
  font-size: 1.125rem;
  width: 1.5rem;
  text-align: center;
}

/* Dashboard Cards */
.dokan-dashboard-page .dashboard-widget,
.dokan-dashboard-page .dokan-panel {
  background: var(--bg-card);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-1);
  margin-bottom: 1.5rem;
}

.dokan-dashboard-page .dashboard-widget .widget-title,
.dokan-dashboard-page .dokan-panel-heading {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-200);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-800);
  margin: 0;
}

.dokan-dashboard-page .dashboard-widget .widget-content,
.dokan-dashboard-page .dokan-panel-body {
  padding: 1.25rem;
}

/* Dashboard Stats */
.dokan-dashboard-page .dashboard-widget.big-counter {
  text-align: center;
  padding: 1.5rem;
}

.dokan-dashboard-page .dashboard-widget.big-counter .count {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-500);
  line-height: 1.2;
}

.dokan-dashboard-page .dashboard-widget.big-counter .title {
  font-size: 0.875rem;
  color: var(--ink-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

/* ==========================================================================
   DOKAN FORMS
   ========================================================================== */

/* Form Controls */
.dokan-form-control,
.dokan-dashboard-page input[type="text"],
.dokan-dashboard-page input[type="email"],
.dokan-dashboard-page input[type="password"],
.dokan-dashboard-page input[type="number"],
.dokan-dashboard-page input[type="url"],
.dokan-dashboard-page input[type="tel"],
.dokan-dashboard-page select,
.dokan-dashboard-page textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-800);
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid var(--border-300);
  border-radius: var(--radius-2);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.dokan-form-control:focus,
.dokan-dashboard-page input:focus,
.dokan-dashboard-page select:focus,
.dokan-dashboard-page textarea:focus {
  color: var(--ink-800);
  background-color: #fff;
  border-color: var(--brand-400);
  outline: 0;
  box-shadow: var(--focus);
}

/* Form Groups */
.dokan-form-group {
  margin-bottom: 1rem;
}

.dokan-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--ink-700);
}

.dokan-form-group .dokan-help {
  font-size: 0.8125rem;
  color: var(--ink-400);
  margin-top: 0.25rem;
}

/* ==========================================================================
   DOKAN BUTTONS
   ========================================================================== */

.dokan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  border-radius: var(--radius-2);
  transition: all 0.2s ease;
}

.dokan-btn-theme,
.dokan-btn-primary {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 89, 225, 0.15);
}

.dokan-btn-theme:hover,
.dokan-btn-primary:hover {
  background: var(--brand-400);
  border-color: var(--brand-400);
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 89, 225, 0.25);
  transform: translateY(-1px);
}

.dokan-btn-danger {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
}

.dokan-btn-danger:hover {
  background: #c9302c;
  border-color: #c9302c;
  color: #fff;
}

.dokan-btn-default {
  background: #fff;
  border-color: var(--border-300);
  color: var(--ink-700);
}

.dokan-btn-default:hover {
  background: var(--bg-soft);
  border-color: var(--border-300);
  color: var(--ink-800);
}

.dokan-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.dokan-btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ==========================================================================
   DOKAN TABLES
   ========================================================================== */

.dokan-table,
.dokan-dashboard-page table {
  width: 100%;
  margin-bottom: 1rem;
  background-color: transparent;
  border-collapse: collapse;
}

.dokan-table th,
.dokan-table td,
.dokan-dashboard-page table th,
.dokan-dashboard-page table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-200);
}

.dokan-table thead th,
.dokan-dashboard-page table thead th {
  font-weight: 600;
  color: var(--ink-600);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  background: var(--bg-soft);
  border-bottom: 2px solid var(--border-200);
}

.dokan-table tbody tr:hover,
.dokan-dashboard-page table tbody tr:hover {
  background-color: var(--bg-soft);
}

/* ==========================================================================
   DOKAN ALERTS & NOTICES
   ========================================================================== */

.dokan-alert,
.dokan-message {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-2);
}

.dokan-alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.dokan-alert-danger,
.dokan-alert-error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.dokan-alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.dokan-alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/* ==========================================================================
   DOKAN PAGINATION
   ========================================================================== */

.dokan-pagination {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 2rem;
}

.dokan-pagination a,
.dokan-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-600);
  background: var(--bg-card);
  border: 1px solid var(--border-200);
  border-radius: var(--radius-2);
  text-decoration: none;
  transition: all 0.2s ease;
}

.dokan-pagination a:hover {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
}

.dokan-pagination .current,
.dokan-pagination span.current {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
}

/* ==========================================================================
   DOKAN MODALS
   ========================================================================== */

.dokan-modal {
  background: var(--bg-card);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-2);
  max-width: 500px;
  margin: 2rem auto;
}

.dokan-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-200);
}

.dokan-modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.dokan-modal-body {
  padding: 1.25rem;
}

.dokan-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-200);
}

/* ==========================================================================
   VENDOR PRODUCT BADGE
   ========================================================================== */

.product-vendor-badge {
  font-size: 0.75rem;
  color: var(--ink-400);
}

.product-vendor-badge i {
  color: var(--brand-500);
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 992px) {
  .dokan-dashboard-page .dokan-dashboard {
    flex-direction: column;
  }

  .dokan-dashboard-page .dokan-dash-sidebar {
    width: 100%;
    position: static;
  }

  .dokan-dashboard-page .dokan-dash-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .dokan-dashboard-page .dokan-dash-sidebar ul li a {
    padding: 0.5rem 1rem;
    border-left: none;
    border-radius: var(--radius-2);
  }

  .dokan-dashboard-page .dokan-dash-sidebar ul li.active a,
  .dokan-dashboard-page .dokan-dash-sidebar ul li a.dokan-active {
    border-left: none;
    background: var(--brand-500);
    color: #fff;
  }
}

@media (max-width: 768px) {
  .dokan-store-page .profile-info-box {
    flex-direction: column;
    text-align: center;
  }

  .dokan-store-page .profile-info {
    min-width: 100%;
  }

  .dokan-store-page .store-badges {
    justify-content: center;
  }

  .dokan-store-page .dokan-store-tabs ul {
    flex-wrap: wrap;
  }

  .dokan-store-page .dokan-store-tabs ul li a {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  .dokan-store-page .profile-frame {
    padding: 1.5rem 1rem;
  }

  .dokan-store-page .store-name {
    font-size: 1.5rem;
  }

  .dokan-dashboard-page .dokan-dash-sidebar ul li a span {
    display: none;
  }

  .dokan-dashboard-page .dokan-dash-sidebar ul li a i {
    margin: 0;
  }
}

/* ==========================================================================
   DOKAN STORE LIST (VENDOR DIRECTORY)
   ========================================================================== */

.dokan-seller-listing-wrap .dokan-single-seller {
  background: var(--bg-card);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: all 0.2s ease;
}

.dokan-seller-listing-wrap .dokan-single-seller:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.dokan-seller-listing-wrap .seller-avatar img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.dokan-seller-listing-wrap .seller-details {
  padding: 1rem;
}

.dokan-seller-listing-wrap .seller-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dokan-seller-listing-wrap .seller-name a {
  color: var(--ink-800);
  text-decoration: none;
}

.dokan-seller-listing-wrap .seller-name a:hover {
  color: var(--brand-500);
}

.dokan-seller-listing-wrap .seller-address {
  font-size: 0.8125rem;
  color: var(--ink-400);
}
