/* Geral*/

* {
    margin: 0;
    padding: 0;
    font-family: Verdana;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

/* Navbar*/
header nav {
    background-color: #333;
}

#navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 0.7rem;
    padding: 0 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

#navbar a {
    color: #f5f5f7;
    transition: .4s;
}

#navbar a:hover {
    color: #fff;
}

#bottom-header {
    font-size: 0.8rem;
    padding: 1rem;
    border-bottom: 1px solid #ccc;
}

#bottom-header h3 {
    font-size: 1.2rem;
}

#bottom-header a {
    color: #333;
}

#bottom-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#bottom-header-inner a {
    margin: 0 0.5rem;
}

#bottom-header-inner .btn,
.btn {
    background-color: #0071e3;
    border-radius: 10rem;
    padding: .4rem 1rem;
    color: #fff;
}

/* Conteúdo */
#ribbon {
    text-align: center;
    padding: 1rem;
    background-color: #f5f5f7;
    color: #1d1d1d;
    font-size: 0.8rem;
}

#ribbon a {
    color: #0071e3;
}

#main-content {
    text-align: center;
    color: #1d1d1d;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#main-content #title {
    margin: 1rem;
    font-size: 1.2rem;
}

#main-content #subtitle {
    margin: 1rem;
    font-size: 4rem;
    font-weight: bold;
}

#main-content #description {
    max-width: 600px;
    margin: 1rem auto;
    font-size: 1.1rem;
    line-height: 1.5rem;
}

#main-content #price {
    font-size: 1.3rem;
    color: #86868b;
    margin: 2rem;
}

#main-content .btn {
    font-size: 1.1rem;
    padding: .8rem 1.4rem;
    align-self: center;
}

#main-content #product-image {
    max-width: 1000px;
    margin: 3rem auto;
    opacity: 1;
    transition: .5s;
}

#main-content #product-image.changing {
    opacity: 0.5;
}

#image-picker {
    margin-bottom: 500px;
}

#image-picker ul {
    display: flex;
    justify-content: center;
}

#image-picker li {
    margin: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

#image-picker li .color  {
    width: 2rem;
    height: 2rem;
    border-radius: 50px;
    box-shadow: 1px 1px 1px;
    border: 4px solid #fff;
    pointer-events: none;
}

#image-picker li .description {
    font-size: 0.7rem;
    color: #1d1d1d;
    margin-top: 0.6rem;
}

#green .color {
    background-color: #394c38;
}

#silver .color {
    background-color: #f1f2ed;
}

#golden .color {
    background-color: #fae7cf;
}

#grafite .color {
    background-color: #44524f;
}

#blue .color {
    background-color: #a7c1d9;
}

.selected {
    outline: 2px solid #43a1ff;
}

/* Mobile */

@media(max-width: 480px) {

    #navbar li {
        display: none;
    }

    #navbar #logo {
        display: flex;
    }

    #bottom-header-links a {
        display: none;
    }
    
    #bottom-header-links .btn {
        display: flex;
    }

    #main-content {
        padding: 2rem;
        overflow: hidden;
    }

    #main-content #subtitle {
        font-size: 3rem;
    }
}

/* ===========================
   Tablets (iPad e similares)
   =========================== */
@media (min-width: 481px) and (max-width: 1024px) {

  /* ===== NAVBAR ===== */
  /* Seu UL já é #navbar, então estilizamos direto nele */
  #navbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
    overflow-x: auto;              /* evita quebrar se tiver muitos itens */
    scrollbar-width: none;         /* Firefox */
  }
  #navbar::-webkit-scrollbar { display: none; } /* Chrome */

  /* por padrão, esconda todos e mostre só os primeiros itens */
  #navbar li { display: none; }
  #navbar #logo { display: flex; align-items: center; }
  /* logo (1) + 4 links seguintes (2..5) = até iPhone */
  #navbar li:nth-child(-n+5) { display: flex; }

  #navbar a {
    display: inline-flex;
    align-items: center;
    height: 44px;                  /* área de toque confortável */
    padding: 0 .5rem;
    text-decoration: none;
    white-space: nowrap;
    font-size: .95rem;
  }

  /* ===== BOTTOM HEADER ===== */
  #bottom-header {
    padding: .75rem 1.25rem;
  }

  #bottom-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;               /* quebra linha se faltar espaço */
  }

  #bottom-header-inner h3 {
    margin: 0;
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    line-height: 1.2;
  }

  #bottom-header-links {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
  }

  /* No tablet, mostramos os links e mantemos o botão */
  #bottom-header-links a { display: inline-flex; }
  #bottom-header-links .btn {
    display: inline-flex;
    padding: .6rem .9rem;
    line-height: 1;
    border-radius: 8px;
    font-weight: 600;
  }

  /* ===== RIBBON ===== */
  #ribbon p {
    margin: 0;
    padding: .6rem 1.25rem;
    text-align: center;
    font-size: clamp(.9rem, 1.6vw, 1rem);
  }

  /* ===== MAIN EM DUAS COLUNAS ===== */
  #main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* texto | imagem */
    align-items: center;
    gap: 1.5rem 2rem;
    padding: 2.5rem 1.25rem;
    overflow: visible;
  }

  /* Tipografia fluida no tablet */
  #title {
    grid-column: 1;
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1.15;
    margin: 0;
  }

  #subtitle {
    grid-column: 1;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    line-height: 1.2;
    margin: .25rem 0 .5rem;
  }

  #description {
    grid-column: 1;
    font-size: clamp(1rem, 2vw, 1.05rem);
    line-height: 1.6;
    margin: .5rem 0 1rem;
  }

  #price {
    grid-column: 1;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    margin: 0 0 1rem;
  }

  /* Botão de compra com boa área de toque */
  #main-content .btn {
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .7rem 1.1rem;
    border-radius: 10px;
    font-weight: 600;
  }

  /* Imagem do produto à direita, responsiva */
  #product-image {
    grid-column: 2;
    justify-self: center;
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  /* Seletor de cores abaixo da imagem, alinhado */
  #image-picker {
    grid-column: 2;
    justify-self: center;
    width: 100%;
  }

  #image-picker ul {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
    padding: 0;
    margin: .5rem 0 0;
    list-style: none;
  }

  #image-picker li {
    display: grid;
    gap: .35rem;
    justify-items: center;
  }

  #image-picker .color {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    outline: 1px solid rgba(0,0,0,.08);
  }
  #image-picker .color.selected {
    outline: 2px solid currentColor;
  }

  #image-picker .description {
    font-size: .8rem;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
  }
}
