/* shop.css - nutzt dieselben Variablen wie global.css, keine eigenen Farben erfunden */

/*Header*/
#header {
  background: url("../../images/header-background.jpg") no-repeat fixed center;
  min-width: 100%;
  min-height: 400px;
  height: 30vh;
  background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  -webkit-background-size: cover;
  z-index: 0;
  display: flex;
  align-items: center;
}

#header .content {
  padding: 90px 150px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#header .info .minecraft-server-ip {
  color: var(--main-color);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
}

#header .info .title {
  color: var(--white-color);
  font-size: 42px;
  font-weight: 900;
  margin-top: 4px;
}

#header .info .title span {
  color: var(--main-color);
}

#header .description {
  color: var(--description-color);
  font-size: 17px;
  max-width: 600px;
}

/* Cart Toggle Button (Navbar) */
#shop {
  padding-bottom: 90px;
}

.cart-toggle {
  position: relative;
  background: var(--how-to-join-button-background);
  border: none;
  color: var(--white-color);
  font-size: 16px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.cart-toggle:hover { background: var(--copy-ip-button-background); }

.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--main-color);
  color: var(--background-color);
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Rank Table */
.rank-table-wrap {
  margin-bottom: 90px;
  display: none;
  scroll-margin-top: calc(var(--navbar-height, 84px) + 24px);
}
.rank-table-wrap.visible { display: block; }
.rank-table-wrap .section-title {
  color: var(--white-color);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.rank-table-wrap .section-title i { color: var(--main-color); }

/* Bild statt/neben dem Icon in Sektions-Überschriften (Ränge, Klumpen, Kisten) */
.section-icon {
  max-height: 350px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}
.shop-category h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.rank-cards-scroll { overflow-x: auto; }

/* Eine Grid-Spalte für die Zeilen-Labels + eine Spalte pro Rang */
.rank-cards-grid {
  display: grid;
  grid-template-columns: 150px repeat(var(--rank-count), minmax(120px, 400px));
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.rank-empty-cell { background: transparent; }

/* Preis-Karten */
.rank-card-header {
  background: var(--rank-color);
  border-radius: 14px 14px 0 0;
  padding: 22px 14px;
  text-align: center;
  color: #fff;
  margin-bottom: 3px;
}
.rank-card-header .rank-icon {
  max-width: 100%;
  height: 175px;
  object-fit: contain;
  margin-bottom: 10px;
}

.rank-card-header .rank-duration {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  margin-bottom: 6px;
}
.rank-card-header .rank-name {
  font-weight: 900;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.rank-card-header .rank-price-pill {
  background: rgba(0,0,0,0.25);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 16px;
}
.rank-card-header .rank-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: 0.2s;
}
.rank-card-header .rank-buy-btn i { font-size: 11px; }

.rank-buy-sub {
  background: #fff;
  color: var(--rank-color);
}
.rank-buy-sub:hover { opacity: 0.9; }

.rank-buy-life {
  background: rgba(255,255,255,0.22);
  color: #fff;
}
.rank-buy-life:hover { background: rgba(255,255,255,0.32); }

.rank-buy-btn.added {
  background: var(--ip-copied-icon-background) !important;
  color: var(--white-color) !important;
}

/* "Allgemein" Sektionstitel */
.rank-section-title {
  grid-column: 1 / -1;
  background: var(--how-to-join-button-background);
  color: var(--white-color);
  font-weight: 800;
  font-size: 15px;
  padding: 16px 20px;
  border-radius: 12px 12px 0 0;
  margin-top: 12px;
}

/* Feature-Zeilen */
.rank-feature-label {
  background: var(--stats-background);
  color: var(--description-color);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
}
.rank-help {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(210,208,208,0.15);
  color: var(--description-color);
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  transition: 0.2s;
}
.rank-help:hover {
  background: var(--main-color);
  color: var(--background-color);
}

/* Eigene Tooltip-Box (statt Browser-Standard-Tooltip) */
.rank-tooltip {
  position: fixed;
  transform: translateX(-50%);
  background: #15171c;
  border: 1px solid var(--scroll-bar);
  color: var(--white-color);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 220px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 550;
}
.rank-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

.rank-cell {
  background: var(--stats-background);
  text-align: center;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white-color);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rank-prefix { font-weight: 800; }

.rank-check-yes, .rank-check-no {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.rank-check-yes { background: rgba(74,255,107,0.2); color: var(--green-color); }
.rank-check-no { background: rgba(255,124,124,0.2); color: var(--red-color); }

/* "Mehr sehen" - ausgeblendete Zeilen ab der 7. Zeile */
.rank-row-extra { display: none; }
.rank-row-extra.rank-row-extra-visible { display: flex; }

.rank-expand-row {
  grid-column: 1 / -1;
  position: relative;
  height: 56px;
  margin-top: -12px;
  background: linear-gradient(to bottom, transparent, var(--background-color) 70%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}
.rank-expand-btn {
  background: var(--main-color);
  color: var(--background-color);
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(57,190,255,0.35);
  transition: 0.2s;
}
.rank-expand-btn:hover { opacity: 0.88; }
.rank-expand-btn i { font-size: 11px; }

/* leicht abwechselnde Zeilenfarbe, wie im Vorbild (Klasse wird per JS gesetzt) */
.rank-row-alt.rank-feature-label,
.rank-row-alt.rank-cell {
  background: rgba(210, 208, 208, 0.09);
}

/* letzte Zeile unten abgerundet */
.rank-row-last.rank-feature-label { border-radius: 0 0 0 12px; }
.rank-row-last.rank-cell.rank-col-last { border-radius: 0 0 12px 0; }

/* Kategorie-Leiste — schwebt fix am unteren Bildschirmrand, bleibt beim Scrollen sichtbar */
.shop-categories-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  background: rgba(15, 17, 22, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--scroll-bar);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  width: fit-content;
  max-width: calc(100vw - 40px);
  gap: 8px;
  overflow-x: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.category-nav-item {
  flex: 0 0 auto;
  color: var(--description-color);
  font-size: 15px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
}
.category-nav-item:hover { color: var(--white-color); background: var(--how-to-join-button-background); }
.category-nav-item.active { color: var(--background-color); background: var(--main-color); }

.status-line {
  color: var(--description-color);
  font-size: 15px;
  text-align: center;
  margin-bottom: 30px;
}
.status-line:empty {
  margin: 0;
  display: none;
}
.status-line.success {
  color: var(--green-color);
  background: rgba(74,255,107,0.1);
  border: 1px solid rgba(74,255,107,0.3);
  border-radius: 10px;
  padding: 14px 20px;
  font-weight: 600;
}

/* Statusmeldung: klappt von der Mitte nach außen auf und wieder von außen nach innen zu */
.status-line.status-anim-in,
.status-line.status-anim-out {
  clip-path: inset(0 50% 0 50%);
}
.status-line.status-anim-in {
  animation: statusExpandFromCenter 0.5s ease-out forwards;
}
.status-line.status-anim-out {
  animation: statusCollapseToCenter 0.5s ease-in forwards;
}
@keyframes statusExpandFromCenter {
  from { clip-path: inset(0 50% 0 50%); opacity: 0; }
  to   { clip-path: inset(0 0% 0 0%);   opacity: 1; }
}
@keyframes statusCollapseToCenter {
  from { clip-path: inset(0 0% 0 0%);   opacity: 1; }
  to   { clip-path: inset(0 50% 0 50%); opacity: 0; }
}

.shop-main.hidden { display: none; }

/* Hilfe-Bereich */
.help-section {
  margin-top: 60px;
  padding-top: 10px;
  scroll-margin-top: calc(var(--navbar-height, 84px) + 24px);
}
.help-section .section-title {
  color: var(--white-color);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.help-section .section-title i { color: var(--main-color); }

.help-block {
  background: var(--stats-background);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 14px;
}
.help-block h3 {
  color: var(--white-color);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}
.help-block p {
  color: var(--description-color);
  font-size: 14px;
  line-height: 1.7;
}
.help-block p strong { color: var(--white-color); }

/* Package Categories + Grid */
.shop-category {
  margin-bottom: 44px;
  scroll-margin-top: calc(var(--navbar-height, 84px) + 24px);
}
.shop-category h2 {
  color: var(--white-color);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 18px;
  text-align: center;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 260px));
  justify-content: center;
  gap: 18px;
}

.package-card {
  background: var(--stats-background);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: 0.2s;
}
.package-card:hover { background: var(--how-to-join-button-background); }

.package-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--background-color);
}
.package-card .name { color: var(--white-color); font-weight: 700; font-size: 16px; }
.package-card .desc { color: var(--description-color); font-size: 13px; line-height: 1.5; flex-grow: 1; }

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--background-color);
  border-radius: 8px;
  padding: 6px 10px;
}
.qty-btn {
  background: none; border: none; color: var(--white-color);
  font-size: 18px; width: 26px; height: 26px; cursor: pointer; font-weight: 700;
}
.qty-btn:hover { color: var(--main-color); }
.qty-value { color: var(--white-color); font-weight: 700; min-width: 24px; text-align: center; }

