.sgs-board,
.sgs-deals,
.sgs-detail,
.sgs-shell,
.sgs-board *,
.sgs-deals *,
.sgs-detail *,
.sgs-shell * {
  box-sizing: border-box;
}

.sgs-board,
.sgs-deals,
.sgs-detail,
.sgs-shell {
  --sgs-ink: #17212b;
  --sgs-muted: #667484;
  --sgs-line: #dfe6ec;
  --sgs-soft: #f5f8f7;
  --sgs-surface: #ffffff;
  --sgs-green: #0f7b5f;
  --sgs-green-dark: #0a604a;
  --sgs-gold: #e1a51b;
  --sgs-red: #b42318;
  --sgs-shadow: 0 18px 44px rgba(23, 33, 43, 0.08);
  direction: rtl;
  color: var(--sgs-ink);
}

.sgs-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 64px;
  text-align: right;
}

.sgs-shell--single {
  width: min(1120px, calc(100% - 32px));
}

.sgs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 18px;
  align-items: end;
  margin: 0 0 22px;
  padding: 24px;
  border: 1px solid var(--sgs-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 123, 95, 0.1), rgba(225, 165, 27, 0.08)),
    #fff;
  box-shadow: var(--sgs-shadow);
}

.sgs-hero span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--sgs-green);
  font-size: 13px;
  font-weight: 1000;
}

.sgs-hero h1 {
  margin: 0 0 8px;
  color: var(--sgs-ink);
  font-size: 34px;
  line-height: 1.45;
}

.sgs-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--sgs-muted);
  font-size: 15px;
  line-height: 1.9;
}

.sgs-hero__meta {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px solid rgba(15, 123, 95, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.sgs-hero__meta strong {
  color: var(--sgs-green);
  font-size: 34px;
  line-height: 1;
}

.sgs-hero__meta small {
  color: var(--sgs-muted);
  font-size: 12px;
  font-weight: 900;
}

.sgs-board {
  margin: 28px 0;
}

.sgs-board__head {
  margin-bottom: 18px;
}

.sgs-board__head span {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--sgs-green);
  font-size: 13px;
  font-weight: 900;
}

.sgs-board__head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.45;
}

.sgs-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 18px;
}

.sgs-cats a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--sgs-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sgs-ink);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
  text-decoration: none;
}

.sgs-cats a:hover,
.sgs-cats a.is-active {
  border-color: var(--sgs-green);
  background: rgba(15, 123, 95, 0.1);
  color: var(--sgs-green);
}

.sgs-deals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.sgs-card,
.sgs-detail {
  border: 1px solid var(--sgs-line);
  border-radius: 8px;
  background: var(--sgs-surface);
  box-shadow: var(--sgs-shadow);
  overflow: hidden;
}

.sgs-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.sgs-card__image,
.sgs-detail__media {
  position: relative;
  display: block;
  background-color: #eef3f1;
  background-image: linear-gradient(135deg, #eef3f1, #f8fbfa);
  background-size: cover;
  background-position: center;
}

.sgs-card__image {
  aspect-ratio: 16 / 10;
  min-height: 190px;
  text-decoration: none;
}

.sgs-card__image::after,
.sgs-detail__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 23, 34, 0.08), rgba(10, 23, 34, 0.34));
  pointer-events: none;
}

.sgs-status,
.sgs-saving,
.sgs-badge,
.sgs-term {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
}

.sgs-card__image .sgs-status,
.sgs-detail__media .sgs-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.sgs-saving {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  background: rgba(255, 255, 255, 0.94);
  color: #7a5200;
  box-shadow: 0 8px 18px rgba(23, 33, 43, 0.12);
}

.sgs-status {
  background: rgba(15, 123, 95, 0.92);
  color: #fff;
}

.sgs-badge {
  background: rgba(225, 165, 27, 0.14);
  color: #805700;
}

.sgs-term {
  background: rgba(23, 33, 43, 0.06);
  color: var(--sgs-muted);
}

.sgs-card__body,
.sgs-detail__main {
  padding: 18px;
}

.sgs-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}

.sgs-card h3,
.sgs-detail h1 {
  margin: 0 0 12px;
  color: var(--sgs-ink);
  line-height: 1.55;
}

.sgs-card h3 {
  min-height: 60px;
  font-size: 19px;
}

.sgs-card h3 a {
  color: inherit;
  text-decoration: none;
}

.sgs-card h3 a:hover {
  color: var(--sgs-green);
}

.sgs-detail h1 {
  font-size: 32px;
}

.sgs-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.sgs-price-row del {
  color: var(--sgs-muted);
  font-size: 14px;
}

.sgs-price-row strong {
  color: var(--sgs-green);
  font-size: 21px;
  font-weight: 1000;
}

.sgs-price-row--large strong {
  font-size: 30px;
}

.sgs-countdown {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  margin: 14px 0;
}

.sgs-countdown__label,
.sgs-countdown__ended {
  display: inline-flex;
  align-items: center;
  color: var(--sgs-muted);
  font-size: 12px;
  font-weight: 900;
}

.sgs-countdown__ended {
  grid-column: 1 / -1;
  min-height: 38px;
  justify-content: center;
  border: 1px solid var(--sgs-line);
  border-radius: 6px;
  background: var(--sgs-soft);
}

.sgs-countdown__item {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(15, 123, 95, 0.18);
  border-radius: 6px;
  background: rgba(15, 123, 95, 0.08);
}

.sgs-countdown__item b {
  color: var(--sgs-green);
  font-size: 18px;
  line-height: 1.1;
}

