/* Atelio Public Store Styles */
.store-container {
  padding-bottom: 70px;
}

.store-header-banner {
  margin-bottom: 24px;
}

.store-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.store-search-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.store-search-input-wrap {
  flex: 1 1 280px;
  position: relative;
}

.store-search-input-wrap input {
  padding-left: 40px;
}

html[dir="rtl"] .store-search-input-wrap input {
  padding-left: 14px;
  padding-right: 40px;
}

.store-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 1rem;
}

html[dir="rtl"] .store-search-icon {
  left: auto;
  right: 14px;
}

.store-select-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-select-wrap select {
  min-width: 140px;
  flex: 1 1 auto;
}

/* Category pills */
.category-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.category-pill {
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.category-pill:hover {
  background: var(--surface-alt);
  border-color: #d1b8a5;
}

.category-pill.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(217, 119, 30, 0.25);
}

/* Subcategory chips */
.subcategory-chips-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0 12px;
}

.subcategory-chip {
  background: #f4efe9;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.subcategory-chip:hover {
  color: var(--ink);
  background: #ebe4dc;
}

.subcategory-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Store Products Grid */
.store-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.store-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.store-card:hover {
  transform: translateY(-3px);
  border-color: #d8bda9;
  box-shadow: 0 12px 28px rgba(79, 43, 16, 0.12);
}

.store-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f8f6f3;
  overflow: hidden;
}

.store-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.store-card:hover .store-card-img-wrap img {
  transform: scale(1.03);
}

.store-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: #f1ece6;
  color: #9c8e82;
}

.store-stock-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

html[dir="rtl"] .store-stock-tag {
  right: auto;
  left: 10px;
}

.stock-in_stock {
  background: rgba(22, 121, 75, 0.9);
  color: #fff;
}

.stock-low_stock {
  background: rgba(217, 119, 30, 0.9);
  color: #fff;
}

.stock-out_of_stock {
  background: rgba(180, 35, 24, 0.9);
  color: #fff;
}

.stock-on_order {
  background: rgba(108, 98, 91, 0.9);
  color: #fff;
}

.store-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.store-meta-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.store-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f0e9e1;
  color: #5a4f47;
}

.store-chip.brand {
  background: #e0f2fe;
  color: #0369a1;
}

.store-chip.subcat {
  background: #f4f4f5;
  color: #52525b;
}

.store-card-title {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.store-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 14px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.store-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.store-price-block {
  display: flex;
  flex-direction: column;
}

.store-price-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--orange-dark);
}

.store-price-unit {
  font-size: 0.76rem;
  color: var(--muted);
}

.store-btn-view {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.84rem;
  padding: 7px 14px;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.store-btn-view:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* Empty State */
.store-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
}

.store-empty h3 {
  margin: 0 0 8px 0;
  color: var(--ink);
}

/* Modal Dialog */
.store-modal {
  border: none;
  border-radius: 20px;
  padding: 0;
  width: min(640px, 94vw);
  max-height: 90vh;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
  background: var(--surface);
  overflow: hidden;
}

.store-modal::backdrop {
  background: rgba(33, 26, 21, 0.55);
  backdrop-filter: blur(4px);
}

.store-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.store-modal-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  background: #f5f1eb;
}

.store-modal-content {
  padding: 24px;
}

.store-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.store-modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.25;
}

.store-modal-close {
  background: #f2ece7;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.store-modal-close:hover {
  background: #e5ded7;
}

.store-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.store-modal-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 24px;
  white-space: pre-line;
}

.store-modal-pricing {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.store-inquire-btn {
  background: #25d366;
  color: #fff;
  border: none;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.store-inquire-btn:hover {
  background: #1da851;
  color: #fff;
}
