/* ---------------------------
   SEZIONE PRINCIPALE SHOP
---------------------------- */
.shop {
  width: 100%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  background-color: var(--background-color);
  color: white;
}

@media screen and (max-width: 1450px) {
  .shop {
    margin-top: 80px !important;
  }
}

/* ---------------------------
   NAVIGAZIONE SHOP
---------------------------- */
.shopNavigation {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.shopNavigation .categories {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.shopNavigation .cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  width: 100px;
  text-align: center;
  border-radius: var(--border-radius-medium);
  background-color: #1f1f1f44;
  box-shadow: 0 0 8px #0005;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.shopNavigation .cat:hover {
  background-color: var(--accent-color);
  transform: scale(1.05);
}

.shopNavigation .cat img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 10px;
}

.shopNavigation .cat h3 {
  font-size: 14px;
  font-family: var(--font-minecraft-normal);
  text-transform: uppercase;
  margin: 0;
}

/* ---------------------------
   PLAYER SECTION + CARRELLO
---------------------------- */
.shopNavigation .player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 15px 25px;
  min-height: 64px;
  min-width: 280px;
  flex-grow: 1;
  background-color: #2c2c2c1f;
  border-radius: var(--border-radius-medium);
  box-shadow: 0 0 8px #0005;
  color: white;
  font-family: var(--font-default);
}

.player-head img {
  width: 55px;
  height: 55px;
  border-radius: 4px;
  image-rendering: pixelated;
  background-color: #111;
}

.player-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.player-info h3 {
  margin: 0;
  font-size: 16px;
  color: var(--accent-color);
  font-family: var(--font-minecraft-bold);
}

.player-info p {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.player-info button {
  margin-top: 10px;
  background-color: var(--accent-color);
  color: white;
  font-weight: bold;
  font-size: 14px;
  padding: 6px 12px;
  border: none;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  font-family: var(--font-default);
  transition: background-color 0.2s ease;
}

.player-info button:hover {
  background-color: var(--accent-color-lighten, #50a7ff);
}

.cart-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 60%;
  max-width: 470px;
  background-color: var(--background-color);
  color: white;
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--border-radius-medium);
  box-shadow: 0 2px 10px #0004;
  overflow: scroll;
  overflow-x: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}

.cart-dropdown.open {
  max-height: 300px;
  opacity: 1;
}

.cart-dropdown h4 {
  margin-top: 0;
  font-size: 16px;
  font-weight: bold;
}

.cart-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cart-dropdown ul li {
  padding: 5px 0;
  border-bottom: 1px solid #fff2;
  font-size: 14px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  gap: 20px;
  flex-wrap: wrap;
  word-break: break-word;
}
@media (max-width: 768px) {
  .cart-dropdown ul li {
    gap: 15px;
    font-size: 13px;
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  .cart-dropdown ul li {
    flex-direction: column;
    align-items: flex-start;
    font-size: 12px;
    gap: 8px;
  }
}
.cart-dropdown ul li img{
  height: 80px;
  width: 80px;
}
.cart-dropdown ul li .info h3{
  font-family: var(--font-default);
  font-size: 30px;
}
.cart-dropdown ul li .info p{
  font-size: 18px;
}
.cart-dropdown button{
  background-color: var(--accent-color);
  border: none;
  border-radius: var(--border-radius-medium);
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: .1s linear;
  margin-left: 20px;
  cursor: pointer;
  color: #fff;
}
.cart-dropdown button:hover{
  scale: 1.1;
  background-color: var(--accent-color-lighten);
}
.cart-dropdown button p{
  font-size: 18px;
  font-weight: bolder;
}
.cart-dropdown ul li button img{
  height: 40px;
  width: 40px;
}
.paymentButton{
  margin: 10px 20px;
  width: 90%;
}
/* ---------------------------
   RESPONSIVE
---------------------------- */
@media (max-width: 768px) {
  .shopNavigation {
    flex-direction: column;
    align-items: center;
  }

  .shopNavigation .player {
    flex-direction: column;
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .shopNavigation .categories {
    justify-content: center;
  }

  .shopNavigation .cat {
    width: 80px;
  }

  .shopNavigation .cat h3 {
    font-size: 12px;
  }

  #shopGrid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* ---------------------------
   SHOP GRID GENERALE
---------------------------- */
#shopGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* ---------------------------
   CARD STILE BASE
---------------------------- */
.shop-card {
  background-color: var(--background-color);
  border-radius: var(--border-radius-medium);
  border: 1px solid var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-card:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.card-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  scale: 0.85;
}

.card-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  color: white;
  font-family: var(--font-default);
  gap: 10px;
}

.card-content h3 {
  font-size: 20px;
  font-family: var(--font-minecraft-normal);
}

.card-content p {
  font-size: 16px;
  line-height: 1;
  color: #ccc;
  overflow: hidden;
  font-weight: bold;
}
.card-content p ul{
    margin-left: 10px;
    list-style: none;
}

.price {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-color);
}

.add-to-cart {
  background-color: var(--accent-color);
  color: white;
  font-size: 18px;
  font-family: var(--font-minecraft-normal);
  padding: 6px 10px 18px 10px;
  border: none;
  border-radius: var(--border-radius-medium);
  cursor: pointer;
  transition: background-color 0.2s ease;
  transition: transform 0.2s ease;
}
.shopSettingsButton {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  align-items: initial;
  gap: 20px;
}
.shopSettingsButton button{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.shopSettingsButton button img{
  height: 30px;
  width: 30px;
}

.add-to-cart:hover {
  background-color: #e53e3e;
  transform: scale(1.05);
  box-shadow: #000 5px 10px 0px;
}

/* ---------------------------
   STILI PER CATEGORIA
---------------------------- */

/* VIP */
#shopGrid.VIP .shop-card {
  border: 2px solid #4fff8f;
  background: linear-gradient(145deg, #2c2c2c, #323232);
}
#shopGrid.VIP .price {
  color: #4fff8f;
}
#shopGrid.VIP .add-to-cart {
  background-color: #4fff8f;
  color: black;
}
#shopGrid.VIP .add-to-cart:hover {
  background-color: #4fff8f;
}