.sgs-countdown__item small {
  color: var(--sgs-muted);
  font-size: 10px;
  font-weight: 800;
}

.sgs-countdown--detail {
  grid-template-columns: minmax(90px, auto) repeat(4, minmax(72px, 1fr));
}

.sgs-countdown--detail .sgs-countdown__item {
  min-height: 58px;
}

.sgs-countdown--detail .sgs-countdown__item b {
  font-size: 24px;
}

.sgs-meter {
  height: 11px;
  border-radius: 999px;
  background: #edf2f1;
  overflow: hidden;
  margin: 12px 0 14px;
}

.sgs-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sgs-green), var(--sgs-gold));
  transition: width 0.25s ease;
}

.sgs-meter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -6px 0 12px;
  color: var(--sgs-muted);
  font-size: 12px;
  font-weight: 900;
}

.sgs-meter-label strong {
  color: var(--sgs-green);
}

.sgs-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 14px;
}

.sgs-stats--detail {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sgs-stats div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--sgs-line);
  border-radius: 6px;
  background: var(--sgs-soft);
}

.sgs-stats dt {
  margin: 0 0 4px;
  color: var(--sgs-muted);
  font-size: 11px;
  font-weight: 800;
}

.sgs-stats dd {
  margin: 0;
  color: var(--sgs-ink);
  font-weight: 1000;
}

.sgs-live {
  min-height: 40px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--sgs-line);
  border-radius: 6px;
  background: #fff;
  color: var(--sgs-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.8;
}

.sgs-live strong {
  color: var(--sgs-green);
}

.sgs-live.is-active {
  border-color: rgba(225, 165, 27, 0.42);
  background: rgba(225, 165, 27, 0.1);
  color: #745100;
}

.sgs-live--detail {
  font-size: 13px;
}

.sgs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--sgs-green);
  color: #fff;
  padding: 10px 16px;
  font: inherit;
  font-weight: 1000;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 123, 95, 0.2);
}

.sgs-button:hover {
  background: var(--sgs-green-dark);
  color: #fff;
}

.sgs-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.sgs-button--ghost {
  width: 100%;
  border: 1px solid var(--sgs-line);
  background: #fff;
  color: var(--sgs-green);
  box-shadow: none;
}

.sgs-button--ghost:hover {
  background: var(--sgs-soft);
  color: var(--sgs-green);
}

.sgs-detail {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
  margin: 28px 0;
}

.sgs-shell .sgs-detail {
  margin-top: 0;
}

.sgs-detail__media {
  min-height: 520px;
}

.sgs-policy {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  color: var(--sgs-muted);
  line-height: 1.9;
}

.sgs-policy p {
  margin: 0;
}

.sgs-purchase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--sgs-line);
  border-radius: 8px;
  background: #fff;
}

.sgs-reserve-note {
  grid-column: 1 / -1;
  padding: 11px 12px;
  border: 1px solid rgba(15, 123, 95, 0.18);
  border-radius: 6px;
  background: rgba(15, 123, 95, 0.08);
  color: var(--sgs-green-dark);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.8;
}

.sgs-description {
  margin: 22px 0 0;
  padding: 22px;
  border: 1px solid var(--sgs-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--sgs-shadow);
  color: var(--sgs-ink);
  line-height: 2;
}

.sgs-description h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.sgs-description p {
  margin: 0 0 12px;
}

.sgs-purchase label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
}

.sgs-purchase input,
.sgs-purchase select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--sgs-line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px 12px;
  font: inherit;
}

.sgs-purchase input:focus,
.sgs-purchase select:focus {
  outline: 0;
  border-color: var(--sgs-green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 123, 95, 0.12);
}

.sgs-check {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  color: var(--sgs-muted);
  font-weight: 700 !important;
  line-height: 1.9;
}

.sgs-check input {
  flex: 0 0 18px;
  width: 18px;
  min-height: 18px;
  margin-top: 7px;
}

.sgs-message {
  grid-column: 1 / -1;
  min-height: 24px;
  color: var(--sgs-muted);
  font-weight: 800;
}

.sgs-message--success {
  color: var(--sgs-green);
}

.sgs-message--error {
  color: var(--sgs-red);
}

.sgs-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--sgs-line);
  border-radius: 8px;
  background: #fff;
  color: var(--sgs-muted);
}

@media (max-width: 1100px) {
  .sgs-deals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sgs-detail {
    grid-template-columns: 1fr;
  }

  .sgs-detail__media {
    min-height: 360px;
  }
}

@media (max-width: 680px) {
  .sgs-shell,
  .sgs-shell--single {
    width: min(100% - 18px, 1180px);
    margin-top: 22px;
  }

  .sgs-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .sgs-hero h1 {
    font-size: 24px;
  }

  .sgs-hero__meta {
    min-height: 90px;
  }

  .sgs-board__head h2 {
    font-size: 22px;
  }

  .sgs-deals {
    grid-template-columns: 1fr;
  }

  .sgs-card__body,
  .sgs-detail__main {
    padding: 15px;
  }

  .sgs-card h3 {
    min-height: 0;
  }

  .sgs-detail h1 {
    font-size: 24px;
  }

  .sgs-countdown,
  .sgs-countdown--detail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sgs-countdown__label {
    grid-column: 1 / -1;
  }

  .sgs-stats,
  .sgs-stats--detail,
  .sgs-purchase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sgs-check,
  .sgs-message,
  .sgs-purchase .sgs-button {
    grid-column: 1 / -1;
  }
}
