/* Seller storefront — Instagram-classic profile on Masterkado shop */

.seller-page {
  direction: rtl;
  width: 100%;
  padding-bottom: 3.5rem;
  background: #fff;
  text-align: right;
  color: #262626;
}

.seller-page ::selection {
  background: #ff671d;
  color: #fff;
}

/* —— Profile hero —— */
.seller-profile {
  width: 100%;
  background: #fff;
}

.seller-profile__inner {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  column-gap: 4.5rem;
  align-items: start;
  width: 100%;
  padding-block: 2.15rem 1.65rem;
}

.seller-profile__avatar {
  position: relative;
  width: 168px;
  height: 168px;
  flex-shrink: 0;
}

.seller-profile__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.seller-profile__ring circle {
  fill: none;
  stroke: var(--primary, #ff671d);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 292;
  stroke-dashoffset: 292;
  animation: seller-ring-draw 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

.seller-profile__photo {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #efefef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seller-profile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seller-profile__photo-fallback {
  display: inline-flex;
  color: var(--primary, #ff671d);
}

.seller-profile__photo-fallback svg {
  width: 52px;
  height: 52px;
}

.seller-profile__main {
  min-width: 0;
  max-width: 38rem;
  padding-top: 0.35rem;
}

.seller-profile__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem 1.15rem;
  margin-bottom: 1.15rem;
}

.seller-profile__name-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.seller-profile__name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  color: #262626;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-profile__verified {
  flex-shrink: 0;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  background: #fff3ec;
  color: var(--primary, #ff671d);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
}

.seller-profile__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.seller-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0 1rem;
  border-radius: 8px;
  background: #efefef;
  color: #262626;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.seller-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.seller-btn:hover,
.seller-btn:focus-visible {
  background: #dbdbdb;
  color: #262626;
  outline: none;
}

.seller-btn:focus-visible {
  outline: 2px solid var(--primary, #ff671d);
  outline-offset: 2px;
}

.seller-btn--primary {
  background: var(--primary, #ff671d);
  color: #fff;
}

.seller-btn--primary:hover,
.seller-btn--primary:focus-visible {
  background: #e85a12;
  color: #fff;
}

.seller-profile__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 2.4rem;
  margin: 0 0 1.05rem;
  padding: 0;
  list-style: none;
}

.seller-profile__stats li {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  color: #262626;
  font-size: 1rem;
}

.seller-profile__stats li.is-joined {
  flex-direction: row-reverse;
}

.seller-profile__stats b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.seller-profile__stats span {
  color: #262626;
  font-weight: 400;
}

.seller-profile__bio {
  max-width: 52ch;
}

.seller-profile__desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #262626;
  white-space: pre-wrap;
}

.seller-profile__link {
  display: inline-block;
  margin-top: 0.35rem;
  color: #00376b;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  unicode-bidi: isolate;
}

.seller-profile__link:hover,
.seller-profile__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.seller-profile__link:focus-visible {
  outline: 2px solid var(--primary, #ff671d);
  outline-offset: 2px;
}

.seller-profile__place {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0.45rem 0 0;
  color: #262626;
  font-size: 0.88rem;
  line-height: 1.6;
}

.seller-profile__place svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 0.18rem;
  color: #5e5e5e;
}

.seller-profile__place span {
  color: inherit;
}

/* —— Products tab + grid —— */
.seller-products {
  padding-top: 0;
  width: 100%;
  scroll-margin-top: 1.25rem;
}

.seller-products__tabs {
  display: flex;
  justify-content: flex-start;
  border-top: 1px solid #dbdbdb;
  margin-bottom: 1.35rem;
}

.seller-products__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.95rem 0.15rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5e5e5e;
}

.seller-products__tab.is-active {
  color: #262626;
  box-shadow: inset 0 1px 0 #262626;
}

.seller-products__tab svg {
  width: 12px;
  height: 12px;
}

.seller-products__tab span {
  color: #5e5e5e;
  font-weight: 500;
  letter-spacing: 0;
}

.seller-products__tab.is-active span {
  color: #5e5e5e;
}

.seller-products:target .seller-products__tab.is-active {
  color: var(--primary, #ff671d);
  box-shadow: inset 0 1px 0 var(--primary, #ff671d);
}

.seller-products .shop_carts_wrapper {
  width: 100%;
  justify-content: flex-start;
}

.seller-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 14rem;
  color: #5e5e5e;
  text-align: center;
}

.seller-empty svg {
  width: 42px;
  height: 42px;
}

.seller-empty p {
  margin: 0;
  font-size: 0.95rem;
  color: #5e5e5e;
}

@keyframes seller-ring-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seller-profile__ring circle {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* —— Product page seller card (inside .product_pay_section) —— */
.product_pay_section .product-seller-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0 0 0.75rem;
  border: 0;
  border-bottom: 1px solid #e4e4e4;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  color: inherit;
}

.product-seller-card__head {
  font-size: 0.95rem;
  font-weight: 700;
  color: #333;
  text-align: right;
}

.product-seller-card__row {
  display: flex;
  flex-direction: row;
  direction: rtl;
  align-items: center;
  gap: 0.65rem;
}

.product-seller-card__logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #ebebeb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-seller-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-seller-card__logo-fallback {
  display: inline-flex;
  color: var(--primary, #ff671d);
}

.product-seller-card__logo-fallback svg {
  width: 20px;
  height: 20px;
}

.product-seller-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  direction: rtl;
  align-items: flex-start;
  gap: 0.12rem;
  text-align: right;
}

.product-seller-card__name {
  display: inline-flex;
  flex-direction: row;
  direction: rtl;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  font-size: 0.9rem;
  font-weight: 700;
  color: #333;
}

.product-seller-card__check {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.product-seller-card__perf {
  font-size: 0.75rem;
  font-weight: 600;
  color: #00a049;
}

.product_pay_section .product-seller-card:hover .product-seller-card__name,
.product_pay_section .product-seller-card:focus-visible .product-seller-card__name {
  color: var(--primary, #ff671d);
}

.product_pay_section .product-seller-card:focus-visible {
  outline: none;
}

@media (max-width: 900px) {
  .seller-profile__inner {
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 1.35rem;
    row-gap: 1rem;
    padding-block: 1.25rem 0.85rem;
  }

  .seller-profile__avatar {
    width: 96px;
    height: 96px;
    grid-column: 1;
    grid-row: 1;
  }

  .seller-profile__main {
    display: contents;
    max-width: none;
  }

  .seller-profile__stats {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
    gap: 0.2rem 1.4rem;
    justify-content: space-evenly;
  }

  .seller-profile__stats li,
  .seller-profile__stats li.is-joined {
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    font-size: 0.82rem;
  }

  .seller-profile__stats b {
    font-size: 1.05rem;
  }

  .seller-profile__topline {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0.85rem;
    gap: 0.7rem;
  }

  .seller-profile__name {
    font-size: 1.12rem;
    white-space: normal;
  }

  .seller-profile__actions {
    width: 100%;
  }

  .seller-profile__actions .seller-btn {
    flex: 1 1 auto;
  }

  .seller-profile__bio {
    grid-column: 1 / -1;
    grid-row: 3;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .seller-profile__inner {
    grid-template-columns: 86px minmax(0, 1fr);
    column-gap: 1rem;
    padding-top: 1rem;
  }

  .seller-profile__avatar {
    width: 86px;
    height: 86px;
  }

  .seller-profile__photo-fallback svg {
    width: 32px;
    height: 32px;
  }

  .seller-products__tab span {
    display: none;
  }

  .seller-btn {
    min-height: 36px;
    font-size: 0.84rem;
  }
}
