/*
  Josh's Custom CSS Reset
  https://www.joshwcomeau.com/css/custom-css-reset/
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  padding: 0;
}

/* Global */

:root {
  --theme-color-1: #ff6a14;
  --theme-color-2: #ffffff;
  --theme-color-3: #505050;
  --theme-color-4: #333333;
}

body {
  font-family: "Open Sans", sans-serif;
  background-color: var(--theme-color-4);
  color: var(--theme-color-2);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 30px 0;
  font-family: "Montserrat", sans-serif;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2rem;
  font-weight: 600;
}

p {
  margin: 16px 0;
}

main {
  margin: 0 5%;
}

main > section {
  margin: 50px 0;
}

.inner-section {
  margin: 50px 0;
}

address {
  font-style: normal;
}

/* Header */

header {
  background: linear-gradient(60deg, #29323c 0%, #485563 100%);
  padding: 25px 5%;
  color: var(--theme-color-2);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.header nav {
  background-color: rgb(0 0 0 / 0.1);
  box-shadow: 0 0 10px rgb(255 255 255 / 0.1);
  border-radius: 30px;
  padding: 10px;
  z-index: 1;
  position: absolute;
}

.header ul {
  display: flex;
  flex-direction: column;
  list-style-type: none;
  gap: 20px;
  padding: 0;
  margin: 0;
}

.hamburger {
  cursor: pointer;
  font-size: 24px;
}

@media screen and (max-width:1023px) {
  .header nav {
    top: 120%;
    width: 100%;
    backdrop-filter: blur(10px);
    display: none;
  }

  .header.active nav {
    display: block;
  }

  .highlight {
    display: none;
  }
}

@media screen and (min-width: 1024px) {
  .header nav {
    left: 50%;
    transform: translateX(-50%);
    background-color: rgb(255 255 255 / 0.1);
  }

  .header ul {
    flex-direction: row;
  }

  .hamburger {
    display: none;
  }

  .highlight {
    background-color: var(--theme-color-1);
    transition: all 0.2s ease;
    border-radius: 20px;
    display: block;
  }
}

.header ul li a {
  padding: 10px;
  border-radius: 20px;
  display: block;
  font-weight: 500;
}

.heading-container {
  margin: 50px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.heading-container input {
  padding: 15px 25px 15px 50px;
  color: var(--theme-color-4);
  border-radius: 25px;
  border: none;
  outline: var(--theme-color-1) solid 3px;
  outline-offset: 0px;
  transition: all 0.5s;
}

.heading-container input:focus {
  outline-offset: 5px;
}

.heading-container form {
  position: relative;
  margin-block: 20px;
}

.heading-container form svg {
  position: absolute;
  top:50%;
  transform: translateY(-50%);
  left:15px;
  width: 20px;
  height: 20px;
  fill: var(--theme-color-4);
}

/* Hero */

.hero {
  display: flex;
  align-items: center;
  flex-direction: column;
}

@media screen and (min-width:768px) {
  .hero {
    flex-direction: row;
  }

  .hero > * {
    width: 50%;
  }

  .hero > img {
    order:1;
  }
}

.hero img {
  aspect-ratio: 227 / 200;
  object-fit: cover;
  animation: 2s infinite linear alternate myani;
}

@keyframes myani {
  from {
    transform: translateY(0%);
  }
  to {
    transform: translateY(2%);
  }
}

.hero a {
  padding: 15px;
  border-radius: 25px;
  background-color: var(--theme-color-1);
  font-weight: 500;
  transition: box-shadow 0.2s;
  display: inline-block;
}

.hero a:hover {
  box-shadow: 0px 0px 10px rgb(255 255 255 / 0.25);
}

h1 span {
  background-color: #3eecac;
  background-image: linear-gradient(19deg, #3eecac 0%, #ee74e1 100%);
  background-clip: text;
  color: transparent;
}

.hero p {
  color: #ccc;
}

/* Product Categories */

#product-categories div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media screen and (min-width:768px) {
  #product-categories div {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (min-width:1280px) {
  #product-categories div {
    grid-template-columns: repeat(5, 1fr);
  }
}

#product-categories figure {
  display: grid;
  justify-items: center;
  row-gap: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
}

#product-categories figure img {
  box-shadow: 0px 0px 10px rgb(0 0 0 / 0.2);
  border-radius: 50%;
  padding: 10px;
  transition: all 0.2s ease-in;
  background-color: var(--theme-color-3);
  height: auto;
}

