/**
 * KMMN Store Manager Public Styles
 *
 * @package Kmmn_Store_Manager
 */

/* Store List Container */
.kmmn-store-list {
  margin: 20px 0;
}

/* Search Form */
.kmmn-search-form {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.kmmn-search-form .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.kmmn-search-form .form-group {
  flex: 1;
  min-width: 200px;
}

.kmmn-search-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.kmmn-search-form input,
.kmmn-search-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.kmmn-search-form input:focus,
.kmmn-search-form select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 1px #0073aa;
}

.kmmn-search-form .submit-btn {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.kmmn-search-form .submit-btn:hover {
  background: #005a87;
}

/* Filter Section */
.kmmn-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.kmmn-filter-tag {
  display: inline-block;
  padding: 5px 12px;
  background: #e9ecef;
  border-radius: 20px;
  font-size: 13px;
  color: #495057;
  text-decoration: none;
  transition: all 0.2s;
}

.kmmn-filter-tag:hover,
.kmmn-filter-tag.active {
  background: #0073aa;
  color: #fff;
}

/* Store Grid */
.kmmn-stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Store Card */
.kmmn-store-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.kmmn-store-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kmmn-store-card .store-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f0f0f0;
}

.kmmn-store-card .store-content {
  padding: 15px;
}

.kmmn-store-card .store-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
  color: #333;
}

.kmmn-store-card .store-name a {
  color: inherit;
  text-decoration: none;
}

.kmmn-store-card .store-name a:hover {
  color: #0073aa;
}

.kmmn-store-card .store-address {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.kmmn-store-card .store-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.kmmn-store-card .store-category {
  font-size: 11px;
  padding: 2px 8px;
  background: #e9ecef;
  border-radius: 3px;
  color: #666;
}

.kmmn-store-card.featured {
  border-color: #ffc107;
}

.kmmn-store-card.featured::before {
  content: "おすすめ";
  display: block;
  background: #ffc107;
  color: #333;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  text-align: center;
}

/* Store Detail */
.kmmn-store-detail {
  max-width: 900px;
  margin: 0 auto;
}

.kmmn-store-detail .store-header {
  margin-bottom: 30px;
}

.kmmn-store-detail .store-name {
  font-size: 28px;
  margin: 0 0 10px;
}

.kmmn-store-detail .store-main-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.kmmn-store-detail .store-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.kmmn-store-detail .store-info-table th,
.kmmn-store-detail .store-info-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

.kmmn-store-detail .store-info-table th {
  width: 120px;
  background: #f8f9fa;
  font-weight: 500;
}

.kmmn-store-detail .store-description {
  line-height: 1.8;
  margin-bottom: 30px;
}

/* Map */
.kmmn-store-map {
  width: 100%;
  height: 300px;
  border-radius: 8px;
  margin-bottom: 30px;
}

/* Coupons */
.kmmn-coupons-section {
  margin-top: 30px;
}

.kmmn-coupons-section h3 {
  font-size: 20px;
  margin-bottom: 15px;
}

.kmmn-coupon-card {
  display: flex;
  border: 2px dashed #ffc107;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: #fffdf5;
}

.kmmn-coupon-card .coupon-info {
  flex: 1;
}

.kmmn-coupon-card .coupon-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 5px;
}

.kmmn-coupon-card .coupon-description {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.kmmn-coupon-card .coupon-validity {
  font-size: 12px;
  color: #888;
}

.kmmn-coupon-card .coupon-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  font-size: 24px;
  font-weight: 700;
  color: #d63638;
}

/* Pagination */
.kmmn-pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 30px;
}

.kmmn-pagination a,
.kmmn-pagination span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
}

.kmmn-pagination a:hover {
  background: #f0f0f0;
}

.kmmn-pagination .current {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* No Results */
.kmmn-no-results {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* Featured Stores Section */
.kmmn-featured-stores {
  padding: 30px 0;
}

.kmmn-featured-stores h2 {
  margin-bottom: 20px;
}

/* Loading */
.kmmn-loading {
  text-align: center;
  padding: 40px;
}

.kmmn-loading::after {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top-color: #0073aa;
  border-radius: 50%;
  animation: kmmn-spin 1s linear infinite;
}

@keyframes kmmn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media screen and (max-width: 768px) {
  .kmmn-stores-grid {
    grid-template-columns: 1fr;
  }

  .kmmn-search-form .form-row {
    flex-direction: column;
  }

  .kmmn-search-form .form-group {
    min-width: auto;
  }

  .kmmn-coupon-card {
    flex-direction: column;
  }

  .kmmn-coupon-card .coupon-value {
    margin-top: 10px;
    justify-content: flex-start;
  }
}