.package-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.package-price { color: var(--white-color); font-weight: 800; font-size: 18px; }
.package-price span { color: var(--description-color); font-size: 12px; font-weight: 500; }

.add-to-cart-btn {
  background: var(--copy-ip-button-background);
  border: none;
  color: var(--white-color);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.add-to-cart-btn:hover { opacity: 0.85; }
.add-to-cart-btn.added { background: var(--ip-copied-icon-background); }

/* Cart Drawer */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 590;
  opacity: 0; pointer-events: none;
  transition: 0.25s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed; top: 0; right: -400px;
  width: 380px; max-width: 90vw; height: 100%;
  background: var(--background-color);
  border-left: 1px solid var(--scroll-bar);
  z-index: 600;
  transition: right 0.25s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }

.cart-drawer-header {
  padding: 22px;
  border-bottom: 1px solid var(--scroll-bar);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-drawer-header h3 { color: var(--white-color); font-size: 18px; font-weight: 800; }
.cart-close { background: none; border: none; color: var(--description-color); font-size: 26px; cursor: pointer; }
.cart-close:hover { color: var(--white-color); }

.cart-items { flex-grow: 1; overflow-y: auto; padding: 18px 22px; }
.cart-empty { color: var(--description-color); text-align: center; padding: 60px 20px; font-size: 15px; }

.cart-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--scroll-bar); gap: 12px;
}
.cart-item-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--background-color);
  flex-shrink: 0;
}
.cart-item-info { min-width: 0; flex: 1; }
.cart-item-name { color: var(--white-color); font-size: 15px; font-weight: 600; }
.cart-item-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.cart-qty-btn {
  background: var(--background-color);
  border: 1px solid var(--scroll-bar);
  color: var(--white-color);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-qty-btn:hover { border-color: var(--main-color); color: var(--main-color); }
.cart-qty-value { color: var(--white-color); font-size: 13px; font-weight: 700; min-width: 16px; text-align: center; }
.cart-item-remove {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 124, 124, 0.1);
  border: 1px solid rgba(255, 124, 124, 0.25);
  color: var(--red-color);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: 6px;
  transition: 0.2s;
}
.cart-item-remove i { font-size: 11px; }
.cart-item-remove:hover {
  background: var(--red-color);
  border-color: var(--red-color);
  color: var(--white-color);
}
.cart-item-price { color: var(--white-color); font-weight: 700; font-size: 15px; white-space: nowrap; }