#product-categories figure:hover img {
  box-shadow: 0px 0px 20px 5px rgb(0 0 0 / 0.2);
  padding: 0;
}

#product-categories figure:hover figcaption {
  color: var(--theme-color-1);
}

/* Product Cards */

.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
}

@media screen and (min-width:768px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width:1280px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

.products .product {
  background-color: var(--theme-color-3);
  display: grid;
  justify-items: center;
  border-radius: 15px;
  box-shadow: 0px 0px 10px rgb(0 0 0 / 0.2);
  transition: all 0.2s ease-in;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.products .product:hover {
  box-shadow: 0px 0px 20px 5px rgb(0 0 0 / 0.2);
}

.products .product img, #platinum-series-battery-banner {
  height: auto;
}

.product-link {
  background-color: var(--theme-color-1);
  width: 100%;
  position: absolute;
  bottom: -50px;
  padding-block: 10px;
  text-align: center;
  display: inline-block;
  transition: all 0.3s ease;
}

@media (hover: hover) {
  .products .product:hover .product-link {
    bottom: 0;
  }
}

/* Platinum Battery */

details.battery-list {
  padding: 0 20px;
  margin-block: 20px;
  background-color: var(--theme-color-3);
  border-radius: 10px;
}

details.battery-list[open] {
  padding-bottom: 15px;
}

details.battery-list summary {
  padding: 15px 0;
  cursor: pointer;
}

details.battery-list ul {
  list-style-type: none;
  display: grid;
  grid-template-columns: repeat(2,1fr);
  justify-items: center;
  gap: 10px;
}

@media screen and (min-width:768px) {
  details.battery-list ul {
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
  }
}

/* Footer */

footer {
  background-color: var(--theme-color-3);
  padding: 25px 5%;
  margin-top: 50px;
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
  justify-content: space-between;
}

@media screen and (min-width:768px) and (max-width:1023px) {
  footer {
    grid-template-columns: repeat(2, 1fr);
  }

  footer div:first-child {
    grid-column: 1 / 3;
    justify-self: center;
  }
}

@media screen and (min-width:1024px) {
  footer {
    grid-template-columns: repeat(3, 1fr);
  }
}

footer ul {
  list-style-type: none;
}

footer li {
  margin-bottom: 10px;
}

footer h3 {
  margin-top: 0;
}

footer li a:hover {
  opacity: 0.7;
}

footer img.icon {
  width: 20px;
  height: 20px;
}

footer address .icon-container {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

footer #instagram {
  margin-top: 20px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  background-color: var(--theme-color-1);
  padding: 10px;
  border-radius: 10px;
}

/* Contact us */

.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media screen and (min-width:768px) {
  .contact-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width:1280px) {
  .contact-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-container .contact-info {
    grid-column: 1/2;
  }

  .contact-container .address {
    grid-column: 2/4;
    place-self: center;
  }
}

.contact-container h3 {
  margin-block: 0px -20px;
  font-size: 1.5rem;
}

.contact-container .contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info article {
  background-color: var(--theme-color-3);
  padding: 20px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  gap: 20px;
}

.contact-info img {
  width: 50px;
  height: 50px;
  background-color: var(--theme-color-1);
  padding: 10px;
  border-radius: 50%;
}

.contact-info a {
  text-decoration: underline var(--theme-color-1) 2px;
  text-underline-offset: 10px;
  transition: all 0.2s ease;
}

@media (hover: hover)  {
  .contact-info a:hover {
    text-underline-offset: 13px;
  }
}

.contact-container .address iframe {
  max-width: 100%;
}

/* Product page */

.product-specs, .product-specs td, .product-specs th {
  border: 1px solid var(--theme-color-2);
  border-collapse: collapse;
  padding: 10px;
}

.product-specs th {
  background-color: var(--theme-color-3);
}

@media (hover: hover) {
  .product-specs td:hover {
    background-color: var(--theme-color-1);
  }
}

/* Utility Classes */

.center {
  text-align: center;
}

.underline {
  text-decoration: underline var(--theme-color-1);
  text-underline-offset: 20px;
}

.hidden {
  display: none;
}