/* assets/css/shop-dashboard.css */
/* ショップトップページのスタイル */

.shop-dashboard-page {
  max-width: 700px !important;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

/* ①ショップヘッダー画像 */
.shop-dashboard-header-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* ②ショップアイコンとショップ名 */
.shop-dashboard-header {
  margin-bottom: 1.5rem;
  margin-left: calc(-1rem - 2rem) !important;
  margin-right: -1rem !important;
  padding-left: calc(1rem + 2rem) !important;
  padding-right: 1rem !important;
  text-align: left !important;
  width: calc(100% + 2rem + 1rem);
}

.shop-dashboard-name-wrapper {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 1rem;
  width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.shop-dashboard-icon {
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  border-radius: 50% !important;
  object-fit: cover;
  flex-shrink: 0;
  display: block !important;
  margin: 0 !important;
}

.shop-dashboard-name {
  font-size: 1.5rem !important;
  font-weight: bold;
  color: #1f2937;
  margin: 0;
}

/* ③ショップ紹介文ブロック */
.shop-dashboard-description-block {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
}

.shop-dashboard-description-content {
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.shop-dashboard-external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.shop-dashboard-external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  color: #111827;
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.shop-dashboard-external-link:hover {
  background-color: #f3f4f6;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  text-decoration: none !important;
  transform: translateY(-1px);
}

.shop-dashboard-external-link-name {
  white-space: nowrap;
}

/* ④ショップページ編集へのリンク */
.shop-dashboard-edit-link-container {
  margin-bottom: 2rem;
  text-align: center;
}

.shop-dashboard-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #ec4899;
  color: white;
  font-weight: bold;
  text-decoration: none !important;
  border-radius: 9999px;
  transition: background-color 0.2s;
}

.shop-dashboard-edit-link:hover {
  background-color: #db2777;
  text-decoration: none !important;
}

/* ⑤商品一覧ブロック */
.shop-dashboard-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.shop-dashboard-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.shop-dashboard-section-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #1f2937;
  margin: 0 0 1rem 0;
}

.shop-dashboard-products-block {
  margin-top: 1rem;
}

.shop-dashboard-products-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.shop-dashboard-products-list-link {
  color: #3b82f6;
  text-decoration: underline;
  font-size: 0.9rem;
}

.shop-dashboard-products-list-link:hover {
  color: #2563eb;
}

.shop-dashboard-product-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  background-color: #3b82f6;
  color: white;
  font-weight: bold;
  text-decoration: none !important;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s;
}

.shop-dashboard-product-add-btn:hover {
  background-color: #2563eb;
  text-decoration: none !important;
}

/* 商品カード（PC・SP ともに2列） */
.shop-dashboard-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.shop-dashboard-product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.shop-dashboard-product-thumbnail {
  width: 100%;
  aspect-ratio: 1;
  background: #f3f4f6;
  overflow: hidden;
}

.shop-dashboard-product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-dashboard-product-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 2rem;
}

.shop-dashboard-product-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shop-dashboard-product-title {
  font-size: 1rem;
  font-weight: bold;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
}

.shop-dashboard-product-price {
  font-size: 0.95rem;
  color: #ec4899;
  font-weight: 600;
}

.shop-dashboard-product-meta {
  font-size: 0.85rem;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shop-dashboard-product-stock {
  margin-right: 0.5rem;
}

.shop-dashboard-product-type {
  padding: 0.15rem 0.4rem;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.8rem;
}

.shop-dashboard-product-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.8rem;
  background-color: #f3f4f6;
  color: #6b7280;
  text-decoration: none !important;
  border-radius: 6px;
  font-size: 0.85rem;
  align-self: flex-start;
  margin-top: 0.25rem;
  transition: background-color 0.2s;
}

.shop-dashboard-product-edit-btn:hover {
  background-color: #e5e7eb;
  text-decoration: none !important;
}

.shop-dashboard-product-edit-btn i {
  color: #ec4899;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .shop-dashboard-page {
    max-width: 94% !important;
    padding: 1rem;
    margin-left: auto;
    margin-right: auto;
  }

  .shop-dashboard-header-image {
    height: 150px;
  }

  .shop-dashboard-header {
    margin-left: calc(-1rem - 1rem) !important;
    margin-right: -1rem !important;
    padding-left: calc(1rem + 1rem) !important;
    padding-right: 1rem !important;
    width: calc(100% + 1rem + 1rem);
  }

  .shop-dashboard-name-wrapper {
    gap: 0.75rem;
  }

  .shop-dashboard-icon {
    width: 70px !important;
    height: 70px !important;
    max-width: 70px !important;
    max-height: 70px !important;
  }

  .shop-dashboard-name {
    font-size: 1.2rem !important;
  }

  .shop-dashboard-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .shop-dashboard-products-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-dashboard-product-add-btn {
    width: 100%;
    justify-content: center;
  }
}

/* 未ログイン時：画像にぼかし */
.shop-public-guest .shop-dashboard-header-image {
  filter: blur(8px);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}
.shop-public-guest .shop-dashboard-icon {
  filter: blur(6px);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}
.shop-public-guest .shop-dashboard-product-card .shop-dashboard-product-thumbnail img,
.shop-public-guest .shop-dashboard-product-card img {
  filter: blur(8px);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}