.cart-drawer-footer { padding: 22px; border-top: 1px solid var(--scroll-bar); }
.cart-total-row {
  display: flex; justify-content: space-between;
  color: var(--white-color); font-weight: 800; font-size: 17px; margin-bottom: 16px;
}
.checkout-btn {
  width: 100%;
  background: var(--how-to-join-button-background);
  border: none;
  color: var(--white-color);
  font-weight: 700;
  font-size: 15px;
  padding: 13px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}
.checkout-btn:hover:not(:disabled) { background: var(--main-color); color: var(--background-color); }
.checkout-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.login-toggle {
  background: var(--how-to-join-button-background);
  border: none;
  color: var(--white-color);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-toggle:hover { background: var(--copy-ip-button-background); }

.platform-badge {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--main-color);
  font-size: 13px;
}

.login-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 600; display: none; align-items: center; justify-content: center;
}
.login-overlay.open { display: flex; }

.login-modal {
  background: var(--background-color);
  border: 1px solid var(--scroll-bar);
  border-radius: 16px;
  padding: 28px;
  width: 340px;
  max-width: 90vw;
  position: relative;
}
.login-modal h3 { color: var(--white-color); font-size: 20px; margin-bottom: 18px; }
.login-context {
  display: none;
  color: var(--main-color);
  background: rgba(57,190,255,0.1);
  border: 1px solid rgba(57,190,255,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin: -8px 0 18px;
}
.login-modal label { color: var(--description-color); font-size: 13px; display: block; margin-bottom: 8px; }
.login-modal input {
  width: 100%; background: var(--stats-background); border: 1px solid var(--scroll-bar);
  color: var(--white-color); padding: 12px 14px; border-radius: 8px; font-size: 15px; margin-bottom: 16px;
}
.login-modal input:focus { outline: none; border-color: var(--main-color); }

/* Java/Bedrock-Umschalter */
.platform-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.platform-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--stats-background);
  border: 1px solid var(--scroll-bar);
  color: var(--description-color);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.platform-btn:hover { color: var(--white-color); }
.platform-btn.active {
  background: var(--main-color);
  border-color: var(--main-color);
  color: var(--background-color);
}

.platform-hint {
  color: var(--description-color);
  font-size: 12px;
  line-height: 1.5;
  margin-top: -10px;
  margin-bottom: 16px;
  min-height: 0;
}

.login-submit {
  width: 100%;
  background: var(--how-to-join-button-background);
  border: none;
  color: var(--white-color);
  font-weight: 700;
  font-size: 15px;
  padding: 13px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}
.login-submit:hover { background: var(--main-color); color: var(--background-color); }
.login-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--description-color); font-size: 22px; cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Responsive - dieselben Breakpoints wie global.css */
@media screen and (max-width: 1625px) {
  #header .content { padding: 90px 90px 40px; }
}
@media screen and (max-width: 819px) {
  #header .content { padding: 50px 30px 30px; }
  .rank-cards-grid { grid-template-columns: 120px repeat(var(--rank-count), minmax(110px, 150px)); }
  .rank-card-header .rank-name { font-size: 17px; }
}
@media screen and (max-width: 564px) {
  .package-grid { grid-template-columns: 1fr; }
}