/* BOOSTERS */
#shopGrid.BOOSTERS .shop-card {
  border: 2px solid #ff4e4e;
  background: linear-gradient(145deg, #342727, #542a2a);
}
#shopGrid.BOOSTERS .price {
  color: #ff4e4e;
}
#shopGrid.BOOSTERS .add-to-cart {
  background-color: #ff4e4e;
}
#shopGrid.BOOSTERS .add-to-cart:hover {
  background-color: #d73d3d;
}

/* COINS */
#shopGrid.COINS .shop-card {
  border: 2px solid #f0c419;
  background: linear-gradient(145deg, #2c2500, #3b3200);
}
#shopGrid.COINS .price {
  color: #f0c419;
}
#shopGrid.COINS .add-to-cart {
  background-color: #f0c419;
  color: #000;
}
#shopGrid.COINS .add-to-cart:hover {
  background-color: #d6ad00;
}

/* CHEST */
#shopGrid.CHEST .shop-card {
  border: 2px solid #6c4fff;
  background: linear-gradient(145deg, #1f1f33, #28284a);
}
#shopGrid.CHEST .price {
  color: #6c4fff;
}
#shopGrid.CHEST .add-to-cart {
  background-color: #6c4fff;
}
#shopGrid.CHEST .add-to-cart:hover {
  background-color: #563df2;
}

/* BUNDLES */
#shopGrid.BUNDLES .shop-card {
  border: 2px solid #00bcd4;
  background: linear-gradient(145deg, #1b2c2c, #224040);
}
#shopGrid.BUNDLES .price {
  color: #00bcd4;
}
#shopGrid.BUNDLES .add-to-cart {
  background-color: #00bcd4;
  color: #fff;
}
#shopGrid.BUNDLES .add-to-cart:hover {
  background-color: #009daf;
}

/* ---------------------------
   DISPOSIZIONE PER CATEGORIA
---------------------------- */
#shopGrid.BOOSTERS,
#shopGrid.COINS,
#shopGrid.BUNDLES {
  grid-template-columns: repeat(auto-fit, 1fr) !important;
}
#shopGrid .shop-card{
    position: relative;
    overflow: visible !important;
}
#shopGrid.VIP .shop-card:nth-child(3)::after{
    content: 'Scelta Dei Player';
    font-family: var(--font-default);
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 190px;
    height: 30px;
    border-radius: var(--border-radius-small);
    background-color: var(--accent-color);
    z-index: 10;
    border: 2px solid var(--accent-color-lighten);
    box-shadow: var(--accent-color-lighten) 0px 0px 10px 0px ;
}

.shop-card span{
  font-size: 20px;
}
.shop-card span.purple{color: #ff36e4;}
.shop-card span.cyan{color: #36e4ff;}
.shop-card span.orange{color: #ffaf36;}
.shop-card span.red{color: #ff3636;}
.shop-card span.yellow{color: #ffe436;}
.shop-card span.green{color: #36ff54;}
.shop-card .card-content div h3{
  font-size: 15px;
  color: #cccccc;
}

#shopGrid.CHEST {
  grid-template-columns: repeat(auto-fit, 1fr) !important;
}

.playerUsernameChanger{
    position: absolute;
    top: -100vh;
    left: 0px;
    width: 100vw;
    height: 100vh;
    background-color: #000000cc;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}
.playerUsernameChanger.visible{
  top: 0px;
}
.playerUsernameChanger .form{
  padding: 20px 40px;
  background-color: #1f1f1f;
  border-radius: var(--border-radius-big);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.playerUsernameChanger .form button{
  padding: 10px 20px;
  background-color: var(--accent-color);
  border: none;
  border-radius: var(--border-radius-medium); 
  transition: 0.1s linear;
}
.playerUsernameChanger .form button:hover{
  background-color: var(--accent-color-lighten);
  scale: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.playerUsernameChanger .form input{
  border: 2px solid var(--accent-color);
  border-radius: var(--border-radius-medium);
  padding: 5px 30px;
  font-size: 20px;
  font-family: var(--font-default);
  color: #fff;
  text-align: center;
  background-color: #ffffff10;
}
.playerUsernameChanger .form .buttons{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px
}
.playerUsernameChanger .form button p{
  font-size: 21px;
  font-weight: bolder;
}

.overlay iframe{
  position: fixed !important;
  width: 70vw;
  height: 70vh;
  position: absolute;
  top: -300vh;
  visibility: hidden;
  left: 50%;
  z-index: 11000;
  transform: translate(-50%, -50%);
  background-color: #111111;
}
.overlay.visible iframe{
  top: 50%;
  visibility: visible !important;
}
.overlay{
  position: fixed !important;
  content: "";
  background-color: #000000ee;
  width: 100vw;
  height: 100vh;
  position: absolute;
  visibility: hidden;
  top: -300vw;
  left: 0px;
  z-index: 10000;
}
.overlay.visible{
  top: 0px;
  visibility: visible !important;
}